Web lists-archives.com

Re: is xdvi broken?

On Mon 22 Apr 2019 at 08:06:01 (+0000), rlharris@xxxxxxxxxx wrote:
> On 2019.04.22 06:51, Bill Wood wrote:
> > Is there a reason not to use pdflatex?  My workflow then is
> > = In emacs, save the doc foo.tex
> > = switch to a virtual terminal
> > = execute "pdflatex foo.tex" (as many times as needed)
> Why would it be necessary to execute pdflatex more than once?

If you don't check for the re-run message at the end of your final
run (LateX book p128), then a second run should rectify any
cross-references that have moved (unless you have a pathological
document that flipflops across two pages). In general, you need to
ascertain that the contents of the .aux file is completely up-to-date
before the final run.

> > = execute "evince foo.pdf"
> > = when desired, select "Print" from the "File options" menu of evince
> > = switch back to emacs
> But to print from evince requires that I take my hand off the
> keyboard and reach for the rodent in order to print.

My workflow does not involve a mouse at all.
(Very few of my workflows do.)

Iteration 1:
    emacs filename.tex
    Win¹-Right (to next viewport)
    pdfl² filename
    xpdf filename.pdf
    Win-Left Win-Left

Subsequent iterations:
    more edits
    Up Return (repeats pdfl command from commandline's history)
    Win-Left Win-Left

To print a copy (from the middle viewport):
    Up .pdf Home Space p8500 ESC-d Return
which will edit "pdfl filename" into " p8500³ filename.pdf" and
execute it without polluting the commandline's history.

¹ Win is left of Alt.
² pdfl is a bash function that checks pathname.tex exists, generates
  pathname.pdf, runs lualatex in pathname.tex's directory with
  -halt-on-error -synctex=1, moves the .log file into my "trash
  directory" under /tmp, and moves .aux too if its contents are
  solely \relax .
³ p8500 is a bash function that prints a file on the portrait queue
  (as opposed to l8500 for landscape).

I've ignored the fourth viewport that I use for occasional detailed
layout work, and which displays a temporary rendition of a page from
some previous iteration, so I can do A-B-A-B comparison (as I
described in an earlier post). It's far quicker than having to make
ephemeral PDF copies for preserving the earlier rendition.

> Kindly forgive my lack of perception, but I do not see why it is
> advantageous to introduce into my work routine a PDF file and a PDF
> viewer such as evince.

It's always difficult to keep up with changes in programs that you
don't use, but I think it's still true to say that latex can only
include graphics in EPS format.

OTOH pdflatex and lualatex handle PNGs, JPEGs and PDFs. That nicely
covers diagrams, images and documents (the latter recursively).
So you only need one set of tools for each of these formats.
I do all my document post-processing with scripts/functions invoking
programs like pdftk and pdfjam, all operating on PDFs.