sysprog21 / lkmpg

The Linux Kernel Module Programming Guide (updated for 5.0+ kernels)
https://sysprog21.github.io/lkmpg/
Open Software License 3.0
7.64k stars 518 forks source link

Modular LaTeX Documents. #26

Open Hsins opened 3 years ago

Hsins commented 3 years ago

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 commented 3 years ago

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?

jserv commented 3 years ago

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 commented 3 years ago

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.