Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

My latex logs begin with

 %&-line parsing enabled

What does it mean?

share|improve this question
1  
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. –  Jubobs Apr 22 at 12:10
1  
What do you find missing? A minimal working example? (any attempt generates this log message) Or perhaps my question is just too short? –  Bach Apr 22 at 12:15
1  
Don't be alarmed. Your question is fine. That message is just our way of welcoming a new user (see this). –  Jubobs Apr 22 at 12:17
10  
@Jubobs although the fact that you need to explain that implies that it's an unnecessarily negative opening comment I think. The text block ought to be changed (if it is going to be used). –  David Carlisle Apr 22 at 12:37

2 Answers 2

up vote 18 down vote accepted

Some TeX engines (e.g. based on Web2C) have the feature that the format file can also be specified in the first line of the document, e.g.:

%&pdflatex
\documentclass{article}
\begin{document}
Hello World
\end{document}

This specifies the format pdflatex.fmt for the engine pdftex. The engine still needs to be specified, e.g. pdftex, pdflatex, latex, but the format is taken from the first line of the document. Thus the document above can also be compiled with

pdftex test

or

latex test

In both cases the LaTeX format is used and PDF is generated.

From the manual page of TeX:

-parse-first-line
If the first line of the main input file begins with %& parse it to look for a dump name or a -translate-file option.

-no-parse-first-line
Disable parsing of the first line of the main input file.

share|improve this answer

%& parsing is an option which allows one to indicate which TeX variant a particular file requires, e.g., %& eplain

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.