Commit e4578130 authored by Ronny Bergmann's avatar Ronny Bergmann 🎧

introduces a `none` argument for ´\enclose` to deactivate printing enclosing...

introduces a `none` argument for ´\enclose` to deactivate printing enclosing stuff. Documents, that this should be used with care.
parent 56c7427d
......@@ -197,15 +197,21 @@ Its default definition is \codeCommand{\textsc{#1}\xspace}.\footnote{which adds
\item[enclose] is a command which encloses some content in scaled delimiters.
It is meant as a helper to facilitate the definition of other commands.
Its syntax is \codeCommand{\enclose[#1]{#2}{#3}{#4}}.
The first (optional) argument is used to scale the delimiters to the standard amsmath sizes.\footnote{\lstinline!big!, \lstinline!Big!, \lstinline!bigg!, \lstinline!Bigg! or \lstinline!auto!, which uses \lstinline!left! and \lstinline!right!\label{footnote:amsmath_sizes}}
The first (optional) argument is used to scale the delimiters to the standard amsmath sizes.%
\footnote{\lstinline!big!, \lstinline!Big!, \lstinline!bigg!, \lstinline!Bigg! or \lstinline!auto!, which uses \lstinline!left! and \lstinline!right! as well as \lstinline!none! to easily deactivate brackets.\label{footnote:amsmath_sizes}}
The second and fourth arguments specify the opening and closing delimiters, respectively.
The third argument is the content to be enclosed.
\par\mathCodeExample{\enclose[Big]{[}{\dfrac{1}{2}}{]}} % chktex 9
\par\mathCodeExample{\enclose{[}{\dfrac{1}{2}}{]}} % chktex 9
\par\mathCodeExample{\enclose[Big][{\dfrac{1}{2}}]} % chktex 9
\par\mathCodeExample{\enclose[auto]{[}{\dfrac{1}{2}}{]}} % chktex 9
\par\mathCodeExample{\enclose[none]{[}{\dfrac{1}{2}}{]}} % chktex 9
\textbf{Note:} This command should normally be used only in the definition of other commands.
For instance, \codeCommand{\abs} is using it internally.
\textbf{Note 1.} \lstinline!none! is merely meant for testing when having arguments
in brackets whether it is useful to omit them. You can also deactivate the absolute value
vertical lines this way, so \emph{use this option with care}.
\textbf{Note 2.} This command should normally be used only in the definition of other commands.
For instance, \codeCommand{\abs} is using it internally. See \codeCommand{\paren} for the nicer command to use
\item[enclspacingSet] provides spacing before and after the center delimiter \codeCommand{\encloseSet}.
By default set to be \codeCommand{\,}.
\item[encloseSet] is a command which encloses some content in scaled delimiters.
......@@ -217,7 +223,7 @@ Its default definition is \codeCommand{\textsc{#1}\xspace}.\footnote{which adds
The third and fifth argument are the content to be enclosed.
\par\mathCodeExample{\encloseSet[big]{\{}{x\in\R}{|}{x>5}{\}}} % chktex 9
\par\mathCodeExample{\encloseSet[auto]{\{}{x\in\R}{|}{x>\dfrac{1}{2}}{\}}} % chktex 9
\textbf{Note:} This command should normally be used only in the definition of other commands.
\textbf{Note.} This command should normally be used only in the definition of other commands.
For instance, \codeCommand{\setDef} is using it internally.
\item[paren] is an alternative to \codeCommand{\enclose}, with a different ordering of arguments.
Its syntax is \codeCommand{\paren[#1]{#2}{#3}{#4}}, which is simply mapped to \codeCommand{\enclose[#1]{#2}{#4}{#3}}.
......@@ -474,8 +480,6 @@ The semantic file \file{numapde-manifolds.sty} collects definitions and notation
\par\mathCodeExample{\cotangentBundle[\NN]}
\item[cotangentSpaceSymbol] the symbol used within \codeCommand{\cotangent}.
\par\mathCodeExample{\cotangentSpaceSymbol}
\item[expOp] the symbol used within the \codeCommand{\exponential}.
\par\mathCodeExample{\expOp}
\item[exponential] the exponential map.
Its syntax is \codeCommand{\exponential[#1]{#2}{#3}}.
The first argument can be used to scale the third.
......@@ -487,6 +491,8 @@ The semantic file \file{numapde-manifolds.sty} collects definitions and notation
\par\mathCodeExample{\exponential{p}X}
\par\mathCodeExample{\exponential{p}(X)}
\par\mathCodeExample{\exponential[Big]{p}(\frac{X}{2})}
\item[expOp] the symbol used within the \codeCommand{\exponential}.
\par\mathCodeExample{\expOp}
\item[geodesic] a geodesic.
Its syntax is \codeCommand{\geodesic<#1>[#2]{#3}{#4}(#5)}.% chktex 6
The first (optional) argument is used to modify the style of the geodesic (\codeCommand{s}ymbol, \codeCommand{l}ong, \codeCommand{a}rc or \codeCommand{p}lain, where the last is the default)
......@@ -519,8 +525,6 @@ The semantic file \file{numapde-manifolds.sty} collects definitions and notation
\par\mathCodeExample{\inverseRetract{p}q}
\par\mathCodeExample{\inverseRetract{p}(q)}
\par\mathCodeExample{\inverseRetract[Big]{p}(q)}
\item[logOp] the symbol used within the \codeCommand{\logarithm}.
\par\mathCodeExample{\logOp}
\item[logarithm] the logarithmic map.
Its syntax is \codeCommand{\logarithm[#1]{#2}{#3}}.
The first argument can be used to scale the third.
......@@ -532,6 +536,8 @@ The semantic file \file{numapde-manifolds.sty} collects definitions and notation
\par\mathCodeExample{\logarithm{p}q}
\par\mathCodeExample{\logarithm{p}(q)}
\par\mathCodeExample{\logarithm[Big]{p}(q)}
\item[logOp] the symbol used within the \codeCommand{\logarithm}.
\par\mathCodeExample{\logOp}
\item[parallelTransport]\hspace{1em} the parallel transport.\\
Its syntax is \codeCommand{\parallelTransport[#1]{#2}{#3}(#4)}.
The first (optional) argument is used to scale the parantheses enclosing the argument \# 4.\cref{footnote:amsmath_sizes}
......
......@@ -81,7 +81,7 @@
}%
}
\DeclareMathOperator{\logOp}{exp}
\DeclareMathOperator{\logOp}{log}
% Define a command for the logarithmic map
% Argument {#1} is used to scale the brackets around #3
% Argument {#2} is the source base point
......
% TODO why the double brackets?
% This LaTeX package provides numerous short-hand, low-level commands
% which do not carry a semantic meaning. The latter are defined in
% which do not carry a semantic meaning. The latter are defined in
% numapde-semantic.sty.
\ProvidesPackage{numapde-syntax}
......@@ -224,7 +224,7 @@
\newcommand{\vepsilon}{{\vec{\epsilon}}}
\newcommand{\vvarepsilon}{{\vec{\varepsilon}}}
\newcommand{\vzeta}{{\vec{\zeta}}}
\newcommand{\veta}{{\vec{\eta}}}
\newcommand{\veta}{{\vec{\eta}}}
\newcommand{\vtheta}{{\vec{\theta}}}
\newcommand{\vvartheta}{{\vec{\vartheta}}}
\newcommand{\viota}{{\vec{\iota}}}
......@@ -256,7 +256,7 @@
\newcommand{\vDelta}{{\vec{\Delta}}}
\newcommand{\vEpsilon}{{\vec{E}}}
\newcommand{\vZeta}{{\vec{Z}}}
\newcommand{\vEta}{{\vec{H}}}
\newcommand{\vEta}{{\vec{H}}}
\newcommand{\vTheta}{{\vec{\Theta}}}
\newcommand{\vIota}{{\vec{I}}}
\newcommand{\vKappa}{{\vec{K}}}
......@@ -286,7 +286,7 @@
\let\S\undefined \newcommand{\S}{\mathbb{S}}
\newcommand{\Z}{\mathbb{Z}}
% Define some English abbreviations
% Define some English abbreviations
\let\aa\undefined \newcommand{\aa}{a.a.\xspace}
\newcommand{\ale}{a.e.\xspace}
\let\cf\undefined \newcommand{\cf}{cf.\xspace}
......@@ -296,7 +296,7 @@
\let\st\undefined \newcommand{\st}{s.\,t.\xspace} % WileyNJD-v2.cls (loads soul.sty)
\newcommand{\wrt}{w.r.t.\xspace}
% Define some German abbreviations
% Define some German abbreviations
\newcommand{\dah}{d.\,h.\xspace}
\newcommand{\Dah}{D.\,h.\xspace}
\newcommand{\fue}{f.\,ü.\xspace}
......@@ -384,7 +384,8 @@
% Define \enclose command
% \enclose[a]{b}{c}{d} encloses content (c) in brackets (b,d) where the optional parameter
% a scales the brackets (big, Big, bigg, Bigg) or (auto)matically scales them
% a scales the brackets (big, Big, bigg, Bigg) or (auto)matically scales them.
% It can also be set to [none] do deactivate the brackets/enclosing
% \enclosespacing allows for additional spacing before and after the \enclose:d content
% https://blag.nullteilerfrei.de/2014/01/16/a-dynamic-bracketing-macro-in-latex/
% The \enclose command is mainly meant for internal use; use \paren instead
......@@ -392,10 +393,13 @@
\newcommand{\enclose}[4][]{%
\ifthenelse{\isempty{#1}}%
{\ifthenelse{\equal{#2}{.}}{}{#2}\enclspacing#3\enclspacing#4}%
{\ifthenelse{\equal{#1}{auto}}%
{\ifthenelse{\equal{#1}{auto}}% given auto
{\left#2\enclspacing#3\enclspacing\right#4}%
{\csname#1l\endcsname#2\enclspacing#3\enclspacing\csname#1r\endcsname#4}%
}%
{\ifthenelse{\equal{#1}{none}}% given none
{#3}%
{\csname#1l\endcsname#2\enclspacing#3\enclspacing\csname#1r\endcsname#4}%
}% end auto
}% end #1 empty
}
% Define \encloseSet command to do { c | e }
......@@ -409,7 +413,7 @@
\ifthenelse{\isempty{#1}}%
{#2\enclspacing#3 \enclspacingSet#4\enclspacingSet #5\enclspacing#6}%
{\ifthenelse{\equal{#1}{auto}}%
{\left#2\enclspacing#3\enclspacingSet\middle#4\enclspacingSet#5\right#6}%
{\left#2\enclspacing#3\enclspacingSet\middle#4\enclspacingSet#5\right#6}%
{\csname#1l\endcsname#2\enclspacing#3\enclspacingSet\csname#1\endcsname#4\enclspacingSet#5\enclspacing\csname#1r\endcsname#6}%
}%
}
......@@ -442,4 +446,3 @@
\newcommand{\gqq}[1]{\glqq#1\grqq}
\newcommand{\eq}[1]{`#1'}
\newcommand{\eqq}[1]{``#1''}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment