{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
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 ...
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 ...
1
vote
0answers
60 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
435 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
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 ...
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 ...
0
votes
0answers
31 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
144 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
296 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
684 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
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 ...
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
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 ...
2
votes
1answer
86 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
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{#}). ...
6
votes
0answers
101 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
51 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
157 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
98 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
213 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
59 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
256 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
163 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
69 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
110 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
65 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
70 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 ...
16
votes
2answers
567 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
72 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
83 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
294 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
43 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 ...
6
votes
2answers
59 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
361 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 ...
44
votes
4answers
2k 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
86 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
476 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 ...
23
votes
1answer
335 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
58 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
75 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 ...
76
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 ...
7
votes
1answer
200 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
128 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
165 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 ...