Tag Info

1

ConTeXt does not define any relative font size smaller than xx. Although you can define new relative font size switches; if you need a smaller fontsize just for visual counter, you can use style={\switchtobodyfont[5pt]} to scale to absolute font size.

1

I do not use the project-product-component structure, so I am not 100% sure what is the right solution. But you have two possibilities: Change the structure as follows: Product.tex: \startproduct * \environment env \component test \stopproduct components/test.tex: \startcomponent * \environment env This is a test \stopcomponent Add a project file: ...

5

Here is a real-world example. I am an academic and I write my grant proposals using ConTeXt. The formatting guidelines are relatively simple (use this font, set these margins, and that's about it). I usually submit to two funding agencies, FRQNT and NSERC, and they have slightly different formatting instructions. Occasionally, I also write a generic proposal ...

4

When defining fonts, you can use sa to specify relative font sizes. For example: \definefont[sectionfont] [name:freakyfontname sa 2] creates a font that is two times the default fontsize. Say, you want the section titles to be twice the bodyfont size, then you can use: \definefont [sectionFont] [name:comicneueangularbold sa 2] \setuphead[section][style=\...

2

Here is a complete example showing how to having old style numbers in the running text and proportional numbers in tables: \definefontfeature[default][default][onum=yes] \definefontfeature[lnum][onum=no, lnum=yes] \setupbodyfont[modern] \starttext 12345 \startTABLE[style=\addff{lnum}] \NC 12345 \NC 67890 \NC \NR \stopTABLE \stoptext

5

\setupfontfamily[serif][DejaVu Serif] \setupfontfamily[math] [Minion Math] \starttext $y=\int_1^ 4 x^2 dx$ \stoptext

3

I solved the issue by installing SciTE from the original website (link). I copied the lexer add-in and the settings instructed, but I also had to create a batch file with the following instructions: rem Use to start SciTE for ConTeXt @echo off c: cd C:\context\tex call setuptex cd C:\wscite start scite.exe %1% Note that you can change the path for context ...

1

To align the itemize symbol in the middle of the line, you could use the plain-TeX-inherited \vcenter. \startuseMPgraphic{itemize:triangle} save p; path p; p := ( (0,-0.5) --(0,0.5)--(0.5,0)--cycle ) scaled ExHeight; fill p withcolor red; \stopuseMPgraphic \definesymbol[itemize:main][\vcenter{\hbox{\useMPgraphic{itemize:triangle}}}] \setupitemize[1][...

0

Unfortunately, the circuitikz module does not acknowledge a plain european option. It rather takes a key=value list, akin to \ctikzset. Therefore, to obtain the european resistor, one has to pass resistor=european to the module. Also, you have to load the tikz module before circuitikz or the keys will no be parsed (I guess they are being silently ...

2

I don't know what happened in the meantime, but the issue is definitely fixed in ConTeXt MkIV distributed with TeXlive 2016, see below.

0

Partial solution for XML export In the case of information retrieval, @DavidCarlisle advised me to take a look at LaTeXML. On the website of the project I have found a link to an outdated experiment on exporting ~730k scientific preprints from arXiv.org into XML format. This experiment ended in 2013, but at that moment Result count % ---...

5

I'm a little hesitant to post this as I'm not sure how adaptable it would be to your case, but with the hope that it might point you in the right direction, here it is. I have been developing a system that allows me to write documents using LaTeX and writes output files as text files in a variety of formats. My current primary use-case is to output HTML5 ...

11

I don't know what was the original reason why Hans Hagen used \NC instead of &. In the original table macros, there was also \VL for vertical rule \HC for "hook" column, etc. So, perhaps it was introduced to have a consistent syntax. But, I find it most useful because it allow for a very clean separation between content and style. And, I don't mind ...

2

Use \restoreglobalbodyfont: \starttext \tf A quick brown fox \par \tfc A quick brown fox \par \restoreglobalbodyfont A quick brown fox \par \tfb A quick brown fox \par \restoreglobalbodyfont A quick brown fox \par \tfa A quick brown fox \par \restoreglobalbodyfont A quick brown fox \par \stoptext Source: https://mailman.ntg.nl/pipermail/ntg-context/...

5

xtable are buffers: if you want to embed xtables use \startembeddedxtable instead of \startxtable: \starttext \doifundefined{undefined}{% \startembeddedxtable \startxtablebody \startxrow \startxcell cell \stopxcell \stopxrow \stopxtablebody \stopembeddedxtable } \stoptext Other option is set a mode if a command is undefined and process ...

7

The list of all options to various commands are described in The ConTeXt Commands This list is auto-generated and only lists the options without any description. It is also available for the different language interfaces: Dutch, German, Czech, Italian. The Command Reference on the ConTeXt wiki contains a similar list. This list is not exhaustive, but ...

3

You can use combination of a font switch the character spacing to change the appearance of the em-dash. In the first step you create a separate typeface with a compressed em-dash. \definefontfeature[russian][extend=0.8] \definefallbackfamily [russianfont] [rm] [DejaVu Serif] [range={0x2013,0x2014},force=yes,features=russian] \definefontfamily [...

2

This also removes the burden of typing different em-dashes for different situations. You just type --- or — (unicode em-dash) and it will adjust depending of the position. \usemodule[translate] \translateinput[---][—] \define\cyrdashsymbol{\dontleavehmode\scale[sx=0.80]{---}} % cyrillic dash sign \unexpanded\def\cyrdash{\ifincsname\string—\else \ifvmode\...

3

One option is to have language specific hspace: \define\cyrdash{\dontleavehmode\scale[sx=0.80]{---}} \setuplanguage [ru] [midsentence=\cyrdash, leftsentence=\cyrdash, rightsentence=\cyrdash] \definehspace [emdash] [\zeropoint] \definehspace [ru] [emdash] [2cm] % Exaggerated, for visualization. \definetextmodediscretionary < {\...

4

You can automate the placement of the notes with the combination of the layer mechanism the \setupparagraphintro command. \setuppapersize[A4,landscape] \setuplayout [width=18cm, rightmargin=6cm] \setupnote [footnote][location=text] \setupnotation[footnote][numbercommand=,alternative=serried] \definelayer[notelayer][width=\paperwidth,height=\...

14

In ConTeXt, one option is to export your document as XML. You can then manipulate the resulting XML document using standard XML tools in your favourite programming language. As an example, consider this example: \setupbackend[export=yes] \setupinteraction[state=start] \starttext \startsection[title={Test of export}] This is to test how \CONTEXT\ export ...

4

This was answered on the ConTeXt mailing list. There is a new mechanism that can be used to underline text: \starttext test {\red\underrandoms{test me}} and \underrandom{test} or \underrandom{grep} \blank test {\red\underdashes {test me}} and \underdash {test} or \underdash {grep} \blank test {\red\underdots {test me}} and \underdot {test} or \underdot ...

Top 50 recent answers are included