ConTeXt is a TeX macro package like LaTeX and eplain. It provides a consistent, key-value driven user interface, supports all TeX engines, is tightly integrated with LuaTeX & Metapost, and supports grid-typesetting, PDF/A, PDF/X, XML/XHTML & ePub export.

learn more… | top users | synonyms

7
votes
4answers
462 views

Vertically aligned table in plainTeX / LaTeX / Context etc

My last answer about vertically aligned table inspired me to write my first question at this site. How to create the following table in various TeX approaches: plainTeX, LaTeX, Context, eplain, OPmac ...
7
votes
2answers
835 views

How to check if a value is not equal using TeX conditionals?

I have a value defined in a macro, e.g.: \mymacro{apple} I need to check if a value does not equal a string, e.g.: IF #1 NOT EQUAL TO "apple" THEN PRINT "It is not a apple, it is #1." FI I ...
7
votes
2answers
163 views

How can a macro know how many times a value has appeared and will appear?

Using ConTeXt, I have a macro which can be given a unique key value: \macro{000010} \macro{000011} \macro{000010} \macro{000010} \macro{000012} \macro{000011} I need to be able to access ...
7
votes
2answers
423 views

How to display special symbols in ConTeXt which are processed by Lua?

I have a ConTeXt document containing many special characters. I have followed the instructions at Which symbols need to be escaped in ConTeXt? to ensure they can all display properly in the document, ...
7
votes
3answers
328 views

How to define acronyms in ConTeXt?

The acronym packages allows one to easily create and display acronyms, with a simple syntax, like \ac{usb}. The first time this is called, is will say “Universal Serial Bus (USB)”, but after that, ...
7
votes
2answers
121 views

How to compare the beginning of an argument

I need to write a simple function in tex (ConTeXt more precisely, but I suspect that does not matter here), that does one thing when the first argument #1 begins with a particular string, and does ...
7
votes
2answers
260 views

What does \s! do?

1st example: \starttypescript [\s!serif] [paratype] \definefontsynonym [ParatypeSerif-Regular] [\s!name:PTSerif-Regular] [\s!features=\s!default] \definefontsynonym [ParatypeSerif-Italic] ...
7
votes
2answers
596 views

Macro for the average width of a character

How can i made a macro similar to \averagecharwidth of ConTeX in LaTeX, that calculates the average width of a character based on the frequency of that character into my document ? that macro is show ...
7
votes
2answers
170 views

Number kerning in ConTeXt math mode is different and worse than normal

Compare these two: \starttext \unit{0.01 kilogram} $ \unit{0.01 kilogram} $ \stoptext I would naively expect these to produce very similar results, but the latter case—the one in math mode—we get ...
7
votes
1answer
172 views

Why is pdflatex automatically loading a ConTeXt package and crashing

If I process the following MWE with pdflatex (TeXLive 2012, Linux) \documentclass{article} \usepackage{color} \def\mymacro#1{#1} \begin{document} \pdfinfo{/Title (Some text \textbf{This macro causes ...
7
votes
2answers
865 views

Improving the legibility of a pdfTeX produced PDF on Google Docs

My draft dissertation (google docs link here) shows up remarkably poorly on google docs. It was rendered on ConTeXt MkIV with the default pdf engine (pdftex, I believe.) What steps do I need to take ...
7
votes
3answers
116 views

How to get the current directory name in ConTeXt?

Assume the file, source.tex is placed in /home/user/Birds/ and the user types context source.tex to compile the file. Is there a way for ConTeXt to retrieve the name of the folder that the file is ...
7
votes
1answer
419 views

CritTeXt — any sign of life?

I've been fascinated by the announcements of the upcoming features of CritTeXt in 2007. As I learned from a thread on NTG-context from early 2010 we shouldn't expect a dedicated package, but that ...
7
votes
1answer
436 views

Continuously compile/watch source files in ConTEXt?

Is there an equivalent to latexmk in Context? I want the script to watch my source files for changes and continuously recompile them. Here is how I would do it with latexmk: latexmk -bibtex -pdf ...
7
votes
1answer
265 views

Creating a ConTeXt/LaTeX hybrid module

I have a simple titlepage, which I want to make available for ConTeXt- as well as LaTeX users. Each should just type \usemodule[myTitlepage], or \usepackage{myTitlepage}, respectively. I want to do ...
7
votes
1answer
310 views

Ligatures in (Graphite) TrueType fonts

When using ConTeXt MkIV (i.e. with the LuaTeX engine), I’ve noticed that ligatures don’t work properly for some TrueType fonts, even though they do work in LuaLaTeX or even LibreOffice. As far as I ...
7
votes
2answers
204 views

