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}.

102 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
13 votes
0 answers
421 views

Release space in the string pool

I managed to get a capacity exceeded message by adding a bit too many named coordinates to a number of tikzpictures and so started to test and now wonder if it is possible to release unneeded space in ...
user avatar
7 votes
0 answers
110 views

Has anyone made a modified TeX with infinity greater than 10,000?

We're all familiar with the effect of \sloppy deciding that if there has to be something bad in the paragraph, it might as well shove everything into one really bad line. Part of this is, no doubt, ...
user avatar
  • 13.1k
7 votes
0 answers
134 views

Suppress a low-level error message in LuaTeX

Using LuaTeX it is possible to customize low-level error messages produced directly by TeX, such as the undefined control sequence error, or bad number etc. Here is the code that David Carlisle wrote ...
user avatar
5 votes
0 answers
194 views

Length of Computer Modern TFM files

With the exception of cmfi10.tfm and cmmi5.tfm, all the TFM files in the Computer Modern distribution have an extra 0x00 byte at the end, which makes them one byte longer than claimed by their first ...
user avatar
4 votes
0 answers
75 views

Can you detect from within TeX how the name of a file accessed by TeX is encoded?

This question is inspired by the question Input dynamically generated file name which basically is about truncating a given filename/the expansion of \jobname by two characters. In utf-8 the byte-...
user avatar
4 votes
0 answers
85 views

Difference between counters and tokens in TeX

This is my first question here on TeXSE, and my second question on the StackExchange community. I am reading Notes on Programming in TeX by Dr. Christian Feuersänger as part of a general introduction ...
user avatar
4 votes
0 answers
103 views

How to create docker environment for Pascal to WASM compiler web2js?

What is web2js? This is a Pascal compiler that targets WebAssembly, designed specifically to compile TeX so it can be run inside the browser. More specifically, this repository includes a TeX engine ...
user avatar
4 votes
0 answers
104 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 ...
user avatar
  • 950
4 votes
0 answers
627 views

How is TeX/LaTeX parsed?

I have some questions about TeX/LaTeX parser and parsing TeX/LaTeX after reading the following: Limitations when parsing TeX as a context-free grammar This is a PEG parser, which means it interprets ...
user avatar
4 votes
0 answers
140 views

Is there a specialized literate programming web-file editor that supports navigating in a Knuth's web file e.g. "tex.web"?

What do I mean by that? displaying starred and unstarred sections of cursor position displaying title of starred section displaying See also sections if exists displaying This code is used in ...
user avatar
3 votes
0 answers
115 views

Could TeX run Doom?

I know this question sounds silly, but Doom has been made to run in all sorts of completely ridiculous environments, including text-based terminals. So how about TeX? Could it somehow run Doom? I know ...
user avatar
  • 11.2k
3 votes
0 answers
120 views

How to make a "Computer Modern Medium" font?

In [La]TeX documents printed in the early 1980s, fonts look noticeably thicker than they do today. Something about the advent of modern laser printers and the disappearance of older printing ...
user avatar
3 votes
0 answers
94 views

Get value of global token register from local group

Given the following sample code: \documentclass{article} \newtoks\foo \foo={foo} \begin{document} \the\foo, \begingroup \foo={bar} \the\foo \the\global\foo % <-- fails \endgroup \end{document} ...
user avatar
  • 12.9k
3 votes
0 answers
149 views

How to add new primitives to e-TeX?

I am aware of this question \pdfstrcmp or \strcmp in pure TeX so I want to learn how to add the missing primitive \pdfstrcmp to e-TeX. From LaTeX3 source code expl3.lua: local function strcmp(A, B) ...
user avatar
  • 291
3 votes
0 answers
232 views

Can one use the Potrzebie unit system in (La)TeX?

Inspired by a comment to this answer (and some wasted but entertaining time on the internet), I was wondering if somebody has implemented the use of the Potrzebie unit system in (La)TeX, as a tribute ...
user avatar
  • 2,178
3 votes
0 answers
88 views

Is there a single word that I can use to refer to different TeX-based formats or engines?

I am writing an article on the TeX, pfdTeX, XeTex and LuaTeX engines and the LaTeX, pfdLaTeX, XeLaTex and LuaLaTeX formats. I find it necessary in some parts of my article to refer to the above-...
user avatar
  • 1,135
3 votes
0 answers
160 views

Can I define the format file in TeX file?

