I used to use
%&pdftemasclases
and other pre-dumped formated as usual in LaTeX but Cmd-R in TextMate doesn't seems to recognize it.
Another good thing it should do could be to retypeset it until no warnings and rebuild bibtex... etc.
On Feb 4, 2007, at 9:56 AM, Juan wrote:
I used to use
%&pdftemasclases
and other pre-dumped formated as usual in LaTeX but Cmd-R in TextMate doesn't seems to recognize it.
I have no idea what you mean here, and never seen %&pdftemasclases before. Could you elaborate?
Another good thing it should do could be to retypeset it until no warnings and rebuild bibtex... etc.
Bundles -> Latex -> Help. Look at section 2.2 about Using latexmk.pl
Haris
El 04/02/2007, a las 16:38, Charilaos Skiadas escribió:
On Feb 4, 2007, at 9:56 AM, Juan wrote:
I used to use
%&pdftemasclases
and other pre-dumped formated as usual in LaTeX but Cmd-R in TextMate doesn't seems to recognize it.
I have no idea what you mean here, and never seen %&pdftemasclases before. Could you elaborate?
Thanks Charilaos
probably you have never used dumped preformated nor perhaps LaTeX at all. This could justify that you didnt' never seen any first line like that
%&format
as you can see, %& are the initial characters. They must be at the first line and since many years (OzTeX and previous) did hep to change formats and avoid complex usepackages at the start of your latex sources
TeXShop, OzTeX and many others recognize that "format" like the format.fmt file it must use in
pdflatex -format format source.tex
Another good thing it should do could be to retypeset it until no warnings and rebuild bibtex... etc.
Bundles -> Latex -> Help. Look at section 2.2 about Using latexmk.pl
If you typeset for first time a source.tex, there are no aux, log, etc, files there and it is very easy to recognize that situations and then retypeset one or two times more until all the Table of Contents were correctly updated
Thanks again.
On Feb 4, 2007, at 4:21 PM, Juan wrote:
Thanks Charilaos
probably you have never used dumped preformated nor perhaps LaTeX at all.
I am actually one of the maintainers of the LaTeX bundle, and using LaTeX for more than 7 years now on a daily basis. But I have never had the need to learn about .fmt files at all. Also, a google search for "dumped preformated" or even "latex dumped preformated" does not really return any meaningful results, so are you sure you are using the right terminology? The LaTeX Companion doesn't seem to have much info on these fmt files either. So I doubt this is something that an average LaTeX user sees in front of them. (Probably because most of them are happy with latex.fmt or whatever the default one is.)
You are right though that i have never used dumped preformated, whatever they are. Anyway, moving on,
This could justify that you didnt' never seen any first line like that %&format as you can see, %& are the initial characters. They must be at the first line and since many years (OzTeX and previous) did hep to change formats and avoid complex usepackages at the start of your latex sources
TeXShop, OzTeX and many others recognize that "format" like the format.fmt file it must use in
pdflatex -format format source.tex
We should be able to make this change easily, I'll try to find some time this week to fix this on the subversion version of the bundle.
Another good thing it should do could be to retypeset it until no warnings and rebuild bibtex... etc.
Bundles -> Latex -> Help. Look at section 2.2 about Using latexmk.pl
If you typeset for first time a source.tex, there are no aux, log, etc, files there and it is very easy to recognize that situations and then retypeset one or two times more until all the Table of Contents were correctly updated
But most of the times you are already typesetting a document you have typeset before, so the absence of such files is not a very good indicator that a recompile is needed, especially if things like TOC don't need to be created. In any case, my point is that by telling TextMate to use latexmk.pl as per the instructions in the help file, it will compile the required number of times as you want.
And of course, you can always provide for it your very own script to do the compiling as you want it.
Thanks again.
Haris
El 04/02/2007, a las 22:42, Charilaos Skiadas escribió:
On Feb 4, 2007, at 4:21 PM, Juan wrote:
Thanks Charilaos
probably you have never used dumped preformated nor perhaps LaTeX at all.
I am actually one of the maintainers of the LaTeX bundle, and using LaTeX for more than 7 years now on a daily basis. But I have never had the need to learn about .fmt files at all. Also, a google search for "dumped preformated" or even "latex dumped preformated" does not really return any meaningful results, so are you sure you are using the right terminology? The LaTeX Companion doesn't seem to have much info on these fmt files either. So I doubt this is something that an average LaTeX user sees in front of them. (Probably because most of them are happy with latex.fmt or whatever the default one is.)
You are right though that i have never used dumped preformated, whatever they are. Anyway, moving on,
Ok, Charilaos
dumping precompiled tex is a very old and useful technique you should try. You only need to bundle all the styles and headers you used to use for making some kind of LaTeX document and after that usepackages.. put
\dump
then you will be asked for the name of the format.fmt file. Put that file in the usual tex searched paths and vuala! you can use it in
pdflatex -f format.fmt source.tex
saving you not only many processor cycles but making your every day documents shorter and cleaner
%&format % Author: me %...
\begin{document}
\end{document}
this came from the very first times of tex and is of course used by TeXShop, OzTex, and my terminal Tcl scripts ;)
This could justify that you didnt' never seen any first line like that %&format as you can see, %& are the initial characters. They must be at the first line and since many years (OzTeX and previous) did hep to change formats and avoid complex usepackages at the start of your latex sources
TeXShop, OzTeX and many others recognize that "format" like the format.fmt file it must use in
pdflatex -format format source.tex
We should be able to make this change easily, I'll try to find some time this week to fix this on the subversion version of the bundle.
Another good thing it should do could be to retypeset it until no warnings and rebuild bibtex... etc.
Bundles -> Latex -> Help. Look at section 2.2 about Using latexmk.pl
If you typeset for first time a source.tex, there are no aux, log, etc, files there and it is very easy to recognize that situations and then retypeset one or two times more until all the Table of Contents were correctly updated
But most of the times you are already typesetting a document you have typeset before, so the absence of such files is not a very good indicator that a recompile is needed, especially if things like TOC don't need to be created. In any case, my point is that by telling TextMate to use latexmk.pl as per the instructions in the help file, it will compile the required number of times as you want.
And of course, you can always provide for it your very own script to do the compiling as you want it.
You are wright, not every latex doc need to produce .toc files and then it is more difficult to discover that. You need to make a first typesetting, if no previous .aux and now is there one a second one will be necessary, and if no previous .toc file and one now appears, a third one will be necessary. In the meanwhile, you also will need to watch .bbl files from bibtex that should be run if some .bbl appears, etc.
On Feb 4, 2007, at 7:40 PM, Juan wrote:
dumping precompiled tex is a very old and useful technique you should try. You only need to bundle all the styles and headers you used to use for making some kind of LaTeX document and after that usepackages.. put
\dump
then you will be asked for the name of the format.fmt file. Put that file in the usual tex searched paths and vuala! you can use it in
pdflatex -f format.fmt source.tex
saving you not only many processor cycles but making your every day documents shorter and cleaner
Of course this means that if you want to send your files to someone else, you need to send them your .fmt file as well, unless you change the files. Is there a way to recover the source that the .fmt file was created from, or do you need to keep it around, and know what is in it in some other way?
It's a good idea, though not one I am likely to use any time soon personally. processor cycles are relatively cheap these days and it's hard to break old habits. Plus, I change my preambles all the time ;)
But most of the times you are already typesetting a document you have typeset before, so the absence of such files is not a very good indicator that a recompile is needed, especially if things like TOC don't need to be created. In any case, my point is that by telling TextMate to use latexmk.pl as per the instructions in the help file, it will compile the required number of times as you want.
And of course, you can always provide for it your very own script to do the compiling as you want it.
You are right, not every latex doc need to produce .toc files and then it is more difficult to discover that. You need to make a first typesetting, if no previous .aux and now is there one a second one will be necessary, and if no previous .toc file and one now appears, a third one will be necessary. In the meanwhile, you also will need to watch .bbl files from bibtex that should be run if some .bbl appears, etc.
Even if there is an .aux file, it might very well be out of date etc. There is a way to figure out what is going on, and latexmk.pl does exactly that as I've already mentioned. It does exactly the kind of work you have described, and compiles the right number of times. So if you want TM to do these multiple latex invocations, just tell it to use latexmk.pl and it will work just fine. This functionality is already there.
Haris
On Feb 4, 2007, at 16:57, Charilaos Skiadas wrote:
On Feb 4, 2007, at 7:40 PM, Juan wrote:
dumping precompiled tex is a very old and useful technique you should try. You only need to bundle all the styles and headers you used to use for making some kind of LaTeX document and after that usepackages.. put
\dump
then you will be asked for the name of the format.fmt file. Put that file in the usual tex searched paths and vuala! you can use it in
pdflatex -f format.fmt source.tex
saving you not only many processor cycles but making your every day documents shorter and cleaner
Of course this means that if you want to send your files to someone else, you need to send them your .fmt file as well, unless you change the files. Is there a way to recover the source that the .fmt file was created from, or do you need to keep it around, and know what is in it in some other way?
It's a good idea, though not one I am likely to use any time soon personally. processor cycles are relatively cheap these days and it's hard to break old habits. Plus, I change my preambles all the time ;)
There was a recent discussion on the Mac OS X TeX list about the fragility of this. Here's another note from the past <http://www.tug.org/pipermail/macostex-archives/2005-February/013634.html
.
Also, the %&format in the first line of a file is generally disabled, unless you've manually set parse_first_line = t in texmf.cnf or pass - parse-first-line to pdftex. This has been discussed numerous times on the Mac OS X TeX list.
-- Adam
El 05/02/2007, a las 2:16, Adam R. Maxwell escribió:
It's a good idea, though not one I am likely to use any time soon personally. processor cycles are relatively cheap these days and it's hard to break old habits. Plus, I change my preambles all the time ;)
There was a recent discussion on the Mac OS X TeX list about the fragility of this. Here's another note from the past <http:// www.tug.org/pipermail/macostex-archives/2005-February/013634.html>.
Also, the %&format in the first line of a file is generally disabled, unless you've manually set parse_first_line = t in texmf.cnf or pass -parse-first-line to pdftex. This has been discussed numerous times on the Mac OS X TeX list.
Ok
thanks a lot, I didn't know nothing about "-parse-first-line" as option for pdftex, thanks!!
but I don't agree with the "dangerous and then never use" % &formats... I can assure you that it is very time consuming and a good way of organizing your docs. I have several .fmts for my every day work. Of course you never must put \dump after \begin{document}, where all those auxiliary files will be created. You usually want to put \dump and make your format.fmt file before \begin{document} and after those milliard of styles and options you need.
I
El 05/02/2007, a las 1:57, Charilaos Skiadas escribió:
Even if there is an .aux file, it might very well be out of date etc. There is a way to figure out what is going on, and latexmk.pl does exactly that as I've already mentioned. It does exactly the kind of work you have described, and compiles the right number of times. So if you want TM to do these multiple latex invocations, just tell it to use latexmk.pl and it will work just fine. This functionality is already there.
Thanks Charilaos for this information. I am absolutely novice (and so equally admirer of TM!).
I have make a new command (Cmd-Shift-R) with a simplify script:
# Source some support functions we need. . "${TM_SUPPORT_PATH}/lib/html.sh" . "${TM_SUPPORT_PATH}/lib/webpreview.sh"
# Get the viewer program. Any program (that works with open -a <name>) can be used, # except 'html' which is reserved to mean the internal HTML window. This is also the # default option. V=${TM_LATEX_VIEWER:-html} V="PDFView" EL=${TM_LATEX_ERRLVL:-1} M=${TM_LATEX_MASTER:-$TM_FILEPATH} DIR=`dirname "$M"` FILE=`basename "$M"` PDF="${FILE%.*}.pdf"
latexmk.pl "$FILE" 2>&1 | latexErrWarnHtml.py -v RC=$? if [ -s "${PDF}" -a "$PDF" -nt "$FILE" ]; then open -a PDFView "$PDF" else strong "Error: PDF file not written to disk" fi html_footer
and place that magic from Adam R. Maxwell
Also, the %&format in the first line of a file is generally disabled, unless you've manually set parse_first_line = t in texmf.cnf or pass -parse-first-line to pdftex. This has been discussed numerous times on the Mac OS X TeX list.
directly in /usr/local/gwTeX/texmf.cnf
all works fine now!!
I miss many things from AlphaX ("my editor") like an analyze of the .log at the end of typesetting with links to source lines with errors...
Another think I miss are FileSets (I don't know how to add menus to TM, in particular, menus with set of files from directories, etc, I used to use etc...) But this is another question
Thanks