Skip to content

Commit

Permalink
firstaid for #605
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankMittelbach committed Jun 28, 2021
1 parent 4166dff commit 5fb2860
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 9 deletions.
2 changes: 1 addition & 1 deletion base/testfiles/tlb0406.luatex.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ l. ...\DeclareMathSymbol{a}{7}{operators}{`\a}
l. ...\DeclareMathSymbol{a}{7}{letters}{`\a}
> 31457377.
<to be read again>
\tex_par:D
\scan_stop:
l. ...
2 changes: 1 addition & 1 deletion base/testfiles/tlb0406.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ l. ...\DeclareMathSymbol{a}{7}{operators}{`\a}
l. ...\DeclareMathSymbol{a}{7}{letters}{`\a}
> 29025.
<to be read again>
\tex_par:D
\scan_stop:
l. ...
2 changes: 1 addition & 1 deletion base/testfiles/tlb0942.luatex.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -737,5 +737,5 @@ l. ...\showthe
\mathcode`\z
> 31457402.
<to be read again>
\tex_par:D
\scan_stop:
l. ...
2 changes: 1 addition & 1 deletion base/testfiles/tlb0942.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -737,5 +737,5 @@ l. ...\showthe
\mathcode`\z
> 29050.
<to be read again>
\tex_par:D
\scan_stop:
l. ...
2 changes: 1 addition & 1 deletion base/testfiles/tlb2558.luatex.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ For xelatex or lualatex save the document in UTF-8 encoding
and do not use inputenc, or use the [utf8] option.
> 11.
<to be read again>
\tex_par:D
\scan_stop:
l. ...
! Package inputenc Error: inputenc is not designed for xetex or luatex.
(inputenc) only UTF-8 supported.
Expand Down
2 changes: 1 addition & 1 deletion base/testfiles/tlb2558.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ File: latin1.def ....-..-.. v... Input encoding file
)
> 11.
<to be read again>
\tex_par:D
\scan_stop:
l. ...
> 12.
l. ...\showthe\catcode`\@
Expand Down
2 changes: 1 addition & 1 deletion base/testfiles/tlb2558.xetex.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ For xelatex or lualatex save the document in UTF-8 encoding
and do not use inputenc, or use the [utf8] option.
> 11.
<to be read again>
\tex_par:D
\scan_stop:
l. ...
! Package inputenc Error: inputenc is not designed for xetex or luatex.
(inputenc) only UTF-8 supported.
Expand Down
6 changes: 6 additions & 0 deletions required/firstaid/changes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2021-06-28 Frank Mittelbach <Frank.Mittelbach@latex-project.org>

* latex2e-first-aid-for-external-files.dtx:
Add first aid for strange bogus para/end error due to listings's
redefinition of \vskip.

2021-06-24 Frank Mittelbach <Frank.Mittelbach@latex-project.org>

* latex2e-first-aid-for-external-files.dtx (subsection{\footref first aid}):
Expand Down
34 changes: 32 additions & 2 deletions required/firstaid/latex2e-first-aid-for-external-files.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@
% \end{macrocode}
%
% \begin{macrocode}
\def\LaTeXFirstAidDate{2021/06/24}
\def\LaTeXFirstAidVersion{v1.0n}
\def\LaTeXFirstAidDate{2021/06/28}
\def\LaTeXFirstAidVersion{v1.0o}
% \end{macrocode}
%
% \begin{macrocode}
Expand Down Expand Up @@ -679,6 +679,36 @@
\ExplSyntaxOff
% \end{macrocode}
%
% The next fixes Github issue 605 (by inserting a \cs{scan_stop:}
% before doing the check for hmode.
% \begin{macrocode}
\ExplSyntaxOn
\cs_set_protected:Npn \para_end: {
\scan_stop:
\mode_if_horizontal:TF {
\mode_if_inner:F {
\tex_unskip:D
\hook_use:n{para/end}
\@kernel@after@para@end
\mode_if_horizontal:TF {
\if_int_compare:w 0 < \tex_lastnodetype:D
\tex_kern:D \c_zero_dim
\fi:
\tex_par:D
\hook_use:n{para/after}
\@kernel@after@para@after
}
{ \msg_error:nnnn { hooks }{ para-mode }{end}{horizontal} }
}
}
\tex_par:D
}
\cs_set_eq:NN \par \para_end:
\cs_set_eq:NN \@@par \para_end:
\cs_set_eq:NN \endgraf \para_end:
\ExplSyntaxOff
% \end{macrocode}
%
% \begin{macrocode}
%</kernel>
% \end{macrocode}
Expand Down

0 comments on commit 5fb2860

Please sign in to comment.