4
votes
0answers
51 views

What is the difference between putting macros in a .sty package file vs. simply \input them from another .tex file? [duplicate]

If \input just "imports the commands from the [target file]" into your new document, then what is the difference between calling a set of commands via \input{filename} (where filename is some .tex ...
4
votes
1answer
65 views

Hook into \input (or any underlying command) in order to allow transparent preprocessing

Which command would be most suitable to be hooked in order to preprocess input before it is passed to TeX? Input file: \begin{document} \input{a} \end{document} Seen by TeX (after a file ...
1
vote
1answer
133 views

Is that a bug between `xymatrix`, the `input` command and .sty file?

I have a problem compiling the following document. First, I have a file macros.sty that consists of : \newcommand{\test}{ \xymatrix@R=0mm{x} } Then, I have an auxiliary file out.aux that consists ...
6
votes
3answers
239 views

Is there a way to load additional packages specified in the document environment?

It seems strange but I really need this. Is there a built-in macro to load additional packages specified in the document environment? % main.tex \documentclass{article} \begin{document} ...