{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
21 views

Float(s) lost in newly defined environment (possible \vbox/\hbox problem)

The following gives me LaTeX Error: Float(s) lost. I saw on Lost float in exam class that this might have to do with the \vbox. Replacing it with an \hbox gives Something's wrong--perhaps a missing ...
3
votes
2answers
34 views

Line break in a modified proof environment (with show/hide feature)

In the recent post How to define a proof environment which can be displayed/hidden? [combining two TeX solutions], Werner helped me to redefine a proof environment which can be hidden by an optional ...
10
votes
1answer
149 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
36 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
83 views

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

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 ...
2
votes
1answer
69 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
117 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
960 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
31 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{#}). ...
5
votes
0answers
86 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
48 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
152 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 ...
4
votes
1answer
84 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
191 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 ...
3
votes
0answers
47 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
235 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
143 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
34 views

TeXlive on ubuntu - fonts in Plain TeX

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
108 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
62 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
46 views

Reference of Latex/Plain Tex control sequences

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 ...
15
votes
2answers
545 views

The role of %&latex at the beginning of a source latex file

Could someone please explain what is the role of %&latex which is put in a source LaTeX file before \begin{document} command?
2
votes
1answer
63 views

Count “a” in text not in math mode, verbatim or lstlisting

I would like to count the "a" word in a text and put output to the PDF file, eg. This is a document about processing text in TeX. The document has a new macro but $a = 10$ is not counted, nor ...
10
votes
2answers
75 views

\csname not working as expected

The following code prints ==atname== \def\atname{atname} \def\xxx{name} \def\at{at} ==\csname\at\xxx\endcsname== \bye but this does not: \def\@name{atname} \def\xxx{name} \def\at{@} ...
12
votes
1answer
266 views

Is Knuth's *The TeXBook* complete?

Suppose I want to learn TeX. Then, is The TeXBook a complete source? Does it cover all relevant aspect of TeX? Or is there something worth learning about TeX which is not present there? Does also ...
1
vote
1answer
38 views

Pre-compiling with a different syntax [closed]

I am looking for a pre-compiler to introduce a customized syntax into LaTeX. Hope that an example will be worth a thousand words: I would like to compile this \thm The sum $ 1+2+3 is equal to ...
5
votes
2answers
51 views

Different Behaviors Digesting \csname x\endcsname and Digesting \x (expansion issue)

This question has been significantly EDITED, as I learned more of the problem. If I was good, I would be able to create macros with multiple optional arguments, but not only can't I, but in this ...
17
votes
2answers
349 views

Why does this simple \ifx test fail?

This should be easy, but I don't understand why the test below fails... I expected Hurrah! to be printed when the \currentchar count reaches 90 (i.e. the character code of Z). There must be some ...
42
votes
4answers
1k views

What is “expansion”?

I'm relatively new to (La)TeX, but I have a reasonable amount of experience with computational programming languages. Until I began learning (La)TeX, I'd never heard of "expansion"... So, what is ...
2
votes
0answers
79 views

Why does LaTeX impose a memory limit of 8,000,000 and can I circumvent it? [duplicate]

A few people have already asked the question of how to increase the maximum memory LaTeX is allowed to use (see here and here) because it is quite common for LaTeX to run out of memory when using, for ...
20
votes
1answer
465 views

How does a TeX engine read and render the input stream?

I am new to TeX programming and I have not finished reading the TeXBook yet. I need at a glance tutorial about how a TeX engine reads, processes, and produces its output. My mental model as a newbie ...
20
votes
1answer
287 views

The \lowercase trick

We have a number of questions or rather answers using (and explaining) the \lowercase “trick”. \begingroup \lccode`\~=`\. \lowercase{\endgroup\def~}#1{foo with #1} However, after reading on ...
4
votes
0answers
56 views

Namespace in luatex

Is it possible from luatex access registers where all names of command sequences are stored. Is it possible to pull out this list of names? I am looking for a way to trace how namespace changes during ...
3
votes
1answer
73 views

What can I do if I want to have a system for compilation to (AMS) LaTeX regarding restrictions to user-defined macros?

So I want to have a system where some user document is fully processed by TeX engine (full TeX engine!) and some data is collected to some helper file (saying "helper" just not make you think it's ...
72
votes
2answers
6k views

What's new in TeX, version 3.14159265?

The new Knuth TeX has been released in early this month, and its version number is 3.14159265 now. It can be downloaded here. What's new in this release? And a further-more question, where can one ...
6
votes
1answer
116 views

debug No room for a new \write problem

I have a template with an extensive documentation. (See TemplateDocumentation.pdf). It compiled several month ago. Now with updated packages it does not compile anymore because of the famous No room ...
8
votes
1answer
100 views

Cut last word from sentence one by one

I want to execute particular command for some space separated list as argument. And then execute the same command for the same list without last element and do it until list is empty. As extra point ...
6
votes
2answers
148 views

Counters and macros?

Not sure how I should post my question but here it is: I've seen that in plain TeX, \newcount is illegal inside a macro \definition. Is there a way to allocate a register inside a macro? Also, if I ...
3
votes
1answer
133 views

Can (La)TeX be a compelling technology for the humanities, journalism, and other non-technical disciplines? [closed]

All over the web, I see how LaTeX has been successful as a way of describing mathematical notation, which makes it pretty easy to argue that it is a compelling technology for science, technology, ...
6
votes
2answers
144 views

Allowing first undelimited argument to be empty

Consider the following macro definitions: \def\mymacro#1{\mymacroii#1\nil} \def\mymacroii#1#2\nil{% \ifx\\#1\\% empty% \else #1% \fi }% \mymacro{foo}% -> f \mymacro{} \bye This is ...
3
votes
1answer
48 views

Alignment problem or the height of one text line for \footnotesize text

I want to align the arrows so that it goes directly through the "x". How can I do this? It works if I use \normalsize font. The background is that I want to separate my Tikz document in text rows ...
8
votes
1answer
77 views

Hyphenation of the word “paraboloid”

It seems like my TeX does not hyphenate the word "paraboloid" on its own. After adding \hyphenation{para-boloid} (I hope that's the right hyphenation...) to the preamble everything is fine. My ...
23
votes
2answers
503 views

Backward definition of (La)TeX commands

Again and again I see, that TeXnicians define commands and do several things with them in the reverse order, I would do this as amateur. See this example: In his answer to scrpage2: Three ...
4
votes
6answers
355 views

A meta-language for LaTeX

Whenever I write TeX/LaTeX documents, I always find that annoying because I can't really focus on the content, It's not that I don't like TeX or what it does for me, it's just the fact that the ...
5
votes
1answer
139 views

Changing page margins in {pdf-,Xe-}TeX

In TeX, changing the \hsize and the \vsize changes the main text size and the page size of the dvi output. When I compile a document with pdftex or xetex, the page size remains at A4. How can I change ...
12
votes
2answers
245 views

All about \shipout

While reading about packages that allow to hook macros to certain events, I came across this command, \shipout. Searching on the internet didn't help a lot but if I'm not so wrong it's somehow related ...
6
votes
2answers
358 views

Can you do all what you want with TeX?

With LaTeX, I know you can put pictures in the documents, use different fonts, ... and practically do whatever you want (except the fact that your document must have a predefined style, imposed by the ...
6
votes
1answer
68 views

Getting the page breaks right for a \beginsection macro

I've found this code in the question No indent in the first paragraph in a section in Plain TeX \def\mysection#1{% \goodbreak \vskip2\baselineskip \noindent #1\par \nobreak ...