diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/pseudo/Makefile | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/pseudo/README.md | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/pseudo/VERSION | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/pseudo/doc/pseudo.pdf | bin | 525757 -> 528156 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/pseudo/doc/pseudo.tex | 65 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/pseudo/pseudo.sty | 5 |
6 files changed, 61 insertions, 16 deletions
diff --git a/Master/texmf-dist/doc/latex/pseudo/Makefile b/Master/texmf-dist/doc/latex/pseudo/Makefile index 9aeafae4c14..8b649a353f4 100644 --- a/Master/texmf-dist/doc/latex/pseudo/Makefile +++ b/Master/texmf-dist/doc/latex/pseudo/Makefile @@ -4,7 +4,7 @@ FIGS=build/hilitefig.pdf build/pausefig.pdf doc/pseudo.pdf: build/pseudo.pdf cp $< $@ -build/pseudo.pdf: doc/pseudo.tex build/pseudo.bib $(FIGS) +build/pseudo.pdf: doc/pseudo.tex build/pseudo.bib $(FIGS) README.md $(LATEX) $< build/pseudo.bib: doc/pseudo.bib diff --git a/Master/texmf-dist/doc/latex/pseudo/README.md b/Master/texmf-dist/doc/latex/pseudo/README.md index 244be766969..5c175168fb7 100644 --- a/Master/texmf-dist/doc/latex/pseudo/README.md +++ b/Master/texmf-dist/doc/latex/pseudo/README.md @@ -3,3 +3,6 @@ quite a bit of configurability. Its main environment combines aspects of `enumeration`, `tabbing` and `tabular` for nonintrusive line numbering, indentation and highlighting, and there is functionality for typesetting common syntactic elements such as keywords, identifiers and comments. + +The package is written by [Magnus Lie Hetland](mailto:mlh@ntnu.no) and +released under the [MIT license](LICENSE). diff --git a/Master/texmf-dist/doc/latex/pseudo/VERSION b/Master/texmf-dist/doc/latex/pseudo/VERSION index 9459d4ba2a0..524cb55242b 100644 --- a/Master/texmf-dist/doc/latex/pseudo/VERSION +++ b/Master/texmf-dist/doc/latex/pseudo/VERSION @@ -1 +1 @@ -1.1 +1.1.1 diff --git a/Master/texmf-dist/doc/latex/pseudo/doc/pseudo.pdf b/Master/texmf-dist/doc/latex/pseudo/doc/pseudo.pdf Binary files differindex c9fe6491a34..4cdab2e88cf 100644 --- a/Master/texmf-dist/doc/latex/pseudo/doc/pseudo.pdf +++ b/Master/texmf-dist/doc/latex/pseudo/doc/pseudo.pdf diff --git a/Master/texmf-dist/doc/latex/pseudo/doc/pseudo.tex b/Master/texmf-dist/doc/latex/pseudo/doc/pseudo.tex index 25c5c099e27..a93daee46db 100644 --- a/Master/texmf-dist/doc/latex/pseudo/doc/pseudo.tex +++ b/Master/texmf-dist/doc/latex/pseudo/doc/pseudo.tex @@ -46,6 +46,9 @@ listingsutf8, documentation]{tcolorbox} \usepackage{pseudo} + +\usepackage{noindentafter} + \usepackage{url} \usepackage{amsopn} % For \newmcodes@ example @@ -287,19 +290,16 @@ \ior_map_inline:Nn \g_tmpa_ior { - \tl_gput_right:Nn \g_tmpa_tl { ##1 } + % Just using the first paragraph + \regex_match:nnTF { ##1 } { \c{par} } { + \ior_map_break: + } { + \tl_gput_right:Nn \g_tmpa_tl { ##1 } + } } \regex_replace_all:nnN - { \# .* \n } - { } \g_tmpa_tl - - \regex_replace_all:nnN - { \n } - { XYZZY } \g_tmpa_tl - - \regex_replace_all:nnN {\*\* ( \w+ ) \*\*} { \c{pkg} \cB{ \1 \cE} } \g_tmpa_tl @@ -444,7 +444,7 @@ environment starts a new paragraph. The left margin (how much the pseudocode is indented wrt.\ the surrounding text) is set by the \refk{left-margin} key (initially \code{0pt}).\footnote{If \refe{pseudo} occurs in a box such as \code{fbox}, or a \pkg[https://ctan.org/pkg/pgf]{tikz} node, this spacing is -dropped.} +dropped. See also the \refk{compact} key for overriding this behavior.} \medskip\noindent There are also some styling commands for special elements of the pseudocode: @@ -1088,8 +1088,8 @@ alphabetical order), you'll find definitions of a couple of counters here \pkg[https://ctan.org/pkg/standalone]{standalone} to produce individual pseudocode images, this compactness will \emph{not} be triggered automatically. In such cases, you can override the behavior using the - \refk{compact} trigger, manually specifying whether you want the - pseudocode to be compact or not. + \refk{compact} key, manually specifying whether you want the pseudocode to + be compact or not. \end{docKey} \begin{docCommand}{ct}{\marg{text}} @@ -1995,9 +1995,49 @@ See also \refk{indent-level}. \section{But how do I\,\dots} + Some functionality is not built in, but is still fairly easy to achieve. Some streamlining may be added in future versions. +\subsection{\dots\,prevent paragraph indentation after \code{pseudo}?} + +If you want to keep the pseudocode as part of a surrounding paragraph, you +could have it not start its own, i.e., not have an empty line before it. This +will reduce the amount of spacing as well; if you'd rather have that reduced, +you could simply drop the empty line \emph{after} the environment: + +\begin{texexp}[listing only] +Text before + +\begin{pseudo} + pseudocode +\end{pseudo} +% +Text after +\end{texexp} + +\noindent +The effect would then be the following: + +\begin{pseudo} + pseudocode +\end{pseudo} +% +No indentation here, and normal spacing. If, however, you wish to suppress +indentation after \emph{all} instances of \refe{pseudo}, you could use the +\pkg[https://ctan.org/pkg/noindentafter]{noindentafter} package, as follows: + +\medskip + +\begin{texexp}[listing only] +\usepackage{noindentafter} +\NoIndentAfterEnv{pseudo} +\end{texexp} + +\noindent +If you wish to override this, and indent a given paragraph after all, you can +simply use the \cs{indent} command. + \subsection{\dots\,get log-like functions?} There's no built-in command for math-roman function names, as used in $\log$ @@ -3515,6 +3555,7 @@ the line: \mode_if_vertical:F { \unskip \par + \group_insert_after:N \@endparenv } \addvspace{ \l_tmpa_skip } diff --git a/Master/texmf-dist/tex/latex/pseudo/pseudo.sty b/Master/texmf-dist/tex/latex/pseudo/pseudo.sty index 1d400840d96..a81b379a57a 100644 --- a/Master/texmf-dist/tex/latex/pseudo/pseudo.sty +++ b/Master/texmf-dist/tex/latex/pseudo/pseudo.sty @@ -20,8 +20,8 @@ % OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE % SOFTWARE. % -\def \pseudoversion {1.1} -\def \pseudodate {2019-06-30} +\def \pseudoversion {1.1.1} +\def \pseudodate {2019-07-04} \RequirePackage{expl3} \ProvidesExplPackage {pseudo} @@ -522,6 +522,7 @@ \bool_if:nF { \l__pseudo_compact_bool } { \mode_if_vertical:F { \unskip \par + \group_insert_after:N \@endparenv } \addvspace{ \l_tmpa_skip } } |