Formulas in ConTeXt are different from those in plain TeX

I often typeset formulas using TeX and friends. I noticed they are different between ConTeXt and plain TeX recently. \starttext \startformula \int\nolimits_a^bf(x)dx=F(b)-F(a) \stopformula \stoptext ...
7
votes
1answer
157 views

Why does Context line-break my quotation and leave the quotation sign on it's own row?

Using Context to set a book I have the following problem: Context linebreaks some quotations in a way that makes the quotation sign (in my case a guillemet [sic!]) appear on its own row. How can i ...
7
votes
2answers
636 views

How to create form letters from spreadsheet data in ConTeXt?

In LaTeX, one can use datatool to build simple form letters. As an example, the data is stored in a spreadsheet or CSV file, like this: Name,Amount,Date "Mr. White","$300","Dec. 2, 1911" "Mr. ...
7
votes
1answer
202 views

Equivalent of \chapter[title]{title} in ConTeXt

In LaTeX, one can use \chapter[A]{B}, such that, in the table of contents, "A" appears, but in the actual page where the chapter begins, "B" appears. This allows one to print different text in the ...
7
votes
2answers
217 views

Written response spaces for a workbook in ConTeXt

I am making a workbook in ConTeXt. Throughout the workbook, there will be many spaces for the owner to write in short answers of one or two paragraphs. This can be quite simple, perhaps just a ...
7
votes
1answer
160 views

Applying van de Graaf's Canon (ninths-division) in ConTeXt

I'm sure this is an obvious question but after much tinkering all I've managed to do is confuse myself. I'm typesetting a book. The paper size is 5.5×8.5". I want to apply the canons of page ...
7
votes
1answer
182 views

MetaPost: Randomly generated number, distinct from previously generated number

