I am a question about terminology. When I think about source code I usually think about the code that a program is compiled from. But I also often call the code in the .tex file source code. Is this correct? So I might say

"The source code for the LaTeX file is ..."


"You compile the source code and that produces a PDF file"

  • I call it "document source" file or code. – Steven B. Segletes Nov 16 '15 at 13:56
  • I have seen the term "source file" used commonly. – jak123 Nov 16 '15 at 14:01
  • 1
    As you can see in the Related (to the right) LaTeX source code is commonly used, just as one would say C source code or Matlab source code. – John Kormylo Nov 16 '15 at 17:50

I think at last there is not only one correct answer for this, because there are several possibilitys to mention what an LaTeX input file does.

Similar to programming languages like FORTRAN, Algol68, Pascal, C, C++ the written code for this programming languages is usually called "source code", because this code is compiled and changed to an executable file.

Because you can see the translating of the LaTeX input file to an printable pdf document the same process done with programming languages (and programming languages exists first) the well known words "source code" is often used.

But there exist some other word combinations expressing at last the same:

See for example:

  • lshort.pdf (page 8, point 1): LaTeX input file
  • usrguide.pdf: Source Code
  • tex.stackexchange.com: LaTeX source file or source file for LaTeX
  • Wikibook: See chapter: 2.3. Editors: TeX and LaTeX source documents
  • http://tug.org/levels.html:: See Output formats: TeX source files* ...

To summarize: TeX/LaTeX source file/code/document or TeX/LaTeX input file means at last the same. Sometimes with TeX/LaTeX, sometimes without ...

Open lshort.pdf and usrguide.pdf with texdoc lshort and texdoc usrguide.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.