Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [latex-base]

{latex-base} is about the inner workings of the LaTeX kernel. Do not use this tag for general questions about LaTeX or {macros}.

Filter by
Sorted by
Tagged with
10 votes
1 answer
247 views

How can I determine current font attributes and/or determine if the current font has been substituted by the kernel?

This question concerns two attributes of fonts in LaTeX: series (e.g. bold extended) and shape (e.g. italic small-caps). The problem does not arise for encoding (e.g. T1) or family (e.g. yesjw). How ...
cfr's user avatar
  • 208k
0 votes
1 answer
43 views

Installation of TeX Live 2007 ends up with error messages, saying it fails to build some formats

Upon installing TeX Live 2007 from https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/2007/texlive2007-live-20070212.iso.bz2 on Debian 12 in a local user's home directory, we get a bunch of ...
AlMa1r's user avatar
  • 541
4 votes
2 answers
109 views

How can I do the equivalent of \DeclareFontShapeChangeRule which tests 4 targets rather than 3?

If you don't care why I'm asking, skip the first section .... Problem: No small-caps italic shape was defined in LaTeX 2e. \textsc{\textit{small-caps italic}} did not produce small-caps italic even ...
cfr's user avatar
  • 208k
3 votes
1 answer
238 views

LaTeX rollback - unexpected behavior

Typesetting this mwe \RequirePackage[2015/01/01]{latexrelease} \documentclass{article} \begin{document} Hello World \end{document} I expect it to be indicated the LaTeX version 2015/01/01 into the ...
matteofg's user avatar
  • 175
3 votes
1 answer
155 views

Is there a command something like \NeedsTeXFormatAtLeast{LaTeX2e}[date]

I know about the command \NeedsTeXFormat, as in such as \NeedsTeXFormat{LaTeX2e}[2023/11/01]. But: does this automatically allow a later LaTeX format to be used? if not, is there some similar command ...
murray's user avatar
  • 8,712
3 votes
1 answer
152 views

`section` is reset upon changing a chapter?

The amsthm documentation states: If any theorem elements are numbered by section, and (in a book) the first such element in a chapter comes before the first section, numbering will continue from the ...
Atom's user avatar
  • 665
7 votes
1 answer
183 views

Why do I get "unused global options warning" for options forwarded to a package except for the first option?

I am working on a custom package for my macros and shortcuts, and a custom class for my preferred style of the document. I am using DeclareKeys to define key-value options in my package, and then my ...
Shai Avr's user avatar
  • 909
0 votes
1 answer
139 views

why is ispackageloaded named with an @? [duplicate]

