I have just read https://tex.stackexchange.com/questions ... e-the-file
It shows that \input is not equivalent to typing ( https://tex.stackexchange.com/questions ... vs-include says that it is equivalent).
Would it be interesting to make the input command equivalent to typing? If any of the LaTeX3 team is listening in this forum, could this be part of the new system?
As far as I understand, it works in this way because of the way TeX works (expansion). But it would make sense to make it work in another way :-)

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide : 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook : 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ : the first book about TikZ for perfect drawings in your LaTeX thesis

Hi Giovanni!
In normal use \input is equivalent to typing. Indeed, there are exceptions, rare cases, and they are unusual, such as that case - using \input within a macro or an environment definition gives the question, does it have to be interpreted at definition time (only that time once) or each time the macro (or environment) runs when the whole document is translated.
I would use \input in a sane way, to externalize code parts, but not fragements of code parts within definitions. So I would not use \input within a number, in an argument, or within a command name. That goes too far. Here, \input relies on the outside context, and expansion time.
That question is interesting, but if we stay practical, introducing a new \input that covers extreme situations would not be very efficient, as not many people might use it, I guess. But the standard \input is handy in normal life for everybody.
Stefan
Stefan Kottwitz wrote: Hi Giovanni!
In normal use \input is equivalent to typing. Indeed, there are exceptions, rare cases, and they are unusual, such as that case - using \input within a macro or an environment definition gives the question, does it have to be interpreted at definition time (only that time once) or each time the macro (or environment) runs when the whole document is translated.
I would use \input in a sane way, to externalize code parts, but not fragements of code parts within definitions. So I would not use \input within a number, in an argument, or within a command name. That goes too far. Here, \input relies on the outside context, and expansion time.
Stefan
This is reasonable. However, it raises a second point, which is important in my opinion. The clarity of the documentation of LaTeX can be improved ; I say it from my point of view - I have used LaTeX with a superficial knowledge of it for about 15 years and the documentation is not satisfactory for me.
In this case, the correct statement (different from the one that appeared on StackExchange) is
\input is expanded to the content of the file, and this in normal cases is equivalent to typing.
For example in https://en.wikibooks.org/wiki/LaTeX/Mod ... vs_include
I read:
"When the compiler processes your base file and reaches one of the commands \input or \include , it reads filename.tex and processes its content in accordance with the formatting commands specified in the base file"
(it is talking about the commands \input{filename} and \include{filename} )
while the correct statement - as far as I understand - is "When the compiler expands the command \input ".
The complaint on the documentation is however more general ;-)
it's not really LaTeX documentation, it's just a Wikibook that's not written by the LaTeX team. I guess anybody could edit it.
Stefan
Stefan Kottwitz wrote: it's not really LaTeX documentation, it's just a Wikibook that's not written by the LaTeX team. I guess anybody could edit it.
Stefan
You caught me there :-)
On my statement that the LaTeX documentation is not satisfactory though I am insisting. I even have an authoritative source: Christian Feuersänger.
Have a look at this:
https://archive.ins.uni-bonn.de/wissrec ... ferenz.pdf
He says in the abstract
"Dieses Dokument entstand über mehrere Jahre, in denen ich das Resultat von zum Teil stundenlangem Suchen nach LATEX-Einstellung gesammelt habe"
I do not need to translate it for you, but for people that do not know German: "I composed this document over many years, collecting the results of my searches, that sometimes took hours, for LaTeX settings."
Even if he did not mean it in the way that I mean, I think I am reporting it in a fair way: a person with a university degree in Computer Science, and expert in TeX and LaTeX, needs many years to collect information on LaTeX settings. I think that this can and should be improved.
For the \input command: Source2ε refers to TeX, and in the TeXBook there is a single line that explains it as far as I could see (I am not aware of an official TeX reference manual).
Johannes_B wrote: https://chat.stackexchange.com/transcript/41?m=47473464#47473464
Look at the few messages above. Thanks, it is helpful (it will take a bit of time before I can parse it completely). Of course it is also an information that would belong nicely to a good LaTeX documentation.
  • LaTeX's Friends
  • ↳   BibTeX, biblatex and biber
  • ↳   MakeIndex, Nomenclature, Glossaries and Acronyms
  • ↳   Conversion Tools
  • ↳   Viewers for PDF, PS, and DVI
  • ↳   XeTeX
  • ↳   Others
  • LaTeX Distributions
  • ↳   Decision Guidance
  • ↳   MiKTeX and proTeXt
  • ↳   TeX Live and MacTeX
  • ↳   Others
  • LaTeX Editors
  • ↳   Decision Guidance
  • ↳   AUCTeX
  • ↳   Kile
  • ↳   LEd
  • ↳   LyX
  • ↳   Scientific Word/Workplace
  • ↳   Texmaker and TeXstudio
  • ↳   TeXnicCenter
  • ↳   Announcements
  • ↳   General
  • ↳   Templates, Wizards & Tools
  • ↳   Feature Suggestions
  • ↳   Development
  • ↳   TeXShop
  • ↳   TeXworks
  • ↳   WinEdt
  • ↳   WinShell
  • ↳   Others
  • LaTeX Templates
  • ↳   Articles, Essays, and Journal Templates
  • ↳   Theses, Books, Title pages
  • ↳   Letters
  • ↳   Presentations and Posters
  • ↳   Curricula Vitae / Résumés
  • ↳   Assignments, Laboratory books and reports
  • ↳   Calendars and Miscellaneous
  • LaTeX Community
  • ↳   Announcements
  • ↳   Community talk
  • ↳   Comments & Wishes
  • ↳   New Members
  • LaTeX Books
  • ↳   LaTeX Beginner's Guide
  • Learn LaTeX easily with newest books:

    The LaTeX Beginner's Guide : 2nd edition and perfect for students writing a thesis

    The LaTeX Cookbook : 2nd edition full of practical examples for mathematics, physics, chemistry, and more

    LaTeX Graphics with TikZ : the first book about TikZ for perfect drawings in your LaTeX thesis


    Advertisements by Advertisement Management
    Powered by phpBB ® Forum Software © phpBB Limited phpBB Two Factor Authentication © paul999 Privacy Terms