Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

17
votes
2answers
740 views

Why do people specify date as an option for \usepackage?

In LaTeX code written by other people, I sometimes see a date specified as an optional argument for \usepackage: \usepackage{iftex}[2013/04/04] Intuition tells me that this is some way to ensure ...
0
votes
1answer
527 views

I installed MiKTeX but I can't compile the file

I installed MiKTeX but I can't compile the file. This file worked perfectly on another computer This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6840 64-bit) entering extended mode (...
2
votes
1answer
99 views

how does '\maketitle' work?

I would like to know how the \maketitle command works since I am creating my own class and I want to use my own commands. For example, I already create certain commands like \a, \b and \c and I want ...
5
votes
2answers
306 views

LaTeX newcommand limitation

I want to know the possibilities and the limitation of LaTeX's \newcommand regarding the definition and the use/call of new macros. I know some of these examples are primitive but they can help to ...
1
vote
1answer
31 views

What do the labels (such as <*dircheck>) mean in `source2e.pdf`?

I am studying source2e.pdf and I have encountered something such as <*dircheck>, <*initex>, <*2ekernel>,<latexrelease>. I thought that they might be some sort of label to mark ...
6
votes
1answer
155 views

How does \verb* set the visible space?

I'm trying to understand how \verb* works under the hood, especially where the mapping for the visible space character comes into play. Let's have a look at the definitions first: \verb: macro:->\...
17
votes
3answers
562 views

What macros should be used as 'scratch space'?

The LaTeX kernel provides the 'scratch' macros \@tempa, etc., and \reserved@a, etc. These are used for a variety of purposes. Which should be used as temporary space by general users/programmers?
4
votes
1answer
187 views

Kernel deprecation warning with fnpct

I recently upgraded to TeXLive 2018 (and pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018/W32TeX)) and now I notice that package fnpct generates the following warnings: **************************...
0
votes
1answer
41 views

Circumvent missing dot in hierarchical listing numbering

I'm trying to deal with the same problem as described here. But the accepted answer does not really help in my case since the problem occurs when I try to add hierarchical numbering to listings and I ...
0
votes
1answer
90 views

Error in compiling a file with its own document class using MiKTeX 2.9.6643

I had to re-install MiKTeX version (2.9.6643) after formatting my pc, but when I compiled the file of my dissertation I received these error messages: ! Undefined control sequence. \UseTextAccent ......
0
votes
1answer
91 views

Corrupted nfss table, overfull hbox and undefined control sequence when testing fonts

I just installed texlive and I am running a series of tests recommended in section 3.5 of the official documentation. The tests are working as expected but when I get to testfont.tex I am getting !...
16
votes
1answer
132 views

L(a/ua)TeX kernel/package solution incorporating the globally optimised float placement/pagination

It was interesting to read Frank Mittelbach's articles on globally optimized pagination and float placement. https://www.latex-project.org/publications/ But, there is no mention of these proposed ...
2
votes
1answer
37 views

Comparing package version dates

Is it safe to use the LaTeX commands \@ifpackagelater, \@ifl@t@r and/or \@parse@version to compare/parse dates in the format used with \ProvidesPackage (YYYY/MM/DD)? Or is there a package providing ...
1
vote
1answer
69 views

What does svsec in \@svsec stand for?

Most of the following text you could probably skip. I just put it down there to show my effort. What does it do? Pretty sure I understand this already... In the LaTeX kernel, the generic heading ...
0
votes
2answers
107 views

gdef with @ifnextchar

I am trying to create a command with two or three arguments, that creates a new command. In my classfile I have: \def\foobar#1#2{\gdef\foo{#1, #2, \@ifnextchar\bgroup{foo}{bar}}} If I call \foobar{...
3
votes
1answer
55 views

When defining a new section command/macro, what is causing the \@startsection text to be repeated?

When I try producing a new section command \orangesection, which utilizes the LaTeX kernel command \@startsection, I end up with duplicated text. Where is it coming from? As a bonus, how could I track ...
4
votes
2answers
695 views

Dot between chapter number and figure number disapear after update