I suppose there is some reason why the command \@ifpackageloaded is not just called \ifpackageloaded But with the @ one has some additional work: \makeatletter \@ifpackageloaded{geometry} { ...
user2609605's user avatar
3 votes
1 answer
128 views

Adding to package hook after it's been loaded

It was my understanding of kernel hooks that adding to a hook only affects instances that follow that addition. This seems true for in-document hooks. For example, with \begin{quote} some text \end{...
mbert's user avatar
  • 4,561
0 votes
1 answer
97 views

How to make a specific environment disappear? [duplicate]

I have got several Tikz pictures whose compilation takes up much time. More generally, I am wondering whether there is a switch that can make a specific environment foo disappear as if the code would ...
shuhalo's user avatar
  • 2,575
1 vote
1 answer
364 views

Page breaks still occur in samepage

I cannot find any documentation at all on the samepage environment (aside from a cryptic comment on p229 of the LaTeX book that "The \samepage command still works, but is now of little use", ...
richard's user avatar
  • 729
0 votes
1 answer
111 views

Get current style (rm, sf, tt)

How to print the current style (rm, sf, tt) in a give position of a document? \begin{document} \sffamily % print current style -> sf \rmfamily % print current style -> rm \ttfamily % print ...
wolfrevo's user avatar
  • 523
7 votes
1 answer
287 views

Why is grouping used in the numerator of the definition of \frac but not the denominator?

In the answers to this question: What is the difference between \over and \frac?, one finds the ams and plain latex definitions of \frac, respectively: \DeclareRobustCommand{\frac}[2]{{\begingroup#1\...
Anthony Pulido's user avatar
5 votes
1 answer
113 views

Different meanings of "footnotesep"?

What is the difference between footnotesep as option of the geometry package and as native dimension \footnotesep? It seems that \usepackage[footnotesep=1em]{geometry} sets the separation between the ...
wolfrevo's user avatar
  • 523
0 votes
1 answer
73 views

Difference between `\newcommand{..}[1]` and `\NewDocumentCommand{..}{m}` [duplicate]

In this answer, egreg uses \NewDocumentCommand{\refprefix}{m}{% \ifinproofref\else #1\fi } The command \refprefix is part of code that's written to the aux file. Defining the command with \...
Bubaya's user avatar
  • 2,549
3 votes
2 answers
449 views

why You can't use `blank space ' after \the

If I define \newcount\punkt \def\newpt{\the\punkt\space\advance\punkt by 1} everything runs fine; but if I do \newcounter{punkt} \newcommand\newpt{\the\punkt\space\stepcounter{\punkt}} I get You can'...
jarnosz's user avatar
  • 4,356
2 votes
1 answer
44 views

use \def\@plus{plus} etc to save token space

In the LaTeX kernel, we can see these definitions: \def\@plus{plus} \def\@minus{minus} \def\@height{height} \def\@depth{depth} \def\@width{width} It is said that these definitions can be used to save ...
Stephen's user avatar
  • 4,684
0 votes
1 answer
74 views

How to store Boolean values for later use

I want to define a new command for a package using xparse. My command looks like this: \NewDocumentCommand{\fancyCommand}{s o m}{ \def\@optional{#2} \def\@mandatory{#3} } This is, because I ...
Matthias's user avatar
3 votes
1 answer
117 views

`\global\NewCommandCopy` instead of `\GlobalLetLtxMacro`?

The new LATEX2ε kernel provides \NewCommandCopy (and \Renew... and \Declare... variants) which functions almost like \LetLtxMacro from the letltxmacro package. Instead of \GlobalLetLtxMacro from ...
Stephen's user avatar
  • 15.1k
8 votes
1 answer
318 views

latex/pdflatex, NewTX, and hyperref: in ⓪ and ①, the circle touches the digit

Feeding \documentclass{article} \pagestyle{empty} \usepackage{newtxtext} \usepackage{hyperref}%%% it's bizarre that adding a package for referencing (and not using this package) changes the shapes of ...
user avatar
5 votes
2 answers
125 views

Why does \newcommand on an already defined active character not yield an error?

We (or at least I) usually think of an active character as just another command whose name just happens to a character rather than a control sequence. So why does \newcommand<active character> ...
Gaussler's user avatar
  • 12.9k
2 votes
1 answer
82 views

Why does \tensor produce errors when LaTeX Info warns about number of math fonts?

In actuarial documents we use much mathematically oriented notation, for which we need many math fonts. In What is the meaning of "No math alphabet change to frozen version normal on input line ...
Markos Mitsos's user avatar
0 votes
1 answer
73 views

Iterate through the tokens of a list not known in advance (\@for + \csname)

If I want to iterate through the tokens of \myList I can simply do \def\myList{one,two,three} \makeatletter \newcommand{\iterateThroughMyList}{% \@tempswafalse \@for\next:=\myList\do{% ...
madmurphy's user avatar
  • 233
13 votes
1 answer
440 views

What's the difference between \AtBeginDocument and \AddToHook{env/document/begin}?

Here is an MWE: \documentclass{article} \usepackage{lipsum} \AtBeginDocument{\linespread{1}\fontsize{12bp}{23bp}\selectfont} % \AddToHook{env/document/begin}{\linespread{1}\fontsize{12bp}{23bp}\...
xdyy's user avatar
  • 590
4 votes
2 answers
451 views

Command \MakeUppercase does not work as expected in pdfLatex, but works fine in LuaLaTeX and XeLaTeX

As you can see from the minimal working examples below \MakeUppercase command when compiled with pdfLatex keeps accents for converted Uppercase words, although it shouldn't. When compiled with ...
miltos's user avatar
  • 2,647
4 votes
2 answers
162 views

What's the best way to avoid ignoring leading space tokens with arguments of LaTeX commands where command before argument does space-hacking?

In LaTeX there are commands that process arguments but do not produce visible output. For example, the command \label, or, if you use the package color or xcolor, the command \color. When the closing ...
Ulrich Diez's user avatar
  • 29.8k
3 votes
1 answer
228 views

How 'experimental' is \TrimSpaces today?

The documentation of xparse dated 2022-06-22 describes the argument processor TrimSpaces which can be used to remove leading and trailing spaces with example \NewDocumentCommand \foo { > { \...
Thomas F. Sturm's user avatar
5 votes
1 answer
150 views

Unused global option(s) warning with latex 2022-06-01-PL2

I was about to ask this question a few days ago, but at the time the site suggested this question to me and I thought that it is the same problem with mine. But now as PL2 releases, the problem in the ...
Jinwen's user avatar
  • 8,618
4 votes
1 answer
163 views

What causes Unused global option(s) error after updating to latex-base 2022-06-01-PL1?

After applying today's kernel updates (2022-06-01-PL1) it seems loading the doc package now causes an Unused global option(s) warning over options passed to the article document class that was not ...
LaTeXereXeTaL's user avatar
9 votes
3 answers
675 views

How to use equals sign in custom class options?

I have seen package options such as in geometry that allow the user to specify an option with a certain value. For example, \usepackage[margin=1in]{geometry} will use 1in for the left and right ...
btshepard's user avatar
  • 680
4 votes
1 answer
161 views

\IfTargetDateBefore doesn't use dates from \DeclareRelease and \DeclareCurrentRelease

I am a little confused with the rollback mechanism in LaTeX. I want to let users test the future breaking changes of my package and also I want to keep the future changes in the same package file. So ...
L.J.R.'s user avatar
  • 11.4k
3 votes
1 answer
208 views

Why are \showboxbreadth and \showboxdepth set to 2^{30}-1 in \loggingall?

The plain TeX format defines \def\loggingall{\tracingcommands\tw@\tracingstats\tw@ \tracingpages\@ne\tracingoutput\@ne\tracinglostchars\@ne \tracingmacros\tw@\tracingparagraphs\@ne\tracingrestores\...
Ruixi Zhang's user avatar
  • 9,613
0 votes
0 answers
172 views

The function and meaning of variable \@afterindenttrue

I do not know the function and meaning of variable \@afterindenttrue (see figure below). What will change if I change it to \@afterindentfalse, how can I see its changes? Thank you very much. \def\@...
Peter Yang's user avatar
0 votes
0 answers
358 views

LaTeX naming conventions

I have been reading a lot of LaTeX source files recently and I noticed certain naming conventions like \label{fig:...} and \label{tab:...}. It this used as some kind of scoping to avoid namespace ...
apriori's user avatar
  • 963
5 votes
2 answers
408 views

Didn't get warning for empty citation

My document has an empty citation \cite{}. I'd expected to get some warning about it. Is it a bug? (if not - why?) Is it possible to enable checking for such cases? MWE: \documentclass{article} \...
Zvika's user avatar
  • 426
4 votes
1 answer
208 views

When is textwidth 4.5in in latex?

In latex documentation, I found this: Then I searched that what does bk mean, and I found this: After seeing this I thought that bk means book. And textwidth equals to 4.5in in book class (font size ...
RajinCoding2007's user avatar
0 votes
0 answers
84 views

\include tex file does not allow me to add anything else afterwards [duplicate]

I am trying to include two tex files at the end of my report. The first file is included as usual but anything I write after that does not appear. This is my code: \section{Code for Question 1} \...
Kyriacos Xanthos's user avatar
1 vote
0 answers
42 views

How to make code conditional on LaTeX kernel version [duplicate]

I want to make use of some kernel features introduced in the latest release (2021-11-15) in a package. In order to maintain some backwards compatibility, I want to issue a warning and use a workaround ...
schtandard's user avatar
  • 15.4k
9 votes
1 answer
1k views

Differences between \newcommand, \NewDocumentCommand and \DeclareRobustCommand

What are the main differences between \newcommand, \NewDocumentCommand and \DeclareRobustCommand? Could you answer me giving exhaustive examples, please? I already read this, this and this, but I'd ...
Puck's user avatar
  • 1,212
2 votes
0 answers
75 views

History - LaTeX2e - \newcommand - Why does the mechanism for detecting an optional argument not crank out the case of an implicit [?

[Please take this question for a moot point/an "academical" issue.] The LaTeX-kernel-command \newcommand was invented decades before expl3, xparse and \NewDocumentCommand were available. \...
Ulrich Diez's user avatar
  • 29.8k
1 vote
1 answer
110 views

History - LaTeX2e - \newcommand - Why optional arguments as (]-)delimited arguments?

[Please take this question for a moot point/an "academical" issue.] The LaTeX-kernel-command \newcommand was invented decades before expl3, xparse and \NewDocumentCommand were available. \...
Ulrich Diez's user avatar
  • 29.8k
3 votes
1 answer
438 views

Defining environments calling other environments (bug in 3.14159265-2.6-1.40.21)

A strange error has suddenly appeared after I upgraded Debian, resulting in an update of texlive. Does anyone know the source of this error? How to fix it? I have used similar constructs for more ...
George's user avatar
  • 31
3 votes
1 answer
351 views

What is so special about "\@tempboxa"?

When storing a box, why do so many folks use \@tempboxa? Why not \@foobar or \@MyGreatTemporaryBox or simply \@temporaryBox0? Is there anything special about this \@tempboxa? Knuth says simply \...
user avatar
2 votes
2 answers
1k views

Avoid line stretching automatically

I would like to avoid at all cost line stretching, without forcing it manually. I will provide you with an example to clarify what I mean. Here it is the code: \documentclass{article} \begin{...
Lele99_DD's user avatar
  • 610
5 votes
2 answers
848 views

Major changes in LaTeX2e/LaTeX3 kernel

Just out of curiosity. If it would be possible to summarize the major changes/improvements in LaTeX2e/LaTeX3 kernel during the last decade, which they would be?
Yorgos's user avatar
  • 2,704
4 votes
2 answers
216 views

\NewDocumentCommand without xparse

I noticed that I can use \NewDocumentCommand without loading xparse. Why is that? How universal is that? And where can I read more about this? (My search terms always pointed to xparse.) \...
mhchem's user avatar
  • 3,525
3 votes
0 answers
2k views

How do I solve the Output routine didn't use all of \box255. \newpage ...prevdepth \fi \fi \vfil \penalty -\@M error?

I am currently writing my thesis and am using MikTex to do so. I have not updated MikTex in a whole year of time and it was running fine till I did today. Today I updated the MikTex to the latest ...
Guru's user avatar
  • 31
1 vote
1 answer
143 views

How to build the binaries pdflatex-dev and friends

pdflatex-dev and variants are helpful for catching issues before new releases, as detailed at What is "latex-dev"?. There appear to be several bugs reported and fixed since the latest pre-...
scottkosty's user avatar
  • 13.4k
3 votes
1 answer
156 views

Missing (?) \begingroup in the definition of \enddocument

Disclaimer While re-reading the question before posting it, it occurred to me that I'm referring to the LaTeX kernel of my computer (TeXLive 2017, \fmtversion=2017-04-15). The question is in some ...
campa's user avatar
  • 32k
4 votes
2 answers
277 views

MacTeX 2020: error with report + hyperref + mathbf in chapter

I am getting an error with the following: \documentclass{report} \usepackage{hyperref} \begin{document} \chapter{This raises an error: \(\mathbf{x}=y\)} test \chapter{Using this instead works: \({\...
John Palmieri's user avatar

1
2 3 4 5