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

4
votes
1answer
156 views

ConTeXt: How can I prevent a block of text from being split over a page break?

At the end of below minimum working example there is a funny \startdelimitedtext[endtext] which should be printed at the bottom of the last page without being split over a page break. How do I render ...
3
votes
1answer
231 views

ConTeXt: How to increase line-spacing in title?

Pandoc generates ConTeXT document titles using a standard simple scheme that sets the title in \tfd. I already changed the default font and size of \tfd. However, when a title is so long that it ...
2
votes
1answer
164 views

Stretch image width within a two-column layout in ConTeXt

Background Trying to place an image within two-column text. Problem The image renders as follows, where the vertical bar is the column separator: Code The following code produces the problem ...
4
votes
1answer
206 views

How hard is it to use typo-dir.lua in LaTeX?

I tried to use typo-dir.lua from ConTeXt distribution in LaTeX but I could not. I searched all context sources and I added all missing functions but still it did not work. Is it possible to use this ...
2
votes
1answer
53 views

Is there a ConTeXt command to print the path of the file in which it is evoked?

I would like to put a URL-link in the output PDF of a ConTeXt file. It should point to the directory in which the ConTeXt file and its output PDF reside. Currently, I am using a shell script in my ...
3
votes
1answer
97 views

Problems with multiple \starthanging \stophanging in ConTeXT

I'm trying to place multiple figures with additional side text using ConTeXT one after the other. When there are two figures in a row they overlap. How should they be separated? The following ...
3
votes
1answer
67 views

How to place an “Ex.” item at the beginning of an itemized list in ConTeXt?

I created a macro which displays an list of numbers, where readers can write in their answers to a question. \def\answers{ \startitemize[n] \docursive{3}{\item} \stopitemize } In ...
1
vote
0answers
75 views

How to prevent page breaks from appearing at the point where a sub-itemized list begin in ConTeXt?

I have a lengthy document containing lots of itemized lists, in two levels. It is like this, but often much longer: \startitemize[r] \item This is a statement. \startitemize[n] ...
2
votes
1answer
212 views

How to invert direction of brackets (for a right to left text) in ConTeXt?

The Unicode Bidirectional algorithm mandates that the glyph for the character "left parenthesis" (and many others) be inverted when displaying text in RTL direction. However I am trying to typeset in ...
1
vote
1answer
203 views

ConTeXt: Is there a package or functionality similar to the LaTeX mwe package?

I would like to post questions here concerning ConTeXt and graphics. However, I cannot find a minimum working example package for ConTeXt like Martin Scharrer's mwe package for LaTeX. Nothing alike ...
5
votes
1answer
648 views

Remove the space above/below itemizes and descriptions

In the document below an itemize is nested in a description and I want to have no vertical space between the entries. I removed the space above and below of itemizes and descriptions using ...
7
votes
1answer
338 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 ...
5
votes
1answer
248 views

Vertically align \framed with itemized list using ConTeXt

Problem The numbers in the following itemized list are not aligned with the text: Code It is possible to adjust the vertical alignment using the offset command: % Itemized bullet list ...
5
votes
1answer
195 views

Change list bullet style independently from each other in ConTeXt

Background I would like to vary the style of multiple itemized lists on the same page, independently from one another. Code A short example: \setuppapersize[A5] \setupcolors[state=start] % ...
2
votes
1answer
64 views

Conversion of Sectioning Numbers in ConTeXt

I would like to have the following typesetting in my ConTeXt document, but I don't master its conversion mechanism to yield it. First part, Second part, Third part... Chapter 1, Chapter 2, Chapter ...
10
votes
2answers
303 views

How to let text flow around irregular-shaped graphics in ConTeXt?

I have some illustrations which I need to scan and place within a document. The illustrations come in various shapes, with no straight edges, and are bound by lots empty white space, e.g.: ...
4
votes
1answer
153 views

How do I get italic texts figures in ConTeXt?

Inside an italic section I want to place text figures (which should be italic as well). How do I achieve this? (The document is in ConTeXt MKII.) Both of the following examples produces non italic ...
5
votes
1answer
77 views

