Skip to main content

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
1 vote
1 answer
38 views

Missing control sequence inserted when using `breqn`

I have compatibility problem between my own TeX code and breqn, and I'm out of my depth in my understanding of TeX. I'm encountering this while reviving some LaTeX code from a few years ago. I'm ...
yori's user avatar
  • 5,723
0 votes
1 answer
54 views

Is it possible to save a notepad text (.txt) file to a Latex (.tex) file?

I am trying to compile and test a file in Latex/Domino using a text file in Notepad that has a script/code in it. Is it possible to convert the notepad txt file to tex somehow? Could a txt file be ...
Sierra's user avatar
  • 1
5 votes
2 answers
211 views

Exact time point of assignment

Consider this plain TeX code: \the\dimen0 \dimen0=1pt\the\dimen0\the\dimen0 \bye which produces 0.0pt 0.0pt.0pt Here is my analysis: the first line is obvious, and it shows that the original value ...
Stephen's user avatar
  • 5,288
0 votes
2 answers
63 views

Is there any method to export the content show in commandline with command `\show` to the PDF file?

In the TeXBook, I learn about that the definition of some macros could be shown with the CommandLine in tex environment with \show, like \show\uppercase or \show\proclaim, however,my question is: Is ...
Explorer's user avatar
  • 451
6 votes
1 answer
231 views

What does the \end mean in LaTeX's environment?

I run with an example today: \documentclass{article} \begin{document} \def\EE{\section{EE}} \begin{EE} A \end{EE} \end{document} this source can be compiled successfully using pdflatex, and ...
zpding's user avatar
  • 447
0 votes
1 answer
49 views

Metapost label with centered paragraph text

I'm using Metapost and trying to typeset a long-ish label (a figure caption so it could be multiple lines) centered under a figure and not exceeding the figure width. I came up with this which is ...
g i i k's user avatar
  • 165
3 votes
2 answers
104 views

Defining command for use with ifnum

I want to define a conditional command that I can easily use with \ifnum, hence such a command should expand to a number. However, I sometimes need to define temporary commands which breaks such usage,...
Tohiko's user avatar
  • 1,885
0 votes
0 answers
26 views

Using authblk \author in a tex cls file with a \foreach loop

I wrote a cls file containing: \NeedsTeXFormat{LaTeX2e}[1994/12/01] \ProvidesClass{Bug}[2024/07/12 Bug] \LoadClass[a4paper,twoside,openbib]{article} \RequirePackage{expkv-opt} \RequirePackage{expkv-...
Jouke's user avatar
  • 11
0 votes
1 answer
91 views

What has been modified in the core of TeX or LaTeX that creates a bug in the xlop package? [closed]

Normally the first operand 521 should display _2_ but it displays 52_ and the second operand 177 should display _7_ but it displays 17_. This xlop package didn't have this bug until 6 months ago. ...
AndréC's user avatar
  • 26.2k
0 votes
1 answer
57 views

Covert Markdown to LaTeX using Pandoc but exclude some text from appearing in .tex file [closed]

I have added several notes in my Markdown document but when converting the mardown to .tex file using Pandoc, I do not want those notes to appear in .tex file: Here is the text with the notes: "...
Araz's user avatar
  • 1
0 votes
1 answer
70 views

How to tell TeX to avoid overfull hboxes by breaking a line?

Is there a way to tell TeX that, whenever a paragraph cannot be typeset properly, it should never produce an Overfull hbox, and break some line in the paragraph instead? I do know about all I should ...
sparusaurata's user avatar
5 votes
1 answer
98 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
  • 528
2 votes
2 answers
67 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
88 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
33 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,885
1 vote
0 answers
75 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
  • 255
2 votes
2 answers
443 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,118
0 votes
3 answers
51 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
60 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
181 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
161 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
60 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,885
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
55 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
77 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
70 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
76 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
  • 4,311
0 votes
0 answers
56 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
249 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
  • 137
1 vote
1 answer
220 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,530
0 votes
0 answers
45 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
61 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
114 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
68 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
94 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
78 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
  • 2,137
4 votes
4 answers
478 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
  • 2,137
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
73 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,111
11 votes
1 answer
220 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
  • 394
2 votes
1 answer
94 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
  • 2,137
3 votes
2 answers
264 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
  • 2,137
4 votes
2 answers
388 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
  • 2,137
0 votes
2 answers
132 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
  • 2,137
0 votes
1 answer
80 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
  • 2,137
2 votes
3 answers
947 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
  • 2,137
0 votes
3 answers
133 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
  • 2,137
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
  • 2,137
4 votes
2 answers
492 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
  • 2,137
0 votes
1 answer
75 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
  • 2,137

1
2 3 4 5
40