uwe_lueck
>
texmap
>
makeshow
Change and show PDF with TeX “immediately,” and link I/O
[ LaTeX “make”
| speed
| reload DVI
| reload PDF
| editor-previewer synchronization
]
This page addresses approaching WYSIWYG with TeX
plus some “ordinary TeX previewer”
by smart reprocessing of TeX’s output files
(of text/.txt/ASCII type).
Aspects of this include
placing the editor cursor automatically at the code line
that generated a certain passage in the screen preview
of the document
(“editor-previewer synchronization”).
This page owes a lot to James Quirk, Jim Diamond, Tom Schneider,
and Martin Sievers.
- Running TeX
(the typesetting engine)
once on the main source typically does not suffice.
Another TeX run (or still another) may be needed, maybe
preceded by running BibTeX and/or makeindex etc.
- Approaches
at doing this automatically are discussed
in the UK TeX FAQ, reminding of the general
make utility.
- AutoLaTeX
– “automate generation of large scale LaTeX projects,”
set of Make and Perl scripts,
- latex-make
(new on CTAN 2009/09/30, documentation 2008/01/28;
Debian
“sid”,
Debian
“lenny”;
“several tools”),
- latexmake
– “LaTeX Makefile”
(last update 2001, E. McLean, D.J. Musliner, & Tong Sun),
- latexmk
(last update 2012-11-11, J. Collins after E. McLean & D.J. Musliner,
cf. obsolete LatexMk
by E. McLean after D.J. Musliner’s
go),
- mk – “Make for LaTeX,”
Ruby script — ? in 2015, it is a Bash script
with caption “a TeX and LaTeX maker”
(CTAN-location support/latex_maker),
- texi2dvi from texinfo,
and texify from MiKTeX
are mentioned.
- Moreover, there is the atchange
program.
Actually, the latter
page
seems to be a much more
comprehensive attempt at covering the task of the present page,
and even at a much more general task.
The page has a
section on LaTeX,
entitled
“LaTeX with Atchange: A Typesetting WYSIWYG!”.
(Also search the
texhax archive
for ‘atchange’).
- latexn
(a C Shell script)
seems to be another LaTeX-make not mentioned in the UK FAQ.
- prv was similar, while declared obsolete by its
author now, referring to his mk
(mentioned above) and vpp.
- What about rake4latex, as
compared to mk?
- And what about shlatex?
- arara automates TeX using source file content,
new 2013-02-05.
- LaTeXDaemon
for Windows
is another tool not on CTAN doing such things,
additionally aiming at
speed
(recommended by
Martin Heller on texhax).
- On
xpt.sourceforge.net
(not on CTAN, cf.
“Sun Tong’s old_home”
and his latexmake above),
there is
LatexMake,
with a report on
similar tools:
- some
“big Makefile” by some
Stefan van den Oort
- that obsolete LatexMk
by E. McLean mentioned above
- LaTeX-Mk on
latex-mk.sourceforge.net
(v2.0 as of April 5, 2010, D. McMahill)
- Rubber
(home
| ManPage —
stack...
comparisons)
- Lars Marowski-Brée has some
LaTeX-Make
on his site.
- Philipp Lehman’s logreq seemingly supporting
such things is new on CTAN 2010/08/05.
- Claudio Beccari’s imakeidx
seems to save you from rerunning for indexes.
- According to
Torsten Wagner’s texhax posting
2010/09/14,
some “editors” provide a similar
functionality—sometimes failing. (It had a little
mistake, see confession.)
- Speed:
For speeding-up compilation, (part of)
the LaTeX preamble (loading packages/macros)
may be moved into the format:[Martin Sievers 2010/05/04]
-
LaTeXDaemon for Windows
-
mylatex |
mylatexformat
-
AUCTeX/preview-latex
(CTAN infos)
which also provides quick preview to
tables, formulas, and graphics.
- DVI reload:
Having rerun “TeX completely”
in a way alluded to previously, you just need to move to the
“DVI preview” window now, which may show
YAP
or
xdvi
nowadays. Usually, this shows exactly the result of your most
recent code change.
I am not sure in the case of changing a macro definition
… actually, it seems that the DVI just is
reloaded
to the same page (and position) as before.
- PDF reload:
The same feature with PDF (replacing DVI)
may be less easy to obtain. This,
or
“how to get a PDF to reload to the same page when the file changes”
,
has been addressed on the
texhax
mailing list starting with Tom Schneider’s
controlling pdf reader
(Apr 18, 2010).
-
James Quirk
answered
alluding to another project of his interesting here,
as well as pointing out that Linux
Adobe Acrobat 9.x (AR9)
has a reload feature with key short-cut
Ctrl-R
.
-
I mentioned
the PDF reload feature from Alexander Grahn’s
acroreloadpdf for Linux
(a JavaScript adding a “Reload” item to the
“Files” menu of AR8, cf. below).
As
James answered,
there had been a discussion about acroreloadpdf
(addressing a shortcoming) on the
pdftex
mailing list. It started there with
Alexander Grahn
(Jan 22, 2009)
who added that it will not work with Windows.
-
According to
James
(Apr 18, 2010), AR has another problem with
Mac OS X.
According to
David Romano
(on texhax) however,
Skim
for Mac OS X has the reload feature and even allows
“pdfsync”
(with Aquamacs).—Tom Schneider added
a
script for Skim;
and
here
is something relevant on
MacVim.
-
According to
John Culleton
(Jan 22, 2009 on the pdftex list),
KPDF for KDE
(even Windows—cross-platform!)
possesses the same “reload” feature.
He there explains how to use it with the
Gvim editor.
-
According to
Ahmed El-Mahmoudy
(next message on pdftex list)
Evince for GNOME
is another PDF (and others) viewer
with that “reload” functionality.
- According to Wikipedia, Sumatra PDF has the same feature.
- Mysteriously, xpdfopen for
the X Window System,
(now) dealing with the reloading feature of AR9, was updated on
Apr 19, 2010.
The same day,
latexmk (see above) was updated.
xpdfopen’s author, Jim Diamond,
now
has reported that it makes AR5, AR7, AR8, AR9, and xpdf
reload automagically.
- James Quirk points at
another discussion of reloading
where he and others have posted solutions
and according to which the reload feature
(to the same page) has been present
with AR just apart from AR8.
- A “poor man’s” solution using
hyperref’s
pdfstartpage
option
has been discussed in a
German newsgroup.
-
As some upshot, it seems (to me) that
the “reload” feature of PDF viewers is becoming
standard on UNIX-like systems right these days.
Even on Windows it can be achieved with KPDF
(xpdfopen?).
TODO: find out for all PDF Readers according to the
Wikipedia category
– moreover
VTeX …
-
Reworking needed:
OK, the previous list needs to be made more concise.
And I missed a distinction Tom made somewhere:
The viewer should not just reload with a key combination,
but automatically when a source file/the
PDF file changed
(again the DVI viewers
YAP and xdvi have
shown this “automatic reload” feature
for some longer time).
- Editor-Previewer Synchronization:
The
iTeXMac-pdfsync page
explains the notion of editor-previewer synchronization
(for the case of PDF previewers):
-
“[…] helps you finding what part of the output corresponds to what line of the source file, […]”
-
“[…] and conversely what line of the source file corresponds to a location of a given page in the output.”
(The page says that 2007 is “now” while locating
last revision in 2004.)
This “converse” feature needs support implementation in the
editor (the named page lists some of this kind).
The Xdvi(k) SourceForge page describes the latter feature
as inverse (or also “reverse”) search,
the former one as forward search (also called
“direct search”), and names editors
like AUCTeX supporting inverse search as well.
- For DVI output, besides Xdvi also the
YAP
supports inverse search, cf.
TeXlips
as well.
-
Stefan Ulrich’s srcltx package
(going back to Aleksander Simonic, the author of WinEdt)
supports the feature with DVI.
-
Jérôme Laurens’ LaTeX package
pdfsync implements the feature with
pdfTeX
and
XeTeX,
explained on a
SourceForge page.
-
Heiko Oberdiek’s vpe
package implements the feature for pdfTeX,
VTeX,
and generating PDF from DVI
via the dvips driver.
- Regarding the same VTeX, the
iTeXMac-pdfsync page
reports that it has the “pdfsync” feature.
-
SyncTeX
is a another synchronization method by the author
of pdfsync.
(synctex-parser is the C code of
a parser for SyncTeX output.)
-
In his
2007 PracTeX paper,
Jérôme Laurens describes three synchronization
methods for generating PDF with TeX,
including pdfsync and TeXShop’s method,
and argues that TeX’s architecture is fundamentally unable
to attain better WYSIWYG functionality. In his
2008 TUGboat paper,
he desribes SyncTeX and gives a more general historical overview
of synchronization techniques.
- The
Wikipedia article on inverse search
may give a more general picture …
Please report corrections, amendments,
and suggestions to uwe “dot” lueck “at” web “dot” de!
Last revised 2015-09-24 © Uwe Lück
[→ top of page ]