With the following environment, I would like to make #3
an optional argument. In a way that when #3
is present, the text starts on the next line. And when #3
is missing, the text is written in the adjacent area as done by the theorem environment.
\NewDocumentEnvironment{Pz}{mmm}
%% General Proposition
%% \Pz {SPECIFIER} {LOCATOR} {TITLE}
{ \noindent #1 \ #2 \ (#3) }
{}
\begin{document}
\maketitle
\tableofcontents
\chapter {This is an introduction
to some topic}
\section{Some Section}
This section is about this and that.
\begin{Pz}{Theorem}{GCHQ}{Pythagoras}
Some Text
\end{Pz}
\begin{Pz}{Theorem}{GCHQ}
Some Text on new line
\end{Pz}
\end{document}
The following is not doing the trick
\NewDocumentEnvironment{Pz}{mmO{}}
%% General Proposition
%% \wvPz {SPECIFIER} {LOCATOR} {TITLE}
%% TITLE Optional, Default Empty
{ \noindent #1 \ #2 \ (#3)
\IfValueT {#3} { \newline }
}
{}
xparse
documentation is now incorporated intousrguide
.usrguide
? I couldn't find it in CTAN and MikTeX.texdoc usrguide
doesn't bring it up? (Maybe MikTeX doesn't install documentation by default?) It's part of the kernel documentation (the user version ofclsguide
, which is for package writers).C:\Users\John\AppData\Local\Programs\MiKTeX\doc\latex\base