Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- newenvironment{foo}%
- {%
- %
- newcommandbara{}%
- newcommandbarb[1]{%
- renewcommandbara{##1}%
- typeout{FIRST}%
- typeout{##1}{bara}%
- }%
- newenvironment{baz}%
- {%
- begin{figure}[!h]%
- centering%
- begin{tikzpicture}{scale=1}%
- }%
- {%
- typeout{SECOND}%
- typeout{bara}%
- end{tikzpicture}%
- typeout{bara}%
- caption{bara}%
- end{figure}%
- }%
- }%
- {}%
- begin{foo}
- begin{baz}
- bara{abc}
- end{baz}
- end{foo}
- FIRST
- abc
- SECOND
- abc
- [blank]
- FIRST
- abc
- SECOND
- abc
- abc
- documentclass{article}
- makeatletter
- newenvironment{foo}%
- {%
- %
- newcommand@bar{}%
- renewcommandbar[1]{%
- renewcommand@bar{##1}%
- typeout{FIRST}%
- typeout{##1}{@bar}%
- }%
- %
- newenvironment{baz}%
- {%
- }%
- {%
- typeout{SECOND}%
- typeout{@bar}%
- }%
- }%
- {}%
- makeatother
- begin{document}
- begin{foo}
- begin{baz}
- bar{abc}
- end{baz}
- end{foo}
- end{document}
- % latex tmp.tex
- [snip]
- FIRST
- abc
- SECOND
- abc
- [snip]
- Output written on tmp.pdf (1 page, 11670 bytes).
- Transcript written on tmp.log.
Add Comment
Please, Sign In to add comment