I have a Finnish format file for TeX. Can I make TeX use the custom format while processing the file? Looking at tex -help, it looks like starting the file like: %&../fin/Finnish.fmt should work,...
user avatar
3 votes
0 answers
458 views

Adding vedic accents in sanskrit in devanagari script in red color using Context - not working in all cases

Using the techniques described in Coloring combining characters without changing color of a base character I have been able to color red the vedic accents in sanskrit typesetting using ConTexT MIV. ...
user avatar
2 votes
0 answers
133 views

TeX as a programming language: examples and design patterns

I'm looking for simple examples of using TeX as a programming language, not LaTeX, and ideally these examples only use the primitive TeX commands. Why? Because the members of a local computer club ...
user avatar
2 votes
1 answer
242 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 ...
user avatar
  • 5,247
2 votes
0 answers
29 views

Need left large curly bracket that allows alignment in align environment

I know that \begin{cases}\end{cases} can give me large left bracket spanning multiple lines, but it does not work well when I want to align equations inside cases with that outside using &. For ...
user avatar
2 votes
0 answers
108 views

Why is the newline character not printed on terminal after entering batch_mode?

When TeX stops on an error, we can answer Q. In such case in the log file this is printed: OK, entering \batchmode... But on the terminal thsis is printed: OK, entering \batchmode<terminal ...
user avatar
2 votes
0 answers
90 views

Which significance does 100000000 have as overflow boundary in Pascal?

A recent conversation about bug-free software at work has lead to a discussion about TeX (which is considered virtually bug-free, while it might technically be false). Since TeX's source code is ...
user avatar
2 votes
0 answers
42 views

How to add a second table of content to "tex.pdf" with a LaTeX package by using the "contents.tex" generated by 'pdfwebmac'?

This is a follow up question to How to change table of content layout for a pdf document created from a web source file? I input the following commands: weave tex.web pdftex tex.tex and create ...
user avatar
2 votes
0 answers
102 views

What causes fatal errors and why TeX cannot produce any file if it occurs?

