diff options
Diffstat (limited to 'macros/latex/contrib/xsim/code/xsim.verbwrite.code.tex')
-rw-r--r-- | macros/latex/contrib/xsim/code/xsim.verbwrite.code.tex | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/macros/latex/contrib/xsim/code/xsim.verbwrite.code.tex b/macros/latex/contrib/xsim/code/xsim.verbwrite.code.tex index 83124c5ff2..a04ab8fed4 100644 --- a/macros/latex/contrib/xsim/code/xsim.verbwrite.code.tex +++ b/macros/latex/contrib/xsim/code/xsim.verbwrite.code.tex @@ -8,7 +8,7 @@ % Web: https://github.com/cgnieder/xsim % E-Mail: contact@mychemistry.eu % ---------------------------------------------------------------------------- -% Copyright 2017--2018 Clemens Niederberger +% Copyright 2017--2019 Clemens Niederberger % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -66,7 +66,7 @@ { \xsim_if_final:F { \iow_close:N #1 } } % #1: write stream -% #1: contents +% #2: contents \cs_new_protected:Npn \__xsim_write_to_stream:Nn #1#2 { \xsim_if_final:F @@ -75,6 +75,9 @@ % no options are given to the surrounding environment: \tl_set:Nn \l__xsim_tmpa_tl {#2} \tl_remove_once:Nn \l__xsim_tmpa_tl {~} + % \tl_show:N \l__xsim_tmpa_tl + % \int_show:n { \tl_count:N \l__xsim_tmpa_tl } + % \tl_analysis_show:N \l__xsim_tmpa_tl \int_zero:N \l__xsim_tmpa_int \int_while_do:nn { \l__xsim_tmpa_int < \l_xsim_line_gobble_int } { @@ -147,10 +150,10 @@ \cs_set:Npx \__xsim_M:w { \exp_not:N \end {\@currenvir} } % \char_set_active_eq:nN {13} \__xsim_M:w % % the last line is `##1 \end{\@currenvir} ##2': - % \tl_if_blank:nF {##1} % - % { \__xsim_write_to_stream:Nn \l__file_contents_iow {##1} }% - % \tl_if_blank:nF {##2} % - % {}% + \tl_if_blank:nF {##1} % + { \__xsim_write_to_stream:Nn \l__file_contents_iow {##1} }% + \tl_if_blank:nF {##2} % + {} % } % ^^M % } % @@ -204,6 +207,6 @@ \NewDocumentCommand \XSIMgobblechars {m} { \int_set:Nn \l_xsim_line_gobble_int {#1} } - + % ---------------------------------------------------------------------------- \file_input_stop: |