LuaLaTeX
我正在寻找(或)编译过程的流程图pdfLaTeX
。该图表应包括使用 的额外调用的软件包(如hyperref
、等) 。此外,我还使用词汇表、参考书目和索引功能。varioref
lualatex.exe
更普遍的问题是:我什么时候必须调用哪个程序(TeX、xindy、makeglossarie 等)来获取包含所有定义函数的 pdf。
答案1
这是我有待进一步改进的代码。
\documentclass[border=2pt]{standalone}
% additional packages
\usepackage{amsmath, ifluatex, tikz}
\ifluatex
\usepackage{fontspec % Spezifikation Zeichensatz
, lualatex-math % Fixes for mathematics related LuaLATEX issues
}
\fi
% \input{../Font.tex}
% additional TikZ libraries
\usetikzlibrary{positioning}
% define lengths
\newlength{\lenDist}
\begin{document}
\begin{tikzpicture}[align=center, draw=black, scale=1]
% add styles
\tikzset{styRectDef/.style = {rectangle, rounded corners, draw=black, inner xsep=6mm, inner ysep=3mm}}
\tikzset{styRectOne/.style = {styRectDef, draw=green, fill=green!20}}
\tikzset{styRectTwo/.style = {styRectDef, draw=cyan, fill=cyan!40}}
\tikzset{styConn/.style = {very thick, ->, -latex, shorten <=1mm, shorten >=1mm}}
% set radius
\setlength{\lenDist}{2cm}
% nodes
\node [styRectOne] (nlatex1) {1. Lua\LaTeX};
\node [styRectTwo, right=\lenDist of nlatex1] (nindex) {2b. Index\\(Texindy)};
\node [styRectTwo, above=of nindex] (nbiber) {2a. Bibliography\\(Biber)};
\node [styRectTwo, below=of nindex] (nglossary) {2c. Glossary\\(MakeGlossaries)};
\node [styRectOne, right=\lenDist of nindex] (nlatex2) {3. Lua\LaTeX};
\node [styRectOne, right=\lenDist of nlatex2] (nlatex3) {4. Lua\LaTeX};
% connections
\draw[styConn, bend left] (nlatex1) to (nbiber);
\draw[styConn] (nbiber) to (nindex);
\draw[styConn] (nindex) to (nglossary);
\draw[styConn, bend right] (nglossary) to (nlatex2);
\draw[styConn] (nlatex2) to (nlatex3);
\end{tikzpicture}
\end{document}
答案2
以下是通用 TeX 编译过程的流程图示例 - 它并未具体解决该问题的细节,但可能会为进一步的开发提供一些想法(这是我已经有的东西,因此分享它并不需要花费太多精力)。绘图代码(当然)是 Metapost,但我已使用该luamplib
包将其嵌入到 LuaLateX 文档中。
代码
\documentclass[margin=5mm]{standalone}
\usepackage{fontspec}
\setmainfont{TeX Gyre Pagella}
\setmonofont{Monaco}
\usepackage{luamplib}
\begin{document}
\begin{mplibcode}
vardef mac_window(expr s,t) = image(
fill unitsquare xscaled s yscaled 0.618s withcolor white;
fill unitsquare xscaled s yscaled 1/25 s shifted (0,0.618s) withcolor 0.784 white;
draw unitsquare xscaled s yscaled 0.658 s withpen pencircle scaled 0.2;
fill fullcircle scaled 1/50 s shifted (1/40s, 0.638s) withcolor (233/255, 66/255, 63/255);
fill fullcircle scaled 1/50 s shifted (5/80s, 0.638s) withcolor (255/255, 233/255, 125/255);
fill fullcircle scaled 1/50 s shifted (4/40s, 0.638s) withcolor (180/255, 240/255, 140/255);
draw fullcircle scaled 1/50 s shifted (1/40s, 0.638s) withpen pencircle scaled .1;
draw fullcircle scaled 1/50 s shifted (5/80s, 0.638s) withpen pencircle scaled .1;
draw fullcircle scaled 1/50 s shifted (4/40s, 0.638s) withpen pencircle scaled .1;
label(t,(1/2s, 0.309s));
) enddef;
vardef paper_file(expr s, t) = image(
save p, ear, r; r=0.21;
path p; p = (origin -- right -- (1,1.414-r) -- (1-r,1.414)
-- (0,1.414) -- cycle) scaled s;
path ear;
ear = point 2 of p -- point 3 of p -- (xpart point 3 of p, ypart point 2 of p) -- cycle;
fill p withcolor white;
fill ear withcolor .9 white;
draw p; draw ear;
label(t,center p);
) enddef;
vardef process(expr s, t) = image(
save p; path p; p = unitsquare shifted -(1/2,1/2) xscaled s yscaled 0.618 s;
fill p withcolor white - 1/4 blue;
draw p; label(t, center p);
) enddef;
def connecting(expr p, q) = center p -- center q cutbefore bbox p cutafter bbox q enddef;
beginfig(1);
fill unitsquare yscaled 9cm xscaled 14cm shifted (-1cm,-1/2cm) withcolor (241/255, 241/255, 231/255);
picture vim, skim, tex, pdf, aux, log, inputs, comp;
vim = mac_window(3cm, btex VIM etex);
skim = mac_window(3cm, btex Skim etex) shifted (8cm * right);
tex = paper_file(2cm, btex \TeX etex) shifted (.5cm,4cm);
pdf = paper_file(2cm, btex PDF etex) shifted (8.5cm,4cm);
log = paper_file(9mm, btex .log etex) shifted (11cm, 6.5cm);
aux = paper_file(9mm, btex .aux etex) shifted (7cm, 6.5cm);
comp = process(2cm, btex xelatex etex) shifted 1/2[center tex, center pdf];
inputs = thelabel(btex $\vcenter{\halign{\hfil#\hfil\cr Macros\cr Fonts\cr Graphics\cr}}$ etex scaled .8,
center comp shifted 60 up);
path a[];
a1 = connecting(vim,tex);
a2 = connecting(skim,pdf);
a3 = connecting(tex,pdf);
drawarrow a1 dashed evenly; label.lft("edit, save" infont "phvro8r" scaled .7 , point 1/2 of a1);
drawarrow a2 dashed evenly; label.lft("view, print" infont "phvro8r" scaled .7 , point 1/2 of a2);
drawarrow a3;
drawarrow center comp { right } .. center log cutafter bbox log;
drawarrow center comp { right } .. center aux cutafter bbox aux;
drawarrow center aux { left } .. center comp cutbefore bbox aux cutafter bbox comp;
drawarrow connecting(inputs,comp);
draw comp;
draw inputs;
draw vim; draw tex;
draw skim; draw pdf; draw log; draw aux;
drawoptions(withcolor .56 red);
a4 = connecting(vim,comp); drawarrow a4 dashed withdots scaled .4;
a5 = connecting(vim,skim); drawarrow a5 dashed withdots scaled .4;
label.rt ("!xelatex %" infont "texnansi-lmtt10" scaled .8, point 1/2 of a4);
label.top("!open -a Skim %:r.pdf" infont "texnansi-lmtt10" scaled .8, point 1/2 of a5);
endfig;
end.
\end{mplibcode}
\end{document}