Apply columns to sections without explicitly bracketing each section

Background Creating a document that can have zero-, two-, or three-column layouts, depending on user preferences. I would like to keep the content clean of \columnsets by redefining only the sections ...
5
votes
1answer
527 views

Define colour transparency in relation to existing colour

Background Using ConTeXt to develop a nice theme where users can change the colour scheme, but still get the same "feeling" for the output, primary, secondary, and tertiary colours are defined. For ...
1
vote
1answer
88 views

Substrings in ConTeXt

Problem Trying to get the first letter of a word for a chapter heading. The chapter style is being applied as follows: \setuphead[chapter][ command=\StyleChapter, % Hide the header's ...
6
votes
1answer
349 views

Set margin background colour for all chapter pages

Problem The \setupbackgrounds macro has the ability to change the background colour of the margins, from the top of the page to the bottom: \setupbackgrounds[footer,header,text][rightmargin][ ...
6
votes
2answers
169 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, ...
3
votes
1answer
220 views

How to obtain formatted page number in ConTeXt?

Problem The \pagenumber macro does not reflect the conversion attribute value within the context of front matter vs. body matter. The front matter uses Roman numerals, the body matter uses regular ...
3
votes
1answer
182 views

\lettrine causes strange line breaks

Since I updated to ConTeXt 2012 and mkIV, each time I want to write a dropped capital I got a strange result (I mean, that extra line break) with the first line of the paragraph the dropped capital is ...
4
votes
1answer
286 views

ConTeXt: vertical spacing

I'm a bit confused about how to specify vertical whitespace. The following document works: \setupwhitespace[line] \setuphead[subsection] [after={\blank[2*line]}] \starttext \subsection{Title} ...
8
votes
1answer
334 views

Parallel text in ConTeXt

I need to type parallel text on facing pages (original text on right page and translation on left one) in ConTeXt. I've used ledpar in Latex but wasn't satisfied with the results (text is aligned on a ...
2
votes
1answer
111 views

How to let Lua see the contents of a variable rather than just the variable name in ConTeXt?

I have some Lua code which searches for "①" and "②" within some text and prints only the text displayed between: \startluacode userdata = userdata or {} function userdata.printbetween(str, ...
7
votes
2answers
117 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 ...
3
votes
1answer
96 views

Alignment issues with lists in a table in ConTeXt

This issue has been answered many times for LaTeX, but I couldn't find any explanation for ConTeXt. Here is a sample that shows the alignment problem : \starttable[|cB|p(4cm)|p(4cm)|] ...
9
votes
1answer
152 views

How to renumber and redisplay additional references to a previous footnote if the previous appearance was several pages prior in ConTeXt?

I am using \setnotetext[footnote][0001]{This is a footnote.} to set a footnote's text and \note[footnote][0001] to create multiple references to it. When the footnote's first appearance, and later ...
3
votes
1answer
65 views

Get confused about the `command` option in some ConTeX \setup*

Since I switched to ConTeXt from plain TeX, I always get confused about macros in it. Now it is the command option in \setup* of ConTeXt. In ConTeXt, some macros, like \setuphead, \setuplist, have ...
5
votes
1answer
170 views

\placeongrid and \moveongrid not working in ConTeXt

I am trying to use the grid features in ConTeXt, but some of the commands are somehow not recognized by the compiler. Whenever I try to use the commands \placeongrid or \moveongrid, the compiler ...
2
votes
1answer
456 views

Flushleft and flushright in the same line (ConTeXt)

I have the following macro \mainlanguage [de] \definepapersize[MyBook][A5] \setuppapersize[MyBook][A5] \definestartstop[Test][commands=\setups{Test}] \def\Test{\doTest} \def\Test[#1]{ ...
4
votes
1answer
131 views

How do I get ConTeXt to produce pdf files in one directory, the aux files in a second, and take the .tex files from a third?

I want to be able to cleanly use my letterhead template with many different input files. I have created a shell scrip that invokes: context --silent --purgeall --path=./img content/$1 But have ...
4
votes
2answers
137 views

PDF links generated by \cite do not work when using project component files

When using the project files shown below, links generated by \cite[…] are displayed as links, but when I click on them nothing happens. But when \completepublications[…] is directly written in ...
3
votes
1answer
184 views

Sort bibliography entries in alphabetical order by the entries' “short” value

How can the bibliography list entries be sorted in alphabetical order using the s ("short") field of the publication entries in the example below? I don't want to use a BibTeX file, but the ...
6
votes
1answer
259 views

Set layout for the first page of Chapters in ConTeXt

When designing some documents, I hope I can set a global layout and another layout for the first page of all chapters. I have defined two layouts as follows: \setuppagenumbering ...
6
votes
1answer
190 views

Providing Arguments to a Start-Stop

Mostly for the sake of doing so, I am writing a presentation in ConTeXt. I thought that defining a start-stop would be a good way to split up slides. So I have something like: ...
5
votes
1answer
181 views

Indented block in ConTeXt

I need to write pseudocode in ConTeXt. Since there is no documentation of the t-algorithmic module, and because I don't have so much to write, I decided to format the code myself. Here is what I ...
8
votes
1answer
318 views

What is the equivalent of Biblatex in Context?

How do I do bibliography in Context, that is more than just bibtex? In the manual there is no explanation of this. Source code doesn't tell me much either... Are there any "packages" that provide ...
3
votes
1answer
160 views

How to display an encyclopedia-like range of topics per chapter or per page in ConTeXt?

At the top of the page in many reference books or encyclopedias, there is always a range stating which topics are covered within a given area, e.g.: A volume of encyclopedias will say "A-B" to ...
16
votes
3answers
714 views

Rounded box around placeholder text that supports line breaking

I want to draw a rounded box around a piece of text like that: The left and right borders should be half circles and line breaking should be supported. This my code so far: \setuppapersize[A7] ...
5
votes
1answer
190 views

How to change the font formatting in the text and numbers of footnotes in ConTeXt?

I have a document with two different types of footnotes, \noteone and \notetwo, defined with this: \definenote[noteone][footnote] \definenote[notetwo][footnote] For these two footnotes, I need to ...
10
votes
2answers
215 views

ConTeXt equivalent of \renewcommand

I can use \define to define a new command, but how do I overwrite an existing one? My use case is rewriting all {\externalfigure[cow]} to \placefigure[right]{My Caption}{\externalfigure[cow]} to ...
3
votes
1answer
109 views

How to set section numbers to use whole numbers, rather than decimals, in ConTeXt? [duplicate]

I have a document like this: \setuphead[part][placehead=yes] \definestructureresetset[default][1, 0, 1, 0][1] \setuphead[sectionresetset=default] \starttext \part{Animals} ...
3
votes
1answer
229 views

List all TypeScripts in ConTeXt

A TypeScript (as opposed to a font) contains font definitions for the individual font styles (regular, sans, math, etc. and bold, italic, bolditalic, etc.). I can list all the fonts with mtxrun ...
3
votes
2answers
238 views

ConTeXt unicode fallback font

In case a font doesn't have some symbols, is there an easy way to just fall back to whatever font LuaTeX can find that supports that glyph, just for that symbol? Or is there a reasonably complete ...
2
votes
1answer
103 views

ConTeXt: arbitrary Unicode code point

How to print a glyph by Unicode code point? i.e. what is the ConTeXt equivalent of the following LaTeX (displaying a capital Alpha): \symbol{"0391} % hex \symbol{913} % dec \symbol{'1621} % oct
5
votes
1answer
102 views

How to place section titles in the header, but not in the document?

I need to place some \part titles within my document, but make them invisible in the text, and only appear within the table of contents and headers. With this code, the \part titles are not found ...
3
votes
1answer
121 views

How to display the page range of marked locations in a passage in ConTeXt?

I have a macro placed throughout my document marking key places within a long passage. These have no relation to the chapter or section titles. _____________ _____________ | | ...