After a recent update the dot between chapter numbers and figure numbers disappeared. Here is a minimal example. \documentclass[]{memoir} \begin{document} \frontmatter Some text \mainmatter \chapter{...
8
votes
0answers
254 views

Problem with dtx file after LaTeX kernel upgrade (2018/04/01)

Today, the generation of one of my dtx files stopped with the error: ! Undefined control sequence. \UseTextAccent ...up \@firstofone \let \@curr@enc \cf@...
4
votes
2answers
939 views

What is the difference between \paperheight, \paperwidth and \pdfpageheight, \pdfpagewidth?

I couldn't find any existing answers to this question. So, what's the difference? Are there any advantages to using one duo over the other?
21
votes
1answer
4k views

! LaTeX Error: Command \counterwithout already defined

After updating MikTex up to 09.04.2018 (MikTex 2.9.6637, Win 10, 64bit) I've got the error: (F:\...\texmfs\install\tex\latex\chngcntr\chngcntr.sty ! LaTeX Error: Command \counterwithout already ...
3
votes
2answers
66 views

listings highlight 'escapeinside' causes unexpected line break of user code

I just want to highlight digits for variable initialization, to avoid colored number in equation und variable name,I have used the approach of Jubobs How to highlight all words of the form [0-9][A-Za-...
3
votes
1answer
248 views

How is “! LaTeX Error: Something's wrong--perhaps a missing \item.” produced (technically)?

Lists in LaTeX test for \item before their \end{list}. I want to know the chain of events leading to this error. From my analysis, I came to the following, but got lost at \@noitemerr. Sources ...
11
votes
1answer
281 views

Why does equation environment not give an error without the amsmath package?

As far as I understand the equation environment is defined in the amsmath package so one would expect an error while trying to compile the following document with pdflatex: \documentclass{article} \...
5
votes
1answer
553 views

Definition of \protect in \edef

Update: With the release of LaTeX2e 2018-04-01 Patch level 2, the following sentence has been added in the paragraph cited below to make the documentation clearer: More precisely, whenever the ...
15
votes
4answers
2k views

Why, in 2017, does LaTeX not use tree-like structures? [closed]

Short version: Why, in 2017, does LaTeX not use a tree-like structure, and prefer to deal with ugly token rewrite rules? Long version: LaTeX was created nearly 35 years ago. Maybe at that time, ...
3
votes
1answer
48 views

Definition of \@vobeyspaces

In section 53.3 of source2e, the macro \@vobeyspaces (one internal macro for verbatim environment) is defined as {\catcode`\ =\active% \gdef\@vobeyspaces{\catcode`\ \active\let \@xobeysp}} Is there ...
3
votes
2answers
108 views

Compiling file places a bunch of commas before the title

I am working on a big project with many subfiles that I wanted to incorporate into one main file. For that, I used the standalone package, to be able to check the individual files for errors, if any ...
1
vote
1answer
144 views

Getting arguments of any LaTeX command

I do not like R and LaTeX. I simply love them. In R, I can get the arguments of any function using args(function_name) on command line. I wonder if we can get the list of all possible arguments of any ...
5
votes
1answer
385 views

How does \@currentlabel work? How does it connect to sectioning commands / headings?

My understanding is that \@currentlabel holds a register value. This also applies when hyperref is used. I was having a look at kpsewhich ltxref.dtx when I read that \@currentlabel handles situations ...
4
votes
2answers
63 views

Why does \@checkend occur after running \endenvironment?

Does anyone know why in the LaTeX definition of \end, the \@checkend command occurs after running the end environment code? It seems like for error catching purposes, it would be best to let the user ...
6
votes
2answers
195 views

Where have the legacy macros gone?

As far as I understand LaTeX is a set of macros built on top of the 300 or so primitive commands of the underlying TeX core. The TeXBook talks about macros like \it and \sl, but I cannot use them in ...
13
votes
4answers
2k views

Why does it seem that font sizes are quantized in typography?

There are several points, especially when using LaTeX, that give me the feeling that the size of a font is not really a continuous quantity, but somehow quantized, i.e. can only take some specific ...
7
votes
1answer
743 views

What are the default values in LaTeX commands or variables

How can I know what is the default value for line spacing in LaTeX (for example what is the default value of \baselinestretch command before renewcommanding it?) and how I can print this value in the ...
3
votes
1answer
612 views

What do \@nil, \@cdr and \@car mean

Today I came across these three commands: \@nil \@cdr \@car Some are mentioned here and here, but I didn't get the idea of it. It seems to have to do with the macro character. I haven't seen any ...
7
votes
1answer
164 views

Double \ProvidesFile in LaTeX kernel. Why?

The LaTeX kernel defines \ProvidesFile twice: 121: \def\ProvidesFile#1{% 122: \begingroup 123: \catcode`\ 10 % 124: \ifnum \endlinechar<256 % 125: \ifnum \endlinechar>\m@ne ...
6
votes
1answer
3k views

Using BibTeX and pdfLaTeX: why are three LaTeX runs needed?

I am able to use BibTeX and pdfLaTeX if I compile with pdfLaTeX THREE TIMES. This seemed absurd, but appears to be confirmed by this previous question. That is: Compile with pdflatex to generate ....
2
votes
1answer
2k views

\contentsline with 4 parameters

I have a document whcih .toc file looks like this: \contentsline {chapter}{Prefácio}{vii}{chapter*.2} \contentsline {chapter}{\numberline {1}História}{1}{chapter.1} \contentsline {chapter}{\...
7
votes
1answer
106 views

Missing \begin{document}, \count22 and a mathchar give infinite font-loading attempts

After some expected errors (missing \begin{document}, missing number treated as zero, missing $ inserted) the following code produces an infinite loop where LaTeX attempts to load the font ^^@^^@OT1+...
21
votes
1answer
517 views

Where can I find the definitions of TeX environments?

As can be seen by my comments here, here and here, I'm currently trying to find out how to see the definitions of environments, but I felt that a new question would be responded to quicker. I want to ...
24
votes
0answers
378 views

Should \minipage restore the default definition of \@par?

I came across the issue hinted at in the title while I was reflecting on this question (“Irregular spacing around a user-defined environment”) and its answer. The \@endparenv command is called by ...
12
votes
1answer
188 views

\@clubpenalty leaks out

In the following example the value of \clubpenalty has been reset to the one of \@clubpenalty on the second page: \documentclass[]{book} \usepackage{lipsum} \begin{document} \subsection{abc} blblb ...
1
vote
1answer
261 views

Encode into an `enumerate` environment

I am convinced that I need to encode lists that I have in various files in enumerate environments. I have taken a sample of them and put them into one file, which I include in this post. It looks ...
4
votes
1answer
489 views

Automatically run code at end of file

In typical LaTeX documents, the document content is typed inside the document environment, which is usually the last thing in the file: \documentclass{article} \begin{document} Content goes here....
23
votes
1answer
854 views

What packages are no longer necessary after TeX Live 2015 kernel update?

I see from this question that fixltx2e is no longer needed. This means the LaTeX kernel now finally has a \textsubscript command. Formerly that was provided by fixltx2e and also by the subscript ...
2
votes
1answer
985 views

Latex \newcommand usage

I would like to simplify the way to type indicator functions. So I used package bbm and defined \newcommand{\1}{\mathbbm{1}} But I actually want something like \mathbbm{1}_{XXX}=\newcommand{1}{XXX}. ...
10
votes
2answers
2k views

What is a macro, really?

From the list of catcodes, \ starts a new control sequence, { starts a group, and } ends a group. In LaTeX, a macro appears as \foo[opt-arg]{arg1}{arg2} However, TeX does not seem to have the notion ...
33
votes
3answers
986 views

Do fontsize environments exist?

Without any doubt there are fontsize switches in the form of control sequences (described here for instance.) But, from time to time I ran into code examples where environment versions of those were ...
4
votes
0answers
77 views

What does `\escapechar` do? [duplicate]

In latex.ltx you can find several situations where \escapechar is set to -1 -- from what it's clear that it has to be a count register. But, what does it actually "count" or control? A small ...
8
votes
2answers
538 views

Where is \@makefntext defined?

I was studying how footnotes come about in LaTeX and what processes exactly run behind the curtain, and noticed \@makefntext. But in fact, in latex.ltx there are only two occurences of this macro ...
10
votes
1answer
350 views

Why the new changes to LaTeX kernel breaks zref-perpage package?

Consider the following minimal example: \documentclass{book} \usepackage{zref-perpage} \zmakeperpage{footnote} \begin{document} \chapter{Test} \footnote{A footnote} \footnote{A footnote} \newpage \...