{tex-core} is for questions that are independent of formats and macro packages. Such questions usually relate to low-level TeX programming or the behaviour of TeX at an underlying level. Note that even Plain TeX is a format in itself; for questions about it, use {plain-tex}.

learn more… | top users | synonyms (1)

3
votes
1answer
136 views

How do LaTeX macros interact with the TeX engine?

From wiki on LaTeX the basic requirement is to have a TeX compiler (which is used to generate output files from source), fonts, and the LaTeX macro set. Assuming I have a TeX engine and I ...
4
votes
1answer
301 views

LaTeX structure

I have question about LaTeX structure and how LaTeX works? Is it just a set of macros for TeX? What happens, when I call latex somefile.tex? Does latex just includes somefile into a file, which ...
9
votes
3answers
401 views

How to force LaTeX only commands?

Recently, I learned that for a long time I have been doing all of my mathematics in LaTeX incorrectly! I was using the $ TeX commands instead of the \( and \) LaTeX commands! I immediately went back ...
1
vote
2answers
374 views

Where does LaTeX loose its breath? [closed]

LaTeX is a markup(typesetting) language typically used to typeset books. It has got a huge collection of classes and packages to work with. Now, obviously, LaTeX cannot be compared to Adobe Products(...
124
votes
10answers
10k views

Why is LaTeX so complicated? [closed]

I have been using LaTeX professionally almost every day for almost 10 years, so I think I can say that, by now, I more or less know what I'm doing. I also do a lot of ordinary computer programming, in ...
1
vote
0answers
201 views

Reference of Latex/Plain Tex control sequences [closed]

I'm looking for a reference of the control sequences defined in Latex and plain Tex similar to this one for the build-in primitives. The Texbook states that there are about 600 macros in plain Tex. ...
6
votes
1answer
450 views

Is there a language standard (ISO, ANSI, …) for LaTeX?

Coming from the C/C++ world, I am used to a standardized language. There are differenct standards, such as ISO or ANSI C. Is there a language standard for LaTeX? (Syntax, keywords, ...)
161
votes
23answers
8k views

Are there any open research problems in the world of TeX?

For a year-long capstone project in computer science, I have to do some 'original research.' I'm still not entirely sure what this entails, but it just struck me that perhaps I can do research and ...
24
votes
2answers
529 views

Will LaTeX work on any TeX?

As I understand it, latex is simply a macro package for tex, as in tex the program, not the format. (Again, weird, but I understand LaTeX to be a format of TeX.) Does this imply that LaTeX the ...
0
votes
1answer
888 views

What is the main difference between command latex, tex, pdflatex, pdftex … and all the other commands? [duplicate]

I am new to TeX world, and I use pdfLatex very often. But sometimes pdfLatex do not work. So I begin to wonder what the difference between all these tex commands. Please give me some guiding ...
58
votes
2answers
2k views

If LaTeX is only a macro package, why does it have its own executable?

From other answers on this site and the FAQ of the TeX User Group my understanding is that: TeX is the original typesetting program, written by Knuth Omega, eTeX, pdfTeX, XeTeX, LuaTeX are engines. ...
3
votes
3answers
315 views

How exactly are TeX and LaTeX related? [duplicate]

I know that plain TeX is the low-level typographical language that describes nearly every aspect of presentation, taking care of things like paragraph breaks, new pages, and the like. I know (well, I'...
8
votes
5answers
421 views

What sequence of documents should I read to know “all of” TeX and then LaTeX?

I know that there are a already number of questions on this site about good instructional (La)TeX materials for users at different levels. What I am interested in, though, is what set of documents ...
5
votes
0answers
216 views

How would (La)TeX be different if it had been created recently? [closed]

If Knuth/Lamport/anyone else had created a typesetting system with the flexibility and power of TeX, using everything we have learned about computation and programming languages in the last 35 years, ...
3
votes
1answer
2k views

Including a PDF for dvi output

I want to include a multipage-pdf in latex and get .dvi output. I know \include{pdfpages} only works with pdfLaTeX. I can't convert PDF to .eps since it is multi-page. I want to have .dvi output with ...
99
votes
8answers
28k views

Why are there no alternatives to TeX, or, why is TeX still used? [closed]

I'm fairly new to TeX and LaTeX, having been drawn in by the Big Idea — creating a document programmatically. However, my experience of TeX (and its libraries — LaTeX, ConTeXt, …) has been almost ...
21
votes
6answers
1k views

LaTeX Markup Options?

I was wondering what prevented the implementation of a MarkDown system in (La)TeX? I know that pandoc does a conversion of MarkDown with extra features to LaTeX. I also know that many are happy with ...
26
votes
1answer
3k views

What are the differences between TeX counts and LaTeX counters?

The title already states the whole question. It has been answered by Joseph Wright at http://www.texdev.net/2009/11/17/tex-counts-and-latex-counters/, but I have not seen the according answer here at ...
114
votes
7answers
34k views

What is the difference between TeX and LaTeX?

I know LaTeX and I've heard that LaTeX is a set of macros in TeX. But what does it exactly mean?
30
votes
5answers
969 views
4
votes
2answers
191 views

Are xelatex, pdflatex, … compilers?

I am just asking for the terminology here. I know the technical details of what pdflatex, xelatex and similiar software really is. But how would you describe that? a "compiler"? does it "compile" ...
3
votes
0answers
67 views

Diagrams of TeX Design

In order to understand TeX better, and in order to procrastinate on stuff that is almost certainly more important, I'm slowly working my way through a YouTube series of Knuth explaining TeX82 ...
6
votes
1answer
89 views

How can I retrieve the number of currently defined macros?

The following will max-out TeX's memory: % arara: pdftex \nonstopmode \input expl3-generic \relax \ExplSyntaxOn \int_zero:N \l_tmpa_int \int_while_do:nn { \l_tmpa_int < 490000 } { \cs_new:...
4
votes
3answers
135 views

How to make existing \strut-based code work with accented letters?

\strut-based solutions assume that heights cannot exceed 8.5 pt and depth - 3.5 pt. But with accented letters this assumption is not true. In the second example the last line is lower than in the ...
6
votes
2answers
136 views

How to extend existing macro with \edef?

\edef does expansion, but does not execute the commands. How in the following example make so that \foo will do assignment to \tmp at the moment of its call, not when it is defined? Why \foo produces ...
12
votes
3answers
2k views

How do I get the width of \hfill?

In my LaTeX document, I have a first line with a given spacing obtained using \hfill, then a paragraph, and then a third line in which I would like to use the same spacing as in the first line. The ...
5
votes
1answer
225 views

Empty/blank lines in LaTeX code

I hope this question is in order here although it rather asks for a "best practice" than for some "solution". I am wondering to what extent blank/empty lines in the code (I am using pdflatex) should ...
15
votes
1answer
511 views

Is Knuth's *The TeXBook* complete?

Suppose I want to learn TeX. Then, is The TeXBook a complete source? Does it cover all relevant aspects of TeX? Or is there something worth learning about TeX which is not present there? Does "TeX ...
10
votes
1answer
2k views

Expansion in \numexpr…\relax versus \pdfstrcmp

The \numexpr...\relax construction in eTeX allows to evaluate numerical expressions, and it expands tokens fully as it goes. The \pdfstrcmp{...}{...} construction in pdfTeX lets us compare two lists ...
9
votes
1answer
730 views

\pdfstrcmp or \strcmp in pure TeX

I'm trying to get LaTeX3 working with an old e-TeX kernel, and it fails due to the lack of \pdfstrcmp (or XeTeX's \strcmp equivalent). Is there a pure TeX definition of \pdfstrcmp that I could insert ...
8
votes
1answer
171 views

Infinite loop in \everypar

Why the following code enters an infinite loop? \everypar={\hrule} a \bye \tracingcommands=1 gives this: {vertical mode: \everypar} {blank space } {the letter a} {horizontal mode: \hrule} {\par} {...
8
votes
1answer
412 views

A “#1#” argument. What is the meaning of the second hash? [duplicate]

In an answer to this question Automatically replace environment align by equation+aligned combination egreg uses \def\relaxtag#1#{\relaxrelaxtag} \def\relaxrelaxtag#1{} The role of the second # is ...
6
votes
1answer
127 views

How to draw borders around page contents

During learning, while conducting different experiments, it's useful to see actual page borders. So I wrote the code which does this and would like to know whether it is the proper way to accomplish ...
17
votes
3answers
417 views

Can I convert a string to catcode 11?

In the TeX FAQ there's a way to test if the jobname is equal to something (comparing the jobname). The difficulty of the naïve test is that the contents of the \jobname primitive are catcode 12 so to ...
15
votes
4answers
363 views

Using the filename in the document?

I have a bunch of documents called wk01.tex wk02.tex and so on up to (eventually) 20. These are weekly handouts for a course I TA. Currently, each document starts with a \def\classweek{5} or whatever. ...
12
votes
4answers
292 views

Useful applications of \edef with macro arguments

Well, it's been in my head for some time, but I haven't got anything out of it, so I ask here. At what places could be useful to have \edef\foo#1{..}? What applications could it have? Is it useful at ...
53
votes
4answers
2k views

What is a token?

Please forgive such a basic question, but I did some Google searching and looked around on this site, and while there are many threads and online resources that involve tokens, I can't seem to find a ...
3
votes
1answer
236 views

How to set margins and page size in pdfLaTeX without geometry?

What is the TeX equivalent of \usepackage[paperwidth=10cm, paperheight=15cm, margin=0mm, bottom=1mm]{geometry} ? I know nothing in TeX and so far, I am playing ...
2
votes
1answer
71 views

Calculation in a TeX function. How to do it?

I don't know anything of TeX but would like to improve a function. Here is the initial function: \newcommand{\setnewvsize}[1]{% \global\paperheight\dimexpr#1+\initialVerticalInset\relax% \global\...
8
votes
2answers
186 views

Commands that disable everything except the counters

what I'm looking for... I'm looking for a couple a commands, \disableAllButCounters and \enableAll that would do the following: Everything between \disableAllButCounters and \enableAll would ...
11
votes
2answers
735 views

How are curly braces used?

In TeX, the same characters (namely, { and }) are used for grouping and to define macros (\def{...}). I think that this is because it can be distinguished from context which one is which. So, ...
5
votes
2answers
78 views

Output Location of Element

Suppose I have a LaTeX document, the entirety of whose content is: $\frac{a+b}{c}$ Now, suppose I want to bounding rectangles for the $a$, $b$, and $c$. Is there a way to DEFINE A FUNCTION "bbox" ...
7
votes
2answers
112 views

\write and \ifmmode

This is related to a previous question of mine (if I understand correctly, \write works a bit like \edef). Consider the following code: \documentclass[varwidth,convert={size=640}]{standalone} \...
5
votes
1answer
186 views

\edef, \xdef and \ifmmode

I don't understand the difference between \edef and \xdef in the following code. Clearly, the \xdef does what I'm expecting but why? AFAIK, $ does not start a group. \documentclass[varwidth]{...
3
votes
2answers
53 views

What are the rules for style change in formulas (Plain TeX)?

Both numerator and denominator in the following two formulas are of the same size, namely \textstyle (from which we conclude, that: 1) style change does not affect the digit, which immediately follows;...
1
vote
1answer
44 views

Weird spaces after \magstepN

Consider example1: hello% world \bye In example2 a space is added between o and w, in comparison with example 1: hello% \magnification\magstep0 world \bye (It seems that space (which appeared ...
11
votes
1answer
154 views

Why does \moveleft not contribute to width but \moveright does?

Consider example1: \setbox1=\vbox{ \moveleft 1pt \vbox{\hrule width 4pt height 10pt depth 0pt} \hrule width 4pt height 10pt depth 0pt } \showbox1 The output: \vbox(20.0+0.0)x4.0 .\vbox(10.0+0....
6
votes
3answers
230 views

nested \ifnum commands

I'm trying to make macro to work in biblatex edition field. Logic is following: if edition =1 there is suffix -li (1-li) if edition>1 and if edition<21 there is prefix me- (me-15,me-20 ..etc) if ...
14
votes
1answer
385 views

How to write a two-pass system in TeX?

On page 400 of The TeXbook ("Dirty tricks" part) it is said: An output routine can also write notes on a file, based on what occurs in a manuscript. A two-pass system can be devised where TeX ...
4
votes
1answer
62 views

Why depth of \vadjust does not influence interline glue?

Consider the following examples: example1.tex %\input vadjust_hook \def\marginalstar{\strut\vadjust{\kern-\dp\strutbox\specialstar}} \def\specialstar{\vtop to \dp\strutbox{ \baselineskip\dp\...