New answers tagged

1

Just define the whole conversion in Lua. \starttext \startluacode local function myfunction(n) local t = { "<3", "!", "\\math{\\therefore}", "?" } return t[n] end interfaces.implement { name = "myfunction", actions = { myfunction, context }, arguments = "integer", } \stopluacode \unprotect \def\myfunction#1{\clf_myfunction\numexpr#...


1

For the record, as @Dave Jarvis mentioned frames do the job. \startuseMPgraphic{MPBox} draw OverlayBox withpen pencircle scaled OverlayLineWidth withcolor OverlayLineColor; setbounds currentpicture to OverlayBox ; \stopuseMPgraphic \defineoverlay[MPBoxOverlay][\useMPgraphic{MPBox}] \defineframedtext[MPBoxFramed] [ ...


6

a bit digging on the context mailing list excavated this syntax which seems to do color mixing. But the exact rules are a bit unclear and it would probably be a good idea to ask on the context mailing list if this syntax is still supported and where it is documentated: \setupcolors[state=start] \usemodule[tikz] \definecolor[ColorA] [1.0(red)] \definecolor[...


6

Here is a minimal example: \setupbackend[export=yes] \starttext Here is a sample of a math document which has some random $x = a + \sqrt{\frac{1}{2}}$ inline math and some random display math \startformula A = B + C + \frac{A}{B} + \binom{C}{D} \stopformula \stoptext Let's say this is called test.tex. When you run context test.tex, you will get a ...


1

\setupexternalfigures[directory=<PATH>], which works also to \copypages and \insertpages. Wolfgang Schuster's comment solves the problem. According to ConTeXt garden wiki you can specify: location: where to find figure files: global: search path specified with the 'directory' key local: search in the current directory default: search ...


1

I was able to figure out an answer thanks to Wolfgang Schuster. As I mentioned in a comment on the question, the pagecolumns source code is located in page-pcl.mkiv. In that code, the \stoppagecolumns macro has two implementations, \page_col_stop_yes and \page_col_stop_nop. The choice of which implementation is used is determined by which of two ...


0

\setupdirections[bidi=global,method=one] Source: https://wiki.contextgarden.net/RTL


3

None of your examples work because ConTeXt allows only a few certain argument types for the \useMPgraphic etc. commands. Only the following three argument type for a key are possible: The name of a color, a number or a valid dimension. In your example you never pass a valid argument to the symbol key which result in the error message.


5

The problem in your example is how you set the value for the right margin of the page. When you use width=fit ConTeXt calculates the space with the values of the rightmargin and rightmargindistance which leaves no space between the margin area and the page border. \setuppapersize[A4][A4,oversized] \setuplayout [width=fit, rightmargin=60mm, ...


Top 50 recent answers are included