Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
5 votes
1 answer
82 views

How implement a drop cap with boxes

I'm trying to implement a "drop cap", not to use it (I know there is a package to do it), but to practice some box things. So far I have this written: \parindent=0pt \newdimen\pdim \def\...
gxono's user avatar
  • 142
2 votes
2 answers
62 views

Specific Formulas Alignment

I need to align congruences in different ways in columns. The left parts of the formulas (in the red frame) need align in the center, the right ones (in the green frame) should be one under the other (...
32seph's user avatar
  • 23
2 votes
2 answers
80 views

How to expand branches of a forest tree

I am trying to draw a stemma codicum of a critical edition using the package forest - after the first step of drawing all the branches I now need to expan the branches before adjusting all the lengths....
Andrea 's user avatar
  • 135
0 votes
1 answer
20 views

Remove newline from input

Is there a way to remove a single newline character from an input? Something like this \edef\test{\removenl{ Hello World % }} % \test should have ` Hello World ` Context: Consider a file.txt that ...
Tohiko's user avatar
  • 1,823
1 vote
0 answers
71 views

I get strange values for the greek letter pi and the product Pi

The following code produces the similar two numbers twice because the two lines of code are similar: 281 and 28677 I don't know what are those values and where they come from. In the log file there's ...
Rafiq's user avatar
  • 93
2 votes
2 answers
434 views

TeX variables become local within list environments?

Apparently, when the value of a TeX counter is modified inside an enumerate environment (and no doubt many other contexts), it acts like a local variable, so that any modifications to it are local to ...
Mars's user avatar
  • 1,108
0 votes
3 answers
40 views

How to change height and depht for superscript and subscript outside math mode?

To display in a decent way both superscript and subscript after some text I'm using these commands \rlap{\textsuperscript{}}\textsubscript{} and it works. I'm looking for a way to increase the ...
Paul's user avatar
  • 45
3 votes
2 answers
57 views

Custom LaTeX Command for Consecutive Superscripts with Correct Alignment After Large Symbols

I am writing my master's thesis on Formal Concept Analysis and I want to create a custom command for the derivation operators. They are superscript arrows with some optional argument, and would look ...
Samuel Jose Molina Ruiz's user avatar
5 votes
2 answers
176 views

Purpose of \nobreak inside \vadjust

I was looking into the definition of \@normalcr. In some cases, the macro expands to include either \vadjust{\nobreak \relax} or \vadjust{\nobreak \vskip 1cm} (the 1cm is an example, more generally it ...
SvenForkbeard's user avatar
0 votes
0 answers
147 views

Powershell's Get-Clipboard slow output in TeXStudio Script

I am currently trying to run a TeXStudio script that calls a Powershell Script that outputs to the Messages Section of TeXStudio the contents of the clipboard. This is the script I have in TeXStudio's ...
Juan De Castro's user avatar
0 votes
2 answers
56 views

def inside def gives an error when used with ref

I want to define a command that returns a label to use with \ref, but it requires using \edef to expand another command. However, I am getting several errors starting with Missing \endcsname inserted. ...
Tohiko's user avatar
  • 1,823
0 votes
1 answer
86 views

How to include a bib file into my latex file? [duplicate]

What is wrong with my code? It doesn't compile! I use Zotero to gather my references. I exported the references from Zotero as biblatex file, and I used this code and It doesn't compile! \...
A witch's user avatar
  • 101
2 votes
1 answer
52 views

verbatim mode and carriage return character tokens

This question refers to how the program TeX creates tokens after reading a line of a .tex-file. It does actually not refer to writing macros or doing typesetting work which takes place in stages after ...
user avatar
1 vote
1 answer
76 views

Why does `\the\le` typeset `12820`?

TeX primitives reference says that the primivite \the can typeset a parameter value (integer, dimen, glue, or muglue) or internal quantity (except \font) produce a copy of the token list for a token ...
user615536's user avatar
0 votes
1 answer
64 views

Why are no words in my document being hyphenated?

I have a document with many instances where hyphenation would be appropriate. But not a single word is being hyphenated. I have tried: Using \hyphenation to explicitly define the hyphenation. Adding \...
vauhochzett's user avatar
0 votes
1 answer
69 views

Flush left all math display equations, including $$

I plan to write a package to adapt a document for visually impaired persons. My wish is that all works out of the box, independently of of the user habits or class, just with \usepackage{my-package}, ...
jlab's user avatar
  • 3,197
0 votes
0 answers
55 views

Suggest a Practical Roadmap to becoming a TeX/LaTeX expert [duplicate]

What would be a Practical and Optimal Roadmap for a beginner to becoming an expert author or maintainer of a complex and professional LaTeX package?
Abbas's user avatar
  • 73
5 votes
6 answers
241 views

nested \ifx with extra \else error

I have this code with nested ifx (plain TeX): \def\test#1#2% { \edef\cmpa{#1} \edef\cmpb{x} \ifx\cmpa\cmpb it is x \edef\cmpa{#2} \edef\cmpb{1} \ifx\cmpa\cmpb and 1 \...
coonlight's user avatar
  • 125
1 vote
1 answer
197 views

Is LaTeX a programming framework of TeX?

My take from What is the difference between TeX and LaTeX? is that TeX is the programming language that renders the document. LaTeX is a well-known macro package for TeX with the aim to make the ...
Ooker's user avatar
  • 1,490
0 votes
0 answers
44 views

How to write above fractions - font issue

I'm trying to write a math document,and I have the following problem. I wanted to create fractions like this: and the code that I used to create it is this: \documentclass[twoside,a4paper,leqno]{...
user939001's user avatar
2 votes
1 answer
57 views

Does \alloc@ change \allocationnumber globally?

I'm reading through plain.tex. This is the definition of \alloc@: \def\alloc@#1#2#3#4#5{\global\advance\count1#1 by 1 \ch@ck#1#4#2% make sure there’s still room \allocationnumber=\count1#1 \global#3#5=...
Marnanel Thurman's user avatar
2 votes
2 answers
111 views

Place explicit character tokens of category 1/2, whose character codes are to be specified, before/behind tokens that form arbitrary macro argument?

Assume tokens \macro{1612512}2{1612612}2{1⟨arbitrary non-outer brace balanced tokens⟩}2; the 1st argument of \macro holds a TeX-⟨number⟩-quantity in the range of possible codepoints of the TeX engine'...
user avatar
1 vote
2 answers
66 views

How to double explicit character tokens of category 6/parameter of an arbitrary sequence of tokens? (Not the \edef..{\unexpanded{..}}-thingie)

Assume there is defined a macro \foo: \def\foo{\bar\space A hash {in {braces: \string##}\string##}} Expanding a control word token/macro token \foo yields: \bar\spaceA11␣10h11a11s11h11␣10{1i11n11␣10{...
user avatar
1 vote
0 answers
86 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 votes
1 answer
72 views

What is the meaning of "the raised asterisk (*) drops down to a lower level (∗)" in "The TeXbook"?

At the end of penultimate paragraph on page 132 of the book The TeXbook, there is the raised asterisk(*) drops down to a lower level (∗). What is the meaning of that? May you give me an example?
Y. zeng's user avatar
  • 1,983
4 votes
4 answers
470 views

How to know shrink limit of "glue" in TeX?

On page 69 of The TeXbook, there is a figure: On page 70 of The TeXbook, is says Glue will never shrink more than its stated shrinkability. For example, the first glob of glue in our illustration ...
Y. zeng's user avatar
  • 1,983
1 vote
1 answer
29 views

How to get Alphabetical section numbers with moderncv LateX package?

There are some prior posts showing how to add section numbers of a moderncv document. For example, the give code such as: \newcounter{secnumber} \renewcommand\sectionstyle[1]{{% \...
Vin's user avatar
  • 11
0 votes
1 answer
70 views

Arrows over letter in LaTeX file indicating a ray is not drawn correctly

I am adopting code for drawing arrows above letters indicating rays from Steven B. Segletes; he had replied to a post "Typesetting arrows above a pair of letters to indicate a line" on tex....
user74973's user avatar
  • 4,081
11 votes
1 answer
210 views

Where do primitives for drawing come from?

I'm currently wondering how packages like tikz can possibly work. I've read the TeX Book and found no evidence of TeX primitives capable of drawing things. LaTeX is just a collection of macros so the ...
HomoVafer's user avatar
  • 294
2 votes
1 answer
89 views

New line cause a "\par" even the "\endlinechar" is changed to "\char256" in TeX

TeX will insert \endlinechar at the end of line. If the value of \endlinechar is negative or greater than 255, no character is appended, and the effect is as if every line ends with %. \def\...
Y. zeng's user avatar
  • 1,983
3 votes
2 answers
256 views

What is the "code 2" when TeX tokenize?

On page 48 of The TeXbook, there is an exercise Assume that the category codes of plain TEX are in force, except that the characters ^^A, ^^B, ^^C, ^^M belong respectively to categories 0, 7, 10, and ...
Y. zeng's user avatar
  • 1,983
4 votes
2 answers
385 views

Show carriage return by changing its catcode in TeX?

On page 46 of The TeXbook, there is TEX deletes any space characters (number 32) that occur at the right end of an input line. Then it inserts a return character (number 13) at the right end of the ...
Y. zeng's user avatar
  • 1,983
0 votes
2 answers
127 views

What follows the `^^` in TeX? Hex or Dec or symbol?

^^6\bye will produces v. I can understand this. 6 is the symbol of ASCII table, and the DEC of 6 symbol is 54. As 54 is smaller than 64, so 54+64=128. The 128th symbol of ASCII table is v. ^^61 ...
Y. zeng's user avatar
  • 1,983
0 votes
1 answer
70 views

Why can the character number 127 be ouput by default?

On page 44 of The TeXbook, it says, the “dangerous bend” sign used in this manual appears as character number 127 of font manfnt, and that font is selected by the control sequence \manual On page 45 ...
Y. zeng's user avatar
  • 1,983
2 votes
3 answers
933 views

"^^A" does not work in TeX?

On page 45 of The TeXbook, TEX has a standard way to refer to the invisible characters of ASCII: Code 0 can be typed as the sequence of three characters ^^@, code 1 can be typed ^^A, and so on up to ...
Y. zeng's user avatar
  • 1,983
0 votes
3 answers
131 views

How to understand "\appendroman#1#2#3" on page 41 of The TeXbook?

At the bottom of page 41 of The TeXbook, there is a question: Define a control sequence \appendroman with three parameters such that \appendroman#1#2#3 defines control sequence #1 to expand to a ...
Y. zeng's user avatar
  • 1,983
6 votes
2 answers
1k views

Doesn't "\romannumeral1986" equal "mcmlxxxvi" in TeX?

In TeX, \uppercase{\romannumeral1986}\par %\catcode`\m=12 \uppercase{mcmlxxxvi} \bye produces So, doesn't mcmlxxxvi equal \romannumeral1986? What the difference between them? \expandafter can bypass ...
Y. zeng's user avatar
  • 1,983
4 votes
2 answers
487 views

"\uppercase{a\lowercase{bC}}" produces "Abc" in TeX?

In TeX, \uppercase{a\lowercase{bC}} produces Abc not ABC, why? As far as I know, TeX will run the inner group before run the outer group, so I think it should be ABC and even \uppercase{a\expandafter{\...
Y. zeng's user avatar
  • 1,983
0 votes
1 answer
69 views

"\escapechar" vs category 0 in TeX

In TeX, \catcode`\|=0 will make escape character to be |, to |TeX will output But at the penultimate paragraph of page 40 of The TeXbook, it says that \escapechar is normally TeX's internal code for ...
Y. zeng's user avatar
  • 1,983
1 vote
1 answer
114 views

To make "\" to category 12, why should convert it to category 13 in TeX?

Exercise 7.5 on page 40 of The TeXbook asks to make \ to category 12. The answer of this question is {\catcode‘/=0 \catcode‘\\=13 /message{/string\}} Why should assign the \ to 13 not 12? The ...
Y. zeng's user avatar
  • 1,983
0 votes
1 answer
78 views

Doesn't "\csname" need contain "\0"?

On page 40 of The TeXbook, Conversely, you can go from a list of character tokens to a control sequence by saying ‘\csname\endcsname’. So \csname TeX\endcsname equals \TeX. However, \TeX contains ...
Y. zeng's user avatar
  • 1,983
0 votes
0 answers
43 views

Why does '\string' convert '\' to "? [duplicate]

On page 40 of the TeXbook, it says, \string\cs will produce tokens to be calssied to 12. But \string\TeX will produce `"TeX" as I once thought that the result should be \TeX. Why is there &...
Y. zeng's user avatar
  • 1,983
0 votes
2 answers
72 views

Need add a space before character in changing category of character?

At the bottom of page 307 of The TeXbook, it says TEX always reads the token following a constant before evaluating that constant. So, {\catcode‘\>=2 > is different from {\catcode\`>=2> ...
Y. zeng's user avatar
  • 1,983
2 votes
1 answer
124 views

What is the '\oops' in 'I\errorcontextlines=100 \oops' and where should they be placed in TeX file?

At the bottom of page 34 of The TeXbook, there is If you use TEX format packages designed by others, your error messages may involve many inscrutable two-line levels of macro context. By setting \...
Y. zeng's user avatar
  • 1,983
2 votes
1 answer
235 views

Does '\centerline' really define '\ERROR' in TeX?

In a .tex file, there is \centerline{\bf A SHORT \error STORY}, which will cause error as l.3 \centerline{\bf A SHORT \ERROR STORY} ? ! Emergency stop. <...
Y. zeng's user avatar
  • 1,983
3 votes
1 answer
261 views

"Underfull" or "Loose" box in TeX?

When badness exceeds \hbadness, there should be Underfull. When badness exceeds \tolerance, there should be Overfull. Origin story.tex file is \hrule \vskip 1in \centerline{\bf A SHORT STORY} \vskip ...
Y. zeng's user avatar
  • 1,983
4 votes
1 answer
112 views

Same badness cause different space in the same sentence in TeX?

On page 29 of The TeXbook, Mr. Knuth show the same sentence with the same badness, but those have different space between their word. What is the reason and how to understand the badness here?
Y. zeng's user avatar
  • 1,983
3 votes
2 answers
424 views

Is "plain.fmt" equal "plain.tex" in TeX?

When tex was input in terminal, there is preloaded format=tex. Is preloaded format=tex equal plain.tex? When input &plain \input story after the tex command, there is Sorry, I can't find the ...
Y. zeng's user avatar
  • 1,983
1 vote
3 answers
166 views

numbers greater or equal condition

can't believe that there is a language in which such a simple thing requires so much effort. well i want to do a greater or equal to comparison of an argument in a macro. My current try is not right. ...
user1850133's user avatar
0 votes
2 answers
57 views

If one of TEX’s internal parameters is changed within a group, the previous contents of that parameter will be restored when the group ends in TeX?

I see this sentence on page 21 of the book The TeXbook, but I can't understand it. May you show me an example and explain it to me? If one of TEX’s internal parameters is changed within a group, the ...
Y. zeng's user avatar
  • 1,983

1
2 3 4 5
40