From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "B. T. Raven" Newsgroups: gmane.emacs.help Subject: Re: latex emacs config for viewing pdf without auctex Date: Sat, 04 Apr 2009 23:14:42 -0600 Message-ID: References: <334306.69525.qm@web28215.mail.ukl.yahoo.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1238906558 26304 80.91.229.12 (5 Apr 2009 04:42:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 5 Apr 2009 04:42:38 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Apr 05 06:43:57 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LqKD4-00051z-Ka for geh-help-gnu-emacs@m.gmane.org; Sun, 05 Apr 2009 06:43:54 +0200 Original-Received: from localhost ([127.0.0.1]:54339 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LqKBg-0002yZ-Bq for geh-help-gnu-emacs@m.gmane.org; Sun, 05 Apr 2009 00:42:28 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!backlog2.nntp.dca.giganews.com!nntp.sysmatrix.net!news.sysmatrix.net.POSTED!not-for-mail Original-NNTP-Posting-Date: Sat, 04 Apr 2009 23:13:06 -0500 User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) Original-Newsgroups: gnu.emacs.help In-Reply-To: Original-Lines: 56 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 12.73.132.94 Original-X-Trace: sv3-myK2PMmffG10mQaBJRcQM5wTmJHrwNPniMSCuCBRFRKbq0tMMKB8xSuid/iT5Bz0pwumeHXx8MSIW2h!c+pxJXvwZMdFbY7RYb2SB/Ch966eho29pXj9+yeKq6drqjt2bIUlJ5Mt+J3qGcFIVl6RPp2sDN0P!giwCNURz75p5c5t9VVBfCFAduHNqAw== Original-X-Complaints-To: abuse@sysmatrix.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39 X-Original-Bytes: 3264 Original-Xref: news.stanford.edu gnu.emacs.help:168201 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:63483 Archived-At: Sven Bretfeld wrote: > Fdfdfd Fdfdfd writes: > >> I've searching for a long time but didn't find out how to bind the >> key sequence C-c C-v >> with adobe acrobat pdf reader (C-c C-c launches pdflatex) instead of >> the default dvi viewer. >> >> So the question is what do I need to put in my .emacs file to do the >> job ? > > It's a little more complex than a simple keybinding. Launch the > following command: > > M-x customize-variable RET TeX-output-view-style RET > > In the block starting with the line: > > INS DEL Extension: ^pdf$ > > replace the value of the Command-line with: > > acroread %o > > That's the command for starting Acrobat Reader under Linux. If you are > under Windows or Mac the command might be different, I don't know. > > Anyway, you don't have to hit C-c C-v to view your output. C-c C-c > automatically suggests to start the viewer if you haven't changed your > tex-file after the last LaTeX run. All you ever need is C-c C-c. You can > toggle between creating a dvi or a pdf output (i.e. a latex run or a > pdflatex run) by hitting C-c C-t C-p. The view-style will also change > automatically. > > Hope it helps > > Sven In the w32 Emacs build (using auctex) the last two lines of this variable are: ("^pdf$" "." "xpdf -remote %s -raise %o %(outpage)") ("^html?$" "." "netscape %o")) I changed the pdf line in Customize to read "start acrord32 %o" and this raises Adobe Reader (8.0) if it's not running, and loads it with the .pdf corresponding to the current .tex file, or if Adobe is running it just opens the new .pdf. However, if a former version of the pdf is already loaded then running C-c C-c trys to rebuild the .pdf and causes a sharing violation. Is there someway to close that old .pdf in Adobe Reader from Emacs? Btw, changing netscape to firefox in the above causes an html file in Emacs to be loaded into Firefox on C-c C-v Ed