New answers tagged

5

Joseph Wright's answer is to the point: conserving memory was Knuth's main concern when defining the primitives dealing with box registers. There are however some subtle points. A box register can be void or it can contain a horizontal box (from \hbox) or a vertical box (from \vbox or \vtop). If you do \box0 (zero can be any other valid register number) ...


1

The box in TeX is implemented (roughly speaking) as a pointer to the vertical/horizontal list of typesetting material included in such box and this data structure can be large and it resides in main TeX memory. When you say \box0 at some place of outer material then only the pointer is placed here and the pointer of box0 is newly set to NULL. The contents of ...


9

At the time TeX was written, conserving memory was important. Typically, when a box has been used the content is no longer needed in the original (i.e. it will be moved to some other box), so memory can conveniently be reclaimed with the behaviour that \box clears the box. When this is not the case, \copy is available. Notably, a box is not a fixed item, ...


0

Just to add to this if anyone still has this problem, I found a pretty simple way to fix it. I was getting this error: TeX capacity exceeded, sorry [main memory size=5000000] I went through a lot of guides to increase the main memory and nothing was working :/ But I read a few articles where they talked about save_size instead of main_memory. I edited ...


0

Partial solution for XML export In the case of information retrieval, @DavidCarlisle advised me to take a look at LaTeXML. On the website of the project I have found a link to an outdated experiment on exporting ~730k scientific preprints from arXiv.org into XML format. This experiment ended in 2013, but at that moment Result count % ---...


5

I'm a little hesitant to post this as I'm not sure how adaptable it would be to your case, but with the hope that it might point you in the right direction, here it is. I have been developing a system that allows me to write documents using LaTeX and writes output files as text files in a variety of formats. My current primary use-case is to output HTML5 ...


2

Since this version draws a symbol in the text area, I commented out the code for the text area (but left it there in case anyone wants to fix the american not port). \documentclass{standalone} \usepackage{circuitikz} \makeatletter \pgfdeclareshape{inverter} { \anchor{center}{\pgfpointorigin} % \anchor{text}{% this is used to center the text in ...


7

Suppose following input example: <?xml version="1.0" encoding="utf8"?> <cenik> <nazev>Počítačové komponenty</nazev> <platnost od="1.1.2000" do="31.3.2000"/> <dodavatel> <nazev>První hardwarová, s.r.o.</nazev> <adresa> <ulice>Průmyslová 12</ulice> <mesto>Praha ...


18

The manmac format used for processing the TeXbook defines ^ in a very special way. Under the standard setup, ^ alone is the marker for superscripts and also has a very peculiar behavior when followed by itself, see What is the role of an unescaped circumflex or hat character " ^ "? However, manmac.tex makes ^ into an active character and Knuth ...


13

If you are referring to the use of ^ like in ^^{TeX78} and ^^|\copyright|, here's the relevant part from manmac.tex % Indexing macros \newif\ifproofmode \proofmodetrue % this should be false when making camera-ready copy \newwrite\inx \immediate\openout\inx=index % file for index reminders \newif\ifsilent \def\specialhat{\ifmmode\def\next{^}\else\let\next=\...


10

The ^ character is used either to indicate the switch to superscript typesetting or it is a character replacement method (better shifting method),e.g. ^^+ will be replaced by the character k, since k and + differ by 64 positions in the ordinary ASCII code, it's possible to say \vs^^+ip 8cm instead of \vskip 8cm Identically, ^^k will replaced by + then, ...


0

The sizes in tfm file are relative to the font design size. I did not do this. Now I multiply the char width by the font design size and all works right. Even $15^{th}$. TeX handles kerning (as I was told), my mistake. My dvi-processor works now to the specification.


9

Alan has explained why \^ takes an argument but note also that latex has \textbackslash, \textasciicircum and \textasciitilde to generate \ ^ ~ In the case of the original OT1 encoding \textasciicircum and \textasciitilde are in fact the same as \^{} and \~{} that is put an accent over an empty base, and \backslash takes a \ from the math symbol font as ...


32

Although we commonly say that \ is the escape character, it's really the character that TeX uses to introduce a control sequence. There are two types of control sequences. Control words consist of \ plus a string of letters. Control symbols consist of \ plus a single non-letter. But in neither case is \ acting as an escape per se. Each of the characters you ...


4

Adding somewhere after \begin{document} \catcode`$=15 % for example - PS gives what is expected in your question.


14

In ConTeXt, one option is to export your document as XML. You can then manipulate the resulting XML document using standard XML tools in your favourite programming language. As an example, consider this example: \setupbackend[export=yes] \setupinteraction[state=start] \starttext \startsection[title={Test of export}] This is to test how \CONTEXT\ export ...


6

count255 is still a scratch register (and as insertions still have to be below 255, the block of count/skip/length/box allocations below 255 is still skipped by \new... depending how many \newinsert there have been.



Top 50 recent answers are included