From 49beb106f00d35296c54a6f15cc663526651d376 Mon Sep 17 00:00:00 2001 From: "Y. Wang" Date: Sun, 4 Sep 2022 17:31:09 +0200 Subject: Use ldoc instead of manpages --- .../manual/man/man3advtrains/rwt_add.3advtrains.md | 25 --------------- .../man/man3advtrains/rwt_copy.3advtrains.md | 35 --------------------- .../man/man3advtrains/rwt_last_rpt.3advtrains.md | 25 --------------- .../manual/man/man3advtrains/rwt_now.3advtrains.md | 10 ------ .../man/man3advtrains/speed_lessp.3advtrains.md | 36 ---------------------- .../speed_set_restriction.3advtrains.md | 21 ------------- .../man7advtrains/node_definition.7advtrains.md | 28 ----------------- assets/manual/man/man7advtrains/rwt.7advtrains.md | 32 ------------------- .../man/man7advtrains/signal_aspects.7advtrains.md | 26 ---------------- .../manual/man/man7advtrains/speed.7advtrains.md | 25 --------------- assets/manual/tex/luaatc.tex | 6 ++-- assets/manual/tex/main.tex | 4 +-- assets/manual/tex/man/.gitkeep | 0 assets/manual/tex/manpages.tex | 7 ----- assets/manual/tex/preamble.tex | 5 +-- 15 files changed, 5 insertions(+), 280 deletions(-) delete mode 100644 assets/manual/man/man3advtrains/rwt_add.3advtrains.md delete mode 100644 assets/manual/man/man3advtrains/rwt_copy.3advtrains.md delete mode 100644 assets/manual/man/man3advtrains/rwt_last_rpt.3advtrains.md delete mode 100644 assets/manual/man/man3advtrains/rwt_now.3advtrains.md delete mode 100644 assets/manual/man/man3advtrains/speed_lessp.3advtrains.md delete mode 100644 assets/manual/man/man3advtrains/speed_set_restriction.3advtrains.md delete mode 100644 assets/manual/man/man7advtrains/node_definition.7advtrains.md delete mode 100644 assets/manual/man/man7advtrains/rwt.7advtrains.md delete mode 100644 assets/manual/man/man7advtrains/signal_aspects.7advtrains.md delete mode 100644 assets/manual/man/man7advtrains/speed.7advtrains.md delete mode 100644 assets/manual/tex/man/.gitkeep delete mode 100644 assets/manual/tex/manpages.tex (limited to 'assets') diff --git a/assets/manual/man/man3advtrains/rwt_add.3advtrains.md b/assets/manual/man/man3advtrains/rwt_add.3advtrains.md deleted file mode 100644 index 5243b3e..0000000 --- a/assets/manual/man/man3advtrains/rwt_add.3advtrains.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -titles: -- rwt_add -- rwt_diff -- rwt_sub -section: 3advtrains -manual: 'Advtrains Developer''s Manual' -shortdesc: add or subtract railway time objects ---- - -# Synopsis - -* `add(t1, t2)` -* `diff(t1, t2)` -* `sub(t1, t2)` - -# Description - -* `add()` returns the result of adding `t1` and `t2`. -* `diff()` returns the result of subtracting `t1` from `t2`. -* `sub()` returns the result of subtracting `t2` from `t1`. - -# Return Value - -`add()` and `sub()` return their results as tables. `diff()` returns its result as a number. diff --git a/assets/manual/man/man3advtrains/rwt_copy.3advtrains.md b/assets/manual/man/man3advtrains/rwt_copy.3advtrains.md deleted file mode 100644 index 5a49048..0000000 --- a/assets/manual/man/man3advtrains/rwt_copy.3advtrains.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -titles: -- rwt_copy -- rwt_new -- rwt_to_table -- rwt_to_secs -- rwt_to_string -section: 3advtrains -manual: 'Advtrains Developer''s Manual' -shortdesc: create and copy railway time objects ---- - -# Synopsis - -* `copy(obj)` -* `new(cycles, minutes, seconds)` -* `to_table(obj)` -* `to_secs(obj [, cycles])` -* `to_string(obj [, no_cycles])` - -# Description - -* `copy()` returns a copy of `obj`. -* `new()` creates a new railway time object with the given number of cycles, minutes, and seconds. -* `to_table()`, `to_secs()`, and `to_string()` convert `obj` to a table, number, or string, respectively. If `cycles` is passed to `to_secs()`, that value is used as the number of cycles. If `no_cycles` is passed to `to_string()`, the number of cycles is set to zero. - -# Return Value - -* `copy()` returns the copy that is created. If `obj` is a table, the returned value is not identical to `obj`. -* `new()` returns the newly created object as a table. -* `to_table()`, `to_secs()`, `to_string()` returns the conveerted object. - -# Notes - -`to_table()` returns `obj` if it is a table. diff --git a/assets/manual/man/man3advtrains/rwt_last_rpt.3advtrains.md b/assets/manual/man/man3advtrains/rwt_last_rpt.3advtrains.md deleted file mode 100644 index b5149e7..0000000 --- a/assets/manual/man/man3advtrains/rwt_last_rpt.3advtrains.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -titles: -- rwt_last_rpt -- rwt_next_rpt -- rwt_time_from_last_rpt -- rwt_time_to_next_rpt -section: 3advtrains -manual: 'Advtrains Developer''s Manual' -shortdesc: calculate time for repeating events ---- - -# Synopsis - -* `last_rpt(time, interval, offset)` -* `next_rpt(time, interval, offset)` -* `time_from_last_rpt(interval, offset)` -* `time_to_next_rpt(interval, offset)` - -# Description -The functions described in this page calculates the time or time difference related to events scheduled to repeat with the given interval and at the given offset, in relation to the given time. Whether and when the event actually takes place is not relevant to the API. - -* `last_rpt()` returns the time at which the event was expected to occur the last time -* `next_rpt()` returns the time at which the event is expected to occur the next time -* `time_from_last_rpt()` returns the time since the event was expected to occur the last time -* `time_to_next_rpt()` return the time until the event is expected to occur the next time diff --git a/assets/manual/man/man3advtrains/rwt_now.3advtrains.md b/assets/manual/man/man3advtrains/rwt_now.3advtrains.md deleted file mode 100644 index 7eb3650..0000000 --- a/assets/manual/man/man3advtrains/rwt_now.3advtrains.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -titles: -- rwt_now -section: 3advtrains -manual: 'Advtrains Developer''s Manual' -shortdesc: get the current railway time ---- - -# Description -`now()` returns the current railway time as a table. diff --git a/assets/manual/man/man3advtrains/speed_lessp.3advtrains.md b/assets/manual/man/man3advtrains/speed_lessp.3advtrains.md deleted file mode 100644 index 61c37b2..0000000 --- a/assets/manual/man/man3advtrains/speed_lessp.3advtrains.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -titles: -- speed_lessp -- speed_greaterp -- speed_equalp -- speed_not_lessp -- speed_not_greaterp -- speed_not_equalp -- speed_min -- speed_max -section: 3advtrains -manual: 'Advtrains Developer''s Manual' -shortdesc: compare speed limits ---- - -# Synopsis - -* `lessp(a, b)` -* `greaterp(a, b)` -* `equalp(a, b)` -* `not_lessp(a, b)` -* `not_greaterp(a, b)` -* `min(a, b)` -* `max(a, b)` - -# Description -`lessp()`, `greaterp()`, `equalp()`, `not_lessp()`, `not_greaterp()`, and `not_equalp()` are predicate functions that returns, respectively, - -* Whether `a` is more strict than `b` -* Whether `a` is less strict than `b` -* Whether `a` and `b` indicate the same speed limit -* Whether `a` is not more strict than `b` -* Whether `a` is nor less strict than `b` -* Whether `a` and `b` do not indicate the same speed limit - -`min()` returns the speed limit that is more strict. `max()` returns the speed limit that is less strict. diff --git a/assets/manual/man/man3advtrains/speed_set_restriction.3advtrains.md b/assets/manual/man/man3advtrains/speed_set_restriction.3advtrains.md deleted file mode 100644 index 619cf3f..0000000 --- a/assets/manual/man/man3advtrains/speed_set_restriction.3advtrains.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -titles: -- speed_set_restriction -- speed_merge_aspect -section: 3advtrains -manual: 'Advtrains Developer''s Manual' -shortdesc: apply speed limits to trains ---- - -# Synopsis - -* `set_restriction(train, type, val)` -* `merge_aspect(train, asp)` - -# Description -`set_restriction()` sets the speed restriction of the given type of the given train to `val` and updates train object correspondingly. - -`merge_aspect()` sets the speed restriction of the given train based on the value of the signal aspect. - -# Return Value -`set_restriction()` and `merge_aspect()` do not return any value. diff --git a/assets/manual/man/man7advtrains/node_definition.7advtrains.md b/assets/manual/man/man7advtrains/node_definition.7advtrains.md deleted file mode 100644 index db9db08..0000000 --- a/assets/manual/man/man7advtrains/node_definition.7advtrains.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -titles: -- node_definition -section: 7advtrains -manual: 'Advtrains Developer''s Manual' -shortdesc: node definition entries specific to Advtrains -seealso: -- signal_aspects(7advtrains) ---- - -# Description -This page describes various fields in node definition tables that are used by Advtrains. - -# Node Groups -Advtrains uses node groups to identify certain properties of a node. The following node groups are currently read by Advtrains: - -* `advtrains_signal`: When set, this property defines the type of signal this node belongs to. `1` indicates that this node is a static signal, and `2` indicates that this node is a signal with a variable aspect. -* `not_blocking_trains`: When set to 1, trains can move through this node. -* `save_in_at_nodedb`: When set to 1, this node should be saved in the internal node database used by Advtrains. - -# The `advtrains` Field -The `advtrains` field in the node definition may contain the following fields: - -* `get_aspect(pos, node)`: This function should return the signal aspect of the node at the given position. - -* `set_aspect(pos, node, asp)`: This function should set the signal aspect of the node to `asp` if possible. `asp` is not guranteed to be an aspect supported by the node. - -* `supported_aspects`: This table should contain a list of supported signal aspects. diff --git a/assets/manual/man/man7advtrains/rwt.7advtrains.md b/assets/manual/man/man7advtrains/rwt.7advtrains.md deleted file mode 100644 index d1efc80..0000000 --- a/assets/manual/man/man7advtrains/rwt.7advtrains.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -titles: -- rwt -section: 7advtrains -manual: 'Advtrains Developer''s Manual' -shortdesc: Advtrains railway time -seealso: -- rwt_add(3advtrains) -- rwt_copy(3advtrains) -- rwt_last_rpt(3advtrains) -- rwt_now(3advtrains) ---- - -# Description -Advtrains depends on Minetest's "dtime" for most operations, and may slow itself down when necessary to prevent unexpected behavior, such as in a situation with a significant amount of lag. As a result, the internal time used by Advtrains is not synchronized to real-life time due to lag and server restarts. Railway time was therefore introduced as a method of accurately measuring internal time and, with this information, implementing a scheduling system. It can, however, also be set up to keep in sync with real-life time. - -Railway time is counted in cycles, minutes, and seconds, roughly corresponding to their real-life counterparts, with cycles roughly corresponding to hours. For a valid railway time object, it is expected that - -* The "cycles" element is an integer, -* The "minutes" element is an integer between 0 and 59 (inclusive), and -* The "seconds" element is an integer between 0 and 59 (inclusive). - -Railway time may be represented in three formats: - -* As a table with the `c`, `m`, `s` fields holding the cycles, minutes, and seconds, respectively, -* As a string with the cycles, minutes and seconds delimited with a semicolon, -* For zero cycles, as a string with the minutes and seconds delimited with a semicolon, or -* As a number representing the number of seconds since 0;0;0. - -If railway time is represented as a string, each element may have a variable length and do not require padding zeroes, and an element of the string may be empty if it is at the beginning or the end of the string. - -The railway time API is available in the `advtrains.interlocking.rwt` table or, for LuaATC, in the `rwt` table. diff --git a/assets/manual/man/man7advtrains/signal_aspects.7advtrains.md b/assets/manual/man/man7advtrains/signal_aspects.7advtrains.md deleted file mode 100644 index 1cb5d7e..0000000 --- a/assets/manual/man/man7advtrains/signal_aspects.7advtrains.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -titles: -- signal_aspects -section: 7advtrains -manual: 'Advtrains Developer''s Manual' -shortdesc: signal aspect tables for Advtrains -seealso: -- speed(7advtrains) ---- - -# Description -A signal aspect table describes the status of a signal in relation to a train following it. - -A signal aspect table may contain the following fields: - -* `main`: The main aspect of the signal -* `type`: The type of speed restriction imposed by the main aspect -* `dst`: The distant aspect of the signal -* `shunt`: A boolean indicating whether shunting is allowed -* `proceed_as_main`: A boolean indicating whether a train in shunt mode should continue with shunt mode disabled - -The `main` and `dst` fields may contain - -* A non-negative number indicating the current or next speed limit -* -1, indicating that the speed limit is or will be lifted -* `nil`, indicating that the speed limit is or will not be changed diff --git a/assets/manual/man/man7advtrains/speed.7advtrains.md b/assets/manual/man/man7advtrains/speed.7advtrains.md deleted file mode 100644 index 8b3fe1e..0000000 --- a/assets/manual/man/man7advtrains/speed.7advtrains.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -titles: -- speed -section: 7advtrains -manual: 'Advtrains Developer''s Manual' -shortdesc: Advtrains speed limit library -seealso: -- speed_lessp(3advtrains) -- speed_set_restriction(3advtrains) -- signal_aspects(7advtrains) ---- - -# Description -The speed library allows the manipulation of speed limits, which can be represented with - -* A non-negative number, which stands for a regular speed limit in m/s, or -* -1 or `nil`, which lifts the speed restriction - -The use of other values (in particular, nan and infinity) may result in undefined behavior. - -This library is available as `advtrains.speed`. - -# Notes - -The meaning of `nil` for the speed limit library differs from its meaning in signal aspect tables, where `nil` keeps the current speed limit. diff --git a/assets/manual/tex/luaatc.tex b/assets/manual/tex/luaatc.tex index 8ee5d43..99ef77f 100644 --- a/assets/manual/tex/luaatc.tex +++ b/assets/manual/tex/luaatc.tex @@ -124,11 +124,11 @@ 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 \manref{signal\string_aspect}{7advtrains} for the structure of signal aspect tables. +\item \apifunc{get\_aspect}{\var{pos}} Returns the signal aspect of the signal at \var{pos}. \end{apidoc} \subsection{Railway time} -Please refer to \manref{rwt}{7advtrains} for information on the railway time API. +Please refer to the railway time API documentation for more information. \begin{apidoc}{LuaATC} \item \apifunc{schedule}{\var{time},\var{message}} Triggers a \texttt{schedule} event at \var{time} with the message \var{message}. Only one event can be scheduled this way. \item \apifunc{schedule\_in}{\var{time},\var{message}} Like \texttt{schedule}, but \var{time} is given as the time until the event is triggered. @@ -194,4 +194,4 @@ The following operations are safe in the approach callback: %%% Local Variables: %%% TeX-master: "a4manual" -%%% End: \ No newline at end of file +%%% End: diff --git a/assets/manual/tex/main.tex b/assets/manual/tex/main.tex index 2ea7bde..c93b5c9 100644 --- a/assets/manual/tex/main.tex +++ b/assets/manual/tex/main.tex @@ -9,8 +9,6 @@ \include{contributing.tex} -\input{manpages.tex} - \include{physics.tex} \ifx\HCode\undefined @@ -20,4 +18,4 @@ %%% Local Variables: %%% mode: LaTeX %%% TeX-master: "a4manual" -%%% End: \ No newline at end of file +%%% End: diff --git a/assets/manual/tex/man/.gitkeep b/assets/manual/tex/man/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/assets/manual/tex/manpages.tex b/assets/manual/tex/manpages.tex deleted file mode 100644 index 3ef817d..0000000 --- a/assets/manual/tex/manpages.tex +++ /dev/null @@ -1,7 +0,0 @@ -\part{Manual Pages} -\input{man.tex} - -%%% Local Variables: -%%% mode: LaTeX -%%% TeX-master: "a4manual" -%%% End: \ No newline at end of file diff --git a/assets/manual/tex/preamble.tex b/assets/manual/tex/preamble.tex index 567b16d..cd2553f 100644 --- a/assets/manual/tex/preamble.tex +++ b/assets/manual/tex/preamble.tex @@ -51,9 +51,6 @@ \newcommand{\vari}[1]{\varnth{#1}{1}} \newcommand{\varii}[1]{\varnth{#1}{2}} -\newcommand{\manref}[2]{\hyperref[man:#1.#2]{\texttt{#1(#2)}}} -\def\tightlist{} % pandoc compat - \def\luatrue{\texttt{true}} \def\luafalse{\texttt{false}} \def\luanil{\texttt{nil}} @@ -202,4 +199,4 @@ %%% Local Variables: %%% TeX-master: "a4manual" -%%% End: \ No newline at end of file +%%% End: -- cgit v1.2.3