unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Peter Dyballa <Peter_Dyballa@Web.DE>
To: brendan.halpin@ul.ie
Cc: help-gnu-emacs@gnu.org
Subject: Re: Auctex&Beamer recognising pdftex mode automatically
Date: Fri, 11 May 2007 11:32:13 +0200	[thread overview]
Message-ID: <F8E2AE49-C6CB-49DD-BD8E-13BF4E84E614@Web.DE> (raw)
In-Reply-To: <87wszgxr6e.fsf@wivenhoe.staff8.ul.ie>


Am 11.05.2007 um 00:14 schrieb Brendan Halpin:

> I've been looking for a way to get Emacs/AucTeX to recognise that a
> paticular latex file should be processed by pdflatex, and was
> delighted to stumble on the fact that \usepackage[pdftex]{graphicx}
> or \documentclass[pdftex]{...} was enough.
>
> But it doesn't seem to work for Beamer files, i.e.
> \documentclass[pdftex]{beamer} still gets put in LaTeX-mode. Is
> this an oddity of beamer.cls?

In a modern TeX installation latex is a sym-link, for example to  
pdftex, which itself is actually pdfetex. So latex produces PDF  
directly.

You can make AUCTeX prefer pdfTeX by adding this customisation(s,  
enabling micro-typography for DVI output, too):

	 '(TeX-PDF-mode t)
	; '(TeX-DVI-via-PDFTeX t)

The third option is to add a file local variable:

	%%% TeX-command-default: "pdfelatex"

which needs to de defined as a TeX command in AUCTeX.


IMO it is not recommended to restrict TeX packages to some mode  
(pdftex, dvips, ...), except you use a package of which you exactly  
know that it is not able to determine whether (x)dvipdfm(x) or dvips  
or something else will process the DVI output. Not using such a  
restrictive options the LaTeX source is free to be compiled by any  
TeX version to PDF, DVI, or whatever. It can be useful to have a  
construct like this in the file's preamble:

	\usepackage{ifpdf}
	\ifpdf
	   \immediate\write16{\jobname: Bonjour, PDF !}
	   \usepackage{cmap}
	   \usepackage[pdftex]{graphicx}
	%   \DeclareGraphicsExtensions{.png,.gif,.tif,.jpeg}
	   \usepackage[activate={true,nocompatibility}]{microtype}
	\else		% for non-pdfTeX
	   \immediate\write16{¡Hola \jobname: DVI!}
	%   \DeclareGraphicsExtensions{.eps,.ps}
	   \usepackage[dvips]{graphicx}
	   \usepackage[protrusion=true,expansion=false]{microtype}
	\fi


--
Greetings

   Pete

The human brain operates at only 10% of its capacity. The rest is  
overhead for the operating system.

  parent reply	other threads:[~2007-05-11  9:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-10 22:14 Auctex&Beamer recognising pdftex mode automatically Brendan Halpin
2007-05-10 23:18 ` Lars Madsen
2007-05-10 23:48 ` Amy Templeton
2007-05-11  5:45 ` Ulrich M. Schwarz
2007-05-11  6:00   ` Ralf Angeli
2007-05-11  9:32 ` Peter Dyballa [this message]
     [not found] ` <mailman.506.1178841043.32220.help-gnu-emacs@gnu.org>
2007-05-11 15:35   ` Brendan Halpin
     [not found] ` <mailman.514.1178876409.32220.help-gnu-emacs@gnu.org>
2007-05-11 18:08   ` Ralf Angeli
2007-05-12 21:10 ` Stephen Eglen
2007-05-12 21:25   ` Ralf Angeli
2007-05-13 12:58     ` Michele Dondi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F8E2AE49-C6CB-49DD-BD8E-13BF4E84E614@Web.DE \
    --to=peter_dyballa@web.de \
    --cc=brendan.halpin@ul.ie \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).