| 1 |
 |
| 2 |
|
| 3 |
# Abstract |
| 4 |
|
| 5 |
`nodetree` is a development package that visualizes the structure of |
| 6 |
node lists. `nodetree` shows its debug informations in the consoles’ |
| 7 |
output when you compile a LuaTeX file. It uses a similar visual |
| 8 |
representation for node lists as the UNIX `tree` command uses for a |
| 9 |
folder structure. |
| 10 |
|
| 11 |
Node lists are the main building blocks of each document generated by |
| 12 |
the TeX engine LuaTeX. The package `nodetree` doesn‘t change |
| 13 |
the rendered document. The tree view can only be seen when using a |
| 14 |
terminal to generate the document. |
| 15 |
|
| 16 |
`nodetree` is inspired by a |
| 17 |
[gist from Patrick Gundlach](https://gist.github.com/pgundlach/556247). |
| 18 |
|
| 19 |
# License |
| 20 |
|
| 21 |
Copyright (C) 2016-2025 by Josef Friedrich <[email protected]> |
| 22 |
------------------------------------------------------------------------ |
| 23 |
This work may be distributed and/or modified under the conditions of |
| 24 |
the LaTeX Project Public License, either version 1.3c of this license |
| 25 |
or (at your option) any later version. The latest version of this |
| 26 |
license is in: |
| 27 |
|
| 28 |
http://www.latex-project.org/lppl.txt |
| 29 |
|
| 30 |
and version 1.3c or later is part of all distributions of LaTeX |
| 31 |
version 2008/05/04 or later. |
| 32 |
|
| 33 |
# CTAN |
| 34 |
|
| 35 |
Since July 2016 the nodetree package is included in the Comprehensive TeX |
| 36 |
Archive Network (CTAN). |
| 37 |
|
| 38 |
* TeX archive: http://mirror.ctan.org/macros/luatex/generic/nodetree |
| 39 |
* Package page: http://www.ctan.org/pkg/nodetree |
| 40 |
|
| 41 |
# Repository |
| 42 |
|
| 43 |
https://github.com/Josef-Friedrich/nodetree |
| 44 |
|
| 45 |
# Installation |
| 46 |
|
| 47 |
Get source: |
| 48 |
|
| 49 |
git clone [email protected]:Josef-Friedrich/nodetree.git |
| 50 |
cd nodetree |
| 51 |
|
| 52 |
Compile: |
| 53 |
|
| 54 |
make |
| 55 |
|
| 56 |
or manually: |
| 57 |
|
| 58 |
luatex nodetree.ins |
| 59 |
lualatex nodetree.dtx |
| 60 |
makeindex -s gglo.ist -o nodetree.gls nodetree.glo |
| 61 |
makeindex -s gind.ist -o nodetree.ind nodetree.idx |
| 62 |
lualatex nodetree.dtx |
| 63 |
|
| 64 |
# Examples |
| 65 |
|
| 66 |
## The node list of the package name |
| 67 |
|
| 68 |
```latex |
| 69 |
\documentclass{article} |
| 70 |
\usepackage{nodetree} |
| 71 |
\begin{document} |
| 72 |
nodetree |
| 73 |
\end{document} |
| 74 |
``` |
| 75 |
|
| 76 |
 |
| 77 |
|
| 78 |
## The node list of a mathematical formula |
| 79 |
|
| 80 |
```latex |
| 81 |
\documentclass{article} |
| 82 |
\usepackage[callback={mhlist}]{nodetree} |
| 83 |
\begin{document} |
| 84 |
\[\left(a\right)\left[\frac{b}{a}\right]=a\,\] |
| 85 |
\end{document} |
| 86 |
``` |
| 87 |
|
| 88 |
 |
| 89 |
|
| 90 |
## The node list of the word 'Office' |
| 91 |
|
| 92 |
The characters 'ffi' are deeply nested in a discretionary node. |
| 93 |
|
| 94 |
```latex |
| 95 |
\documentclass{article} |
| 96 |
\usepackage{nodetree} |
| 97 |
\begin{document} |
| 98 |
Office |
| 99 |
\end{document} |
| 100 |
``` |
| 101 |
|
| 102 |
 |
| 103 |
|
| 104 |
# Development |
| 105 |
|
| 106 |
First delete the stable version installed by TeX Live. Because the |
| 107 |
package `nodetree` belongs to the collection `collection-latexextra`, the |
| 108 |
option `--force` must be used to delete the package. |
| 109 |
|
| 110 |
tlmgr remove --force nodetree |
| 111 |
|
| 112 |
## Deploying a new version |
| 113 |
|
| 114 |
Update the version number in the file `nodetree.dtx` on this locations: |
| 115 |
|
| 116 |
### In the markup for the file `nodetree.sty` (approximately at the line number 30) |
| 117 |
|
| 118 |
%<*package> |
| 119 |
[2016/07/18 v1.2 Visualize node lists in a tree view] |
| 120 |
%<*package> |
| 121 |
|
| 122 |
### In the markup for the file `nodetree-embed.sty` (approximately at the line number 220) |
| 123 |
|
| 124 |
%<*package> |
| 125 |
[2016/07/18 v1.2 Visualize node lists in a tree view] |
| 126 |
%<*package> |
| 127 |
|
| 128 |
### In the markup for the package documentation (approximately at the line number 50) |
| 129 |
|
| 130 |
Add a changes entry: |
| 131 |
|
| 132 |
```latex |
| 133 |
\changes{v1.2}{2020/05/20}{...} |
| 134 |
``` |
| 135 |
|
| 136 |
### In documentation (documentation.tex) (approximately at the line number 70) |
| 137 |
|
| 138 |
```latex |
| 139 |
\date{v2.0 from 2020/05/29} |
| 140 |
``` |
| 141 |
|
| 142 |
### In the file `nodetree.lua` (approximately at the line number 20) |
| 143 |
|
| 144 |
```lua |
| 145 |
if not modules then modules = { } end modules ['nodetree'] = { |
| 146 |
version = '1.2' |
| 147 |
} |
| 148 |
``` |
| 149 |
|
| 150 |
### Update the copyright year: |
| 151 |
|
| 152 |
``` |
| 153 |
sed -i 's/(C) 2016-2025/(C) 2016-2021/g' nodetree.ins |
| 154 |
sed -i 's/(C) 2016-2025/(C) 2016-2021/g' nodetree.dtx |
| 155 |
``` |
| 156 |
|
| 157 |
### Command line tasks: |
| 158 |
|
| 159 |
``` |
| 160 |
git tag -a v1.4 |
| 161 |
make |
| 162 |
make ctan |
| 163 |
``` |