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