Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [context]

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.

0
votes
2answers
44 views

How to create 2 different PDF with the same Context tex source

Is it possible to make 2 (or more) PDF with the same source in Context ? For example, I want to write a booklet with some algorithmics exercise, and a booklet with the solution wrote in Python (and ...
1
vote
1answer
43 views

How to use fontawesome 5 with context?

I have installed mactex-no-gui and it contains context and fontawesome5. > sudo tlmgr install fontawesome5 Password: tlmgr: package repository http://www.pirbot.com/...
3
votes
2answers
68 views

What's wrong with \ifcase in my command?

I'm pretty new user of ConTeXt, for writing my courses. I've wrote a command to generate a titlepage. I want to pass some optionnal parameters. %#1 is used for cover color, %#2 is used for changing ...
2
votes
0answers
32 views

How to automatically search and assign a macro around items from a list in ConTeXt? [duplicate]

Suppose I have a document like this, in ConTeXt: \define[1]\mymacro{{\it #1}} \starttext This is some text. There are some key words in this text, but I need the code to automatically find ...
1
vote
2answers
93 views

How to classify and print only certain items from a register in ConTeXt?

I created many registers in my document like this, which lets me store vocabulary words, using \definevocabulary{word} and then call the list later with \placeregister[vocabulary]: \defineregister[...
0
votes
0answers
42 views

How to write Bangla and Arabic in ConTeXt?

Can anyone give me an example to get the following output using ConTeXt? One can copy and paste relevant text in their ConTeXt: \parindent 0pt \begin{document} এটা কিভাবে হবে? \\ \arab{مَا ...
2
votes
1answer
46 views

ConTeXt: Getting listofpublications to respect current narrower margins

It seems like placing a bibliography using \placelistofpublications does not respect the current margins set by \startnarrower. I can't seem to find the appropriate variable to insert into the margins ...
1
vote
1answer
45 views

ConTeXt: Line numbers in different margins in doublesided document

I'm numbering my lines in a double-sided ConTeXt Mkiv document like so: \usemodule[ipsum] \setuppagenumbering[alternative=doublesided] \starttext \startlinenumbering \ipsum \ipsum \ipsum \ipsum \...
1
vote
1answer
44 views

ConTeXt Standalone install with modules flag fails on Mac OS

I am trying to install ConTeXt Standalone on MacOS (Mojave, 10.14.5) using the instructions at Context Garden's Mac install page. Everything goes fine until the last big step. When I use sh ./first-...
3
votes
1answer
72 views

ConTeXt: How to suppress indentation after setup

Let's say I have a setuo foo, and I always want to suppress indentation for the next paragraph? Is there a way to achieve this? \startsetups foo FOO \stopsetups \setupindenting[yes,medium,next] ...
0
votes
0answers
33 views

Allow page break for many aligned equations (ConTeXt) [duplicate]

When there are many aligned equations so that they cannot fit the rest of the current page, page break is not allowed, and they always start at a new page, giving a lot of blank lines. How to allow ...
7
votes
1answer
89 views

Cannot “remember picture” with TikZ in ConTeXt

In an attempt to connect two inline nodes as I used to in LaTeX, I wrote the following code: \usemodule[tikz] \starttext \starttikzpicture[remember picture] \node (A) {Node 1}; \stoptikzpicture ...
3
votes
0answers
108 views

ConTeXt XML: Produce PDF and cleaned up XML

I have an XML file with some elements that should be typeset right-to-left. I use ConTeXt directives to change the typesetting direction. But our web viewer does not seem to like those injections. Is ...
6
votes
1answer
128 views

How to print only first n items in itemization in ConTeXt?

I am creating a random quiz in ConTeXt, using itemizations. I need to only show the first 10 items, and discard the rest, never showing them. \starttext \startitemize[n] \item This is the ...
3
votes
1answer
37 views

ConTeXt XML: Footnote references and footnote content

I am trying to process JATS XML with ConTeXt. One problem is how I can properly typeset the footnotes since in JATS XML footnote references and footnote content are not at the same location in the ...
2
votes
1answer
51 views

ConTeXt: How to remove italics from book title in APA?

If I want to modify the existing style APA on the fly and remove italics from the book title, what is the best way? This does nothing. \definebtx[apa:list:title:book][apa:list:title][style=]
2
votes
2answers
136 views

Times New Roman PS font not rightfully rendered by ConTeXT

I downloaded the Times New Roman PS font for using by ConTeXT (luatex). Running mtxrun --script font --list --all pattern=timesnewroman* gives me the following result: timesnewromanbold ...
0
votes
0answers
52 views

ConTeXt: Dynamically setting frame width around section using \structureuservariable

I would like to generate graphical sections (for poster/slides) where the section is bounded by a frame and the section title itself also has a graphic around it. However, I would like to generate ...
2
votes
1answer
36 views

How to divide paper up into smaller pages in ConTeXt?

I need to create some cards, of various sizes, cut from larger letter (8.5" x 11") pages. These are for putting in different sized pocket charts for displaying information in a classroom. All are ...
1
vote
0answers
87 views

Can a PDF show today's date, which changes when the file is opened, built in ConTeXt?

I have to share presentation slides with a co-worker. They are created daily in ConTeXt. Throughout the slides, I have placed \date, which is an important part of the slides, but that is the date ...
1
vote
0answers
50 views

ConTeXt project structure: Component not linking to environment via product

Following the ConTeXt documentation enter link description here I should be able to use this project structure. test.tex \startproject * \environment test_env \product test_prod \stopproject ...
1
vote
1answer
65 views

ConTeXt Project Structure: Add metadata to component

I am setting up a project structure for a new journal and I want to use a structure like the one in this answer. However, instead of using document:start I tried \startsetups component:start, but no ...
0
votes
0answers
48 views

ConTeXt fails to display `` correctly? [duplicate]

Instead of turning `` into quote marks, ConTeXt just outputs individual backticks. This occurs whether or not typescripts are used. However --- properly outputs as an em-dash and so on. How do I get ``...
0
votes
3answers
59 views

Line breaking for ConTeXt `\type`

[Edit: What I wanted is a clickable url, or if impossible, at least a nicely wrapped url in mono font, but the original wording is somewhat vague.] In ConTeXt, when using \type for verbatim text (as ...
6
votes
1answer
46 views

How to place enumerations in rows, not columns in ConTeXt?

Similar to the LaTeX answer in left-to-right itemize in multicols environment, in which \usepackage{tasks} is used, I want to place itemizations in rows, like this, but need a ConTeXt solution: a. ...
1
vote
1answer
36 views

How to only \include as much data as fits on a single page in ConTeXt?

I need to \include data from several different files, showing the contents of each file on a separate page (e.g. file1.tex on page 1, file2.tex on page 2), but cut off any extra data if the contents ...
0
votes
2answers
61 views

How to include all files in a directory in ConTeXt?

I need to include a large number of files in my ConTeXt document: \starttext \include file1 \include file2 \include file3 \include file4 \include file5 \stoptext They are all ...
2
votes
3answers
76 views

How to globally set the font for all MetaPost drawings in ConTeXt?

When I add labels to MetaPost drawings in ConTeXt, it does not use the fonts for the rest of the document but appears to be using either a math font or the default fonts used by ConTeXt. I can set the ...
3
votes
1answer
46 views

Why can't this MetaPost drawing be placed more than once in ConTeXt?

I used the code at How to conditionally draw parts of a MetaPost drawing in ConTeXt? to display a crossword puzzle. The code works great, until I try to display another crossword puzzle, at a later ...
6
votes
2answers
101 views

ConTeXt: MetaPost graphic in overlay setups shifts between pages

Background A line is being drawn using MetaPost on an overlay, which is used as the background for a framed layer. The layer is embedded within a setups so that a dot's position on the timeline is ...
2
votes
2answers
88 views

How to conditionally draw parts of a MetaPost drawing in ConTeXt?

The basis of my problem is I am making a 14x14 crossword puzzle, I have the data for each of the 196 cells from an outside document, but need only the cells with text inside to have borders. I tried ...
2
votes
1answer
51 views

How to scale MetaPost drawings with consistent line width and label text size in ConTeXt?

I am using MetaPost to create some simple drawings in a ConTeXt document. In this example, I have a row of 14 boxes: \startMPcode draw (0,0)--(100,0)--(100,100)--(0,100)--(0,0); draw (100,0)--...
4
votes
1answer
60 views

How to stop MetaPost drawings from overlapping on different lines in ConText?

I have an itemized list. On several lines there are some boxes, drawn in MetaPost. I used \inframed[location=line] to make them vertically centered on the line. The problem is, they are overlapping ...
4
votes
1answer
118 views

Is there any alternative for tcolorbox in Context?

I am planning to move to Context, however, the fact that I'll miss some of LaTeX packages (especially tcolorbox) feels sad. That's why I asked such a question.
2
votes
1answer
58 views

Is there a simple way to create a cross-shaped array in ConTeXt?

According to https://en.wikibooks.org/wiki/LaTeX/Mathematics#Matrices_and_arrays, the following code creates an array that has a cross-shape, with four items centered in each quadrant. \begin{array}{...
5
votes
1answer
57 views

ConTeXt: text to the left of a numbered displayed formula

I read in an old style manual (Sättningsregler, by Lansburgh) that suggests to set short word(s) separating two displayed formulas (if there is space) to the left of the second displayed formula, as ...
4
votes
0answers
45 views

Break down a bibliography in Context according to category of item

A requirement for a memoir that I am typesetting (for a friend), using Context, is to separate the bibliography into several sections according to the category of the item (textbook, legal text, etc.)....
5
votes
1answer
81 views

How to activate font fallbacks on typefaces in ConTeXt?

This is a follow-up to my previous question about setting the tt font in mathtt. As Henri Menke stated in a comment using typefaces should be preferred over font families. So I tried to convert the ...
4
votes
1answer
78 views

How to use tt font in mathtt in ConTeXt?

When using a specific mono font in ConTeXt I want to have this font as \tt font which should also affect \mathtt. So how can I use my main tt font as math tt font? MWE: \definefontfamily [test] [rm] ...
1
vote
0answers
42 views

Display book page number in ConTeXt APA style bibliography

I am using APA style for my bibliographies (better covering of @film entries than APS). In French humanistic bibliographies, the page number of a book is often required. I saw on this TEX S.E post a ...
6
votes
1answer
159 views

ConTeXt: Complex multicolumn layout

Background Looking to achieve a fairly complex layout from a Markdown source document. The layout resembles: Code \usemodule[newcolumnsets,visual] \setuphead[chapter][ header=empty, footer=...
2
votes
0answers
98 views

ConTeXt marginal images and notes

I am writing a Textbook with much marginal notes and even images in the margin to explain words. I think it works best to use consequently the same command for text and images: \margintext. I want ...
4
votes
2answers
71 views

ConTeXt: Matrix inside startalign/stopalign changes specified column alignment

Example: \starttext \startformula \startalign[n=2,align={right,left}] \NC x \NC = a ~ long ~ sequence ~ of ~ terms \NR \NC y \NC = ok ~ left \NR ...
2
votes
1answer
79 views

Context images / figures and linenumbering

When typesetting a document with linenumbering, I get heavy problems with images. The linenumbering becomes a mess. What do I do wrong? Here is an MWE: \setuppapersize[A5] \setupexternalfigures[...
3
votes
0answers
46 views

Context bibliography formatting problem

In the bibliography produced by Context MKIV the pages are suddenly in parentheses, but it was not like that a week ago. \setuplanguage[en] %\setupbackend[export=yes] \mainlanguage[english] \...
3
votes
1answer
57 views

Use one font for `\mathcal`, but another font for general math (ConTeXt)

I want to use (for example) Tex Gyre Heros Math for \mathcal, but (for example) Tex Gyre Pagella Math in general for mathematics. (Why did I want to do that, because Pagella's \mathcal seems quite ...
3
votes
0answers
78 views

Bibliography: what is the correct way to setup and invoke the category 'electronic'

Short question: What is the correct way to setup and invoke the bibliography mecanism in context, to use, for example, the category electronic? Long question: Looking at context documentations and ...
1
vote
1answer
36 views

ConTeXt: Line Break for chinese characters

I automatically generate documents in which users can input any kind of text. If the user enters chinese characters the text overflows and no line break is occuring. How can I prohibit the text ...
3
votes
1answer
63 views

ConTeXt: Preformatted text inside tables

I want to insert preformatted text into a table. I tried to accomplish this with \startlines but the command shows no effect in tables. It is possible with \break but this is no real solution. How ...
2
votes
2answers
63 views

Alternative of `\rule` in ConTeXt for lifting `\hat` slightly up

In ConTeXt, I want to lift a \hat slightly up, since \hat is too low and touches the variable. Now, this post is exactly what I want. It suggests: \hat{\rule{0ex}{1.2ex}\mkern-3mu x}_{t+1} However, ...