Created
March 15, 2019 22:25
-
-
Save k16shikano/5b5a329f3b32f080764c1b8e6c5c2a7c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\def\seqinsert{\ifmmode\allowbreak\else\hspace{0pt plus 0.02em}\fi} | |
\def\seqsplit#1{\SQSPL@scan#1\SQSPL@end} | |
\def\SQSPL@scan{\futurelet\SQSPL@next\SQSPL@scani} | |
\def\SQSPL@scani#1{% | |
\ifx \SQSPL@end \SQSPL@next \def\SQSPL@process{\@gobble}% | |
\else \ifx \@sptoken\SQSPL@next \def\SQSPL@process{\SQSPL@sp@doprocess}% | |
\else \def\SQSPL@process{\SQSPL@doprocess}\fi\fi% | |
\SQSPL@process{#1}} | |
\def\SQSPL@doprocess#1{#1\SQSPL@insert} | |
\def\SQSPL@sp@doprocess{◇\SQSPL@scan} | |
\def\SQSPL@insert{\futurelet\SQSPL@next\SQSPL@doinsert} | |
\def\SQSPL@doinsert{% | |
\ifx \SQSPL@end \SQSPL@next \relax% | |
\else \seqinsert \fi% | |
\SQSPL@scan} | |
\def\HS{\space} | |
\DeclareRobustCommand{\breakablett}[1]{{\ttfamily\seqsplit{#1}}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based on seqsplit implementation.