Overview Looking to create random page background colours where the same background colour never appears more than once in succession (i.e., red, green, blue, green, blue, red, etc. -- never red, ...
7
votes
1answer
251 views

ConTeXt MarkIV: Pagenumber in layer not working

I want to put pagenumber and navigation into a layer, but the counter for pagenumber is not working. Here's a minimal example: \usemodule[graph] \usesymbols[nav] \setupsymbolset[navigation 1] ...
7
votes
1answer
316 views

Context Project Seems to Ignore Products

When I typeset the following project, it seems that the products aren't being found. I can typeset the product itself without any trouble, but typsetting the project as a whole doesn't generate a PDF ...
7
votes
1answer
174 views

ConTeXt+MetaPost: Non-conflicting random background and foreground colours

Overview Looking to create a page that has a random (and non-consecutively repeating) background colour with titles that are also random. Problem The code has two problems. First, generating a ...
7
votes
1answer
358 views

How to span the content across two pages in ConTeXt?

Most of the pages in my document look like this, a layout common in books: ___________________________ | | | | Title | ........... | | | ........... | | ...
7
votes
1answer
271 views

Floats that span the text width and the margin

What is the correct way of placing floats that span the text width and the margin? If the width of the float content is increased, ConTeXt does not reserve space in the margin which leads to ...
7
votes
1answer
245 views

How to prevent tables from being wider than the text width in ConTeXt?

I have some tables like this: \starttabulate[|l|l|] \HL \NC Title 1 \NC Title 2 \NC\NR \HL \NC This is a sentence. \NC This is another sentence. \NC\NR \HL \stoptabulate ...
7
votes
1answer
301 views

Different content if command returns empty text (ConTeXt)

I have the following code in my ConTeXt environment: \startsetups[sectioninfo] \ss \rlap{\userpagenumber} \hfill § \getmarking[sectionnumber][current] \emspace \bf ...
7
votes
2answers
414 views

From XeLaTeX's Unicode-math to ConTeXt's typescript

I search a way to translate the following XeLaTeX's declaration (based on the unicode-math package) \setmainfont{Linux Libertine G} \setsansfont[Scale=MatchLowercase]{Liberation Sans} ...
7
votes
1answer
772 views

Writing a letter in ConTeXt, formatting issues

I'm writing a letter to someone, using ConTeXt. I'm running into some formatting issues. The following is the code I have, and the PDF output. There are two things that I'd like to fix. ...
7
votes
2answers
389 views

Augmented matrices in ConTeXt?

In LaTeX, I could use: \[ \left[\,\begin{array}{rr|r}2&-3&6\\ 3&4&-9\end{array}\,\right] \] However, in ConTeXt, especially if I want right-alignments of columns, I seem to have to ...
7
votes
1answer
112 views

Unicode, right to left characters in command names

What is the status, in terms of category codes, of all the Unicode letters above ASCII in XeTeX (using XeLaTex+fontspec) and LuaTeX (using ConTeXt)? Can I define a macro using Unicode characters (ex. ...
7
votes
0answers
226 views

ConTeXt vs LaTeX compilation time

In the past I used ConTeXt only when some font was not available in LaTeX -- I may probably be wrong -- but my impression is that ConTeXt is compiling faster than LaTeX. For a document that compiles ...
7
votes
0answers
220 views

Strange problem with frames (ConTeXt tables) [closed]

Leads to a bug report on the ConTeXt mailing list: [dev-context] bTABLE in header and document give unexpected behavior When using this code I get a problem with the frame around the header on ...
6
votes
3answers
185 views

How to set two or more paragraphs to use the same amount of vertical space?

Given several paragraphs in ConTeXt or plain TeX, how can I ensure that all paragraphs use the same amount of vertical space, by adding white space to the end, as the longest paragraph in the set? ...
6
votes
4answers
7k views

How to sort the order of pages so that they can be printed in a folded book?

I am using ConTeXt to print a book. Each page is A5, but the print store can only print on A4 paper, so they print 2 pages on each side of the A4 paper. I used this code to specify the layout: ...
6
votes
2answers
190 views

How to increase the node memory size in ConTeXt?

With a very large document, after about 30 minutes of compiling with context, I get this error: ! TeX capacity exceeded, sorry [node memory size=100987760]. I added a line to texmf.cnf which says ...
6
votes
2answers
377 views

Is it possible to have thin lines or crop marks to help cut the pages with \setuparranging?

I have something like this: \setuppagenumbering[state=stop] \setuppapersize[A5,landscape][A4] \setuplayout[topspace=1cm,backspace=1cm, header=0mm,footer=0mm, width=middle,height=middle] ...
6
votes
2answers
112 views

Defining the size of a graphic based on the number of rows it should span in ConTeXt

I am using ConTeXt to make a document containing many illustrations. Some will appear placed like this (the area in brackets is where the illustration will appear: This is some text. This is some ...
6
votes
1answer
438 views

How to switch fonts when the language switches in ConTeXt?

I have a mostly English-language document, with fonts defined like this: \usemodule[simplefonts] \setmainfont[MinionPro-Regular] \setsansfont[MyriadPro-Bold] Occassionally, I need to have some ...
6
votes
2answers
198 views

ConTeXt: Cannot typeset four consecutive hyphens

I'm having trouble typsetting four consecutive hyphens in a custom font. Here's a minimal example: \definesimplefont[myfonthere][myfontname] \starttext {\myfonthere ----} \stoptext This always ...
6
votes
1answer
133 views

How to avoid transliteration of Russian text in ConTeXt?

Using TexShop on Mac OS I try to compile a code: \setupbodyfont[dejavu] \enableregime[utf] \mainlanguage[russian] \starttext Немного русского текста для пробы. \stoptext But it gives me a ...
6
votes
2answers
188 views

Eliminate topspace and bottomspace in ConTeXt

Background Looking to put the page number flush to the bottom of the page using ConTeXt. The key lines in the Minimum Working Example (MWE) below are: \setuplayout[ topspace=\zeropoint, ...
6
votes
1answer
222 views

How to disable the header at any page in ConTeXt?

I haven't written an article since I paid my attention to ConTeXt. Now it is a chance to do it. I have tried to set the header, but failed. The structure of this article is like this: ... title ...
6
votes
2answers
308 views

Abstracting an author list

I am writing an academic paper and have no problem manually formatting an author list like \startnarrower[middle] \startalignment[middle] Author One\thanks{email_one@gmail.com}, Author ...
6
votes
1answer
168 views

How to create in-paragraph enumerations in ConTeXt?

The ConTeXt wiki article on enumerations shows many solutions for creating an enumerated list, however, I see no examples for creating an in-paragraph enumeration, e.g.: Five animals lived in the ...
6
votes
2answers
626 views

How can oversets and undersets be allowed to appear over neighboring text?

I am using the \overset and \underset commands in ConTeXt, to place text over other text within a paragraph, e.g.: (animal) (animal) (animal) Bears like to eat fish and ...
6
votes
1answer
128 views

How can I effectively diff 2 versions of a book produced by ConTeXt?

I have just made significant revisions to my thesis which has been typeset with ConTeXt. The project file pulls from approximately 20-30 files spread over 8 directories producing a document of 414 ...