summaryrefslogtreecommitdiff
path: root/macros/luatex/latex/longmath/longmath-doc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/luatex/latex/longmath/longmath-doc.tex')
-rw-r--r--macros/luatex/latex/longmath/longmath-doc.tex68
1 files changed, 28 insertions, 40 deletions
diff --git a/macros/luatex/latex/longmath/longmath-doc.tex b/macros/luatex/latex/longmath/longmath-doc.tex
index 8e64064d87..516e1d22cf 100644
--- a/macros/luatex/latex/longmath/longmath-doc.tex
+++ b/macros/luatex/latex/longmath/longmath-doc.tex
@@ -1,5 +1,5 @@
%%
-%% longmath-doc.tex is part of longmath version 0.1.
+%% longmath-doc.tex is part of longmath version 1.0.
%%
%% (c) 2024 Hans-Jürgen Matschull
%%
@@ -46,10 +46,6 @@ or across the whole document.
A special environment is provided as well, which allows multi line
expressions to be placed inside a displayed equation and make \TeX\
do the line splitting and alignment.
-
-This is the first and in parts still experimental version. If anyone
-actually uses it, the author would be happy to receive bug reports,
-critics and suggestions.
}
\newcommand{\icol}[1]{% inline column vector
@@ -116,10 +112,10 @@ critics and suggestions.
\node[color=yellow!85!black,rotate=-17,scale=1.8] at (-0.7,0)
{$\displaystyle \mathcal{L} = \begin{longmath}[t]{110mm+30mm} \lagrange \end{longmath}$};
\node[txt,scale=1.8] at (0,7.2) {\Huge\textbf{\p{longmath}}};
- \node[txt,scale=1.2] at (0,5.4) {\Large Documentation for Version 0.1};
+ \node[txt,scale=1.2] at (0,5.4) {\Large Documentation for Version 1.0};
\node[txt,scale=1.2] at (0,4.0) {\large Hans-Jürgen Matschull};
\node[txt,scale=1.2] at (0,3.3) {\texttt{hjm.tex@matschull.net}};
- \node[txt,scale=1.2] at (0,1.7) {\texttt{2024/03/25}};
+ \node[txt,scale=1.2] at (0,1.7) {\texttt{2024/07/04}};
\node[txt,scale=1.0] at (0,-3) {\begin{minipage}{130mm}\parskip 1.3ex \intro\end{minipage}};
\end{tikzpicture}
\end{center}
@@ -130,7 +126,7 @@ critics and suggestions.
\lineskip 2pt plus 1pt
\lineskiplimit 2pt
-\newpage
+\newpage
\section{Delimiters}
\label{delims}
@@ -142,6 +138,8 @@ The \p{longmath} package provides ``long'' versions of the "\left" and "\right"
\comm{"\rright" [°scale°] °delimiter°} marks the end of a delimiter group and inserts a closing °delimiter°.
The optional °scale° argument will be explained below. The °delimiter° can be anything that is also accepted by "\left" and "\right", including a dot representing an invisible or null delimiter, any character with a "\delcode", or an explicit "\delimiter" or "\Udelimiter". If you want to use the \p{longmath} package with existing documents, or just stick to the familiar notation, and provided that this does not cause conflicts with other packages manipulating the original primitives, it is even save to say "\let\left\lleft" and "\let\right\rright".
+
+Here is a simple example. Of course, as \LaTeX\ authors, we should better use some math environment instead of "$$", but let's stick to them here just to save some space, and indicate that everything should work regardless of what environment we use.
\begin{code}
The Sellmann-Yokuzi contribution to the
Johansson Entropy is given by
@@ -667,61 +665,51 @@ If the nesting level exceeds the number of sample pairs provided, the outermost
D + \frac{ \lleft* X + Y \rright* × Z }{ W }
\rright* · E \rright* · F \rright* · G \rright* $$
\end{exec}
-If variable delimiters are mixed with explicit delimiters, there is an interaction between them. If you use one of the pairs from the collection, it is treated as if it was inserted automatically. Any enclosing bracket will be the next one from the collection. Let's define a larger collection to demonstrate this.
+Automatic delimiters can be mixed with explicit delimiters. When the nesting level is determined, only the "*" delimiters are taken into account. To demonstrate this, let's choose a different collection and set a negative value for "\delimitershortfall". This makes the bracket size increase linearly with the nesting level.
\autodelimiters{ < \lceil \lfloor [ \{ ( * ) \} ] \rfloor \rceil > }
\begin{code*}
- \autodelimiters{ < \lceil \lfloor [ \{ ( * ) \} ] \rfloor \rceil > }
+ \delimitershortfall -2pt
+ \autodelimiters{ < \lceil \lfloor [ \{ ( * ) \} ] \rfloor \rceil > }
\end{code*}
-This is what we get with automatic brackets only. The numbers indicate the actually used level. A negative value for "\delimitershortfall" makes the bracket size increase linearly with the nesting level.
+This is what we get with automatic brackets only. The numbers indicate the actually used level.
\begin{code}
- \delimitershortfall -2pt
$$ \lleft* 5 + \lleft* 4 + \lleft* 3
+ \lleft* 2 + \lleft* 1 + A \rright* + B \rright*
+ C \rright* + D \rright* + E \rright* $$
\end{code}
-\begin{exec}
+\begin{exec}\:
\delimitershortfall -2pt
$$ \lleft* 5 + \lleft* 4 + \lleft* 3
+ \lleft* 2 + \lleft* 1 + A \rright* + B \rright*
+ C \rright* + D \rright* + E \rright* $$
\end{exec}
-If we replace the second level by explicit square brackets, these are identified as the third level, and the counting continues from there.
+If we replace the second level by explicit square brackets, the counting continues at the third level.
\begin{code}
- $$ \lleft* 6 + \lleft* 5 + \lleft* 4
- + \lleft[ 3 + \lleft* 1 + A \rright* + B \rright]
+ $$ \lleft* 4 + \lleft* 3 + \lleft* 2
+ + \lleft[ 0 + \lleft* 1 + A \rright* + B \rright]
+ C \rright* + D \rright* + E \rright* $$
\end{code}
\begin{exec}\:
\delimitershortfall -2pt
- $$ \lleft* 6 + \lleft* 5 + \lleft* 4
- + \lleft[ 3 + \lleft* 1 + A \rright* + B \rright]
+ $$ \lleft* 4 + \lleft* 3 + \lleft* 2
+ + \lleft[ 0 + \lleft* 1 + A \rright* + B \rright]
+ C \rright* + D \rright* + E \rright* $$
\end{exec}
-And here the counting restarts further out.
-\begin{code}
- $$ \lleft* 2 + \lleft( 1 + \lleft* 3
- + \lleft* 2 + \lleft* 1 + A \rright* + B \rright*
- + C \rright* + D \rright) + E \rright* $$
-\end{code}
-\begin{exec}\:
- \delimitershortfall -2pt
- $$ \lleft* 2 + \lleft( 1 + \lleft* 3
- + \lleft* 2 + \lleft* 1 + A \rright* + B \rright*
- + C \rright* + D \rright) + E \rright* $$
-\end{exec}
-A pair that is not in the collection is ignored and the counting continues at the next level.
+And here two levels are skipped.
\begin{code}
- $$ \lleft* 4 + \lleft* 3 + \lleft\uparrow 0
- + \lleft* 2 + \lleft* 1 + A \rright* + B \rright*
- + C \rright\downarrow + D \rright* + E \rright* $$
+ $$ \lleft* 3 + \lleft| 0 + \lleft* 2
+ + \lleft[ 0 + \lleft* 1 + A \rright* + B \rright]
+ + C \rright* + D \rright| + E \rright* $$
\end{code}
\begin{exec}\:
\delimitershortfall -2pt
- $$ \lleft* 4 + \lleft* 3 + \lleft\uparrow 0
- + \lleft* 2 + \lleft* 1 + A \rright* + B \rright*
- + C \rright\downarrow + D \rright* + E \rright* $$
+ $$ \lleft* 3 + \lleft| 0 + \lleft* 2
+ + \lleft[ 0 + \lleft* 1 + A \rright* + B \rright]
+ + C \rright* + D \rright| + E \rright* $$
\end{exec}
-If variable delimiters are tagged and aligned, this also applies to the chosen delimiter from the collection. Here is a typical example. Without tagging, we get this.
+In the first experimental version of this packages, there was an interaction between automatic and explicit brackets. This has been removed. It didn't work well with linked groups, and it caused problems with bracktes used for purposes other than grouping, like function arguments, binomial coeffiecients etc.
+
+If automatic delimiters are tagged and aligned, this also applies to the chosen delimiter from the collection. Here is a typical example. Without tagging, we get this.
\begin{code}
$$ \lleft * \frac{ n+1 }{ n^2 } \rright * ^2
+ \lleft * \frac{ n }{ \lleft * n - 1 \rright *^2 } %%%
@@ -743,7 +731,7 @@ If the outer brackets are aligned, both become second level brackets.
+ \lleft {qx} * \frac{ n }{ \lleft * n - 1 \rright *^2}
\rright * ^2 $$
\end{exec}
-As a last challenge, let's consider the array from the previous section with a slight modification. If we replace all brackets with variable delimiters, but do not link the cells, we get this.
+As a last challenge, let's consider the array from the previous section with a slight modification. If we replace all brackets with automatic delimiters, but do not link the cells, we get this.
\begin{code}
$$ \begin{array}{dsdsdsd}
\lleft * Z & - & \sum_k A & × &
@@ -882,7 +870,7 @@ To make this look a bit nicer, you can add some extra space to the width of the
$$ \lleft[ \begin{longmath}[c]{0.33+0.07}
\polyA
\end{longmath} \rright] =
- \lleft[ \begin{longmath}[c]{0.33+0.0.7}
+ \lleft[ \begin{longmath}[c]{0.33+0.07}
\lleft( \polyB \rright) \cdot %%%
\lleft( \polyC \rright)
\end{longmath} \rright] $$