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
1answer
78 views

Again: ! TeX capacity exceeded, sorry [save size=500000] (LuaLaTeX, MikTeX)

I'm getting the following error message compiling my PhD-file (used: LuaLaTeX, MikTeX 2.9): ! TeX capacity exceeded, sorry [save size=500000]. <to be read again> \relax l.90 \include{...
0
votes
1answer
30 views

Where is the .tex equievelant .pdf files located in ubuntu?

I have tried find . -name "*.pdf" in various folders where I would initially think that the pdf files would be exported to. Both /usr/share/texlive and /usr/share/textstudio does not contain ...
1
vote
2answers
35 views

Align BUT with large math text?

\documentclass{article} \usepackage[utf8]{inputenc} \usepackage{relsize} \usepackage{amsmath} \usepackage{hyperref} \hbadness=99999 \hfuzz=9999pt \title{Week 2 Question} \author{} \date{October 2020}...
44
votes
1answer
3k views

(La)TeX — What does the '%' character do?

the % character seems to have a lot of uses. So far, I have encountered it in the following places: For writing comments % Schrodinger wave equation $$\nabla^2\psi + \frac{8\pi^2m}{h^2}(E-V) = 0$$ (...
0
votes
0answers
40 views

Latex Type 3 Font Issue in windows 10

I am trying to submit my manuscript but it gives me an issue with type 3 font in Latex. I have installed cm-super package and also followed the steps referred here. I am pasting the last portion of ...
5
votes
2answers
332 views

What is the LaTeX3 project doing to make LaTeX run faster?

One of my biggest problems with LaTeX is the speed that it takes to process large documents. (I typeset books with LaTeX.) I have approaches, such as breaking the book into chapters and running them ...
0
votes
1answer
69 views

How to get number of arguments in a macro?

I'm writing a package and I need to get the number of arguments in the macro. Say, user has to define a macros \def\usermacro#1#2.... Then he calls \dosomestuffdefinedinmypackage and this command ...
3
votes
2answers
130 views

Make equality-sign automatically blue

I know that we can redefine inequality-signs such as \le by simply doing \let\oldle\le and \def\le{\mathrel{...}}. But I have no idea how to redefine the equality-sign =. So if I want to automatically ...
2
votes
1answer
46 views

How ** prompt differs from * prompt?

According to TeXbook p. 23, the ** prompt differs from * prompt only when first character is & or non-\. However, if we issue the following command (notice the first \) in ** and * prompts, the ...
8
votes
2answers
335 views

questions about TeX expansion

See the examples below: \documentclass{article} \begin{document} \def\a{1} \def\b{\def\a{2}} \def\c{\b} \c\a \end{document} In expansion stage, \def, its parameter text and replacement text is not ...
1
vote
1answer
48 views

Question about exercise 11.3 in TeXbook

The answer says You probably predicted a height of 8.9861 I wonder which calculations should be made to predict such a height. The most simple calculations produce the value 8.98608, namely: Take ...
1
vote
1answer
31 views

What is align_state?

Here is section 309 of TeX: The input routines must also interact with the processing of \halign and \valign, since the appearance of tab marks and \cr in certain places is supposed to trigger the ...
1
vote
1answer
44 views

Right curly brace of specified height, with the lower tip exactly on baseline

I need right curly brace of specified height, with the lower tip on the baseline. I need this in LaTeX, but problems with my attempts can be illustrated better in plain TeX. Below I have macro \...
1
vote
2answers
37 views

How to prevent insertion of \parskip glue?

The codes of the two \vtop in the example below look very similar. Difference is: In case 1 you have \hbox{ccc\hfill}. Due to \hrule no \baselineskip-glue is inserted between bbb and ccc. TeX does ...
0
votes
0answers
13 views

Citing Lines in Algorithm

In case I have algorithm written in LaTex, how to cite lines from that algorithm? For example, Lines 3-10 in the algorithm explains... Thanks.
6
votes
1answer
81 views

When are \space tokens discarded?

Consider this example: \obeyspaces b \bye The output is b. Why is the \space discarded? It is not discarded during pre-processing because it has catcode 13 - it is discarded during tokenization, ...
4
votes
1answer
63 views

Question about exercise 5.1 in TeXbook

The answer to the exercise states: TEX will reinsert the ff ligature by itself after hyphenating shelf{}ful. (Appendix H points out that ligatures are put into a hyphenated word that contains no “...
7
votes
3answers
217 views

Which tokens does TeX not use as undelimited arguments (unless between { and } )?

Which tokens does TeX not use as undelimited arguments (unless nested between an explicit character token of category code 1 and an explicit character token of category code 2)? In the last but one ...
2
votes
2answers
35 views

Matrix with top just top indexes

I'm trying to write a matrix which has the indexes on top of the actual matrix, ie. something like: This is similar to this question here, but I haven't managed to avoid the indexes on the sides of ...
0
votes
0answers
49 views

TeX to C/executable

It is possible to program in TeX and it is a Turing complete language as C. Is there any way to translate a program in TeX into C and vice versa? If so, how to correspond C instructions with TeX's ...
0
votes
0answers
28 views

Possible to add a new line with spacing? Without using optional arg

Right now every time I make a new line, I am adding \\[8pt]. Is there a way to automatically have text in a new line with spacing, without needing to specify the [8pt]?
1
vote
1answer
48 views

“Paragraph ended before …” error in TeX

While playing around with TeX, I came across a strange error. This is my input file: \def\twice#1{#1#1} \def\hello{Hello World.\par} \twice{\hello} % works \twice{Hello World. } % works \twice{Hello ...
2
votes
1answer
68 views

\vadjust example on Tug.org

I was on Tug.org reading about some of TeX's primitives. I came across this example usage of \vadjust. 1. \def\strutA#1#2{\vrule height#1 depth#2 width0pt} 2. \def\ta#1% 3. {% 4. \strutA{8.5pt}{3....
1
vote
2answers
87 views

How to write several lines in TeX without line feed?

How to write several lines in TeX/LaTeX without line feed? The lines should not lie vertically on top of each other, but the result should be similar to what you get when you type a line with your ...
2
votes
1answer
52 views

Wrapping text around a figure (under the hood)

I have a question about some of the packages out there that are used to wrap text around figures. Not looking for help with code or anything, just want to understand how TeX can be told to do this, ...
1
vote
1answer
24 views

Separate this in different rows

To calculate market value, can use \textbf{calculator}: [2nd][FV]: Clean previous data [FV] = Face Value [N] = Periods in which coupon payments happen [I/Y] = Market interest rate (YTM) That's ...
0
votes
0answers
38 views

HTML-Aware TeX/LaTex

I can't find an acceptable way to convert LaTeX input to HTML output. Ideally, one should be able to say pdflatex my.tex to produce a PDF file, and htmllatex my.tex to get HTML output. I've tried a ...
1
vote
1answer
33 views

Problem writing a matrix equation

I write this code in order to get Newton's Second Law in a matrix form. But for some reason if i write the first matrix alone everything is ok. But if i add the "\quad" and/or the other ...
1
vote
2answers
247 views

Weird behavior of \jobname

Assume I have a file named G1 (SK).tex containing \def\SK{SK} \def\parse"#1 (#2)"{\def\language{#2}} \expandafter\parse\jobname \ifx\SK\language equal\else distinct\fi \bye When I run ...
1
vote
1answer
40 views

Why does unhboxing seem to ignore vertical mode and why does unvboxing seem to ignore horizontal mode?

First question Why does unhboxing seem to ignore vertical mode and why does unvboxing seem to ignore horizontal mode? The MWE after the next two pictures both delivers the text of the first question ...
3
votes
3answers
123 views

How to escape a quotation mark character/glyph?

I have the same problem as in this question, but the answers just circle around how to best use quotation marks. This is fine as long as you actually want a quotation mark. However, I explicitly don't ...
0
votes
0answers
13 views

How to make in-line equations the same size as their display counterparts? [duplicate]

For example, if I have something like blah blah blah blah $\frac{1}{1+2x-x^2} + 6$ blah blah blah The equation will look compressed compared to \begin{equation} \frac{1}{1+2x-x^2} + 6 \end{equation} ...
4
votes
4answers
95 views

Iterating through a list and modifying elements one at a time to construct new list

Long time reader, first time poster. I have a question about creating a macro that iterates through a list. I've read through some questions posted by other users, but all of those have something to ...
1
vote
0answers
93 views

On TeX and LaTeX relations [closed]

Could you help me with the following questions? I have downloaded the source files of MiKTeX of the last version and I want to see the source code of latex.exe but cannot find it. Where is it located?...
18
votes
1answer
375 views

What is the history of graphic constructions since TeX?

With LaTeX, to natively build a figure, there is the picture mode. Today, there are also the pstricks and TikZ packages. How was it originally done to draw figures in TeX? Was it possible? I couldn't ...
4
votes
1answer
70 views

\lowering \leaders

I'm using \leaders to make a flexible width rule, with the statement \leaders 0pt plus 1fil\hrule, but I also want to put text above this line. \rlap{text}\leaders works fine, except that the text is ...
2
votes
1answer
50 views

The effect of triggering the re-writing/creating anew of a text file which currently is processed via `\input` puzzles me?

I tried to create a .tex-file fileb.tex which can be \input by filea.tex and which - when being input - stops being input and triggers rewriting itself. In my first attempts I erroneously omitted \...
3
votes
2answers
91 views

Is there a way to check whether we're inside a table?

I have a syntax highlighting program that outputs LaTeX code. The generated code can be used in regular text or in a tabular to do more advanced layouts. The generated LaTeX output includes \my@eol ...
2
votes
1answer
48 views

How does the assignment proceed in this iteration (TeX)?

In the famous The TeXbook (Twentieth printing, revised, May 1991), I've found this algorithm (Appendix D: Dirty Tricks, pag. 373), \newcount\m \newtoks\t \m=\n \t={} \loop \ifnum\m>0 \t=\...
0
votes
1answer
39 views

(xe)tex: How do I apply \ifodd\pageno logic (\special) to image, based on page the box is set on, rather than when file is read

Working in (plain) XeTeX, I would like to apply a certain transformation (mirror on vertical axis) to an image if it appears on an odd-numbered page. I'd like a fairly general solution, as in some ...
5
votes
2answers
94 views

Why does `\endinput` bring TeX into interactive mode while there are still tokens to process?

Minimal example consists of two files: fileA.tex: \def\foo#1{#1} \foo{\endinput\input fileB.tex}% fileB.tex: This is file B. \bye I assumed that compiling fileA.tex would lead to a file fileA.pdf ...
1
vote
1answer
29 views

kpathsea-warning when using filenames containing $&?

The MWE, test.tex: \documentclass{article} \begin{filecontents*}{A$&1file.tex} Hello, World! \end{filecontents*} \begin{document} \input{A$&1file.tex} \end{document} The MWE does not ...
3
votes
2answers
109 views

Installing *just* TeX

For a project, I intend to use TeX as a “backend” to layout and generate PDF, i. e., my program would emit core-TeX code to be immediately compiled. I think that means I just need pdftex or xetex + ...
0
votes
0answers
19 views

Using [subpreambles]{standalone} causes the document to not compile

Yesterday I had this problem which was quickly resolved, but now the Solution doesn't work anymore. The problem happens with this small piece of code already: \documentclass{article} \usepackage[utf8]{...
5
votes
4answers
195 views

Double hashes inside macro definition?

Assume a macro which is not defined in terms of \long and which is not defined in terms of \outer and which is not defined in terms of \protected and which does not process arguments and whose ...
0
votes
1answer
52 views

Centering text in a valign without finetuned column width

Currently, I have the following valign output from this code (Plain TeX): \def\make#1{{\hsize1.5in\vfil\centerline{\strut #1}\vfil\hrule}} \valign{\hrule\make{#}&&\make{#}\cr\noalign{\vrule} ...
4
votes
2answers
291 views

Can someone explain what is labxx in the source code of tex

As shown above, I saw many labXXX in the source code of tex and pdftex. I'm really confused about them and there is no comments at all. Is there any doc that demonstrate the meaning of every labXXX? ...
7
votes
3answers
310 views

I need to understand some cmds of tex

I'm debugging the command tex of TexLive2019 Shown as above, if you type: ./tex -ini h I\&V e There will be a segment fault. Note that you need a h.tex under the same directory as tex and ...
0
votes
0answers
32 views

Use minimum size pdfTeX to output pdf file

I want to use TeX to build .pdf file in my program. But TeX Live is too large and I wanna to embed TeX in my little program - it means the TeX should be as small as it can. I try to sreach in Google, ...
11
votes
3answers
279 views

why there is a “Text line contains an invalid character” after “Undefined control sequence” and why “Q” required further input?

(base) MacBook-Pro-2:pdftex zmx$ latex This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded format=latex) restricted \write18 enabled. **\s^EH entering extended mode LaTeX2e <...

1
2 3 4 5
32