{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
22 views

How to use control symbols using \expandafter?

Suppose I want to typset P\' olya correctly in TeX but suppose my computer does not have the key invoking the character/symbol ' (This is of purely theoretical interest). Now, TeX lets you use \rq to ...
3
votes
2answers
39 views

How do I perform an expandable string comparison?

I need to perform a string comparison (string equality). If the macro is non-expandable (e.g. contains \def or \let), it causes problems in the place where it is used. I tried using \ifthenelse from ...
78
votes
4answers
35k views

How to expand TeX's “main memory size”? (pgfplots memory overload)

I'm compiling one pretty simple LaTeX file with few dozen of pgfplots. Now, I can compile part by part, but am unable to compile it all at once. I really need good precision for all those plots (noise ...
1
vote
0answers
40 views

How to define LaTeX like environment in plain TeX?

How do I define LaTeX like environment using TeX primitives? I have just started learning TeX using Knuth's TeX book and found it hard to implement the LaTeX like environment using TeX primitives. An ...
15
votes
0answers
117 views

Is there a reliable way to get the number of arguments of a command?

While pondering over a test to distinguish two versions of a command I came up with the following example: \documentclass{article} \begin{document} \def\testA#1{\#2->blabla} ...
4
votes
0answers
52 views

LuaTeX tex->dvi conversion code

I'm researching ways to teach computers to generate LaTeX code from Page Description Languages (PDL) like PostScript and PDF, using Machine Translation. For this to work, it would be majorly useful ...
18
votes
2answers
7k views

\llap (or \rlap) at the beginning of an indented paragraph

If I use a \llap{text} command at the beginning of an indented paragraph, the text is not indented and is put on the line above the paragraph. \documentclass{article} \begin{document} \parindent=2cm ...
15
votes
1answer
575 views

What is the programming term for the command invoking '\' in latex?

I don't think it would be called a delimiter. Is there a specific term for this character? Just to clarify, I'm talking the slash here: \frac{1}{2}
20
votes
3answers
206 views

Why is a discardable item not discardable?

I have the following code \output={\plainoutput \message{outputpenalty=\the\outputpenalty}} % for debugging \hrule \vskip21.9cm plus1pt % plus1pt because to avoid underfull vbox until output one ...
7
votes
2answers
1k views

Why is the \bye command not used by LaTeX?

Is there a technical reason why the \bye TeX command was replaced in LaTeX by \begin{document} and \end{document}? I suspect there must be a good technical reason behind this, as otherwise it would ...
9
votes
5answers
8k views

Writing Roman numbers in Equation

What is the command for writing roman numerals like I, II, IV etc. in an equation ? To be noted that my requirement is to write them within $$ ...$$ and not as counters or page numbers. Any light on ...
0
votes
0answers
6 views

Compiling a latex file .tex to a PDF File [closed]

I've downloaded a file from this link But i don't know anything about .tex extensions, i've googled it, it turned out to be a latex file. So I've downloaded & installed MacTex, but it doesn't ...
55
votes
5answers
3k views

What are TeX and LaTeX?

I'm surprised no one else has asked this question. It's not explained very well in the FAQ or site descriptions either. I know many of you will think "LMGTFY", "RTFM", or "ask wikipedia", but I'd ...
5
votes
0answers
57 views

How to tell LaTeX to throw a warning if argument is not being used?

In this question the given argument wasn't used, because #1 was missing.. One would actually assume an error or a warning be thrown. A little MWE based on 1: \documentclass{article} ...
2
votes
1answer
109 views

How declare a new package language

I need writing normal text and some sentences in artifical conscript language. How writing small as possible package and how use it (include?) in file? My language have my own font and each glyphs is ...
8
votes
2answers
246 views

What is the maximum nesting depth of \input?

Large documents are best split into various files. Using \input allows to nest multiple files. What is the technical limit of \input regarding the nesting depth? I haven't found any clue searching ...
4
votes
1answer
63 views

Question about \maketoks macros from cwebmac.tex

Consider the following code from cwebmac.tex: {\setbox0=\hbox{\toksA={1.}\toksB={}\maketoks}\the\toksA} What does \maketoks macros do and how does it work? The following is a complete example ...
0
votes
0answers
66 views

TeX capacity exceeded, sorry [input stack size=5000] in LyX Classicthesis

I use classicthesis-LyX-v4.2_biblatex_bibtex8 I got this error message when I load hanging module into the parent document (probably my personal issue, as I tried it on the newly downloaded template, ...
2
votes
3answers
33 views

Retaining count values between blocks

How can one make a count retain values between different blocks e.g in nested loops? For example \newcommand\example {% \newcount\N \loop {\loop \the\N\quad \ifnum\N<5 ...
1
vote
0answers
28 views

Get the current state of all macroes

I was wondering if there was a way to save the current configuration state at some point in the document. For example, if I have the file A.tex \documentclass[10pt]{article} ...
7
votes
3answers
5k views

Resize all images in Latex to a percentage width

I am auto-generating multiple tex files using pandoc (one tex file for each of my chapters). Pandoc generates this tex code for each image. \begin{figure}[htbp] \centering ...
11
votes
2answers
180 views

How to typeset in initex?

Just curious how to typeset letter 'a' in initex without 'overfull' warnings. $ tex -ini '\font\f=cmr10\f a\end' This is TeX, Version 3.14159265 (TeX Live 2015/Debian) (INITEX) Overfull \hbox ...
17
votes
5answers
656 views

Basics of parsing

I'm trying to master the art of parsing text one character at a time. The following is what I've discovered so far. Is this as good as it gets? I would really prefer not to do all those \edefs as ...
70
votes
1answer
5k views

The differences between TeX engines

I am confused about what TeX and its offspring (LaTeX, pdfTeX/pdfLaTeX, e-TeX, ConTeXt, LuaTeX, etc.) are. Some, like LaTeX, seem like add ons to TeX (maybe a change to the eyes and mouth, but not ...
9
votes
1answer
184 views

How does \delimiter work? How does it convert its argument into character(s?) and why?

studying the definition of \lvert (which just made me finally understand what does mean \@xp\@gobble and how it works \o/), I found the \delimiter command, with a numeric argument advanced by ...
3
votes
1answer
50 views

xdef and cedille

I need to xdef some data. In rare cases it'll contain cedilles like: \xdef\xxx{spam\c{e}eggs} \bye Unfortunately this failes. Is there a chance to get this working? (I'm on LaTeX in my code, using ...
7
votes
2answers
128 views

Expansion of \char in \def

In answering another question, I ran into some issues trying to use a combination of \def and \char. Consider the following example: \documentclass{minimal} \usepackage{etoolbox} ...
16
votes
3answers
940 views

Why is SVG not supported by the TeX backend?

I've always wondered why SVG is such a problem for many document creation tools. For example MS Office can't do it, Libre Office can only use very simple SVGs afaik and even in Latex we can't use them ...
3
votes
1answer
37 views

Underline (or otherwise format) all text in custom environment

I'm trying to define a custom environment, in which all text is underlined. I know the underline command underlines its input, but I can't figure out how to get it to work seamlessly with my ...
1
vote
0answers
63 views

Tips for using TEX / LaTeX for writing meeting protocols

I found TEX / LaTeX just over a week ago and I am very pleased with it. I used to hate writing documents on the computer because it felt so inefficient and messy with the word processors. TEX was ...
0
votes
1answer
40 views

Externalize pdf_tex like externalize tikz

I am using the workflow explained in this tutorial for typesetting images in my document: Tutorial for pdf_tex using inkscape Briefly, a vector image is imported into inkscape and then image itself is ...
2
votes
0answers
42 views

Macro with \afterassignment syntax?

Say for some reason I want to make a macro with input stream behaviour mimicking that of \afterassignment and \aftergroup. Namely, I want to absorb exactly one token from the input stream following ...
8
votes
7answers
245 views

unescaped macros

Is there a way to define a macro that does not start with \? for example, I'd like to have -> expand to \rightarrow since I like reading raw LaTeX and $\eps -> 0$ reads much nicer (to me...) ...
22
votes
1answer
271 views

Summary of TeX Capacity Limits

I seem to often run into capacity issues and have been upping the limits each time. There are several question on this site pertaining to these. However, there seems to be some conflicting information ...
56
votes
4answers
3k views

What is “expansion”?

I'm relatively new to (La)TeX, but I have a reasonable amount of experience with computational programming languages. Until I began learning (La)TeX, I'd never heard of "expansion"... So, what is ...
37
votes
2answers
2k views

What language is TeX implemented in?

I read on Wikipedia that the first version of TeX was written in SAIL. However, does anyone know what language later versions (i.e the current one) are implemented in?
0
votes
0answers
55 views

What language is TeXLive written in? [duplicate]

I read that TeX was written in SAIL and re-writen in Pascal. Do we still use that version today? In my Linux distribution, I use TeX-Live. Does that also use the Pascal version? Wikipedia says the ...
5
votes
1answer
189 views

Past and future evolution of command line arguments

Upon typing latex -help, you can get a list of all command line arguments. AFAIK, none of these are mentioned in the original TeX/LaTeX books. So, I wonder how these were born, and more importantly, ...
15
votes
1answer
516 views

productivity tools

I am using latex to write a mathematically dense document which has several hundred differential forms and products. There must be better ways than just typing out the whole equations line by line. ...
9
votes
3answers
327 views

Ignored character as control symbol

Exercise 8.2(f) of the TeXbook (by Knuth) says it is not possible for an ignored character to appear in the midst of a control sequence name. But the following works... \catcode`\t=9 \def\t{\TeX} \t ...
5
votes
3answers
164 views

loop in tabular that uses \the\count to access current line number

I would like to generate an automatic table using loop. As suggested here before, it is best to first generate the lines in a toks and then pass them to tabular. However, I have problems with ...
13
votes
2answers
1k views

Can the PostScript language be used to fully replace TeX? [closed]

THE POSTSCRIPT® LANGUAGE is a simple interpretive programming language with powerful graphics capabilities. ... Because of the importance of text in most applications, the PostScript ...
6
votes
1answer
131 views

Per-word info needed in DVI to create touch rectangles on LaTeX documents in iTeX for the iPad

When reading a LaTeX document on an iPad with iTeX, I need to know the position of every word on the page. (I also need to know the positions of images, URLs, footnotes, etc., but they are all ...
6
votes
2answers
226 views

How can I produce the output of a carriage return in a \message?

It's all in the title. How is it possible to output a carriage return in a \message. For debugging purposes, I need to get readable messages. The obvious doesn't work : \message{A\cr B} outputs A\cr B ...
3
votes
5answers
26k views

Error Latex TeX capacity exceeded, sorry [input stack size=5000]

I want to test this template http://students.engr.scu.edu/~sschaeck/latexforthesis/. when i run the makefile i get this error .Please what does it mean this error here the code : ...
0
votes
2answers
152 views

“! You can't use `\raise' in internal vertical mode” error

I used the command \raise to superimpose a title to a writing. I got the error ! You can't use `\raise' in internal vertical mode which puzzled me for a while. For those interested, here is my ...
40
votes
1answer
565 views

Test if paragraph has an overfull line

I'd like to test if the last paragraph has any overfull line. The naive approach of looking at the \badness once the paragraph is finished does not work, as it will only give the badness of the last ...
3
votes
2answers
38 views

How to separate each section in moderncv to different tex files

How to separate each section in moderncv to different .tex files and include it in main file so that it becomes handy. Consider separating each sections Education to Education.tex, Experience to ...
4
votes
1answer
70 views

Lua to Tex : content and variable content different?

Here is something bizarre ! (I mean I don't understand). I enter a content, let's say "Something" in the (global) variable context. In line 2 of the following code, as one may anticipate, we have the ...
0
votes
1answer
46 views

How to solved the problem with conditions? [duplicate]

I would question how do I solve the following problem. This is a stylistic package where I needed to create a condition. I have made a choice of work as semestral, bachelor. When selecting semestral ...