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.

Filter by
Sorted by
Tagged with
1 vote
1 answer
37 views

ConTeXt: XML processing and buffers

Knowing that buffers and macros don't play well together, I started with the Verbatim XML guide from the wiki. However manipulating the catcode table is insufficient when trying to pass xmlflush into ...
  • 163
2 votes
1 answer
53 views

How are sections rendered in ConTeXt?

Trying to wrap my head around section rendering. The following \defineheadalternative [fullpage] [ alternative=somewhere, renderingsetup=headrenderings:fullpage, ] \startsetups[...
  • 163
3 votes
1 answer
100 views

How to prevent newlines from appearing after enumerations in ConTeXt?

I am trying to place three columns of information after enumerations in ConTeXT, like this: 1 text | more text | yet more text 2 text | more text | yet more text 3 text | more text |...
  • 12.7k
1 vote
1 answer
44 views

Why is this code not giving me custom enumerations in ConTeXt?

I am trying to make some enumerated items in ConTeXt appear with a small section of underline, instead of the bullet point. Here is my attempt, but no matter how many combinations I try, I cannot get ...
  • 12.7k
3 votes
3 answers
193 views

MetaFun: Align "bounding box" of strings of different length

I'm currently getting into ConTeXt, mainly to experiment with MetaFun. I want to get a feeling for how usable it would be to generate some sophisticated diagrams I have in mind. I have a hard time to ...
  • 155
3 votes
1 answer
65 views

ConTeXT: Two pages only background for an head

In order to finish my whole background series, I am trying to figure out how to set the background for only the first two pages of heads (part, chapter, whatever). Here is an example I found from a ...
  • 879
1 vote
1 answer
32 views

mtxrun can't locate '/usr/share/texmf-dist' not found, unknown 'mtx-context.lua' or 'mtx-mtx-context.lua' scripts [closed]

Running Ubuntu 20.04, I can't get ConTeXt to work. I have the distro version and installed the latest version from the contextgarden. I have scoured the StackExchange for answer, to no avail. If I do: ...
  • 21
1 vote
1 answer
67 views

Spread graphics on multiple pages with MetaFun in ConTeXt

I am currently refactoring my document and notice many MetaPost graphics that I would like to draw bigger, typically on two pages without any layout borders. Is there an easy way to do that in ConTeXt?...
  • 879
2 votes
2 answers
46 views

ConTeXt: Required environment variables in fish shell

I installed ConTeXt according to the docs on my Linux machine and added the binary to my path, so I can run context from everywhere. If I do so I get the following errors: mtxrun | forcing ...
  • 155
2 votes
0 answers
68 views

ConTeXt LMTX: How to use the RSFS font?

I try to use RSFS font with ConTeXt LMTX (2022.09.11 20:44) and get nowhere. From the wiki: \starttypescript [math] [modern,computer-modern,latin-modern,ams] [size] \definebodyfont [17.3pt,14.4pt,...
  • 879
4 votes
2 answers
87 views

ConTeXt: How to change the background color of a whole section level?

Following instructions here, I have a new section mysection. On this new section I want to apply a background created with MetaPost; for the sake of the question let's say this background is simply \...
  • 879
3 votes
1 answer
78 views

ConTeXt: Add a proportionality arrow to a table

I am trying to generate proportionality tables, like this one: From this answer I know it is possible to change background of a cell, so I tried to change the background of the last column. The ...
  • 879
1 vote
1 answer
48 views

How to add support for another language (German) to the Words conversion in ConTeXt?

I would like to implement support for another language (German) for the conversion methods words and Words for converting numbers to words in ConTeXt. Having read the answers to this question I ...
  • 661
1 vote
0 answers
84 views

ConTeXt : how to get dingbat glyphs?

I am trying to use symbols, as explained in this wiki page, but I can't get the glyphs I want. For instance, the wiki page says in the "Predefined sets" section there is a unicode set uni : ...
  • 1,005
2 votes
1 answer
52 views

ConTeXt LMTX causes compilation error when using \lineheight

Following up on another question, I recently installed the new LMTX version of ConTeXt (having worked with MkIV up to now) and found that this solved a few problems. However, the new version seems to ...
  • 661
3 votes
0 answers
65 views

When to use palets over color definitions in ConTeXt?

In the Coloring ConTeXt manual, there is a small section about color palets. When looking at it one can reads Color palets are handy when you want to use a set of (named) colors but also want to ...
  • 879
2 votes
0 answers
40 views

How to resample (downsample) images while taking their actual size into account in ConTeXt?

I am currently typesetting a textbook and would like to implement a mechanism that allows me to resample images to exhibit a specific resolution, relative to their final size (mostly for the sake of ...
  • 661
3 votes
1 answer
97 views

How to use the `\hyphenation` command in ConTeXt to add further definitions?

As a follow up to another question I would like to ask for help with the \hyphenation command. The following MWE illustrates the problem: \defineframedtext[secondary][ frame=off, leftframe=on, ...
  • 661
0 votes
1 answer
44 views

How to globally prevent hyphenation of a specific word in ConTeXt?

This question has been asked a few times for LaTeX (e.g. here) and I remember vaguely that I read somewhere that the technique is basically the same in ConTeXt. Alas, it doesn't seem to work too well. ...
  • 661
1 vote
1 answer
44 views

ConTeXt: Undefined control sequence \math_fenced_x_middle

This code example \startformula E=\fenced[brace]{x\in\naturalnumbers \mid 0<x<\infty} \stopformula should produces . Unfortunately, with ConTeXt LMTX (2022.08.25) I only get the following ...
  • 879
1 vote
1 answer
63 views

ConTeXt LMTX – incorrect spacing inside mathalignment

Please consider the following MWE – \starttext \startformula \startmathalignment \NC f(x) \NC = x_0 \NR \NC y \NC = x_0^2 \NR \stopmathalignment \stopformula \stoptext which produces the following ...
0 votes
0 answers
19 views

Issue with table in ConTeXt (part 2) - non compiling code [duplicate]

This code is the smallest not compiling. Any thoughts? Thanks! \startplacetable[ title={Metric prefixes}, reference=u0:prefixes, location=middle ] { \bTABLE \setupTABLE[column][1][...
  • 21
2 votes
1 answer
65 views

An issue with tables in ConTeXt

I have an issue while building a table with \bTABLE \eTABLE. After 14 rows, each with 6 columns, I get the following error: luatex warning > nodes: node 53798 has an attribute list that is free ...
  • 21
7 votes
2 answers
230 views

Strange mod operator behavior in metapost

I am currently facing a strange behavior of the metapost mod operator. Here is a simple piece of code: \startMPcode for x = 0 step .5 until 10: if (x mod 1) = 0.5: label.top(x, (x*cm, 0cm)) ;...
  • 879
4 votes
1 answer
81 views

ConTeXt LMTX: mathalignment does not work properly

The following piece of code \starttext \startformula \startmathalignment[n=9, align={middle,middle,middle,middle,middle,middle,middle,middle,middle}] \NC x^{2}y^{2}-xy^{2}-x^{2}y+xy \NC = \...
  • 879
2 votes
1 answer
38 views

ConTeXt: rounded corners table-cells mismatch rectangulars height

When using rounded corners for some TABLE cells with the following setup \setupTABLE[row] [each][background=color,align={middle,lohi},offset=.75ex,frame=off] \setupTABLE[row] [first][backgroundcolor=...
  • 879
2 votes
1 answer
30 views

Localize xtable continued conversion label

I'm having this setup. \mainlanguage[ru] \setupfloat[table][default={here,split}] \setupfloatsplitting[conversion=continued] and a table itself like: \startplacetable[title={Список модулей}] \...
1 vote
1 answer
53 views

Using a narrow font in ConTeXt

I read up a bit on fonts: https://wiki.contextgarden.net/ConTeXt_distribution%27s_Fonts https://wiki.contextgarden.net/Font_Switching https://wiki.contextgarden.net/Command/setupbodyfont According to ...
  • 145
2 votes
1 answer
66 views

ConTeXt: Replace matching substring with macro output

Background Looking to replace a string within a document with an equivalent string created using a macro. For example, I'd like to replace "McAnulty" with "\Mac Anulty". Problem ...
  • 11.1k
4 votes
1 answer
78 views

ConTeXt: how to use multiple units simultaneously

The goal is to print something like 1 h 20 m 56 s using units module and more specifically the \unit{ } command. I know it is possible to use unit macros like this: 1 \Hour 20 \Minute 50 \Second but ...
  • 879
0 votes
1 answer
61 views

ConTeXt from TeXLive 2021 says unknown script 'context.lua' or 'mtx-context.lua'

I installed texlive 2021 with ConTeXt on gentoo linux. $ context --version mtxrun | unknown script 'context.lua' or 'mtx-context.lua' mtxrun --generate doesn't fix anything. After export ...
  • 1
3 votes
0 answers
46 views

Translate literal words for the \convertnumber command

I need to get a verbal form of simple numbers \mainlanguage[english] % english spanish - works % danish dutch - doesn't work \setupbodyfont[dejavu] \starttext The current ...
2 votes
1 answer
36 views

Sequential chapter numbering by text

The structure of my document consists of parts and chapters. When a new part is added a chapter counter is reset and a chapter numbering starts from 1 again. \setuphead[part] [ page=no, ...
1 vote
1 answer
60 views

ConTeXt: String substitution to include macro

Background A Markdown document uses certain strings that are to be typeset in a special way. In this case, we'd like to typeset a.m. and p.m. as small caps wherever that text appears in the source ...
  • 11.1k
2 votes
1 answer
60 views

ConTeXt failed with units module

I update ConTeXt regularly. unfortunately units module does not work. \usemodule[units] \starttext 50 \Milli \Meter. \stoptext log file : resolvers | formats | executing runner 'run luametatex ...
  • 1,414
1 vote
1 answer
53 views

Setup a distance between columns in tabulate for ConTeXt

I need to create a simple block showing recipe content. A tabulate seems as the easiest way to do that. Below is an example of what I mean \starttext \def\leaderfill{\leaders\hbox to 0.3em{\hss.\hss}\...
2 votes
1 answer
78 views

ConTeXt: Syntax highlighting of source code within XHTML documents

Background Looking to apply syntax highlighting to source code snippets embedded within XHTML code elements, demarcated with a class attribute to indicate the language. Using: mtx-context | ...
  • 11.1k
2 votes
1 answer
49 views

Context: Remove Blank Line Below Sub-Section

I'm learning how to use Context, and I'm having trouble creating a sub-section heading without a blank line underneath it. I'm using a baseline grid and want to continue to do so. Is there a way to ...
1 vote
1 answer
55 views

ConTeXt - weird vertical alignment in multicolumn enumeration

When I type math in a multicolumn enumeration, there is a gap in vertical alignment if I use fractions or matrices. \startitemize[ columns, three] \item $\frac{x^2-4}{\sqrt{x}-\sqrt{2}}$ \item ...
4 votes
1 answer
55 views

How can I pull a specific set of characters from another font in ConTeXt?

I'm using ConTeXt to typeset a long document, and I'm using the libertinus font. However, \mathcal{A} produces 𝒜 rather than a calligraphic 'A', like it does with other fonts. I can get a good ...
  • 51
2 votes
2 answers
77 views

ConTeXt: Set up external figure for particular image type

Background A document has a mix of SVG and PNG images. Problem Changing the parameters for \setupexternalfigure affects both SVG and PNG images. Code Consider the following code: \setupexternalfigures[...
  • 11.1k
2 votes
2 answers
168 views

An oval surrounded a *long text* inside in TikZ [equivalent cover background of METAFUN]

I need to put long text in an oval like this: I try to put a simply text inside an oval, but it does not work (the text overflows the oval). So I guess I need an oval around a text. I have this code ...
2 votes
1 answer
76 views

Defining a new section with ConTeXt

I'm very new to ConTeXt. How can I create my own "mini section", about the size of a paragraph but not as big as a part? I want the first word in this self-defined section to begin with a ...
  • 21
0 votes
0 answers
55 views

ConTeXt with TeXworks

I just downloaded a recent distribution for ConTeXt. I also have TeXworks installed on my Windows laptop. Can anyone give me a step-by-step guide on how to set up the TeXworks editor to compile ...
  • 21
1 vote
0 answers
77 views

Get page edges coordinates in Metapost and ConTeXt

I have written several macros for my projects using TikZ. Several of them need to be aware of the page edges and margins. For example, this is a small macros I have written to draw rectangles from the ...
1 vote
1 answer
59 views

Pass text from console to context

I want pass text from console to context, like this echo "\starttext Hello, World! \stoptext" | context - but this does not work. It seems that context just could be invoked against a file (...
0 votes
0 answers
38 views

Simplefonts module issue with texlive 2022 (context)

With old versions of texlive I had no problem with simplefonts module but after installing the new version (texlive 2022) errors appears when adding the module tex error > tex error on line ...
  • 16.1k
4 votes
2 answers
125 views

ConTeXt: Text wrapping around images with complex outline

I'm a very beginner on ConTeXt, coming from Scribus and InDesign. I would like to know if is it possible to get a text flowing around an image with complex/winding border on ConTeXt as in the images ...
1 vote
0 answers
58 views

Small caps italic as a separate font in LMTX

I have a font that has small caps and small caps italic as separate font files. What I have now: \starttypescript [sans] [dtl-documenta-sans-t] \definefontsynonym[Sans] [name:dtldocumentasanst][...
  • 529
3 votes
0 answers
97 views

Grid layout offset adjustment and non-uniform columns in LMTX

I'm trying to emulate the style of Jean-Luc Doumont's presentation. Here is his slide, with a grid overlay (please open in a new window of image viewer as the gridlines are hard to see on tex....
  • 529

1
2 3 4 5
35