Use the {context-mkiv} tag if ConTeXt Mark IV answers would be helpful.

learn more… | top users | synonyms

4
votes
1answer
170 views

How to compile a file in ConTeXt, but output the results to a text file?

I have some files which contains data with ConTeXt syntax, e.g. containing macros and instructions for special symbols, but no preamble, sections, or other features tying the data to any particular ...
5
votes
1answer
242 views

Text in outer margin of multiple columns

I want to put some text in the outer margin (by which I mean on the left side of the page of even pages and on the right side of odd pages) of the page. My naive approach of using \inoutermargin{Text} ...
6
votes
1answer
159 views

Problem with old ConTeXt separated list example

I have been trying to get the following small example from ConTeXt garden to work without success. \starttext \usemodule[database] \def\SendMe#1#2#3#4{\framed [align={flushleft,lohi}, width=4cm, ...
6
votes
1answer
193 views

Compound/nested section numbers in ConTeXt: how to omit the top level? E.g. 1.2.1 --> 2.1

In the following MWE, titles have no displayed number, but sections (the second level) are still numbered 1.1, 1.2, etc, because the titles have an internal number. I would like the sections to ...
3
votes
1answer
359 views

How to show the \title headings in ToC?

My document is organized as following: \title[Some title] \section[Section 1] \section[Section 2] etc. When I use \completecontents command to print a ToC, I only get the section titles (which are ...
4
votes
1answer
267 views

semantic proof trees in ConTeXt

I want to draw logic proof trees in ConTeXt. Specifically, I want to be able to draw trees like this: I am aware that there are nice ways of doing this in LaTeX, and that the question What is the ...
5
votes
4answers
3k 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: ...
7
votes
1answer
224 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 ...
5
votes
2answers
136 views

How to add whitespace after every item in a list in ConTeXt?

I have a document containing some questions. I need to leave readers space to write a few sentences as an answer. I am using this code: \startitemize[r] \item Where do most bears live? \item ...
6
votes
1answer
380 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 ...
5
votes
1answer
147 views

How to replace specific words with an underscore equal in length to the original word replaced in ConTeXt?

My problem is identical to Phantom and line break, however, I am using ConTeXt. I am creating a cloze test, e.g.: Frogs have four ____ and two eyes. The original text in the source appears like ...
2
votes
1answer
177 views

How to place text between two columns and which breaks the rule dividing them in ConTeXt?

I have two paragraphs of instructions and I need to indicate to readers that they have a choice of one or another. I am using this code, to put the data into different columns, with a line between: ...
4
votes
1answer
97 views

How to check if it is the first time or last time a macro has been used in ConTeXt?

I have some text in my document which appears repeatedly many times throughout the document, so I have defined a custom macro, e.g.: \define\mymacro{ \section{A} There is some text. ...
2
votes
1answer
352 views

How to create custom section titles with a “<title> <number>” format in ConTeXt?

I am making a book, with chapters titled "Week 1", "Week 2", "Week 3", etc., and sections titled "Activity 1", "Activity 2", "Activity 3", etc., and other sections titled "Presentation 1", ...
2
votes
1answer
96 views

How to install ConTeXt from CD-ROM?

I would like to prepare a current version of ConTeXt on a CD-ROM, so that it can be installed on Debian, in some emergency situation, i.e. when Internet access is unavailable. The typical installation ...
8
votes
1answer
510 views

How to add illustrations before chapter titles in ConTeXt?

I would like to add some TIFF format illustrations to my document. These have three features, though, which I do not know how to implement: These fill the entire page, ignoring margins. They appear ...
6
votes
1answer
712 views

Use .otf/.ttf in ConTeXt MKiV/LuaTeX

I would like to use an .otf Font for my document which I typeset in ConTeXt MKiV. Sadly I was not able to change the font. I set export OSFONTDIR="/usr/local/share/fonts;$HOME/.fonts and ran mtxrun ...
2
votes
0answers
118 views

How to snap the page dimensions to the grid in ConTeXt? [closed]

In ConTeXt, I am using the setting grid=yes to make all of the text in a document use grid typesetting. ConTeXt seems to automatically adjust the height of this grid based on the size of the font ...
5
votes
1answer
304 views

Creating a grid which fills available text area on a page in ConTeXt?

I have some pages containing only a small paragraph at the top and a large empty area where readers can add notes or draw, e.g.: _______________ | | | This is some | | text in a pa- | ...
11
votes
2answers
605 views

Status of TiKz with ConTeXt MkIV

Whats the recent status of TiKz support in ConTeXt MkIV? I'm asking because in pgfmanual 2.10 on page 25 it says: Note that pgf/TikZ is not supported by recent ConTEXt versions (like mark IV, the ...
9
votes
1answer
329 views

Discontinuous table rules in ConTeXt

How to set up a table with discontinuous horizontal rules? As an example I used a table from another answer: My table still lacks the interrupted rules. Another thing is the rule above “Total”. ...
6
votes
1answer
345 views

Align multi-line section head on the grid

What I want to achieve Align the first line of a multi-line section head on the grid and consecutive lines according to the baseline distance given in the font definition. The baseline distance of ...
4
votes
1answer
150 views

What is the proper way to format syntax within ConTeXt?

For some time, I have thought, perhaps mistakenly, that the precise placement or spacing around ConTeXt syntax was unimportant, e.g., under this assumption, all of these should produce the same ...
1
vote
1answer
198 views

Stack margin text in outer margin in ConTeXt Mk IV

I try to stack marginals with ConTeXt Mk-IV. In this question a possible solution was given. The solution works fine, but it turns out that the location=outer parameter does not work any more. Please ...
2
votes
1answer
486 views

How to combine characters with macron, acute, caron, and grave accents in ConTeXt?

I am using a font which does not contain all of the symbols I need. I have managed to use the information in this article about Adobe Glyph List For New Fonts, and have successfully added many ...
2
votes
1answer
194 views

How to center align entries in the table of contents in ConTeXt?

In my table of contents, part is defined like this: \setuplist[part][pagenumber=no] I would like to center align the title of the part, so it appears like this in the table of contents: ...
2
votes
1answer
141 views

What is the purpose of defining font synonyms and how are they accessed?

In ConTeXt, one can define a font synonym, as shown in this simple typescript example at the ConTeXt Wiki. In following the example given, I cannot see any way to access the individual levels. I can ...
5
votes
2answers
327 views

How to retrieve a value which is set later on in the document?

According to What is the recommended way to assign a value to a variable and retrieve it for later use?, in ConTeXt, one can use \setvalue{name}{value} to set a value and \getvalue{name}, to retrieve ...
4
votes
1answer
182 views

Stack margin text in ConTeXt

If I try the following in ConTeXt: \starttext text text\inmargin{this is a note.} text text\inmargin{Another note.} \input knuth text text\inmargin[stack=yes]{this is a note.} text ...
2
votes
1answer
105 views

Where to find a list of all system-defined counters in ConTeXt?

I learned from How to obtain the current page number in ConTeXt? that I can obtain the page number counter value using tex.count.pageno, but I have not found this mentioned in any available ...
7
votes
3answers
927 views

Font switch in ConTeXt mkiv

I am struggling to switch the fonts in ConTeXt accordingly and feel that I am missing something basic. I try to mimic \RequirePackage{fontspec} % Use Neo Euler as math font ...
6
votes
1answer
166 views

How to define a section title for volumes in ConTeXt?

I have a lengthy document, which must be divided into separate volumes. So that it can be compiled in one pass, the source file is organized like this: \starttext \startfrontmatter % this ...
6
votes
3answers
275 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, ...
10
votes
1answer
1k views

Are \def and \define the same in ConTeXt?

Is there any difference between defining a variable using \def and using \define, when used without a number inside square brackets, e.g. \def\somecommand{\percent} and \define\somecommand{\percent}? ...
4
votes
1answer
141 views

Does ConTeXt have a language code for Korean?

ConTeXt has various language codes, listed in this article at the ConTeXt wiki. I do not see Korean listed. I have tried \language[ko], and the document compiles, but I have no way to verify if it is ...
7
votes
2answers
599 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
1answer
523 views

How to vertically center content in ConTeXt?

I would like to vertically center my title page. I have tried code like this, but it does not work: \vfill \startalignment[center] Title \stopalignment \vfill I am using ConTeXt, so the ...
2
votes
1answer
111 views

How to make specific items only appear in recto pages in ConTeXt?

I would like for some items in my book to begin only on recto, or right-hand pages, such as, e.g.: The first page. The table of contents. The beginning of a \part. I believe such a configuration ...
3
votes
1answer
245 views

How to obtain the current page number in ConTeXt?

I want to obtain the current page number, for use in Lua conditionals, e.g.: \startlua if 10 <= \pagenumber < 20 then context("The pages are between 10 and 20") end \stoplua ...
3
votes
2answers
270 views

How to prevent words from running off the edge in ConTeXt?

I have a document containing columns 25 characters wide. I have set the language to US English, and some hyphenation appears, however, I have observed that in many places, scientific terms are not ...
4
votes
1answer
616 views

Why are all Heiti fonts appearing below the baseline in ConTeXt?

When using Chinese, heiti (黑体) fonts are the equivalent of sans serif. They generally have simple lines. I want to use a heiti font for all of the titles and description labels in my document, ...
2
votes
1answer
163 views

How to give different margin sizes for verso and recto pages in ConTeXt?

I am creating a simple page layout for a book, which should have 1 cm margins along the top, bottom, and edge, but leave 3 cm in the middle margin, where the pages will be glued together. ...
1
vote
1answer
139 views

How to display different text for a section's entry in the table of contents in ConTeXt?

In LaTeX, one can display different text in the table of contents, than what appears in the document, for part, chapter, and section titles using this: \part[This text will appear in the table of ...
1
vote
1answer
209 views

How to allow line breaks before the numbers in paragraph enumerations in ConTeXt?

I have some enumerated items, in paragraph form, like this: \setuppapersize[A5] \showgrid \setupitemize[text, r] \starttext \startcolumns[n=2] \startitemize \item This is a ...
3
votes
2answers
257 views

How to place a small table of contents in the footer in ConTeXt?

I would like to place a small table of contents in the footer in ConTeXt, which only shows the sections within the current chapter, but it does not appear. This is what I tried: ...
4
votes
1answer
219 views

How to adjust the position of entries in the table of contents in ConTeXt?

I have a table of contents defined like this: \setuphead[part][number=no] \setuphead[chapter][number=no] \setuphead[section][number=no] \setuplist[part][alternative=a, margin=0em] ...
6
votes
1answer
151 views

Why is a page break added at the end of a column set in ConTeXt?

I have a document containing some 1-column and 2-column passages, mixed, e.g.: This sentence has no column- s. This part of are balanced the document such that t- has two col- he lines are ...
2
votes
1answer
72 views

Why is a blank line added before a description environment when placed in a footnote in ConTeXt?

I would like to place a description environment inside a footnote, e.g.: \definedescription[descr][headstyle=normal, style=normal, width=3em] \starttext This is some ...
2
votes
1answer
642 views

How to create a PDF with two A5 pages placed on A4-sized paper in ConTeXt?

I am trying to create a PDF where the text is placed on pages of A5, but two A5 sheets are placed on one A4 sheet which is in landscape mode, e.g.: _______________ | | | | | ...
6
votes
3answers
182 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? ...