Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass{article}
- \usepackage{etoolbox}
- \newcounter{listcount}
- \newcommand{\ppath}[2][$\;\triangleright\;$]{%
- \setcounter{listcount}{0}% Restart list count
- \renewcommand*{\do}[1]{\stepcounter{listcount}}% Count list item
- \docsvlist{#2}% Process list and count items
- \def\nextitem{\def\nextitem{#1}}% Separator
- \renewcommand*{\do}[1]{%
- \addtocounter{listcount}{-1}%
- \ifnum\value{listcount}=0 ~and~\else\nextitem\fi\textsf{##1}}% How to process each item
- \docsvlist{#2}% Process list
- }
- \begin{document}
- A decent file path is \ppath[, ]{File,New,Document}.
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement