Commit e08ba3f1 authored by Richard Berger's avatar Richard Berger
Browse files

Merge branch 'master' into library_interface_update

parents 2013b7ed 1d928409
Loading
Loading
Loading
Loading
+3 −20
Original line number Diff line number Diff line
@@ -9,9 +9,7 @@ if(BUILD_DOC)

  set(VIRTUALENV ${PYTHON_EXECUTABLE} -m virtualenv)

  file(GLOB DOC_SOURCES ${LAMMPS_DOC_DIR}/src/[^.]*.txt)
  file(GLOB PDF_EXTRA_SOURCES ${LAMMPS_DOC_DIR}/src/lammps_commands*.txt ${LAMMPS_DOC_DIR}/src/lammps_support.txt ${LAMMPS_DOC_DIR}/src/lammps_tutorials.txt)
  list(REMOVE_ITEM DOC_SOURCES ${PDF_EXTRA_SOURCES})
  file(GLOB DOC_SOURCES ${LAMMPS_DOC_DIR}/src/[^.]*.rst)

  add_custom_command(
    OUTPUT docenv
@@ -28,25 +26,10 @@ if(BUILD_DOC)
    COMMAND ${DOCENV_BINARY_DIR}/pip install --upgrade ${LAMMPS_DOC_DIR}/utils/converters
  )

  set(RST_FILES "")
  set(RST_DIR ${CMAKE_BINARY_DIR}/rst)
  file(MAKE_DIRECTORY ${RST_DIR})
  foreach(TXT_FILE ${DOC_SOURCES})
    get_filename_component(FILENAME ${TXT_FILE} NAME_WE)
    set(RST_FILE ${RST_DIR}/${FILENAME}.rst)
    list(APPEND RST_FILES ${RST_FILE})
    add_custom_command(
      OUTPUT ${RST_FILE}
      DEPENDS requirements.txt docenv ${TXT_FILE}
      COMMAND ${DOCENV_BINARY_DIR}/txt2rst -o ${RST_DIR} ${TXT_FILE}
    )
  endforeach()

  add_custom_command(
    OUTPUT html
    DEPENDS ${RST_FILES}
    COMMAND ${CMAKE_COMMAND} -E copy_directory ${LAMMPS_DOC_DIR}/src ${RST_DIR}
    COMMAND ${DOCENV_BINARY_DIR}/sphinx-build -j ${NPROCS} -b html -c ${LAMMPS_DOC_DIR}/utils/sphinx-config -d ${CMAKE_BINARY_DIR}/doctrees ${RST_DIR} html
    DEPENDS ${DOC_SOURCES} docenv requirements.txt
    COMMAND ${DOCENV_BINARY_DIR}/sphinx-build -j ${NPROCS} -b html -c ${LAMMPS_DOC_DIR}/utils/sphinx-config -d ${CMAKE_BINARY_DIR}/doctrees ${LAMMPS_DOC_DIR}/src html
  )

  add_custom_target(
+25 −18
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ sub-directories and optionally 2 PDF files and an ePUB file:

src             content files for LAMMPS documentation
html            HTML version of the LAMMPS manual (see html/Manual.html)
tools           tools and settings for building the documentation
utils           utilities and settings for building the documentation
Manual.pdf      large PDF version of entire manual
Developer.pdf   small PDF with info about how LAMMPS is structured
LAMMPS.epub     Manual in ePUB format
@@ -25,17 +25,12 @@ the fetched documentation will include those changes (but your source
code will not, unless you update your local repository).

(b) You can build the HTML and PDF files yourself, by typing "make
html" followed by "make pdf".  Note that the PDF make requires the
HTML files already exist.  This requires various tools including
Sphinx, which the build process will attempt to download and install
on your system, if not already available.  See more details below.

(c) You can genererate an older, simpler, less-fancy style of HTML
documentation by typing "make old".  This will create an "old"
directory.  This can be useful if (b) does not work on your box for
some reason, or you want to quickly view the HTML version of a doc
page you have created or edited yourself within the src directory.
E.g. if you are planning to submit a new feature to LAMMPS.
html" or by "make pdf", respectively.  This requires various tools
including the Python documentation processing tool Sphinx, which the
build process will attempt to download and install on your system into
a python virtual environment, if not already available.  The PDF file
will require a working LaTeX installation with several add-on packages
in addition to the Python/Sphinx setup.  See more details below.

----------------

@@ -46,8 +41,7 @@ Options:

make html         # generate HTML in html dir using Sphinx
make pdf          # generate 2 PDF files (Manual.pdf,Developer.pdf)
                  #   in this dir via htmldoc and pdflatex
make old          # generate old-style HTML pages in old dir via txt2html
                  #   in this dir via Sphinx and PDFLaTeX
make fetch        # fetch HTML doc pages and 2 PDF files from web site
                  #   as a tarball and unpack into html dir and 2 PDFs
make epub         # generate LAMMPS.epub in ePUB format using Sphinx
@@ -94,8 +88,17 @@ This will install virtualenv from the Python Package Index.

Installing prerequisites for PDF build

[TBA]

Same as for HTML plus a compatible LaTeX installation with
support for PDFLaTeX. Also the following LaTeX packages need
to be installed (e.g. from texlive):
- amsmath
- babel
- cmap
- fncychap
- geometry
- hyperref
- hypcap
- times
----------------

Installing prerequisites for epub build
@@ -103,7 +106,11 @@ Installing prerequisites for epub build
## ePUB

Same as for HTML. This uses the same tools and configuration
files as the HTML tree.
files as the HTML tree. The ePUB format conversion currently
does not support processing mathematical expressions via MathJAX,
so there will be limitations on some pages. For the time being
until this is resolved, building and using the PDF format file
is recommended instead.

For converting the generated ePUB file to a mobi format file
(for e-book readers like Kindle, that cannot read ePUB), you
+1 −1
Original line number Diff line number Diff line
.TH LAMMPS "30 October 2019" "2019-10-30"
.TH LAMMPS "20 November 2019" "2019-11-20"
.SH NAME
.B LAMMPS
\- Molecular Dynamics Simulator.
+3 −2
Original line number Diff line number Diff line
Eqs
JPG
/Eqs
/JPG
/false_positives.txt
+0 −5
Original line number Diff line number Diff line
@@ -27,8 +27,3 @@ commands in it are used to define a LAMMPS simulation.
   :maxdepth: 1

   Commands_removed


.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html
Loading