lkmpg icon indicating copy to clipboard operation
lkmpg copied to clipboard

Modular LaTeX Documents.

Open Hsins opened this issue 4 years ago • 3 comments

As the work grows, the *.tex file can become unwieldy and confusing, especially we're writing a full-length book. It's the good practice to split the file into several files.

LaTeX makes this very easy with the commands \input{filename} and \include{filename}. A template for the modular latex document can be set up as follows structure:

.
├── back
│   ├── appendix-*.tex
│   ├── references.bib
│   └── ...
├── contents
│   ├── chapter-*.tex
│   └── ...
├── figures
│   ├── chapter-*
│   │   ├── *.[png/jpg/pdf]
│   │   └── ...
│   └── ...
├── main.tex
├── README.md
├── [style.tex]
├── [template.cls]
├── ...
├── LICENSE
├── Makefile
└── README.md

References

Hsins avatar Jul 31 '21 16:07 Hsins

I've split the files following the structure above and connect it with Overleaf here (only connected to my forked repo). If @jserv has no problem with it then I'll commit and make a pull request for this.

Besides, why do you use the documentclass book but use \section{} instead of \chapter{}? Is there any concern?

Hsins avatar Aug 01 '21 16:08 Hsins

Besides, why do you use the documentclass book but use \section{} insteaf of \chapter{}? Is there any concern?

The TeX script was converted from Org mode for Emacs, and you can figure out some kludge.

jserv avatar Aug 01 '21 17:08 jserv

Due to historical reasons, LKMPG was poor at its documentation organization. That is, the sections/chapters were tattered from the perspective of a complete programming guide. Before the modularization, it would be better if we can revise the existing materials and amalgamate parts of the sections. Recently, I have been preparing.

jserv avatar Aug 01 '21 17:08 jserv