Skip to content

Commit

Permalink
exppl2e.sty: space character at the beginning of \verb (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
aminophen committed Aug 12, 2017
1 parent b7235b9 commit 033fdde
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 1 deletion.
68 changes: 68 additions & 0 deletions exppl2e.sty
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,74 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{verb$B$NKAF,$N%9%Z!<%9(B}
%
% \begin{macro}{\verb}
% \changes{v1.1b}{1995/04/05}{$B8_49%b!<%I$N$H$-$O!"(Bpl209.def$B$NDj5A$r;H$&(B}
% \changes{v1.1g}{1997/01/16}
% {\cs{verb}$B%3%^%s%I$r(B\LaTeX\ \texttt{!<1996/06/01!>}$B$K9g$o$;$F=$@5(B}
% \LaTeX{}$B$N(B|\verb|$B%3%^%s%I$G$O!"?t<0%b!<%I$G$J$$$H$-$O!"(B
% |\leavevmode|$B$G?eJ?%b!<%I$KF~$C$?$"$H!"(B|\null|$B$r=PNO$7$F$$$^$9!#(B
% $B%^%/%m(B|\null|$B$O(B|\hbox{}|$B$H$7$FDj5A$5$l$F$$$^$9$N$G!"(B
% $B$3$3$K$OOB2$J84V%9%Z!<%9!J(B|\xkanjiskip|$B!K$,F~$j$^$;$s!#(B
%
% $B$7$+$7!"C1$K(B|\null|$B$r=|$$$F$7$^$&$H!":#EY$O(B|\verb+ abc+|$B$N$h$&$K(B
% |\verb|$B$NKAF,$KH>3Q6uGr$,$"$k>l9g$K$3$l$,>C$($F$7$^$$$^$9(B(TeX.SX 170245)$B!#(B
% $B$=$3$G!"(Bp\LaTeX{}$B$G$O(B|\null|$B$NBe$o$j$K(B
% \begin{enumerate}
% \item $BOB2$J84V%9%Z!<%9$NA^F~=hM}$OF)2a$9$k(B
% \item $B9TJ,3d;~$K>C$($k(B(discardable)$B%N!<%I$G$O$J$$(B
% \end{enumerate}
% $B$NN>>r7o$rK~$?$9%N!<%I$rA^F~$7$^$9!#$3$3$G$O(B|\vadjust{}|$B$H$7$^$7$?!#(B
%
% $B$3$N%^%/%m$O!"(B\file{ltmiscen.dtx}$B$GDj5A$5$l$F$$$^$9!#(B
% \changes{v????}{????/??/??}{\cs{verb}$B$NKAF,$NH>3Q6uGr$rJ];}(B}
% \begin{macrocode}
%<platexrelease>\plIncludeInRelease{????/??/??}{\verb}
%<platexrelease> {Preserve beginning space characters}%
%<*plcore|platexrelease>
\if@compatibility\else
\def\verb{\relax\ifmmode\hbox\else\leavevmode\vadjust{}\fi
\bgroup
\verb@eol@error \let\do\@makeother \dospecials
\verbatim@font\@noligs
% \end{macrocode}
% \LaTeXe\ 2017-04-15$B$KDI?o$7$F!"(B|\verb|$B$NESCf$G%O%$%U%M!<%7%g%s$,5/$-$J$$(B
% $B$h$&$K(B|\language|$B$r@_Dj$7$^$9!J;29M!'(Blatex2e svn r1405$B!K!#(B
% \changes{v1.2m}{2017/03/19}{\cs{verb}$B$NESCf$G%O%$%U%M!<%7%g%s$,5/$-$J$$(B
% $B$h$&$K(B\cs{language}$B$r@_Dj(B(sync with ltmiscen.dtx 2017/03/09 v1.1m)}
% \begin{macrocode}
\language\l@nohyphenation
\@ifstar\@sverb\@verb}
\fi
%</plcore|platexrelease>
%<platexrelease>\plEndIncludeInRelease
%<platexrelease>\plIncludeInRelease{2017/04/08}{\verb}
%<platexrelease> {Disable hyphenation in verb}%
%<platexrelease>\if@compatibility\else
%<platexrelease>\def\verb{\relax\ifmmode\hbox\else\leavevmode\fi
%<platexrelease> \bgroup
%<platexrelease> \verb@eol@error \let\do\@makeother \dospecials
%<platexrelease> \verbatim@font\@noligs
%<platexrelease> \language\l@nohyphenation
%<platexrelease> \@ifstar\@sverb\@verb}
%<platexrelease>\fi
%<platexrelease>\plEndIncludeInRelease
%<platexrelease>\plIncludeInRelease{0000/00/00}{\verb}
%<platexrelease> {Disable hyphenation in verb}%
%<platexrelease>\if@compatibility\else
%<platexrelease>\def\verb{\relax\ifmmode\hbox\else\leavevmode\fi
%<platexrelease> \bgroup
%<platexrelease> \verb@eol@error \let\do\@makeother \dospecials
%<platexrelease> \verbatim@font\@noligs
%<platexrelease> \@ifstar\@sverb\@verb}
%<platexrelease>\fi
%<platexrelease>\plEndIncludeInRelease
% \end{macrocode}
% \end{macro}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{tabular$B4D6-$N%;%kFb$N(BJFM$B%0%k!=(B}
%
% p\LaTeXe{}$B%+!<%M%k(B(2017/07/29)$B$KF3F~$7$?$?$a:o=|!#(B
Expand Down
9 changes: 8 additions & 1 deletion tests/verb_nohyphenation.tex
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,17 @@
\verb@eol@error \let\do\@makeother \dospecials
\verbatim@font\@noligs
\@ifstar\@sverb\@verb}
%% pLaTeX (2017/04/08 candidate)
%% pLaTeX (2017/04/08)
\def\verb{\relax\ifmmode\hbox\else\leavevmode\fi
\bgroup
\verb@eol@error \let\do\@makeother \dospecials
\verbatim@font\@noligs
\language\l@nohyphenation
\@ifstar\@sverb\@verb}
%% pLaTeX (candidate)
\def\verb{\relax\ifmmode\hbox\else\leavevmode\vadjust{}\fi
\bgroup
\verb@eol@error \let\do\@makeother \dospecials
\verbatim@font\@noligs
\language\l@nohyphenation
\@ifstar\@sverb\@verb}
16 changes: 16 additions & 0 deletions tests/verb_space.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
\documentclass{jarticle}
\textwidth10zw
\begin{document}
\parindent0pt\xkanjiskip=10pt % 強調

x

\verb| |y % \verb の冒頭の空白

\verb|a|い % \verb の前の和欧文間空白

a\verb| bcd|e % 複数の空白

a\verb|bcdbcd|e

\end{document}

0 comments on commit 033fdde

Please sign in to comment.