{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}.
7
votes
3answers
162 views
When to use or avoid grouping?
For writing my own TeX code, grouping (\begingroup, \endgroup) helps on automatically saving and restoring TeX "variables".
(La)TeX "variables" are either macros or registers. The registers can
...
15
votes
3answers
562 views
Starting with TeX (not LaTeX)
I've been using LaTeX for 3 years and I'm decided to switch to (plain) TeX. For the moment I'm reading The TeXbook for the third time (I quietly start to read the double-danger signed paragraphs) and ...
2
votes
1answer
136 views
Type my own font style onto my computer!
How can I use plain TeX & metafont to attain my own font-style, i.e. I want to type the words I write by my hand.
0
votes
1answer
109 views
inlineMath \$…\$ not working but default \(…\) does [closed]
I am having issues getting a custom inlineMath format to work.
I have included the MathJax CDN and then using the in-line configuration options. I can get all of the default formats to work $$...$$, ...
3
votes
1answer
115 views
ConTeXt: Page numbering in words for spanish
So I tried to hack the macro given in the ConTeXt wiki to write pagenumbering in words in spanish, my native language. Things were great until I had to reach the 100th page. ConTeXt claims when ...
7
votes
1answer
245 views
All LaTeX commands list
I'm writing a LaTeX commands highlighter in C#, for this I need all or most of the LaTeX commands.
I've searched the web and found many lists of commands but all of them are with comments and ...
20
votes
3answers
312 views
@tempdima, reserved@a, @tempcnta, what else?
I'm aware that some "temporary" LaTeX dimensions etc. exist. I would, however, like to know all of them.
I know \reserved@a (macro), \@tempdima (dimension) and \@tempcnta (counter).
8
votes
2answers
139 views
Where to find official (!) and extended documentation for tex/latex's commandline options (especially -interaction modes)?
Today I tried to learn more about the several interaction modes for tex/latex/pdflatex etc. The manpages turned out to be not very helpful:
$ man tex
...
-interaction mode
Sets the ...
2
votes
0answers
73 views
How to include a tex file with own formatting options
I have two tex files, tex1 and tex2. I want to include tex1 into tex2. I know \include and \input but those won't allow to include tex files with own formatting. tex1 has a header for example but tex2 ...
10
votes
3answers
255 views
List (at run time) the macros that are currently defined
TeX of course knows at any time what control words and symbols are defined. Is it possible to access this information, for example at the end of a run?
Edit: the answer for pdfTeX is no, since the ...
3
votes
1answer
487 views
Pdflatex began stopping on \showthe?
OK, this I cannot really understand..
Basically, I use scite that calls a lua script, and through that, pdflatex. (If scite is ran from a terminal, then the pdflatex output called through it is ...
9
votes
3answers
147 views
Check for empty macro argument
There is a description on how to check whether the argument of a macro is empty in What does \ifx\\#1\\ stand for?
Unfortunately, I can't get any of the examples there to work.
Among others, I have ...
24
votes
6answers
2k views
Test whether token list is empty
Is it possible to test whether a token list register is empty without expanding it?
60
votes
5answers
3k views
Cunning (La)TeX tricks
Writing (La)TeX code sometimes requires a degree of guile. Here (in no particular order) are two of my favourite examples.
Macros ending with spaces
Pete asked how to see the implementation of ...
20
votes
1answer
192 views
What does different \fontdimen<num> mean
I know that \fontdimen<num> returns some dimensions associated with the current font. What are they?
14
votes
2answers
131 views
Use TeX macros to store multiple data
I'm trying to use TeX macros to store multiple data such as website url/name. Here is an example :
\documentclass{article}
\def\Google{{http://www.google.com}{Google Search}}
\makeatletter
...
5
votes
0answers
55 views
Spurious whitespace in caption [duplicate]
Possible Duplicate:
Why the end-of-line % in macro definitions?
I am not sure what is happening with this MWE.
First the problem: You can clearly see the whitespace between the label and ...
3
votes
1answer
128 views
how to use \loop … \repeat to generate an arbitrary number of rows in a table [duplicate]
Possible Duplicate:
Copy table row n times
The code below is intended to produce a table with 3 columns and 3 rows (one
heading and two empty rows) but it can be seen that it doesn't work.
...
27
votes
2answers
385 views
What is truecm?
In examples found around the web, some people specify lengths such as width=5truecm with \includegraphics or the geometry package. How is this different from regular 5cm?
12
votes
4answers
494 views
File copy without expansion
What is the command for file copy? I want to copy the contents of one file into another without any command expansion. The operative system would use
copy source target
I tried reading the contents ...
31
votes
2answers
419 views
Will cruft from a previous compile ever change the final look of my document
Ok, this has been bugging me for a while; Will cruft left over from a previous run of LaTeX ever change how my document looks?
Would the following procedures ever give me different results:
I ...
12
votes
1answer
117 views
How to read a stream of tokens up to one of two different delimiters
The core question
How can I process text delimited by one of two terminators? For instance, if I want to process text up to the next \A, I can just write
\def\CmdA#1\A{...}
But suppose that \A ...
4
votes
0answers
74 views
How to search for the commands in TeX [duplicate]
Possible Duplicate:
Where do I find out how a command/environment is defined?
Macro find tool
When I am reading the other's LaTeX codes, I always find new commands I have never read ...
5
votes
1answer
271 views
What is the proper way to prevent text from splitting across columns and pages?
I have some description environments which I do not wish to have split across columns or pages. Is there some command which can be placed around an item to ensure that it will never be split across ...
7
votes
1answer
269 views
Why does \@gobble take one argument
I understand what \@gobble, \@gobbletwo etc. do, but I don't understand why \@gobble allows for an argument.
I believe that the definition of the macro is \long\def\@gobble#1{}. Why is this argument ...
9
votes
4answers
188 views
Dividing dimensions to get a count
Is there a way to divide two dimens and get a count? For example, if I have a box that doesn't fit on a single page, and I want to know the number of pages I'd need for the box (i.e., \heightofbox / ...
0
votes
0answers
66 views
Newline or cell wrap in Karnaugh Map of KVMacro [closed]
I am using Karnaugh Map macro from CTAN; my issue is that I want to write inequality in a kmap cell (W1+W2+W3 \le T). When I do so, the text of the cell take two cells. Is there away to either put a ...
4
votes
1answer
269 views
Faking small caps in XeLaTeX
In the post Fake small caps with XeTeX/fontspec? I have found the following definitions to fake small caps
\def\mycommand{\bgroup\obeyspaces\mycommandaux}
\def\mycommandaux#1{\mycommandauxii ...
10
votes
2answers
260 views
How to include eps files in Plain TeX?
The title stands for itself.
If it is not possible, how does LaTeX import an EPS file using \includegraphics?
25
votes
1answer
377 views
What exactly is a “single character” or “symbol” in math mode?
There are at least three instances where single symbols in math mode receive a special treatment by the TeX engine: 1. when accents are placed, 2. when a math operator is created with ...
13
votes
1answer
193 views
How to find out if a math list consists of a single character?
When accents are placed, the TeX engine gives single characters a special treatment; see the TeXbook, Rule 12 on page 443. See also this question and its accepted answer for details. Thus, ...
12
votes
3answers
251 views
What other macros like \pdffilesize exist?
So I just learned about \pdffilesize from this answer.
Are there other similar things like this? I learned about \the\inputlineno a while ago which prints the line number of the input file.
In ...
5
votes
1answer
111 views
Problem with xargs package
I am trying to do what I though was fairly simple - use an xargs defined macro in a CS. MWE:
\documentclass{article}
\usepackage{xargs}
\usepackage{etoolbox}
\makeatletter
\def\abx@foo@baz@bar{test}
...
35
votes
3answers
777 views
Advantages and disadvantages of fully expandable macros
As I currently understand them, fully-expandable macros are analogous to pure/effect-free functions in functional programming. Correspondingly, things that are not expandable, such as \def, are ...
8
votes
2answers
110 views
Is it possible to remove (or otherwise nullify) a whatsit node from a box?
I am aware that it is not generally possible to modify the contents of a box (as per http://tex.stackexchange.com/a/49903/17427), though I believe it is sometimes possible to "unbox" material and hack ...
14
votes
4answers
283 views
LaTeX, package documentation look-up
I am on OS X (10.6 Snow Leopard) using TeXLive-2011 to typeset a simple .tex file I am editing in Vim and trying to learn. My problem is: how do I...
gradually learn about what TeX can do for me
get ...
21
votes
4answers
1k views
Test success of write18
For the new version of my package and class standalone I like to call external programs: further (pdf)latex runs to optionally compile included standalone files, and to convert the resulting PDF to ...
19
votes
4answers
334 views
Extract all emphasized words from latex document
I need to produce a list of all words that are emphasised in my LaTeX document (=which are enclosed by \emph{...}).
How can I use awk to process the .tex file and extract all patterns starting with ...
7
votes
1answer
80 views
Error line inside a package
I've created my own package, but, when I use it in a new document, and pdflatex find an error using a custom command (defined in my own package), it shows me only the error line where this command was ...
8
votes
2answers
189 views
What is wrong with this TeX macro
Still soldiering on with trying to learn these macros. Can someone tell me why this isn't working?
The macro \mycline{n-n} is supposed to expand to \cmidrule{1-1} ... \cmidrule{n-n}, but in my code ...
6
votes
2answers
310 views
Resize all images in Latex to a percentage width
I am auto-generating multiple tex files using pandoc (one tex file for each of my chapters). Pandoc generates this tex code for each image.
\begin{figure}[htbp]
\centering
...
10
votes
2answers
156 views
Catcode of \endlinechar when its charcode is less than 1
When \endlinechar is less than 1, how do we access its catcode? The following gives the error shown below:
! Bad character code (-1).
l.34 ...ndlinechar\string=\the\catcode\endlinechar
...
4
votes
1answer
54 views
Error with expansions
I am getting an error while trying to compile this minimal example:
min.cls:
\ProvidesClass{min}
\LoadClass{minimal}
\NeedsTeXFormat{LaTeX2e}
\newenvironment{myenv}{}{
\def\aaa{test }
...
7
votes
1answer
97 views
Array functionality in TeX?
I've been using LaTeX for a while, but only recently I made myself a mission to create a class. I needed to learn the details of TeX, and I couldn't find answers to some of my questions. One of them ...
3
votes
0answers
222 views
What makes TeX so easy to write? [closed]
I have tried various different markup/markdown languages and have found myself coming back to TeX for the ease of typing. I have always wondered what are the features which make TeX such an ...
6
votes
1answer
199 views
Storing unexpanded macro definitions (including #1, #2, …) for later use (now includes full usecase)
Preliminary Info
I'm working on a new LaTeX package to make scoping more flexible. To do this I'll be capturing and reintroducing user defined commands behind the scenes.
(For a comprehensive ...
16
votes
1answer
502 views
How does TeX actually work?
Lots of useful information for human beings, especially in academia.
But, what is actually underlying the TeX engine? How does it really work? Does it parse everything and just put the stuff together? ...
3
votes
1answer
129 views
Showing expanded `\let` command with `\typeout`
I have already seen the related page macros - What is the difference between \let and \edef?, but I'm afraid it still doesn't expain to me the following MWE:
\documentclass{minimal}
...
1
vote
1answer
154 views
Unexpected scoping issue using \XeTeXinterchartoks
Minimal example (compile with xetex):
\XeTeXinterchartokenstate = 1
\newXeTeXintercharclass \classa
\XeTeXcharclass `\a \classa
\XeTeXinterchartoks 255 \classa = {\begingroup}
\XeTeXinterchartoks ...
5
votes
0answers
162 views
How would (La)TeX be different if it had been created recently? [closed]
If Knuth/Lamport/anyone else had created a typesetting system with the flexibility and power of TeX, using everything we have learned about computation and programming languages in the last 35 years, ...
