Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [tex-core]

{tex-core} is for questions for syntax, semantics and expected behavior of TeX primitive control sequences, regardless of extensions (eTeX, etc.) formats (Plain or LaTeX) and macro packages (tikz). 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}.

Filter by
Sorted by
Tagged with
0
votes
0answers
23 views

Does rulewidth depend on the pdf viewer?

I set rule width like so. \newcolumntype{?}{!{\vrule width 0.001pt}} It renders just fine in my texStudio viewer, as very very faint lines. But when I open the pdf in an external viewer... I get ...
7
votes
1answer
285 views

How come the catcode of ' is 12 while ' is let to be a macro?

' is defined in latex.ltx as follows \def\active@math@prime{^\bgroup\prim@s} {\catcode`\'=\active \global\let'\active@math@prime} \def\prim@s{% \prime\futurelet\@let@token\pr@m@s} \def\pr@m@s{% \...
2
votes
2answers
90 views

\vrule and \hrule in \leaders

Those questions were came up when I was looking through The TeXbook around page 225 and solving the exercise 21.6 in there: In \leaders, are \vrule and \hrule essentially the same ? On the other ...
5
votes
1answer
85 views

Special \relax definition in the unravel package

The unravel package defines an \__unravel_special_relax: command, for which we find in the documentation the following: A special marker slightly different from \relax (its \meaning is \relax but ...
0
votes
1answer
36 views

What is the effect of {} in \eqalign?

$$\eqalign{&{}+7=b\cr}$$ and $$\eqalign{&+7=b\cr}$$ are the same; but $$\eqalign{{}+7=b\cr}$$ and $$\eqalign{+7=b\cr}$$ differ from each other (the first has more space between + and 7)....
52
votes
3answers
7k views

What does the 'etex' package do, exactly?

I was creating a rather large LaTeX project, so I had to use many packages. This gave me an error No room for a new \dimen \newdimen \MPscratchDim while my editor(Kile) opened the file supp-pdf....
2
votes
1answer
24 views

How to pass custom commands to LetLtxMacro?

I think it's fairly common to redefine macros. And I'm creating two functions to help storing and restoring these redefined macros. And so I tried using the following: \documentclass{article} \...
62
votes
2answers
20k views

What does \relax do? [duplicate]

Possible Duplicate: What is the difference between \relax and {}? The title suggest the question. On and off, I see macros here in TeX.SE and I see the \relax command frequently. I was ...
17
votes
3answers
811 views

The "^'' glyph in the TeXBook

TeX, plain TeX, within the source of the Texbook of Don Knuth, there is use of ^ in different command sequences, and in text bites. Is there a special meaning to ^ in TeX primitives, in plain TeX, ...
17
votes
2answers
2k views

Why using character ^^ff before every chapter in the TeXBook source

When viewing the source code of the TeXBook, I find that there is a character ^^ff before every chapter in it. I am wondering why using this ^^ff character which seems useless? The following ...
33
votes
1answer
587 views

Exercise 17.21 of Knuth’s TeXbook: a (known) error?

Exercise 17.21 of The TeXbook asks a question concerning \delcode: Appendix B defines \delcode‘< so that there is a shorthand notation for angle brackets. Why do you think Appendix B doesn’t ...
9
votes
1answer
501 views

Exercise 6.5 Knuth's TeXbook

Running this exercise according to the suggestions on its answer in Appendix B, I got the following result : The following lines can be seen in the log: Loose \hbox <badness 4> ... ...
11
votes
1answer
268 views

Question about exercise 7.5 in TeXbook

Consider this extract from TeXbook: EXERCISE 7.5 Experiment with TEX to see what \string does when it is followed by an active character like ~. (Active characters behave like control sequences,...
6
votes
2answers
154 views

Question about exercise 20.7 in the TeXbook

To which specific examples from answer to exercise 20.7 in TeXbook refers the following part of the answer? Category codes are not shown, but a character of category 6 always appears twice in ...
11
votes
1answer
903 views

Contradiction in a TeXbook example?

This might be a little OT, but I'm curious about this: in the TeXbook the excercises 4.1 and 4.2 mention the italic correction needed in some cases. One such case is: {\it f\/} Since TeX is only ...
3
votes
1answer
110 views

Question about exercise 14.31 in TeXbook

The following example uses \signed macro from page 106 of TeXbook: \tracingonline=1 \tracingparagraphs=1 \def\signed #1 (#2){{\unskip\nobreak\hfil\penalty50 \hskip2em\hbox{}\nobreak\hfil\sl#1\/ \rm(...
9
votes
1answer
149 views

Distinguish active characters from non-active pendants with expansion-methods only?

(Please take the following question rather for a moot point than for an everyday-problem.) Is there an expandable method for distinguishing an arbitrary explicit non-active character token from its ...
1
vote
1answer
66 views

Writing expanded macro with space to file

I'm trying to write an expanded macro to a file without the expansion eating the space after it. I could replace the {} empty group with an explicit \space, but I want this to be fairly robust. Is ...
4
votes
1answer
124 views

How to set the pdf major version in latex?

For example, in lualatex I can do: \typeout{pdfmajorversion=2} \typeout{pdfminorversion=0} But in latex I found out that I can use \pdfoptionpdfminorversion=0, but \pdfoptionpdfmajorversion=2 does ...
1
vote
2answers
40 views

Valid values for `\newfont`

I'm using a template for a thesis and want to change the font of the chapter number. The template ("classicthesis") uses: \newfont{\chapterNumber}{eurb10 scaled 7000} with using Eulerfont. I'd like ...
9
votes
1answer
142 views

\lowercase trick vs. \gdef

In this MWE I define an environment where a particular letter is active with some meaning once with the \lowercase trick and once with \gdef: \documentclass{article} \begingroup \catcode`\A=\active \...
3
votes
1answer
148 views

Knuth's 5 volume TeXbook A,B,C,D and E

Can I freely download the Knuth's 5 volume set books COMPUTERS and TYPESETTING in pdf and the source of TeX and {\sf METAFONT} that these book contain and a compiler for the sources that would ...
10
votes
3answers
386 views

How to avoid input stack overflow during recursion

Although there is already a ↗question with a similar title, I take the risk of asking again, because the linked topic is a bit bloated in my opinion, the answers/solutions too complicated. So here is ...
6
votes
3answers
777 views

\indent and \noindent: details from Knuth's The TeXbook

On page 286 in Knuth's book he writes: \noindent has no effect in horizontal mode. On the contrary on the page 283 he writes : This is exactly like \indent except that TeX starts out in ...
19
votes
2answers
6k views

How can the dimensions of a box be retrieved with LaTeX

One can specify a box in LaTeX, using various methods for example: \newsavebox{\Abox} \savebox{\Abox}{\parbox{4cm}{\lorem}} \usebox{\Abox} How can I retrieve the width, height and depth of the ...
6
votes
0answers
120 views

Historical imperfections of (La)TeX [closed]

Assume for a moment that all TeX literature, TeX software, TeX files etc. got destroyed in some global cataclysm. All information about TeX survives only in the mind of a few TeX gurus, or something ...
8
votes
3answers
2k views

What is the difference between \paperheight, \paperwidth and \pdfpageheight, \pdfpagewidth?

I couldn't find any existing answers to this question. So, what's the difference? Are there any advantages to using one duo over the other?
2
votes
1answer
44 views

What does the name “muglue” mean?

I'm wondering what muglue means in LaTeX and what it is an abbreviation/acronym of: m/u/glue. I have some idea though what glue in LaTeX means.
0
votes
0answers
26 views

ERROR Undefined control sequence `\includegraphics` [duplicate]

My question has been asked severals times on the forum but nothing works for me. I would like to insert a picture. Here's a simple example that should work but which doesn't. \documentclass{article} ...
0
votes
1answer
22 views

Nomencl Error - Unable to produce 2nd line of nomenclature

\documentclass[9pt,conference,a4paper,twocolumn]{IEEEtran} \usepackage{cite} \usepackage{amsmath,amssymb,amsfonts} \usepackage{algorithmic} \usepackage{graphicx} \usepackage{textcomp} \...
11
votes
2answers
468 views

\the vs. \value: what is the difference

I would like to understand the difference between \the and \value{} when using counters in LaTeX.
1
vote
2answers
42 views

Redefining the length-related commands to have a decimal coefficient

The macro of \! is defined as: \def\!{\mskip-\thinmuskip} and the command of \thinmuskip is initialized as being \thinmuskip = 3mu (Appendix B: p.349, The TeXBook). I couldn't have found the ...
3
votes
1answer
39 views

What is the use of putting the grave accent after \catcode?

Can someone kindly explain why is there and what is the use of the ` in \catcode`@=11? I came across that while I'm learning TeX from The TeXbook. Thank you very much.
21
votes
2answers
3k views

TeX's algorithms for “breaking paragraph into lines” and “setting the glue”

I want to learn more about the implementation of TeX's text-justification algorithm (setting the glue). After scanning through ch.12 of Knuth's TeXbook, I'm guessing that setting the glue must ...
4
votes
1answer
83 views

The mechanism that expands a double hyphen into an en-rule

What is the mechanism that transforms -- into –? How do I use the same mechanism to transform an arbitrary sequence of tokens into an arbitrary sequence of symbols?
7
votes
2answers
94 views

Is there a `for each` loop in primitive (La)TeX? [duplicate]

I am trying to iterate over the list of all basic colours: \def\thecolors{black, blue, brown, cyan, darkgray, gray, green, lightgray, lime, magenta, olive, orange, pink, purple, red, teal, violet, ...
7
votes
2answers
223 views

How to have hashes doubled _and_ things expanded?

I'd like to learn some TeX programming technique which I can always apply for handling the same type of situation: The code \newtoks\mytokenregister \def\five{\four5} \def\four{\three4} \def\three{\...
1
vote
1answer
54 views

Print out command line used

Is there a way to print out the command line used to compile the latex document? The document is compiled using an editor and I'd like to get what it is specifically using.
10
votes
2answers
939 views

How to compare integers in TeX?

I do not understand how I can compare integers in TeX. \documentclass[]{article} \begin{document} \if 1<>0 1 is not equal 0. \else 1 equals 0. \fi \end{document} According to this code ...
1
vote
1answer
62 views

How to modify \everypar safely in a package?

This is a follow-up to What does the \the\everypar do? and TikZ Overlay: Inject content at the start of the next paragraph? From a quick grep -R '\\everypar' texmf-dist/tex/latex I can see that \...
0
votes
0answers
108 views

Tex for IT professionals [duplicate]

I'm working as a programmer for about 20 years and invested a lot of time into understanding programming and computers before earning money with it. I've learned to program Java, use Windows, then ...
30
votes
5answers
3k views

How does one append material to a token list?

Several times, the floatrow package uses \newtoks which (according to this website) means that a token register is allocated. An example code snippet is \@ifdefinable\FR@everyfloat{\newtoks\FR@...
0
votes
1answer
74 views

Is there a command, macro or tool that can get the string result (as in other languages) of any macro in an easy to use way? [closed]

I don't want to go down into the depths of expandable and not expandable. I doubt that I will be able to understand my self-developed designs a few weeks later. Therefore I am looking for a universal ...
5
votes
1answer
76 views

Write to screen/console but not to .log file

I use LaTeX without Lua extensions. Is there a platform-independent possibility built into (La)TeX for writing a message to screen only but not to the .log file?
1
vote
1answer
72 views

How to use Optima font in Overleaf with any compiler?

I'm a new LaTeX user with my first use case being math proofs. I want to use Optima font (which came installed on my Mac) for my proof, and as far as I can tell I have to use the XeLaTeX compiler to ...
15
votes
6answers
606 views

Why doesn't a trailing tab typeset?

Consider the following Plain TeX manuscript \catcode9=12\relax% ASCII 9 is tab .\ \ .\par% . .% \bye It's impossible to tell, but there's a tab just after the dot on the third manuscript line. To ...
5
votes
1answer
47 views

TeX truncating output of \showbox command

I am studying Knuth's "The TeXbook". In Chapter 12, he demonstrates the glue that TeX puts between words by looking at the contents of hboxes in internal diagnostic format. I am trying to use \showbox ...
12
votes
1answer
520 views

Are there any non-WEB re-implementation of TeX Core in recent years?

I am looking for re-implementations, in recent years, of the TeX core algorithm (which Knuth wrote in ca. 1982). It would seem to me that LaTeX, XeTeX, LuaTeX all call the TeX core, which is written ...
0
votes
1answer
64 views

Plain TeX bold math in section titles

I apologize if this question is very similar to others, but the other solutions have not worked for me. I am using plain TeX, and trying to make the math in my section titles bold. Any help would be ...
43
votes
3answers
26k views

LaTeX @ (at) symbol [duplicate]

Possible Duplicate: Why do LaTeX internal commands have an @ in them? What does the @ symbol mean in LaTeX? I'm looking at the source of apa.cls, and there's a declaration: \newsavebox\gr@box ...