{tex-core} is for questions that are independent of formats and macro packages. 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}.

learn more… | top users | synonyms (1)

2
votes
0answers
146 views

Adding vedic accents in sanskrit in devanagari script in red color using Context - not working in all cases

Using the techniques described in Coloring combining characters without changing color of a base character I have been able to color red the vedic accents in sanskrit typesetting using ConTexT MIV. ...
12
votes
1answer
75 views

Tight connection of \vbox es

I don't understand why TeX put a thin whitespace between my two vertical boxes: \documentclass{article} \begin{document} \vbox to 1cm {\rule{1cm}{1cm}} \vbox to 1cm {\rule{1cm}{1cm}} ...
12
votes
2answers
229 views

Define a shortcut (-> to \rightarrow) in plain TeX

I'ld like to make -> a shortcut for \rightarrow. Is that possible with Plain TeX or has it to do with the loaded font?
12
votes
2answers
134 views

Document equivalence

What is the best way to determine, for two arbitrary input files, if they will result in the same compiled document (disregarding timestamp information and external files)? Context I'm attempting to ...
49
votes
5answers
849 views

\let\foo\bar vs \let\foo=\bar

Both uses of the \let primitive often lead to the same result. Is this even true for every case? What was the thought process behind it. And if they are actually not equivalent, are there particular ...
11
votes
2answers
246 views

How is \unexpanded defined?

I was wondering how \etoolbox's \expandonce does what it does. So I looked up how it was defined and found \unexpanded\expandafter{#1} But no matter where I look, I cannot find a definition for ...
3
votes
2answers
850 views

How can I ignore latex error while compiling?

When a tex file is compiled, everytime an error is detected, compilation stops and user action (usually hitting return key) is expected through console by user. I would like to ask, how is it possible ...
6
votes
2answers
602 views

Left-aligned display math mode

How could one achieve, as primitively as possible, left-aligned display math so that \abovedisplayshortskip would still work as intended? It is my understanding that one can achieve left-alignment ...
5
votes
1answer
67 views

How can I create active hyperlinks for cross references in Texinfo DVI/PDF?

The Texinfo PDF manual has cross references as hyperlinks through the document. The cross references are presented in an attractive dark red colour. When I create a PDF from my own Texinfo source ...
11
votes
1answer
2k views

Origin and formation to the ERROR ‘Dimension too large’

