yochju / latex-makefile

Automatically exported from code.google.com/p/latex-makefile
Other
0 stars 0 forks source link

No support for precompiling the preamble #105

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When the first line of a tex document states:
%&[preamble out dir]/preamble

The preamble should be precompiled with something like:
pdflatex -interaction=nonstopmode -output-directory=[preamble out dir] -ini 
-output-format=pdf "&latex [preamble dir]/preamble.tex\dump"

The [preamble dir] might be specified in line 2 like this:
% \input{[preamble dir]/preamble}
, but otherwise it should ask or get it via input.

Original issue reported on code.google.com by ber...@gmail.com on 17 Dec 2010 at 3:07

GoogleCodeExporter commented 9 years ago
Do you have a pointer to some documentation on this feature?  I have never 
heard of it before, and I want to get it right if I do add support for it.

Original comment by shiblon on 20 Dec 2010 at 6:10

GoogleCodeExporter commented 9 years ago
Once I get some information, I'll look further into this.  I have never heard 
of the %&[preamble out dir] syntax.  So, I await any pointers you may have to 
relevant documentation.

Original comment by shiblon on 4 Jan 2011 at 4:01

GoogleCodeExporter commented 9 years ago
OK, I have found some more information.  This is called a "format" file, and is 
a feature of latex that I have never seen before.  It looks like if you do

%&name

Then run latex with the -ini parameter, it builds name.fmt, which is then 
included.

So, initial thoughts are that we would have to make a dynamic dependency in the 
.d file based on what is found after %& (no spaces).  That would cause us to 
build the appropriate .fmt file if needed, and then the input would work file, 
theoretically.

I need to look at this in more detail, but for now I'll wait for you to confirm 
that this is, in fact, how it works.

Original comment by shiblon on 4 Jan 2011 at 4:07

GoogleCodeExporter commented 9 years ago
http://magic.aladdin.cs.cmu.edu/2007/11/02/precompiled-preamble-for-latex/

This has some good info, but not enough to put it into the makefile.  I'll have 
to spend some time with this feature to see what it does to various files 
(especially .aux and .fmt files)

Original comment by shiblon on 4 Jan 2011 at 4:12

GoogleCodeExporter commented 9 years ago
Sorry for the late answer. So far I am unable to find more documentation to it 
as well, but your comment 3 sounds very descriptive for my use. The closest 
I've gotten is http://man.he.net/man1/pdflatex

Original comment by ber...@gmail.com on 2 Feb 2011 at 11:44

GoogleCodeExporter commented 9 years ago
Wow, this really languished in my inbox for a while.  My apologies.

Give the attached a whirl and let me know how it works for you.

Original comment by shib...@google.com on 22 Apr 2011 at 3:44

Attachments:

GoogleCodeExporter commented 9 years ago
The revision with diffs in it is r4f885d794e29.

Original comment by shiblon on 22 Apr 2011 at 3:45

GoogleCodeExporter commented 9 years ago
Hello

I'm in the end of my thesis work right now, so I havn't tested this yet.
When I get to it, should I then test with the version you link to here, or just 
take the newest from the download page?

Original comment by ber...@gmail.com on 20 May 2011 at 9:17

GoogleCodeExporter commented 9 years ago
Either way should be fine :-)

Original comment by shiblon on 23 May 2011 at 3:07