texlive[51553] Master/texmf-dist: pseudo (4jul19)

commits+karl at tug.org commits+karl at tug.org
Thu Jul 4 23:14:10 CEST 2019


Revision: 51553
          http://tug.org/svn/texlive?view=revision&revision=51553
Author:   karl
Date:     2019-07-04 23:14:09 +0200 (Thu, 04 Jul 2019)
Log Message:
-----------
pseudo (4jul19)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/pseudo/Makefile
    trunk/Master/texmf-dist/doc/latex/pseudo/README.md
    trunk/Master/texmf-dist/doc/latex/pseudo/VERSION
    trunk/Master/texmf-dist/doc/latex/pseudo/doc/pseudo.pdf
    trunk/Master/texmf-dist/doc/latex/pseudo/doc/pseudo.tex
    trunk/Master/texmf-dist/tex/latex/pseudo/pseudo.sty

Modified: trunk/Master/texmf-dist/doc/latex/pseudo/Makefile
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pseudo/Makefile	2019-07-04 21:13:54 UTC (rev 51552)
+++ trunk/Master/texmf-dist/doc/latex/pseudo/Makefile	2019-07-04 21:14:09 UTC (rev 51553)
@@ -4,7 +4,7 @@
 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

Modified: trunk/Master/texmf-dist/doc/latex/pseudo/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pseudo/README.md	2019-07-04 21:13:54 UTC (rev 51552)
+++ trunk/Master/texmf-dist/doc/latex/pseudo/README.md	2019-07-04 21:14:09 UTC (rev 51553)
@@ -3,3 +3,6 @@
 `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 at ntnu.no) and
+released under the [MIT license](LICENSE).

Modified: trunk/Master/texmf-dist/doc/latex/pseudo/VERSION
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pseudo/VERSION	2019-07-04 21:13:54 UTC (rev 51552)
+++ trunk/Master/texmf-dist/doc/latex/pseudo/VERSION	2019-07-04 21:14:09 UTC (rev 51553)
@@ -1 +1 @@
-1.1
+1.1.1

Modified: trunk/Master/texmf-dist/doc/latex/pseudo/doc/pseudo.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pseudo/doc/pseudo.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pseudo/doc/pseudo.tex	2019-07-04 21:13:54 UTC (rev 51552)
+++ trunk/Master/texmf-dist/doc/latex/pseudo/doc/pseudo.tex	2019-07-04 21:14:09 UTC (rev 51553)
@@ -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 @@
 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 @@
     \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 @@
 
 \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 @@
 
         \mode_if_vertical:F {
             \unskip \par
+            \group_insert_after:N \@endparenv
         }
 
         \addvspace{ \l_tmpa_skip }

Modified: trunk/Master/texmf-dist/tex/latex/pseudo/pseudo.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pseudo/pseudo.sty	2019-07-04 21:13:54 UTC (rev 51552)
+++ trunk/Master/texmf-dist/tex/latex/pseudo/pseudo.sty	2019-07-04 21:14:09 UTC (rev 51553)
@@ -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 }
     }



More information about the tex-live-commits mailing list