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

112 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7 votes
0 answers
142 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 ...
Bruno Le Floch's user avatar
6 votes
0 answers
2k 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 ...
Suminda Sirinath S. Dharmasena's user avatar
4 votes
0 answers
697 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 ...
Gaussler's user avatar
  • 12.8k
4 votes
0 answers
85 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-...
Ulrich Diez's user avatar
  • 28.9k
4 votes
0 answers
131 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 ...
George1917's user avatar
4 votes
0 answers
178 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 ...
Nosuke23's user avatar
4 votes
0 answers
150 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 ...
texdr.aft's user avatar
  • 950
4 votes
0 answers
155 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 ...
CarpeDiemKopi's user avatar
4 votes
0 answers
118 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} ...
siracusa's user avatar
  • 13.4k
4 votes
0 answers
184 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) ...
An Hoa's user avatar
  • 301
3 votes
0 answers
68 views

Are there tricks for detecting whether a `\csname..\endcsname`-thingie went wrong and, if so, delivering additional messages explaining the issue?

For the sake of having expandable tokens expanded before stringification I sometimes combine \csname..\endcsname-expansion with \string as in \chardef\stopromannumeral=`\^^00 \edef\gobbleToPrefix{% \...
Ulrich Diez's user avatar
  • 28.9k
3 votes
0 answers
52 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 ...
Jinwen's user avatar
  • 8,528
3 votes
0 answers
209 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 ...
Thomas Blankenhorn's user avatar
3 votes
0 answers
298 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 ...
Randall Fairman's user avatar
3 votes
0 answers
241 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 ...
jjdb's user avatar
  • 2,238
3 votes
0 answers
89 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-...
user24098's user avatar
  • 1,235
3 votes
0 answers
179 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,...
Hannu Rouhiainen's user avatar
3 votes
0 answers
492 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. ...
shreeshrii's user avatar
2 votes
0 answers
60 views

How can I read line of input without making TeX think it is at the start of a line?

Normally, \errmessage, \immediate\write etc. starts a newline if there's an incomplete line on the terminal. pdftex '\message{123}\errmessage{hello}\end' Output: entering extended mode 123 ! hello. &...
user202729's user avatar
  • 7,173
2 votes
1 answer
240 views

Hyphenate compound word: What items should go into the horizontal list?

TeX won’t hyphenate a “word” if the word already contains a “discretionary”. As a consequence, compound words such as integro-differential and Rajamahendravaram--Visakhapatnam will not be hyphenated, ...
Ruixi Zhang's user avatar
  • 9,573
2 votes
0 answers
244 views

Fully expand an argument before using it in latex

I'm trying to make a function that takes an argument and returns the number of words in the argument, once it is expanded. Something along the lines of \wordcount{Some text goes here with \macros{abc} ...
14jbella's user avatar
  • 153
2 votes
0 answers
156 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 ...
Igor Liferenko's user avatar
2 votes
0 answers
120 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 ...
Nikolai Prokoschenko's user avatar
2 votes
0 answers
48 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 ...
CarpeDiemKopi's user avatar
2 votes
0 answers
129 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 ...
Michael Fraiman's user avatar
2 votes
0 answers
185 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 ...
Petr Potrow's user avatar
2 votes
0 answers
488 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. ...
AbstractDissonance's user avatar
2 votes
0 answers
141 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 ...
Dale Hartley Emery's user avatar
1 vote
0 answers
84 views

How to change the tooltip unmarked annotations to marked annotations using PDF scripting

I'am working on my tooltip package custom-tooltip.sty. Please see below of custom-tooltip.sty \NeedsTeXFormat{LaTeX2e}[2020/02/20] \ProvidesPackage{custom-tooltip}[2020/11/30 custom-tooltip Package] %...
Srinivasan Ganapathy's user avatar
1 vote
0 answers
70 views

On TEXINPUTS, input@path, graphicspath, l_file_search_path_seq etc

There appears to be multiple methods to customize the locations where (La)TeX search for files, as well as packages like import etc. What are they/how to use them? Why were they introduced? Why are ...
user202729's user avatar
  • 7,173
1 vote
0 answers
118 views

Detecting which version of L3 programming layer is in use

The LaTeX3 package I am writing uses \prop_gput_from_keyval which has been introduced in 2021-05-16 of expl3. I am trying to guard my package against users of older TeX installations. In order for ...
Sven Pistre's user avatar
1 vote
0 answers
482 views

Tex Live Updater suddenly broke

I have used Tex Live GUI to update packages. Suddenly it does not work. When I run TLShell TeX Live Manager, I get the following message: C:/texlive/2022 warning: kpathsea: c:/texlive/texmf-local/ls-r:...
quis1938's user avatar
1 vote
0 answers
94 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 ...
pinguino's user avatar
1 vote
0 answers
135 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 ...
LulaTeX's user avatar
  • 11
1 vote
0 answers
31 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 (# $ % & { } _ ~ ^ \...
Alexander Ushakov's user avatar
1 vote
0 answers
114 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 ...
yanpengl's user avatar
  • 2,701
1 vote
0 answers
293 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 ...
Przemysław Scherwentke's user avatar
1 vote
0 answers
53 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\...
JamieLittleJoeHossAdamBen's user avatar
1 vote
0 answers
288 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' ...
nandi's user avatar
  • 21
1 vote
0 answers
424 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@...
nowox's user avatar
  • 1,375
1 vote
0 answers
79 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 ...
codepoet's user avatar
  • 1,316
1 vote
0 answers
132 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 ...
Vladimir's user avatar
1 vote
0 answers
193 views

Using [subpreambles]{standalone} causes the document to not compile

Yesterday I had this problem which was quickly resolved, but now the Solution doesn't work anymore. The problem happens with this small piece of code already: \documentclass{article} \usepackage[utf8]{...
HWilmer's user avatar
  • 203
1 vote
0 answers
132 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 ...
İlker's user avatar
  • 21
1 vote
0 answers
303 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 ...
Admin_PCNGroup's user avatar
1 vote
0 answers
128 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 ...
user2925716's user avatar
  • 1,940
1 vote
0 answers
229 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). ...
Joep Awinita's user avatar
1 vote
0 answers
200 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 ...
javadr's user avatar
  • 2,404
1 vote
0 answers
640 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 ...
Helena's user avatar
  • 43
1 vote
0 answers
69 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 ...
Maïeul's user avatar
  • 11k