{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)

4
votes
2answers
78 views

Is it possible to control the minimum tolerance (allowed space between words)

I have learned to use \pretolerance and \tolerance but sometimes TeX decides to "compress" the broken line of text within the paragraph by simply using less space between the words on the line, and I ...
0
votes
1answer
28 views

White marks around leaders in PDF

Why are there white bars between the leaders and each of the rules in this code when compiled with LuaTeX to a PDF file? When compiled (with LuaTeX) to a DVI file no white bars can be seen. a \vrule ...
5
votes
1answer
74 views

Overlapping hboxes

How can I change the following macro to get a rule in hbox 2 that is just as wide as the text in hbox 1 and remove parameter #2? \def\m#1#2{ \leavevmode \hbox to#2{ \hbox ...
3
votes
1answer
56 views

TeX commands and currency symbols

Why does the code \documentclass{memoir} \usepackage[latin1]{inputenc} \usepackage[danish]{babel} \usepackage[T1]{fontenc} \def£#1£{``#1''} \def€#1€{<#1>} \begin{document} Hi, £this£ is nice, ...
3
votes
3answers
79 views

Vertical line in \halign with interrow spacing - LaTeX error

\documentclass[12pt, russian]{article} \tracingall \tracingassigns=5 \tracingmacros=2 \tracingcommands=2 \tracingrestores=1 \tracingstats=0 \tracingoutput=10 \tracinggroups=10 \tracingonline0 ...
69
votes
5answers
15k views

What is the difference between TeX and LaTeX?

I know LaTeX and I've heard that LaTeX is a set of macros in TeX. But what does it exactly mean?
44
votes
3answers
1k views

Why no vertical-mode Knuth-Plass?

I have only basic knowledge of the TeX internals, so I hope what I am saying here is not complete nonsense. If I understand correctly, in TeX, horizontal positioning / line breaking is done using a ...
2
votes
3answers
76 views

eplain access to \li number

What is the best way to get the "marker" for the current item in a list in the eplain format? \numberedlist \li Here's an item \li And this is another and it's marker is: \marker \endnumberedlist ...
2
votes
2answers
69 views

Simulating directly typed text with \input

I currently have the following code written in Plain TeX: \loadtoks\END int main(void) { printf("Hello World! %!@#$%&*&^\n"); } \END {\tt\the\toks0} \bye The macro \loadtoks is ...
4
votes
2answers
112 views

Define a special verbatim commmand

To learn more about Plain TeX, I try to define a special verbatim command \verb{code}, which puts code inside braces. When there is no braces in code, It's easy. But when there are some balanced ...
8
votes
5answers
199 views

Vertical alignment of text within a table cell