When I tried to compile: \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[very thin, red] (0,0) circle (2); \foreach \i in {0, 1, 2, ..., 46} \draw[very thin, ...
7
votes
1answer
127 views

Could significant speedups be gained from package code minification?

Wikipedia: Minification is (also minimisation or minimization), in computer programming languages and especially JavaScript, is the process of removing all unnecessary characters from source code ...
2
votes
3answers
115 views

Conflict with packages in printing out ƒ in \begin{equation} mode

The initial thread solved the main problem, but there is now some conflict with packages that I do not understand. My tex code \documentclass{article} \usepackage{amsmath, amsfonts, amssymb, ...
3
votes
0answers
58 views

How do I create a reading list, and a bibliography in the same document? [closed]

I'm using a latex, bibtex and pdflatex to organise my dissertation. I need to create a references heading for all the texts I have cited in my work. I also need to create a reading list containing all ...
5
votes
1answer
56 views

Syntax for macro arguments not behaving as expected

I'm trying to build some macros for parsing arguments of other macros in which I'm smuggling in hidden arguments. The following code works perfectly: \documentclass{article} \makeatletter ...
2
votes
0answers
73 views

Has anyone combined marginfix and tikzmark yet?

I am working on a big book project, and up until today I refrained from using glue. But now I had to, and, lo and behold, suddenly my margin notes' position is broken :( The reason is that marginfix ...
0
votes
1answer
160 views

Problem at editing page [closed]

I can't edit this style and I don't know why ? how can help me ? http://naturalspublishing.com/show.asp?JorID=7&pgid=28
9
votes
1answer
83 views

\centering breaks fragile command (is there a fix?)

Many on this site know (and perhaps find slightly annoying) that I will try to solve any LaTeX problem with the use of my stackengine package. My motto is like one of the overnight delivery services: ...
23
votes
1answer
605 views

Use of \relax after \ifnum … \fi construction

I'm reading Malcolm Clark's A Plain TeX Primer. On page 111 there's an exercise to define a macro that prints the current time. I've reproduced Clark's answer below: \newcount\minleft ...
14
votes
1answer
175 views

How to actually close a write-stream

I don't know too much about writing and reading to and from files. But I managed to create a nice command for me where I need to write something into a text-file and later-on read it again. ...
10
votes
1answer
79 views

How to define a command using \lowercase in \csname

I was being lazy and had a lot of commands of the form \def\foo{...Foo...} So I was thinking about taking an approach like ...
8
votes
1answer
285 views

Can I make TeX completely free-form?

I'm bothered about the language format of TeX. I mean I want to know why the CR is converted into a space and % must be at the end of a line to avoid the matter. To make matters worse, a blank line ...
4
votes
1answer
172 views

Tracing group-level and position in LuaTeX

I am absolutely new to LuaTeX and I have few questions about it. First of all I learned that in LuaTeX it is possible to trace all TeX tokens with `token filter' callback. Is it possible to get some ...
10
votes
3answers
389 views

Why is tex designed to render spaces around brackets?

When I wrote following lines: \section{Introduction}{ Content in introduction ... } Unwanted space comes before Content as warned. I understand it's due to some technical decision in tex. But I ...
7
votes
1answer
1k views

TeX capacity exceeded (save size)

I am generating a fairly large index of .txt, .tex, and .pdf files. This process has worked for a long time, and the size of the index is not the issue. I have added logic to insert additional links ...
4
votes
2answers
200 views

Some misunderstanding about macro expansion

I have the following code which doesn't work: \documentclass[12pt]{article} \tracingcommands=2 \tracingmacros=2 \tracingall \makeatletter \let\sep\relax \def\put@stack@#1#2{\edef#2{#1\sep#2}} ...
14
votes
2answers
226 views

How to set tikzmarks with \noalign at the edge of tabular rows

I'm trying to improve the lines in a tabular with colored rows (lines above a colored row can disappear in the adobe reader at some zoom levels) by redrawing the line above a row after the row itself ...
2
votes
0answers
83 views

Is there a way to partially evaluate TeX files? [duplicate]

I am looking for tools or techniques that can partially evaluate (e.g. inline definitions) a TeX source file into an equivalent, simplified TeX file with some parameters fixed. Specifically I would ...
3
votes
1answer
74 views

Moving arguments inside group

I have a setup similar to the MWE below in which I have a macro that needs to be called in the document, and also regularly becomes a moving argument (in this case, inserted into the index, though it ...
18
votes
1answer
257 views

Plain TeX online documentation/references?

I am a non-beginner plain TeX user, mostly typesetting cheat sheets for computer science. I own The TeXbook and have seen some TeX manuals for the compilers, such as pdfTeX manuals and so forth. My ...
11
votes
4answers
274 views

How can I compare two (not necessarily integer) variables?

After experimenting and researching for hours, I still cannot figure out how to perform a simple equality test between two numbers. More specifically, here, the two numbers in question are the ...
7
votes
3answers
177 views

Defining tabular rows with macros using `\ifnum` leads to `Incomplete \ifnum`

I am trying to define tabular rows using a macro which shall perform an conditional definition of the tabular row according to a given parameter. Please consider the following MWE: ...
11
votes
4answers
110 views

A question about macro matching

Consider the following macro definition, and subsequent invocation: \def\foo #1 #2 \bar{stuff with #1 and #2 goes here} \foo arg1 arg2 \bar The \bar simply acts as the terminator for \foo. This all ...
25
votes
3answers
278 views

Has a command access to its own name?

Can two commands - where the one is a copy of the other so that \ifx gives true - have different behaviour depending on the actual name used for a call? \documentclass{article} \newcommand\red{some ...
3
votes
1answer
129 views

Are there more to applications of \iftrue and \iffalse?

While reading "TeX for the impatient" on the topics of iftrue and iffalse, I encountered this example, \def\isbigger{\let\bigger=\iftrue} \def\isnotbigger{\let\bigger=\iffalse} \def\test#1#2{\ifnum ...
9
votes
1answer
140 views

What can and can't occur as macro argument?

The documentation of the environ package says The advantage to using environments is that their contents is not treated as a macro argument, so there are less restrictions on what can exist ...
5
votes
1answer
61 views

tex using the wrong macro

Out of curiosity I tried to weave the bibtex.web source code and compile the resulting bibtex.tex with tex. I got some errors which led me to investigate; I'm sure my confusion stems from incorrect ...
2
votes
1answer
41 views

superscript issue in latex [duplicate]

I have 2 superscripts in 1 equation but one of these is floating higher than the other making it look messy. The code I have used is: $\hat{\boldsymbol\beta}^T X^T$ The T is higher for the beta ...
138
votes
23answers
7k views

Are there any open research problems in the world of TeX?

For a year-long capstone project in computer science, I have to do some 'original research.' I'm still not entirely sure what this entails, but it just struck me that perhaps I can do research and ...
3
votes
1answer
84 views

only expand next macro if its depictable content is placed at a specific place on the page

I'm looking for a conditional that checks if the visual processor puts the depictable content of the macro that is going to be expanded at a specific place on the page where the content is placed. ...
9
votes
3answers
147 views

Problem with ^^<HEX>

I have small problem with ^^<HEX>. If I have a <HEX> part of the ^^<HEX> in the macro \def\attemp{<HEX>}, I cannot write ^^<HEX> as ^^\attempt or ...
9
votes
2answers
186 views

Is it possible to use $ as a macro delimiter?

Experimenting with macro definitions that use strange delimiters (see e.g. this or this question), I thought it would be fun to have a macro that takes an argument of the form "a/b" and turns this ...
22
votes
1answer
255 views

Is \def sensitive to spacing?

In the code below, it took me a long time to figure out that the space in the second line below beginning with \def generates an error. I'm new here. Where is the documentation of \def that would ...
32
votes
3answers
3k views

Difference between \if and \ifx

I try to understand the subtleties of TeX programming, but it is not always easy. For example, in the following code : \def\first{abc} \def\second{abc} \ifx\first\second OK!\else false \fi I ...
2
votes
1answer
397 views

How to render LaTeX in programs?

Recently I'm writing a calc program, on android. As a frequent LaTeX user, it comes to be compelling to use LaTeX rendering in displaying the inputs and outputs. Is there any possibilities to use a ...
11
votes
2answers
123 views

increase \hyphenation{word1 word-2…} capacity

We use LaTeX to typeset a large collection of books with many proper names. We use the \hyphenation{word1 word-2...} command to specify words that should not be hyphenated and to suggest hyphenation ...
3
votes
1answer
216 views

Tex Custom Arrow with oplus symbol

I'd like to create the kind of arrow that shows inner classes in UML, that is, an arrow that starts with an \oplus symbol as it can be seen here: ...
6
votes
0answers
124 views

Replace paragraphs with boxes [closed]

I would like to replace the paragraphs of a compiled document with framed boxes. Although I read the /tex/latex/base documentations I have no idea how to tackle this problem. In detail I want to ...
22
votes
2answers
408 views

Will LaTeX work on any TeX?

As I understand it, latex is simply a macro package for tex, as in tex the program, not the format. (Again, weird, but I understand LaTeX to be a format of TeX.) Does this imply that LaTeX the ...
10
votes
1answer
207 views

How can latex and pdflatex be both symbolic links to same executable (pdftex) and not behave the same?

When I run $ latex my_doc.tex and $ pdflatex my_doc.tex it works, and when I run $ pdftex my_doc.tex it doesn't work. The thing is I noticed that both LaTeX and pdflatex commands are ...
2
votes
0answers
113 views

How to generate an AFP document by using LaTeX compiler? [closed]

I'm working on a new program who have to generate an AFP file. I would like to generate this kind of file by using a powerful language like LaTeX. Because I hate Dialog (HP solution), is there a ...