On Thu, 2020-05-14 at 12:01 +0200, Ondřej Lysoněk wrote:
> Jean Delvare <[email protected]> writes:
> > Agreed. What about:
> > 
> > From: Jean Delvare <[email protected]>
> > Subject: doc/quilt.pdf: Document the build process
> > 
> > Document the list of latex packages that must be installed in order
> > to build the PDF documentation.
> > 
> > Suggested by Ondřej Lysoněk.
> > 
> > Signed-off-by: Jean Delvare <[email protected]>
> > ---
> >  doc/Makefile |    7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > --- a/doc/Makefile
> > +++ b/doc/Makefile
> > @@ -1,3 +1,10 @@
> > +# In order to build the PDF documentation, you need the following packages
> > +# to be installed:
> > +#
> > +# texlive-latex texlive-subfigure texlive-metafont texlive-mfware
> > +# texlive-cyrillic texlive-collection-langcyrillic texlive-cmap
> > +# texlive-cm-super
> > +
> >  all : quilt.pdf quilt-rus.pdf
> >  
> >  quilt.ps : quilt.dvi
> 
> Excellent, thanks!
> 
> Another suggestion for the documentation build I have would be to run
> 'pdflatex --jobname=quilt -t letter $<' twice. Latex seems to require
> two passes in order to generate section references.
> 
> If I run from the doc/ directory 'git clean -dfx' and 'make clean' and then
> 'make quilt.pdf', then section references such as "The location of patch
> files (see Section 3)." don't get generated properly.

Correct :( Thanks for pointing it out, I never noticed.

> But it seems to have worked for you today, so I don't know. I'm not
> really familiar with Latex.

Most likely I was lucky and it worked because I did not clean this
directory in a long time and I still had the .aux files from a previous
run. If I do "make clean" in the doc directory and then "make" again,
the cross references are indeed not solved properly (which,
surprisingly enough, results in a *larger* PDF file, go figure).

I am also not familiar with Latex at all. I can think of 2 workarounds,
first is to duplicate the pdflatex command for each pdf target. The
second is to add the .aux file as an explicit dependency to generate
the .pdf file. Ideally we would need a pdflatex option to generate the
.aux file only, or an option to do the reference resolution as a second
pass of the same command. It *seems* that option --draftmode may
actually do the former. So something like that may work:

From: Jean Delvare <[email protected]>
Subject: doc/quilt.pdf: Fix cross-references
---
 doc/Makefile |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

--- a/doc/Makefile
+++ b/doc/Makefile
@@ -10,7 +10,10 @@ all : quilt.pdf quilt-rus.pdf
 quilt.ps : quilt.dvi
        dvips -t letter -o $@ $<
 
-quilt.pdf: main.tex
+quilt.aux: main.tex
+       pdflatex --draftmode --jobname=quilt -t letter $<
+
+quilt.pdf: main.tex quilt.aux
        pdflatex --jobname=quilt -t letter $<
 
 quilt.dvi : main.tex
@@ -20,7 +23,10 @@ quilt.dvi : main.tex
 quilt-rus.ps : quilt-rus.dvi
        dvips -t letter -o $@ $<
 
-quilt-rus.pdf: main-rus.tex
+quilt-rus.aux: main-rus.tex
+       pdflatex --draftmode --jobname=quilt-rus -t letter $<
+
+quilt-rus.pdf: main-rus.tex quilt-rus.aux
        pdflatex --jobname=quilt-rus -t letter $<
 
 quilt-rus.dvi : main-rus.tex

Unfortunately I don't know how portable that is. Does it work for you?

-- 
Jean Delvare
SUSE L3 Support

_______________________________________________
Quilt-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/quilt-dev

Reply via email to