-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo-write-single.tex
127 lines (115 loc) · 3.33 KB
/
demo-write-single.tex
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
% A demo that produces a single, complete .tex file.
% This file:
% http://angg.twu.net/dednat6/demo-write-single.tex.html
% http://angg.twu.net/dednat6/demo-write-single.tex
% (find-dednat6 "demo-write-single.tex")
% See: http://angg.twu.net/dednat6.html#no-lua
% Version: 2019aug20.
%
%
% This is a modification of demo-write-dnt.tex that replaces the
%
% %L write_dnt_file()
%
% near the end of the file by these two lines:
%
% %L write_dnt_file()
% %L write_single_tex_file("demo-write-single-sngf.tex")
%
% The "write_dnt_file()" writes the contents of the global variable
% dnt_log to the file "demo-write-single.dnt"; the
%
% write_single_tex_file("demo-write-single-sngf.tex")
%
% creates a file that is a copy of demo-write-single.tex with the line
%
% \input\jobname.dnt
%
% replaced by the contents of the global variable dnt_log.
%
%
% Some emacs/eev-isms. You don't need to understand this.
% See: (find-eev-quick-intro "7.4. Commands with very short names")
% http://angg.twu.net/eev-intros/find-eev-quick-intro.html#7.4
% (defun c () (interactive) (find-dednat6sh "lualatex -record demo-write-single.tex"))
% (defun c () (interactive) (find-dednat6sh "pdflatex demo-write-single.tex"))
% (defun c () (interactive) (find-dednat6sh "pdflatex demo-write-single-sngf.tex"))
% (defun d () (interactive) (find-pdf-page "~/dednat6/demo-write-single.pdf"))
% (defun d () (interactive) (find-pdf-page "~/dednat6/demo-write-single-sngf.pdf"))
% (defun e () (interactive) (find-dednat6 "demo-write-single.tex"))
% (defun e () (interactive) (find-dednat6 "demo-write-single-sngf.tex"))
% (defun u () (interactive) (find-latex-upload-links "demo-write-single"))
% (find-pdf-page "~/dednat6/demo-write-single.pdf")
% http://angg.twu.net/dednat6/demo-write-single.pdf
%
%
\documentclass[oneside]{book}
\usepackage{ifluatex}
\usepackage{proof} % For derivation trees ("%:" lines)
\input diagxy % For 2D diagrams ("%D" lines)
\xyoption{curve} % For the ".curve=" feature in 2D diagrams
\begin{document}
\ifluatex
\catcode`\^^J=10
\directlua{dofile "dednat6load.lua"}
\else
\input\jobname.dnt
\def\pu{}
\fi
A tree:
%
%L addabbrevs("->", "\\to ")
%
%: [a]^1 a->b
%: -----------
%: b b->c
%: ------------
%: c
%: ----1
%: a->c
%:
%: ^comp
%:
\pu
$$\ded{comp}$$
\def\catA{\mathbf{A}}
\def\catB{\mathbf{B}}
A diagram:
%
%D diagram adj
%D 2Dx 100 +25
%D 2D 100 LA <--| A
%D 2D | |
%D 2D | <-> |
%D 2D v v
%D 2D +25 B |--> RB
%D 2D
%D 2D +15 \catB \catA
%D 2D
%D (( LA A <-|
%D LA B -> A RB ->
%D B RB |->
%D LA RB harrownodes nil 20 nil <->
%D \catB \catA <- sl^ .plabel= a L
%D \catB \catA -> sl_ .plabel= b R
%D ))
%D enddiagram
%D
$$\pu
\diag{adj}
$$
% More eev-isms, for tests in the author's machine.
% You are not expected to understand this.
% (find-angg "LATEX/dednat6/output.lua" "write_single_dnt_file")
% (find-tkdiff "~/LATEX/dednat6/output.lua" "~/dednat6/dednat6/output.lua")
% (find-tkdiff> "~/LATEX/dednat6/output.lua" "~/dednat6/dednat6/output.lua")
% (find-sh "cd /tmp/ && pdflatex foo.tex")
% (find-fline "/tmp/" "foo.tex")
% (find-pdf-page "/tmp/foo.pdf")
%L write_dnt_file()
%L write_single_tex_file("demo-write-single-sngf.tex")
\pu
\end{document}
% Local Variables:
% coding: utf-8-unix
% End: