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

0
votes
1answer
29 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
78 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 ...
5
votes
2answers
96 views

Implicit \hfil at the end of each paragraph?

Why do Alpha \hfil\ Omega\par and Alpha \hfil\ Omega not flush "Omega" to the right?
3
votes
1answer
58 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, ...
2
votes
3answers
78 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 ...
3
votes
3answers
89 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 ...
4
votes
2answers
120 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 ...
14
votes
2answers
511 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 ...
8
votes
5answers
235 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 ...
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 ...
4
votes
1answer
155 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
167 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 ...
1
vote
1answer
46 views

how do you put caption on figures in sweave

I have this sweave code. I need to add caption to the figures. I am doing this but it looks like I see the figure before the section{Data ANALYSIS}: \documentclass[letter,12pt]{article} ...
5
votes
1answer
53 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
73 views

Drawing Circuits in LaTeX [duplicate]

What package should I use to draw these circuits? Is it circuitikz?
3
votes
3answers
150 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 ...
3
votes
1answer
55 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
109 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 ...
2
votes
2answers
73 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 ...
1
vote
0answers
69 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}% ...
15
votes
2answers
446 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 _ ...
4
votes
1answer
89 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 ...
8
votes
1answer
63 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 ...
0
votes
0answers
35 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 ...
10
votes
2answers
161 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
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?
8
votes
1answer
367 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 ...
17
votes
4answers
706 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 ...
0
votes
1answer
35 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 ...
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 ...
4
votes
0answers
93 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 ...
3
votes
1answer
96 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 ...
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
47 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{#}). ...
6
votes
0answers
103 views

What would be your minimalistic wish list for new TeX programming primitives? [closed]

I have written a lot of 'weird' TeX over the years and have never encountered a situation where TeX's programming environment was completely inadequate. I have, however, often wished for just a little ...
4
votes
2answers
52 views

How to store the definition of a command? Or, how to disable locally a command?

what? I would like to "store" the definition of \includegraphics into \something so that the following logics will work: % the following line is what I am looking for store(\includegraphics, ...
8
votes
2answers
158 views

Commands that disable everything except the counters

what I'm looking for... I'm looking for a couple a commands, \disableAllButCounters and \enableAll that would do the following: Everything between \disableAllButCounters and \enableAll would ...
5
votes
1answer
106 views

Possibility of extending LaTeX capabilities given technology advancements?

As countless questions/answers have noted in the past, LaTeX requires you to compile at least twice when there are references, TOC/LOF, etc. Many of these situations have been documented in the ...
8
votes
1answer
218 views

Expandable, standard TeX only way to compare balanced token lists

Is there a (reasonably) efficient macro that does something similar to \long\def\comparets#1#2{\def\aa{#1}\def\bb{#2}\ifx\aa\bb true\else false\fi} except is expandable (i.e. ...
0
votes
0answers
22 views

How to make a delimiter out of a character, eg \right!, similar to \right) [duplicate]

I must be missing something simple but could not find \right| and was wondering how to duplicate a matching vertical bar after a formula. Edit My mistake! I forgot \left. . But I guess one can ask ...
4
votes
2answers
133 views

Would it make sense to write a TeX algorithms implementation in Cairo/Pango, so that it can be used to output anything Cairo can?

What I'd like to do is experiment with a TeX renderer, and write it in a good graphics library, which includes font support, so I ended up with Cairo. Does it make sense to write a typesetting ...
1
vote
2answers
262 views

Where does LaTeX loose its breath? [closed]

LaTeX is a markup(typesetting) language typically used to typeset books. It has got a huge collection of classes and packages to work with. Now, obviously, LaTeX cannot be compared to Adobe ...
4
votes
3answers
164 views

Creating commands with a TeX `for` loop

I am trying to create many different commands based on a single command (essentially a custom header) in a predictable way. Is there a way to do this in TeX/LaTeX? My specific example: I'm writing a ...
0
votes
0answers
82 views

TeXlive on ubuntu - fonts in Plain TeX [closed]

I've reinstalled my system recently (now I use ubuntu 12.04) and have problem with fonts in Plain TeX I use texlive and texlive-lang-czechslovak. Apparently with UTF-8 encoding (pdf)csplain is not ...
4
votes
0answers
114 views

Is TeX “typeset complete”? [closed]

Occasionally, I see a question on TeX StackExchange where my first idea is "this can't be possible". Yet there always seems to be a way to do exactly what was asked for in TeX. Can TeX, in principle, ...
1
vote
0answers
66 views

How convert any.text to any.tex file or html file to tex [closed]

I found examples where it is mentioned conversion of tex files with LaTeX, but to get any file to tex I could find. In the Linux console. UTF-8 does not support the Russian alphabet or Arabic. If you ...
1
vote
0answers
88 views

Reference of Latex/Plain Tex control sequences [closed]

I'm looking for a reference of the control sequences defined in Latex and plain Tex similar to this one for the build-in primitives. The Texbook states that there are about 600 macros in plain Tex. ...
36
votes
4answers
2k views

How does your mind bend \expandafter to its will?

Expansion is often cited as one of the most arcane aspects of TeX, more akin to witchcraft than to something easily picked up by the newcomer. There are many great questions and great answers about ...