Besides the regular errors, there are fatal errors, like Fatal error occurred, no output PDF file produced! I have seen them happen when TeX capacity exceeds, the mysterious seac (see Automatically ...
user avatar
2 votes
0 answers
158 views

Determining whether pagebreak will occur

So this question is more about the point and the inner workings of TeX instead of a practical solution. How does LaTeX (or TeX?) determine, whether a pagebreak occurs (I mean the stretch-y/ fluid type ...
user avatar
2 votes
0 answers
463 views

Problem caching files, aux data not importing

The following code caches include. This negates the need to use \includeonly. The problem is, for references, counters, toc, to be correct, the corresponding aux file needs to be imported. ...
user avatar
2 votes
0 answers
131 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 ...
user avatar
1 vote
0 answers
24 views

Compilation never ends with modified \pmod after recent update

In this answer, @egreg provided a modified \pmod with a starred variant. However, after some recent update to the TeX distribution this modification no longer works (the last time I used this command ...
user avatar
  • 6,566
1 vote
0 answers
71 views

Get page edges coordinates in Metapost and ConTeXt

I have written several macros for my projects using TikZ. Several of them need to be aware of the page edges and margins. For example, this is a small macros I have written to draw rectangles from the ...
user avatar
1 vote
0 answers
124 views

What are the boundaries of TeX?

Does TeX have a limit at all? I've seen in forums that besides rendering objects with pgfplots and tikz, to animating with animate, to interactive PDFs by embedding Javascript in TeX, actually nothing ...
user avatar
  • 11
1 vote
0 answers
26 views

Auto Escaped Reserved by Latex Chars in Custom Env

I want to create a custom environment designed to handle chunks of text. (Not code, text.) Within this environment, how to make LaTeX to automatically escape all reserved chars (# $ % & { } _ ~ ^ \...
user avatar
1 vote
0 answers
50 views

Where is the reference point of a VBOX?

From the TeXbook, Therefore, the actual rules for the depth of a constructed vbox a somewhat TeXnical. Here they are: Given a vertical list that is being wrapped up via \vbox, the problem is to ...
user avatar
  • 2,629
1 vote
0 answers
104 views

TeX or LaTeX file with a hidden pasword

This question is inspired by this one: Convert PDF to PDF of images? As the author does have the code, creating a LaTeX version that is difficult to decrypt seems to be a good solution. Certainly, it ...
user avatar
1 vote
0 answers
39 views

Getting the name of control sequence token - which values of \escapechar besides 32 require special attention?

I'd like to get the name of a control sequence token as sequence of character tokens. With \relax I'd like to get relax. The preceeding escape character is to be removed from the result of \string\...
user avatar
1 vote
0 answers
142 views

How to type diacritical marks over the letters 'r' and 'i' in latex?

I want to learn how to type diacritical marks over 'r' and 'i' in latex. I need to write a name of Czech Republic origin. The diacritical mark over 'r' looks like a small 'v' on the head of the 'r' ...
user avatar
  • 21
1 vote
0 answers
223 views

How to learn LaTeX internals?

I've read the LaTeX Companion and the TeXbook, but I am still struggling to understand how LaTeX works. How \DeclareOption works? Why should I end some lines with %? How penalty works? Where \if@...
user avatar
  • 1,097
1 vote
0 answers
175 views

.tex file is null after laptop battery died

I am writing a thesis in TeXstudio and while working today (during which I saved my work several times) my laptop battery was lower than I thought and my laptop died. Thinking nothing of it, I plugged ...
user avatar
  • 11
1 vote
0 answers
71 views

LuaTeX: Use some linebreak filter to access linebreak parameters used by last tex.linebreak

How can I access linebreak parameter table used by last call to tex.linebreak? As per LuaTeX manual (screenshot at bottom of post), one can override linebreak parameter table values by passing a ...
user avatar
  • 1,248
1 vote
0 answers
77 views

TeX to C/executable

It is possible to program in TeX and it is a Turing complete language as C. Is there any way to translate a program in TeX into C and vice versa? If so, how to correspond C instructions with TeX's ...
user avatar
1 vote
0 answers
66 views

How do I add shortcuts to TeX Maker?

For example, I want to create a shortcut for \(...\) command and or more specific one _{\circ} etc. Because it is hard to write in a minute. But I cannot create a new shortcut. I only configure the ...
user avatar
  • 11
1 vote
0 answers
213 views

Moving from pdfLaTeX to XeLaTeX

I have this very long preamble and I'm struggling to switch to XeLaTeX. I'm working with PdfLaTeX, but since I want to change some fonts, I would like to switch to XeLaTeX. I tried to load ...
user avatar
1 vote
0 answers
126 views

Badness: why 100.|z|^3 instead of 100 z^2?

As written here on page 158, the badness penalty is 100|z|^3 instead of 100z^2. Why is "3" in the exponent when we take the absolute value of z? Here z=(L-w)/w^+, where L is the required width and w ...
user avatar
  • 1,880
1 vote
0 answers
167 views

Is there a little randomization on TeX default font which is not present in LaTeX default font?

It's more pleasing to me to stare at this... ... than to stare at this... One time Knuth commented that he prefers fonts with a little randomization on their design (Knuth, D. E. (1979). ...
user avatar
1 vote
0 answers
143 views

Is there any way to free up the TeX memory?

As described in this quesion TeX memory is very limited due to the limitation of the computer in time of TeX invention. I want to know is there any way to free up the TeX memory before reaching its ...
user avatar
  • 2,322
1 vote
0 answers
545 views

TeX capacity exceeded using Knitr

I am unable to weave a document containing LaTeX and R code using RStudio due what I think are TeX capacity limitations. Is there a way of fixing this without having to compile using LuaLaTeX which is ...
user avatar
  • 43
1 vote
0 answers
66 views

\write : maximum lines'

In the ledmac documentation, Peter Wilson wrote that, when writing to the .end file (which stores the endnote), it transforms all spaces to line breaks. We change \newlinechar so that in the ...
user avatar
  • 10.7k
1 vote
0 answers
164 views

Is there any way to do bit testing in tikz?

I want to do something in tikz that is a bitwise function of a number, e.g. \def\mask{165} %% = 0xa5 but it looks like TeX doesn't know hex \foreach \k in {0,...,7} { \node[mybox] (b\k) at ($(-\...
user avatar
  • 2,512
1 vote
0 answers
168 views

fixed size + variable size delimiters

background I'm trying to understand how TeX typesets \left( FOOBAR \right} what I understand so far we render FOOBAR , get height/depth of the bounding box then, given the height/depth, we try to ...
user avatar
  • 165
1 vote
0 answers
180 views

Specifying MF mode (to autogenerate fonts) for a specific printer

In Metafont the mode definition is used to define dpi and printer specific adjustments on generating the pixelized character images to use for printing. How could I specify the mode (from a mf file) ...
user avatar