How can I move the text in the following table closer to the upper rule (or closer to the lower rule) without changing row height: {\halign {#\cr \hrulefill\cr \font\f=cmr8\f(bla bla bla)\cr ...
13
votes
2answers
464 views

What is the difference between square brackets and curly brackets in a command invocation?

Pardon the naive beginner question. In a command like: \textcolor[HTML]{4C7045}{dark green text}, or \documentclass[12pt]{article}, or \begin{figure}[htb], why are some arguments surrounded by [] and ...
3
votes
3answers
146 views

ConTeXt: Prevent Reference Name Clashes in Floating Objects of Different Types

I find it very annoying that ConTeXt uses the same namespace for references of floating objects. In other words, if you give the same reference to a figure and a table, then you'd always refer to the ...
0
votes
0answers
38 views

How LaTeX format paragraph [duplicate]

When I write document I get always Underfull and Overflow warnings. I know what's does means this warnings. I want to know what LaTeX (TEX I guess) does to format a paragraph. I mean how it decides ...
33
votes
0answers
567 views

Can TeX generate “heap dumps” to analyze+optimize out-of-memory situations?

As package author of the memory-extensive package pgfplots, I have been asked to analyze some out-of-memory situation. I could identify the "culprit"; it was some call to \pdfmdfivesum in which it ...
47
votes
10answers
4k views

What is the best way to learn TeX?

As opposed to LaTeX, which is addressed in another question. Most of the references I've seen get too complex too quickly. I'm looking for something that gives me a top-down view of the language - ...
4
votes
1answer
150 views

Non-latin characters with plain TeX

What would it take to output non-latin letters (e.g. cyrillic letters) to a document using just plain TeX (i.e. without using "third-party" macro packages such as LaTeX)?
15
votes
2answers
163 views

Multiple consecutive \par's equivalent to just one?

I think the answer to this question should be positive but I just couldn't find it answered elsewhere: Are multiple consecutive \par's the same as a single \par? For example, is \par\par the same as ...
30
votes
5answers
3k views

Should I read Donald Knuth's The TeXbook?

I've been using LaTeX for about a year or two as part of writing reports in university and want to gain a more in-depth understanding of how it works (I'm a computer science student). Would Donald ...
6
votes
2answers
303 views

How to not have widows and orphans without using raggedbottom

I know I can set \clubpenalty and \widowpenalty to 10 000 to make them “really bad”, but then TeX sees it equally bad to cut the page short when there is no vertical stretch (i.e. \parskip=0pt), and ...
5
votes
1answer
47 views

Break page in \valign

Let's say I have a \valign like: \parindent=0pt \tabskip=\baselineskip \valign{& \hsize=.5\hsize\raggedright #\crcr Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod ...
1
vote
1answer
54 views

Drawing Circuits in LaTeX [duplicate]

What package should I use to draw these circuits? Is it circuitikz?
7
votes
2answers
2k views

How can the dimensions of a box be retrieved with LaTeX

One can specify a box in LaTeX, using various methods for example: \newsavebox{\Abox} \savebox{\Abox}{\parbox{4cm}{\lorem}} \usebox{\Abox} How can I retrieve the width, height and depth of the ...
3
votes
1answer
48 views

Vector arrow running into brackets

This looks really horrible when I typeset it in Plain TeX: $$[\vec r]$$ \bye The vector arrow bleeds into the bracket on the right, it's not pretty at all. Is there a standard fix for this sort of ...
0
votes
0answers
105 views

Configuring command line editing for MiKTeX

I just started using MiKTeX 2.9. I set up the Makefile to produce the pdf and it works good. However, how do I set up command line editing of my .tex file. I have the downloaded the Emacs editor and ...
17
votes
4answers
686 views

Which commands consisting of a non-letter eat spaces afterwards?

Command names consist of a sequence of letters (until and excluding the first non-letter) or of a single non-letter. Command names ending in a letter (including of course those consisting of a single ...
54
votes
3answers
3k views

2013, year of the TeX bugs report. Will pdfTeX, XeTeX, etc. be changed accordingly?

Barbara Beeton said (TUGboat vol. 34, pag. 4): As noted on Don Knuth's TeX web pages, www-cs-faculty.stanford.edu/~knuth/abcde.html, he "intend[s] to check on purported bugs again in the ...
1
vote
0answers
61 views

How to convert isodate to x unit in pgfgantt

I'm trying to find a solution to my problem : How to draw vertical lines using pgfgantt package. So I decided to take a look to the package source code and I found this : \def\@tempa{none}% ...
4
votes
1answer
79 views

Activating characters with diacritics (accents)

I want to create an environment that would convert all á to \=a, all é to \=e and so on... (short-hand for macrons) Something that should have been a five-minutes easy-to-write tool became a real ...
15
votes
2answers
436 views

Why does `x_\text y` work?

As far as I have understand the tokenization in LaTeX, x_\text y will be split up into x _ \text y Now the _ will consume/bind to the next token. However, \text takes an argument as well. If _ ...
8
votes
1answer
61 views

Testing for macros by name

I'm curious to know how I would go about testing for macros by name. I need to do something that would be the logical equivalent of the following: \def\doit#1{% \if#1==\foo I got a foo\fi \if#1==\bar ...
3
votes
3answers
12k views

Error Latex TeX capacity exceeded, sorry [input stack size=5000]

I want to test this template http://students.engr.scu.edu/~sschaeck/latexforthesis/. when i run the makefile i get this error .Please what does it mean this error here the code : ...
10
votes
2answers
147 views

Why is \newcount declared \outer?

I'm a user primarily of Plain TeX. Lately I get annoyed about the \outer nature of \newcount, especially when I write macros which require temporary internal variables, variables which really need not ...
0
votes
0answers
33 views

Compatibility with chessboard and xskak

When I try to use these pachages in my latex document (that has other packages as well) it throws me an error; do you know if I can solve this compatibility issues at all? A minimal working example ...
8
votes
1answer
301 views

A bit of fun with logos: how to combine lines and letters in LaTeX (or just TeX)?

I was just having a bit of fun messing around with typesetting, and was able to produce a simple logo. However, it suffers from several issues that are illustrated in the MWE. I'm mainly just doing ...
0
votes
0answers
11 views

make one page 11x16 in middle of document? [duplicate]

So I am working on a report and I need to make a few of my report pages fold outs, thus 11x16 inches instead of the usual 8.5x11. How can I do this in tex?
66
votes
3answers
58k views

\vspace vs. \vskip

What is the difference between \vspace{-1em} and \vskip -1em, for example? I guess the first is LaTeX, and the latter is TeX. When is the proper time to use one and not the other, and why?
0
votes
1answer
33 views

Reduce the number of lines of a paragraph [duplicate]

How can I tell Latex that I want my paragraph with n less lines? I saw a question some days ago, but after twenty minutes of heavy searching (I think), I found nothing. There is a “penalty” or ...
10
votes
4answers
442 views

Extract first, last and rest of tokens

This question is related to Extract first & last characters of macro argument?. It seems that if, besides getting first and last tokens, one wants to accumulate the rest of the tokens, the ...
12
votes
1answer
165 views

Hide ^^^^-notation from pdftex

The following example gives when compiled with pdflatex the error ! Text line contains an invalid character. \documentclass{article} \usepackage{ifluatex} \ifluatex \usepackage{fontspec} \fi ...
1
vote
0answers
43 views

How to define a proof environment which can be displayed/hidden? [combining two TeX solutions] [duplicate]

I once asked for a solution to suppress vertical space right after the beginning of a proof environment; see the link (1) below. I use this quite heavily, it works very well. I recently asked how to ...
13
votes
2answers
617 views

Can the PostScript language be used to fully replace TeX? [closed]

THE POSTSCRIPT® LANGUAGE is a simple interpretive programming language with powerful graphics capabilities. ... Because of the importance of text in most applications, the PostScript ...
3
votes
1answer
89 views

How to create a format file with initex to speed up processing time?

I have a file called matteo.tex which contains lots of macros. I'd like to create a format file with initex so that, every time tex processes a file that contains some of matteo.tex macros, it ...
4
votes
0answers
92 views

TeX programmer needed - or assistance with page dimensions and crop marks [closed]

is there a place where i can find/hire a TeX programmer to adjust TeX files that were set up for us in the 80s? I can make minor edits, but things like page dimensions and crop mark locations are ...
41
votes
3answers
855 views

What is a token?

Please forgive such a basic question, but I did some Google searching and looked around on this site, and while there are many threads and online resources that involve tokens, I can't seem to find a ...
31
votes
3answers
2k 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 ...
20
votes
1answer
122 views

Is implicit `\relax` in conditionals explained anywhere in the TeXbook?

I have been relying for years on TeX's behavior where, say \if1\fi expands to nothing and \if1\else\fi does the same. In the second case TeX inserts an 'implicit' \relax when it tries to expand \else. ...
13
votes
2answers
1k views

Why (La)TeX can not work with true type fonts?

I know that if one wants to use true type fonts, there are solutions via xelatex or lualatex. My question however is, why it is like so? What is the fundamental difference between latex fonts and ...
2
votes
1answer
44 views

Substitute characters in text-mode with their math equivalent

I'm looking for a TeXway to substitute - (or other characters) while in text-mode with their math equivalent (i.e. $-$) in one environment/group. I'm looking for a 'switch' (\foo # and not \foo{#}). ...
49
votes
5answers
819 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 ...