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
26
votes
5answers
2k views

Why does TeX remove braces around delimited arguments?

On pp. 203–204 of the TeXbook, Knuth describes how TeX absorbs macros' arguments: delimited go until the first appearance of the delimiter, and undelimited go until the next token, in both cases ...
10
votes
3answers
437 views

'a^^Mb' isn't equivalent to 'a<return>b'; instead throws pdftex into an extended mode

I'd expect (see background material below) the following Plain TeX manuscript a^^Mb\bye to be equivalent to a b\bye and therefore to typeset thus: a b Instead, pdftex pauses mid-compilation, and ...
0
votes
0answers
48 views

How to multiply a dimen by n? [closed]

I've the following code fragment: \newdimen\tableCellBoxADimen \tableCellBoxADimen=\wd\fooBox \ifdim\tableCellBoxADimen < \anotherDimen ... \fi How can I multiply tableCellBoxADimen by 2 for ...
5
votes
1answer
134 views

Maximum amount of characters per line in .tex-input files?

According to TeXbook TeX does preprocess files of .tex-input line per line (converting all characters of the line to TeX's internal character-representation-scheme (ASCII or Unicode), truncating ...
0
votes
0answers
30 views

Accurately aligning a letter top to the top of the page

I do not understand why I am not succeeding in accurately aligning the top of a capital letter to the top of the page. I am experimenting with: \documentclass{article} \parskip=0mm \topmargin=-1in \...
2
votes
1answer
134 views

Texlive's TeX vs Knuth's TeX

From texmf.cnf: % But don't parse the first line if invoked as"tex", since we want that % to remain Knuth-compatible. The src_specials and % file_line_error_style settings, as well as the ...
1
vote
3answers
75 views

How to get value of a macro immediately

The following code does not work. I think maybe it is because of \f. So my question is: how to get the value from a macro immediately(in my case I want \f get abc immediately)? And is it possible to ...
1
vote
1answer
66 views

Unwanted line break with \raggedleft, \centering or \raggedright

In the following example, I get unwanted line breaks for text "Dest-Addr". The result is correct for text "Hello-World". The result is also correct if I change font size to 10pt or ...
1
vote
0answers
38 views

Problem about the argument of macro defined by \def [duplicate]

I construct a macro named \mymacro, and this macro would be used in two ways: first: \mymacro, which would typeset 1 second:\mymacro*, which would typeset 2 Here is my code: \documentclass{article} \...
8
votes
4answers
591 views

Detecting which version of the LaTeX format is in use

ltxcmds provides \ltx@ifpackagelater, \ltx@ifclasslater, \ltx@iffilelater and there is \@ifpackagelater - but is there any "if TeX later" or some other way to (automatically) get the used TeX version (...
5
votes
3answers
124 views

Why is \char not expandable?

\char<number> is a TeX primitive that results in the character of ASCII code <number> with category code 12. However, it isn't expandable, unlike it's many cousins \romannumeral, \number, ...
9
votes
1answer
239 views

What is kcatcode in pTeX and upTeX?

The Japanese TeX engines pTeX and upTeX treat separately Latin and Japanese characters, in a way I don't fully understand. They introduce a notion of kcatcode of a Japanese character, which takes ...
0
votes
1answer
70 views

Latex drawing of the following screen shot

Can anyone help with the drawing of this pic in latex? I have included what I have done: \documentclass[12pt]{article} \setlength{\topmargin}{-1cm} \setlength{\oddsidemargin}{0in} \setlength{\...
0
votes
1answer
68 views

Letters dont work in math mode using the MinionPro package

Everything seems to work fine except the second you put a letter in math mode, you cant produce a PDF. \documentclass{article} \usepackage{fontspec} \usepackage[T1]{fontenc} \usepackage{inputenc} \...
1
vote
2answers
23 views

cell showing up as “-c-” in table?

Where did I go wrong to have the -c- show up in the cell? I just want the text "bar" there. sorry I am new \documentclass{article} \begin{table} \centering \rowcolors{1}{}{lightgray} \begin{...
1
vote
0answers
39 views

Seeking a faster implementation of \CreateTheorem

Based on this answer, I wrote a macro \CreateTheorem, which can be used in the following five ways: \CreateTheorem*{env}, which creates an unnumbered theorem-like environment env; \CreateTheorem{env},...
1
vote
1answer
19 views

Help with understanding: how does amsart class store the content of abstract for later use in \maketitle?

I wish to understand how the amsart class managed to store the content of abstract for the later \maketitle, and why they demand the abstract environment to precede \maketitle (i.e. is there any ...
0
votes
1answer
55 views

Manually numbering with \tag in double dollar signs

I want to manually numbering in non-numbered displayed equation environment and try the following steps \documentclass{article} \usepackage{amsmath} \begin{document} \[ \bar{D}=\frac{1}{n} \sum_{j=1}^...
1
vote
1answer
59 views

What's the function of the @ symbol? [duplicate]

I'm sure that this is TeX basics and I'm just being a fool, but I can't figure out for what/how the @ symbol is used. All I can tell is that to make sure it works you have to put it between \...
59
votes
2answers
7k views

Electronic version of Knuth's “TeXbook”?

I have a printed copy of the TeXbook (from D.E. Knuth) at home. Now that I travel a lot, I don't want to take my library with me every time. Question: Is there a legal way to obtain (=purchase) a PDF ...
0
votes
0answers
33 views

Problem with installing Tex Live for LaTeX workshop

I was hoping to turn my VS Code into a TeX / LaTeX editor. I came across an extension called LaTeX workshop which told me I had to install Tex Live. Once I downloaded the installer my AV told me it ...
3
votes
1answer
56 views

Is there a token which neither can be redefined to be \outer nor can be affected by \uppercase/\lowercase?

This is more an "academical" question: Is there a token which neither can be redefined to be \outer nor can be affected by \uppercase/\lowercase no matter what \lccodes/\uccodes are current? ...
6
votes
2answers
118 views

Different Behaviors Digesting \csname x\endcsname and Digesting \x (expansion issue)

This question has been significantly EDITED, as I learned more of the problem. If I was good, I would be able to create macros with multiple optional arguments, but not only can't I, but in this case,...
2
votes
1answer
75 views

Can't find file tgtermes (luatex)

I'm trying to build tyscheme, which is a TeX (not LaTeX) document. The README file directs me to run a sequence of commands, the first one is luatex index, which fails as it can't find file tgtermes ...
1
vote
0answers
45 views

Will LaTeX compile Plain TeX? [duplicate]

I'm really new to TeX and I'm trying to learn how the different levels of TeX relate to each other. As far as I understand LaTeX is a set of macros for Plain TeX with the purpose of making life easier,...
2
votes
1answer
246 views

Updating missing font from previous TeX release on a Windows 10 PC?

This is a lot tougher question than I expected it to be. How do I: a) add fonts to TeX from previous releases? b) I change the call in my document from a previous-release default font, to a ...
3
votes
2answers
3k 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 ...
1
vote
1answer
63 views

plain tex. beginsection doesnt break line

I'm typing a math article for someone. He asked me to type it in plain TeX (rather than LaTeX) because he is used to plain TeX and would like the option to edit my typing, I think. Anyway, I am new to ...
167
votes
5answers
378k views

Escape character in LaTeX

I need to output the below text but since \ is a special character, I cannot: [RegularExpression(@"\d+")] Also sometimes I need use dollar sign $ as well but it seems to be a special char, too. ...
0
votes
1answer
64 views

(xe)tex: How do I apply \ifodd\pageno logic (\special) to image, based on page the box is set on, rather than when file is read

Working in (plain) XeTeX, I would like to apply a certain transformation (mirror on vertical axis) to an image if it appears on an odd-numbered page. I'd like a fairly general solution, as in some ...
0
votes
1answer
105 views

Are there things that TeX can do but LaTeX3 can't?

Sorry for this general question but to be honest I hate more and more coding in TeX and even if I am a very beginner coder in LaTeX3, I really appreciate using it.
4
votes
5answers
252 views

Prevent hash doubling with \message

Assume a token sequence: Token 1: Explicit hash character of category code 6. Token 2: Explicit 1 of category code 12. Token 3: Explicit hash character of category code 6. Token 4: Control word token ...
0
votes
1answer
29 views

graph on latex with too many data points, giving me timeout [closed]

So, I am writing a report which contains graphs, graphs are with a huge amount of data points. one graph only could contain more than 32,000 points, and I am using tikzpicture and adding coordinates ...
0
votes
1answer
53 views

How to keep my Tex interpreter running?

I'm coding with Vscode and XeLatex. When running the code below, it worked and cost approximately 20s \documentclass[border={0pt}]{standalone} \usepackage{tikz,} \begin{document} \begin{tikzpicture}...
5
votes
1answer
107 views

How to typeset ordered pairs?

I'd like to typeset ordered pairs with comma-separated components while \langle and \rangle as their delimiters. I want line breaks at commas for an ordered pair in inline math mode. So I came up with ...
20
votes
3answers
614 views

Why does plain TeX set \tolerance larger than \pretolerance?

When TeX breaks a paragraph into lines, it makes three passes. In the first pass, TeX tries to break the paragraph without hyphenation, during which it makes sure that no line has a badness (from glue ...
11
votes
3answers
869 views

Four TeX processors (as described in TeX by Topic)

I started reading TeX by Topic by Victor Eijkhout. He starts from describing four engines: The input processor. This is the piece of TeX that accepts input lines from the file system of whatever ...
23
votes
3answers
3k views

Where is source code of TeX, LuaTeX, pdfTeX

Today, TeX is a big program, LuaTeX, PDFTeX, METAPOST etc. Where is the public accessing source code for hacking LuaTeX or other implementations. For example, I need to embed TeX into C program or ...
1
vote
0answers
88 views

/usr/bin/pdflatex (file fa5free0solid): Font fa5free0solid at 54 0 not found for LIPICS-2021 [closed]

I am using the LIPICS template and compiling using pdflatex on Ubuntu-18.04. I have the fontawesome5 installed and all, but the compilation fails with the error in the subject. I wonder, first, how to ...
0
votes
2answers
48 views

Table doesn't want to appear in the text boundaries

I am trying to make table as wide as the text, but I can't figure it out. I used \usepackage[pass,letterpaper]{geometry} to make left and right margin equal. Also, I would like to center text in the ...
1
vote
3answers
51 views

How to center text in merged cell?

I have this table and I want to have the text from merged cell in the middle of it, I marked the place where I want it. How can I do that? \begin{table}[h] \def\arraystretch{1.5} \begin{tabular}{|*{3}{...
11
votes
2answers
1k views

Why doesn't TeX have hkern and vkern?

We have \hskip, \vskip, and \mskip, but only \kern and \mkern. Why doesn't TeX distinguish between horizontal and vertical kerns like it does for skips?
5
votes
3answers
92 views

Create a hbox that fills the rest of the line + some questions on boxes in general

I'm trying to understand how boxes work in TeX, and I've some question, all related with boxes in general (if you think it's better to create 3 questions, let me know, but I think they are quite ...
0
votes
0answers
140 views

Again: ! TeX capacity exceeded, sorry [save size=500000] (LuaLaTeX, MikTeX)

I'm getting the following error message compiling my PhD-file (used: LuaLaTeX, MikTeX 2.9): ! TeX capacity exceeded, sorry [save size=500000]. <to be read again> \relax l.90 \include{...
2
votes
0answers
85 views

Learning about higher-level formats [closed]

I recently finished reading The TeXbook and TeX by Topic. Now I want to understand more about the LaTeX or ConTeXt formats, as well as the more modern engines; things like: How does LaTeX2e / LaTeX3 ...
4
votes
0answers
81 views

Does anything of this 1988 “TeX in CWEB” still exist?

In TUGboat 9:2 (1988), there is an interesting article titled “TeX adapted to CWEB”, written by David Kennedy of Micro Publishing Systems, Inc. [Literate programming historians should note that the ...
2
votes
1answer
106 views

The hash function used by new_trie_op

In §944 of TeX, The Program (Volume B of Computers & Typesetting) DEK describes the hash function used by new_trie_op in order to store hyphenation tables efficiently. Quoting him: The hash ...
2
votes
0answers
65 views

Remaking the Stack Overflow logo [closed]

I want to build the Stack Overflow logo, but not just the stack, also the text. If it looks like this: How do I recreate it using TeX?
7
votes
1answer
407 views

Plain TeX vs. “primitive” TeX

I'm using LaTeX for my day-to-day needs, but in order to avoid cargo-cult document creation, I'm trying to gain a better understanding of the TeX engine itself. As part of this I'm experimenting with ...
0
votes
0answers
36 views

Embedding LaTeX expressions into a postscript file

Hi: I'm writing a vector graphics drawing lib that produces PS/EPS outputs. I want allow users can embed LaTeX expressions into the file like asymptote did. I only have a vague understanding of how to ...

1
2 3 4 5
34