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
36 views

Text fitted around the middle image or note

Please see this article In my own case, I have a text middle of which I wish to insert a square containing a note. How we can do that!!!
8
votes
1answer
84 views

Semantic differences of global definitions in local group relating to save-stack entries

This is a follow-up question on \global variant of \csname…\endcsname, which asks for a solutions to the problem explained there, but doesn't ask for an explanation. The gist of the problem is that {...
14
votes
2answers
361 views
+100

\global variant of \csname…\endcsname

Please consider the following minimal example: \documentclass{article} \tracingrestores=1 \def\foo{\bar\foobar} \def\bar{\gdef\testA{blabb}} \def\foobar{\expandafter\gdef\csname testB\endcsname{...
6
votes
2answers
117 views

What is an internal dimension/glue/muglue?

In the documentation of l3skip's \dim_eval:n one is warned This [...] requires suitable termination if used in a TeX-style assignment as it is not an ⟨internal dimension⟩. Analogous warnings can ...
8
votes
1answer
112 views

Does LaTeX redefine [some] TeX primitives?

I read in "What is the difference between TeX and LaTeX?" that LaTeX is a collection of macros (an extension) built on top of TeX. Supposedly, TeX primitives should then behave in LaTeX the same way ...
2
votes
0answers
52 views

How do I convert a LaTeX PDF to a completely vector file? [closed]

So, I have this one math equation I made in Kile. I want it to be then used for printing, so I wanted to export it in AI, SVG or CDR file. I thought it would be no problem, since, well, LaTeX is all ...
1
vote
3answers
114 views

Token list: Tokenization reverse puzzle: Did I solve it right? How to use \ShowTokens or \tl_analysis_show:n to prove my solution?

I found this interesting article about tokens: Tokens in LuaTeX from Hans Hagen. A macro definition converts to tokens as follows [B][A] Unfortunately, the macro definition is missing here. ( ...
4
votes
3answers
197 views

Is there good documentation of TeX, eTeX, pdfTeX, XeTeX and/or LuaTeX primitives?

I mean something like this: TeX - Wikibooks I found it looking up documentation for \if. I didn't expect to find it to be a WikiBook. Open the link, scroll down to "TeX Primitives" and click ìf ...
0
votes
1answer
67 views

Example of “babel-\bbl@format.cfg” i.e. “babel-*.cfg”? Typical content? Where do I have to store “babel-latex.cfg” so “kpsewhich” can find it?

An e-TeX generated with Jim Fowler's WEB/TeX Pascal to WebAssembly Compiler web2js should dump a LaTeX format from latex.ltx and stumbles over the babel-latex.cfg, see ShreevatsaR's instructions to ...
3
votes
0answers
56 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 ...
5
votes
3answers
264 views

How to get maximum number that \newcount can hold?

Is there a command that contains greatest positive integer that \newcount can hold?
0
votes
1answer
78 views

TeX initex error “TeX capacity exceeded, sorry [pool size=8563]” while constant pool_size is set to 350000. What can I do?

Attention: This TeX is generated by web2js Jim Fowler's WEB/TeX Pascal to WebAssembly compiler. This is a follow-up question to Is it possible to output a WEB constant with a TeX (or WEB) command?. ...
0
votes
1answer
45 views

Is it possible to output a WEB constant with a TeX (or WEB) command?

tex.web defines several constants which are changed at compile time. How can I get the values of the current TeX or eTeX instance? I'm about to put a TeX or eTeX generated by web2js Jim Fowler's ...
0
votes
1answer
24 views

metapost with tex label can't work in NOT bin folder but can work in the bin folder,what's the reason?

Win 10 1903 + TeXLive 2019 the fig.mp file are prologue := 3; verbatimtex %&latex \documentclass{article} \usepackage{CJK} \begin{document} \begin{CJK}{UTF8}{gbsn} etex beginfig(1); draw (0,0)--(...
11
votes
1answer
274 views

How is \char processed in math mode?

The following example produces ${\rm\char"5}$ \end Why does it not produce the following instead?
6
votes
1answer
80 views

How to convert English letter to its alphabet index, and to its ASCII/Unicode index?

I need to convert a letter to its index in the alphabet, and to its ASCII / Unicode index. And would like to have more than one way of achieving each of the cases (because I remember there are more ...
9
votes
1answer
236 views

Why does one get the wrong value when printing counters together?

I would like to understand why the expression \the\count0\the\count1 returns 0 when they are written without spaces. Here's the code: \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} ...
9
votes
2answers
220 views

To which atoms correspond \left and \right in \showlists?

This is the input: $\left|-\infty\right|\showlists$ \end This is the output: \mathinner .\left"26A30C .\mathbin ..\fam2 ^^@ .\mathord ..\fam2 1 .\right"26A30C It is not clear to what atoms ...
0
votes
1answer
33 views

How can I output another page “** I'm the new first page**” in/with pdfwebmac.tex (or webmac.tex) before the document?

I got it here: pdfwebmac.tex It's the hyperlink version of webmac. In principle, the question should also apply to webmac. My Tex Live 2019 distribution only contained the webmac. With weave tex.web ...
2
votes
0answers
25 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 ...
0
votes
0answers
40 views

Is it possible to preview a graph when referring to it by hovering as of 2019?

I read a lot about fancytooltip package but it seems to be a little bit too confusing installing everything. I am on Windows 10.
1
vote
1answer
105 views

How to change table of content layout for a pdf document created from a web source file?

weave tex.web pdftex tex.tex generates a pdf as follows with a table of content and a document body: Pay attention: The table of content is below the document! I want the table of content ...
9
votes
1answer
184 views

Where to find an interactive PDF or HTML version of the tex.web documentation?

I have problems with the memory management of an eTeX created with Jim Fowler's TeX's pascal to javascript compiler web2js as soon as I want to dump the eTeX format etex.src with more than only "...
5
votes
1answer
68 views

Get correct results for overwritten font identifier

How can I get a correct font identifier with \showthe and \the after it is overwritten? The MWE is below (Same result with all of Knuth TeX, pdfTeX, XeTeX, (e-)pTeX, (e-)upTeX and Aleph. Only LuaTeX ...
2
votes
1answer
56 views

How to prepare a chg file, tie and tangle: tex.web tex.ch etex.ch and etex.sys to a new etex.web?

I need the following changes for tex.web in tex.ch. The section begins line 707. The actual change concerns the last two lines. @ The ASCII code is ``standard'' only to a certain extent, since many ...
1
vote
1answer
81 views

How to avoid “Chi UTF-8 error” when dumping an etex from etex.src?

"Chi error": ! Text line contains an invalid character. l.18 \testengine ^^? ^^?!\relax % That's Chi, a 2-byte UTF-8 sequence' The error is triggered by 18 \testengine χ!\...
0
votes
1answer
36 views

Get the token of a command name by means of another command

There are two commands, one of which forms a token of kind "token-kind@number-of-section@number-of-this-kind-token". With that the name of token kind string and the corresponding counter name are ...
0
votes
1answer
149 views

How to manual create a format which includes LaTeX and a package e.g. calculator for a bare eTeX?

I'm able to make fmt-files with the packages mylatex or mylatexformat in my Tex Live 2019 installation but I need a file mycalclator.tex for a use case as follows einitex *mycalculator.tex \dump ...
9
votes
1answer
200 views

What does <recently read> etc. mean in TeX's error message

TeX will encounter an error with the following code: \documentclass{article} \test \begin{document} \end{document} It will give a message as: ! Undefined control sequence. <recently read> \...
2
votes
1answer
21 views

Writing jobname and day to auxiliary file

I'm confused about why \immediate\write evaluates some commands but not others. E.g. \immediate\write\file{\jobname, \day} correctly expands \jobname but writes "\day" as itself. How can I write the ...
6
votes
2answers
191 views

how to generate correct single and double quotes in tex

I am writing a tex document using book document class. I have already typed close to 100 pages, but i did a mistake with typing single and double quotes. I have done it as follows : "test double ...
0
votes
0answers
56 views

How to test for existence of a string in a tex file? [on hold]

How can I obtain a command that tests for existence of a string in a tex file? Example: if ('foo' is in file.tex) then raise error (You used foo, please don't use foo)
3
votes
2answers
283 views

How to make an e-TeX WebAssembly with Jim Fowler's WEB/TeX pascal to WASM compiler web2js?

I have a TeX Live 2019 distribution installed on Windows 10 and want to run a preloaded LaTeX based on e-TeX (with these packages among others: Calculator, Calculus, TikZ, CircuiTikZ) under ...
3
votes
0answers
114 views

Difference between TeX and LaTeX [duplicate]

I am not getting the difference between TeX and LaTeX. I have seen the answer here but I am not getting it completely. Is TeX a system or language or format or program and Is LaTex a system or ...
3
votes
2answers
243 views

Why is an empty \line added when \insert is used?

Consider the following example: \tracingonline=1 \tracingoutput=1 \gdef\makefootline{} \gdef\makeheadline{} \insert\topins{\vbox to\vsize{\hrule height \vsize width 300pt}} \end The log file ...
2
votes
1answer
74 views

Testing for a length

I'm trying to write some code, that tests whether a value is a length or something else. I've found \token_if_dim_register and \token_if_skip_register which seems to do the trick, but can not get this ...
5
votes
1answer
122 views

Is there a bug in gftype.web's description of character widths?

Under https://www.ctan.org/tex-archive/systems/knuth/dist/mfware we find gftype.web. On line 574 of gftype.web it says: The character width~|w| duplicates the information in the \.{TFM} file; it ...
10
votes
1answer
112 views

How do I define a new TeX register with arguments in LuaTeX?

Some time ago I tried to implement the \pdfadjustinterwordglue from pdfTeX in LuaTeX using a callback. Getting the callback to work is pretty simple, but there is another major problem in the way ...
5
votes
1answer
62 views

Why is \unexpanded not respected after an \if?

I was surprised to find that the argument of an \unexpanded is expanded if the \unexpanded is within the first two tokens after an \if. Using Knuth TeX's \noexpand instead works but I am curious where ...
2
votes
1answer
97 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(...
4
votes
1answer
112 views

Question about exercise 14.23 in TeXbook

In answer to exercise 14.23 it is said: The three paragraphs can be combined into a single paragraph, if you use ‘\hfil\vadjust{\vskip\parskip}\break\indent’ instead of ‘\par’ after the first two....
6
votes
2answers
173 views

How to define a macro inside a macro via \if?

I need to give specific name to a macro based on a condition. The first example works, the second does not. Is using \csname/\endcsname (i.e., example 1) the only right way? Are there any other ways ...
19
votes
2answers
2k views

Are all commands with an optional argument fragile?

Here is a discussion of fragile command in LaTeX. And it says that any commands that have an optional argument are fragile, for instance \footnote[2]{myfoottext} and \footnot{myotherfoottext}. I have ...
1
vote
1answer
29 views

Does \hangafter has any effect when \hangindent is zero?

TeXbook p.103 says: You get the normal paragraph shape, in which every line width is \hsize, when \parshape=0, \hangindent=0pt, and \hangafter=1. IMHO, when \hangindent is zero, \hangafter has ...
3
votes
1answer
35 views

How \hbadness and \hfuzz influence “Overfull \hbox” warning?

TeXbook (p.302) says: A nonempty hbox is considered “overfull” if its glue cannot shrink to achieve the specified size, provided that \hbadness is less than 100 or that the excess width (after ...
0
votes
1answer
46 views

Why “underfull box” message is printed?

In TeXbook, p.27, it is said: And further: If there’s no way to meet these restrictions, you get an overfull box. Here is how to reproduce this text: \input manmac \begindisplay \hbox spread-1em{...
0
votes
2answers
99 views

character box depth and height

As I understand it, when TeX reads a glyph TeX puts the glyph into a character box. It pays attention the left sidebar and right sidebar, so negative sidebars are handled correctly (as are positive ...
10
votes
1answer
117 views

\ifnum expanding too much - what is happening?

Consider the following example: \documentclass{article} \makeatletter \newcommand\fail[1]{% \ifnum1=#1% <- here a space is missing \expandafter \@firstoftwo \else \...
2
votes
1answer
77 views

How to automatically capture \prevgraf value (inside xparse environment) every time text ends with \par?

I need to declare an environment with \NewDocumentEnvironment such that every \par provided by the user inside that environment would automatically set an integer variable (inside environment-...
5
votes
3answers
118 views

Indirectly defined macros: Undefined macro with “@” does not trigger compile error

I defined two macros \newfoo{#1}{#2} and \foo{#1}. The first parameter is used as a key and must be a valid LaTeX macro name (without the backslash). The second parameter is a short piece of text. ...