pgf-tikz / pgf

A Portable Graphic Format for TeX
https://pgf-tikz.github.io/
1.11k stars 106 forks source link

How to compile the “tex” files to generate the documentation pgfmanual.pdf #1191

Closed Dgonn closed 1 year ago

Dgonn commented 1 year ago

Version

No response

Details

I want to compile the “tex” files in .\doc\generic\pgf to generate pgfmanual.pdf. But no matter whicn compiler I used,it always carry out fault。 Is there a course to generate documentation using the files in .\doc

muzimuzhi commented 1 year ago

https://github.com/pgf-tikz/pgf#development contains steps for building a full pgfmanual. The key command is the last line l3build doc -q -H, which uses l3build with pgf's config build.lua. This command will run lualatex and makeindex in correct order and enough times.

Manual steps that act similar to l3build doc -q -H, after applying the patch at the end:

$ cd doc/generic/pgf
$ lualatex pgfmanual.tex # or pgfmanual-test.tex for testing
# run makeindex and then lualatex twice
--- a/doc/generic/pgf/pgfmanual-en-main-preamble.tex
+++ b/doc/generic/pgf/pgfmanual-en-main-preamble.tex
@@ -183,7 +183,7 @@
 % require texlive 2021 or above
 \tracinglostchars=3

-\graphicspath{{../../images/}}
+\graphicspath{{images/}}
 \input{pgfmanual-en-macros}

 \usepackage{todonotes}
Dgonn commented 1 year ago

https://github.com/pgf-tikz/pgf#development contains steps for building a full pgfmanual. The key command is the last line l3build doc -q -H, which uses l3build with pgf's config build.lua. This command will run lualatex and makeindex in correct order and enough times.

Manual steps that act similar to l3build doc -q -H, after applying the patch at the end:

$ cd doc/generic/pgf
$ lualatex pgfmanual.tex # or pgfmanual-test.tex for testing
# run makeindex and then lualatex twice
--- a/doc/generic/pgf/pgfmanual-en-main-preamble.tex
+++ b/doc/generic/pgf/pgfmanual-en-main-preamble.tex
@@ -183,7 +183,7 @@
 % require texlive 2021 or above
 \tracinglostchars=3

-\graphicspath{{../../images/}}
+\graphicspath{{images/}}
 \input{pgfmanual-en-macros}

 \usepackage{todonotes}

I used your method to build it ,but it carrys out

························
Missing character: There is no t (U+0074) in font nullfont!
.
<argument> ...not:N \tex_shipout:D \box_use:N \l_shipout_box 

l.103 

Missing character: There is no o (U+006F) in font nullfont!
.
<argument> ...not:N \tex_shipout:D \box_use:N \l_shipout_box 

l.103 

Missing character: There is no p (U+0070) in font nullfont!
.
<argument> ...not:N \tex_shipout:D \box_use:N \l_shipout_box 

l.103 

(That makes 100 errors; please try again.)
 80236 words of node memory still in use:
   725 hlist, 31 vlist, 65 rule, 350 disc, 90 local_par, 1 dir, 16 math, 2574 g
lue, 456 kern, 545 penalty, 5233 glyph, 1255 attribute, 68 glue_spec, 1255 attr
ibute_list, 1 temp, 4 if_stack, 22 write, 628 pdf_literal, 28 pdf_start_link, 2
8 pdf_end_link, 17 pdf_dest, 15 pdf_action, 446 pdf_colorstack, 8 pdf_setmatrix
, 8 pdf_save, 8 pdf_restore nodes
   avail lists: 1:85,2:41851,3:33597,4:1406,5:3022,6:241,7:16573,8:317,9:5679,1
0:51,11:560,12:23
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on pgfmanual.log.
 ! Compilation failed
muzimuzhi commented 1 year ago

Have you applied step export TEXMFHOME=`realpath -f <path/to/pgf>`?

Or you may need to execute git switch --detach <tag> in which <tag> is kept in line with your local pgf installed by some LaTeX distribution. For example, run git switch --detach 3.1.8b if you have the latest pgf v3.1.8b installed.

Dgonn commented 1 year ago

sorry,I bypass the step。I compile the pgfmanual-test.tex ,it works well. It seems that there are no much difference between pgfmanual-test.tex with pgfmanual.tex except some input files。

Dgonn commented 1 year ago

Have you applied step export TEXMFHOME=`realpath -f <path/to/pgf>`?

Or you may need to execute git switch --detach <tag> in which <tag> is kept in line with your local pgf installed by some LaTeX distribution. For example, run git switch --detach 3.1.8b if you have the latest pgf v3.1.8b installed.

I get the key! We can compile the documentation using lualatex pgfmanual.tex,and Ignore ”warning“ ang ”Missing character“ manually throughout the process.

hmenke commented 1 year ago

This sounds like it is solved. I'll close this for now.