From 2d2f3dd466ef8c3b3af40074e8991de36be60407 Mon Sep 17 00:00:00 2001 From: "Y. Wang" Date: Fri, 12 Aug 2022 08:13:48 +0200 Subject: \include manpage .tex files --- Makefile | 7 ++++--- assets/manual/tex/luaatc.tex | 2 +- assets/manual/tex/main.tex | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 3d05472..41f7af8 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ MAN_TEXS = $(MAN_SRCS:%.md=%.tex) MAN_FILTER = $(MANUAL_ROOT)/filter_man.lua TEX_PATH = $(MANUAL_ROOT)/tex +MAN_TEX_DIR = $(TEX_PATH)/man MAN_TEX = $(TEX_PATH)/man.tex TEX_MAIN_SRCS = $(wildcard $(TEX_PATH)/*manual.tex) TEX_MAIN_DSTS = $(TEX_MAIN_SRCS:%.tex=%.pdf) @@ -21,7 +22,7 @@ all: doc doc: doc-pdf doc-man doc-pdf: $(TEX_MAIN_DSTS) -%.pdf:: %.tex $(MAN_TEX) $(wildcard $(TEX_PATH)/*.tex) +%.pdf: %.tex $(MAN_TEX) $(wildcard $(TEX_PATH)/*.tex) $(LATEXMK) -cd -pdf $< doc-man: $(MAN_DSTS) @@ -31,7 +32,7 @@ doc-man: $(MAN_DSTS) $(PANDOC) -L ${MAN_FILTER} -s -t man -o $@ $< %.tex:: %.md ${MAN_FILTER} - $(PANDOC) -L ${MAN_FILTER} -t latex -o $@ $< + $(PANDOC) -L ${MAN_FILTER} -t latex -o $(MAN_TEX_DIR)/$(notdir $@) $< $(MAN_TEX): $(MAN_TEXS) - find $(MAN_PATH) -name '*.tex' -printf '\\input{../man/%P}\n' | sort > $(MAN_TEX) + find $(MAN_TEX_DIR) -name '*.tex' -printf '\\include{man/%f}\n' | sort | sed '1s/^\\include/\\input/' > $(MAN_TEX) diff --git a/assets/manual/tex/luaatc.tex b/assets/manual/tex/luaatc.tex index 10a67e8..8ee5d43 100644 --- a/assets/manual/tex/luaatc.tex +++ b/assets/manual/tex/luaatc.tex @@ -124,7 +124,7 @@ The following are available if \texttt{advtrains\_interlocking} is enabled. \item \apifunc{can\_set\_route}{\var{pos},\var{name}} Returns a boolean indicating whether the route named \var{name} of the signal at \var{pos} can be set. \item \apifunc{set\_route}{\var{pos},\var{name}} Sets the route named \var{name} of the signal at \var{pos}. \item \apifunc{cancel\_route}{\var{pos}} Cancels the route that is set from the signal at \var{pos}. -\item \apifunc{get\_aspect}{\var{pos}} Returns the signal aspect of the signal at \var{pos}. Please refer to section \ref{s:sigasp} for the structure of signal aspect tables. +\item \apifunc{get\_aspect}{\var{pos}} Returns the signal aspect of the signal at \var{pos}. Please refer to \manref{signal\string_aspect}{7advtrains} for the structure of signal aspect tables. \end{apidoc} \subsection{Railway time} diff --git a/assets/manual/tex/main.tex b/assets/manual/tex/main.tex index cea1cde..2ea7bde 100644 --- a/assets/manual/tex/main.tex +++ b/assets/manual/tex/main.tex @@ -9,7 +9,7 @@ \include{contributing.tex} -\include{manpages.tex} +\input{manpages.tex} \include{physics.tex} -- cgit v1.2.3