Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{article}
- makeatletter
- newcommand@ifnextchars[3]{%
- expandafterifxexpandafter@empty#1@empty%
- def@ifnextchars@tmp{#3}%
- else%
- def@ifnextchars@tmp{%
- expandafterexpandafterexpandafter@ifnextchars@auxexpandafter%
- {@car#1@nil}{@cdr#1@nil}{#2}{#3}%
- }%
- fi%
- @ifnextchars@tmp%
- }
- newcommand@ifnextchars@aux[4]{%
- expandafter@ifnextchar#1{%
- #3%
- }{%
- @ifnextchars{#2}{#3}{#4}%
- }%
- }
- newcommandwhereinsentence{%
- @ifnextchars{.!?}{%
- I am in the end of a sentence.
- }{%
- I am not in the end of a sentence.
- }
- }
- newcommandvowel{%
- @ifnextchars{aeiouy}{%
- Vowel:
- }{%
- Not vowel:
- }
- }
- makeatother
- begin{document}
- Here is whereinsentence a sentencewhereinsentence.
- vowel a.
- vowel b.
- end{document}
- Runaway argument?
- {I am in the end of a sentence. }{@ifnextchars {@cdr @cdr .!?@nil ETC.
- ! Paragraph ended before @cdr was complete.
- <to be read again>
- par
- l.44
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement