diff --git a/doc/.gitignore b/doc/.gitignore index b20157057c..88679898a8 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -1,3 +1,4 @@ +/old /html /latex /spelling diff --git a/doc/Makefile b/doc/Makefile index d117c2d98c..044e358bd5 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -39,7 +39,7 @@ help: @echo "Please use \`make ' where is one of" @echo " html create HTML doc pages in html dir" @echo " pdf create Developer.pdf and Manual.pdf in this dir" - @echo " old create old-style HTML doc pages in old dir" + @echo " old create old-style HTML doc pages and Manual.pdf in old dir" @echo " fetch fetch HTML and PDF files from LAMMPS web site" @echo " epub create ePUB format manual for e-book readers" @echo " mobi convert ePUB to MOBI format manual for e-book readers (e.g. Kindle)" @@ -56,7 +56,7 @@ clean-all: clean rm -rf $(BUILDDIR)/* utils/txt2html/txt2html.exe clean: - rm -rf $(RSTDIR) html old epub + rm -rf $(RSTDIR) html old epub latex rm -rf spelling clean-spelling: @@ -115,21 +115,44 @@ mobi: epub @ebook-convert LAMMPS.epub LAMMPS.mobi @echo "Conversion finished. The MOBI manual file is created." -pdf: utils/txt2html/txt2html.exe +pdf: $(OBJECTS) $(ANCHORCHECK) + @(\ + . $(VENV)/bin/activate ;\ + cp -r src/* $(RSTDIR)/ ;\ + sphinx-build $(SPHINXEXTRA) -b latex -c utils/sphinx-config -d $(BUILDDIR)/doctrees $(RSTDIR) latex ;\ + echo "############################################" ;\ + doc_anchor_check src/*.txt ;\ + echo "############################################" ;\ + deactivate ;\ + ) + @cd latex && \ + sed 's/latexmk -pdf -dvi- -ps-/pdflatex/g' Makefile > temp && \ + mv temp Makefile && \ + sed 's/\\begin{equation}//g' LAMMPS.tex > tmp.tex && \ + mv tmp.tex LAMMPS.tex && \ + sed 's/\\end{equation}//g' LAMMPS.tex > tmp.tex && \ + mv tmp.tex LAMMPS.tex && \ + make && \ + make && \ + mv LAMMPS.pdf ../Manual.pdf && \ + cd ../; @(\ - set -e; \ cd src/Developer; \ pdflatex developer; \ pdflatex developer; \ mv developer.pdf ../../Developer.pdf; \ - cd ..; \ - ../utils/txt2html/txt2html.exe -b *.txt; \ - htmldoc --batch lammps.book; \ - for s in `echo *.txt | sed -e 's/ \(pairs\|bonds\|angles\|dihedrals\|impropers\|commands_list\|fixes\|computes\).txt/ /g' | sed -e 's,\.txt,\.html,g'` ; \ - do grep -q ^$$s lammps.book || \ - echo WARNING: doc file $$s missing in src/lammps.book; done; \ - rm *.html; \ + cd ../../; \ ) + @rm -rf latex/_sources + @rm -rf latex/PDF + @rm -rf latex/USER + @cp -r src/PDF latex/PDF + @cp -r src/USER latex/USER + @rm -rf latex/PDF/.[sg]* + @rm -rf latex/USER/.[sg]* + @rm -rf latex/USER/*/.[sg]* + @rm -rf latex/USER/*/*.[sg]* + @echo "Build finished. Manual.pdf and Developer.pdf are in this directory." old: utils/txt2html/txt2html.exe @rm -rf old @@ -139,6 +162,18 @@ old: utils/txt2html/txt2html.exe cp Eqs/*.jpg ../old/Eqs; \ cp JPG/* ../old/JPG; \ cp PDF/* ../old/PDF; + @( set -e;\ + cd src/Developer; \ + pdflatex developer; \ + pdflatex developer; \ + mv developer.pdf ../../old/Developer.pdf; \ + cd ../../old; \ + for s in `echo ../src/*.txt | sed -e 's,\.\./src/,,g' -e 's/ \(pairs\|bonds\|angles\|dihedrals\|impropers\|commands_list\|fixes\|computes\).txt/ /g' | sed -e 's,\.txt,\.html,g'` ; \ + do grep -q ^$$s ../src/lammps.book || \ + echo WARNING: doc file $$s missing in src/lammps.book; done; \ + htmldoc --batch ../src/lammps.book; \ + ) + fetch: @rm -rf html_www Manual_www.pdf Developer_www.pdf diff --git a/doc/src/JPG/coul_soft.jpg b/doc/src/JPG/coul_soft.jpg index d2cc4c0c9a..618d23b306 100644 Binary files a/doc/src/JPG/coul_soft.jpg and b/doc/src/JPG/coul_soft.jpg differ diff --git a/doc/src/JPG/lj_soft.jpg b/doc/src/JPG/lj_soft.jpg index 47c6a04b91..98404f857d 100644 Binary files a/doc/src/JPG/lj_soft.jpg and b/doc/src/JPG/lj_soft.jpg differ diff --git a/doc/src/JPG/uef_frames.jpg b/doc/src/JPG/uef_frames.jpg index 3b3bfc3a24..933c3e2925 100644 Binary files a/doc/src/JPG/uef_frames.jpg and b/doc/src/JPG/uef_frames.jpg differ diff --git a/doc/src/lammps.book b/doc/src/lammps.book index 02a55e3810..4c24719870 100644 --- a/doc/src/lammps.book +++ b/doc/src/lammps.book @@ -1,5 +1,5 @@ #HTMLDOC 1.8.28 --t pdf14 -f "../Manual.pdf" --book --toclevels 4 --no-numbered --toctitle "Table of Contents" --title --textcolor #000000 --linkcolor #0000ff --linkstyle plain --bodycolor #ffffff --size Universal --left 1.00in --right 0.50in --top 0.50in --bottom 0.50in --header .t. --header1 ... --footer ..1 --nup 1 --tocheader .t. --tocfooter ..i --portrait --color --no-pscommands --no-xrxcomments --compression=9 --jpeg=0 --fontsize 11.0 --fontspacing 1.2 --headingfont Sans --bodyfont Serif --headfootsize 11.0 --headfootfont Sans-Bold --charset iso-8859-15 --links --embedfonts --pagemode document --pagelayout single --firstpage c1 --pageeffect none --pageduration 10 --effectduration 1.0 --no-encryption --permissions all --owner-password "" --user-password "" --browserwidth 680 --no-strict --no-overflow +-t pdf14 -f "Manual.pdf" --book --toclevels 4 --no-numbered --toctitle "Table of Contents" --title --textcolor #000000 --linkcolor #0000ff --linkstyle plain --bodycolor #ffffff --size Universal --left 1.00in --right 0.50in --top 0.50in --bottom 0.50in --header .t. --header1 ... --footer ..1 --nup 1 --tocheader .t. --tocfooter ..i --portrait --color --no-pscommands --no-xrxcomments --compression=9 --jpeg=0 --fontsize 11.0 --fontspacing 1.2 --headingfont Sans --bodyfont Serif --headfootsize 11.0 --headfootfont Sans-Bold --charset iso-8859-15 --links --embedfonts --pagemode document --pagelayout single --firstpage c1 --pageeffect none --pageduration 10 --effectduration 1.0 --no-encryption --permissions all --owner-password "" --user-password "" --browserwidth 680 --no-strict --no-overflow Manual.html Intro.html Intro_overview.html diff --git a/doc/utils/sphinx-config/conf.py b/doc/utils/sphinx-config/conf.py index 8a8b887a5e..29de3af156 100644 --- a/doc/utils/sphinx-config/conf.py +++ b/doc/utils/sphinx-config/conf.py @@ -211,7 +211,9 @@ latex_elements = { #'pointsize': '10pt', # Additional stuff for the LaTeX preamble. -#'preamble': '', +'preamble': r''' +\setcounter{tocdepth}{2} +''' } # Grouping the document tree into LaTeX files. List of tuples @@ -229,7 +231,7 @@ latex_documents = [ # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. #latex_use_parts = False - +latex_toplevel_sectioning = 'part' # If true, show page references after internal links. #latex_show_pagerefs = False