Re: [NTG-context] Can I use \starthangaround?

2022-12-01 Thread Wolfgang Schuster via ntg-context

peter.hopcroft--- via ntg-context schrieb am 01.12.2022 um 04:15:

\starthangaround is mentioned in these context garden wiki pages:
https://wiki.contextgarden.net/CD_Booklet
https://wiki.contextgarden.net/Unexpected_behavior

When I try to use examples from these pages I get an error that 
\starthangaround is undefined. It isn’t in any of my context installation 
files, including cont-new.tex. I'm using LMTX, installed a few days ago.

Is it possible for me to use \starthangaround ?


The environment was renamed a few years ago to \starthanging.

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Why are my captions overlapping next text in combinations?

2022-11-26 Thread Wolfgang Schuster via ntg-context

Joel via ntg-context schrieb am 25.11.2022 um 23:25:

I have some combinations used throughout my document like this:

\starttext
\startcombination[4*2]
            {%
 \framed[width=.25\textwidth, height=.25\textwidth]{}%
 }{%
                \strut word \\ \thinrule\hairline\hairline%
         }%
        \stopcombination
    \input knuth

\stoptext

This makes a box, then displays a word underneath, and then some blank 
lines.


The problem I'm having is many times the caption text is covering up 
whatever appears after. In this minimal example, I tried showing the 
problem, but somehow this is rendering find, not covering the \input 
knuth text.


Also, if I add more more items to the combination, the second row 
appears above the first row!


My document is rather complex, so I couldn't find a way to simplify it 
enough to get a minimal example to reveal the problem that is appearing.


Any ideas what might be causing the caption text to overlap and cover 
whatever appears after it?


Do you other combinations also pass wrong values for the number of rows 
and columns like in your example above?


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] \setupmathematics oddity

2022-11-20 Thread Wolfgang Schuster via ntg-context

Alan Bowen via ntg-context schrieb am 18.11.2022 um 23:48:

The following
\setupmathematics[autopunctuation={all,semicolon}]
%\setupmathematics[autopunctuation={all, semicolon}]
%\setupmathematics[autopunctuation={all,semicolon,colon}]

\starttext
\startformula
0,0;2,0,35,17,40,41\textdegree{} \cdot 365;15 \cdot 40 = 
2,9;23,14\textdegree{}.

\stopformula
\stoptext

works as it should (no space after the “;” or the “,”).

With the second and third versions of \setupmathematics there is an 
unwanted space after each punctuation mark.


Even though it seems like the autopunctuation key accepts a list of 
values this isn't the case
at the moment. Only values from the following list are valid arguments 
for the key:


- yes
- no
- all
- comma
- yes,semicolon
- comma,semicolon
- all,semicolon

The reason for this is that values like "all,semicolon" are treated as 
keyword and the comma
is part of the keyword, this means you can't change the order of the 
words and even spaces

after the comma make the argument invalid.

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Do environment files add implicit \starttext ... \stopttext

2022-11-18 Thread Wolfgang Schuster via ntg-context

Pablo Rodriguez via ntg-context schrieb am 15.11.2022 um 16:06:

On 11/15/22 13:22, Denis Maier via ntg-context wrote:

Hi,

if I process an XML buffer, I’ve noticed I need to wrap the
\xmlprocessbuffer in a \starttext ... \stoptext pair.
[]
However, if I have the XML and the setups in dedicated files, there
seems to be no need for \starttext ... \stoptext.
[]
Therefore my question:

Does the use –environment automatically wrap the processed file in
\starttext ... stoptext ?

Hi Denis,

try a source file with this contents:

   \ConTeXt\ is great.

with the following environment:

   \setuppapersize[A6]
   \setupbodyfont[pagella]

It looks like when --environment is used, ConTeXt assumes that the main
source only contains text. Which makes sense (at least, to me).


The reason why this does work has nothing to do with the environment 
file, the only
thing which is responsible to get a PDF with output is the 
\setupbodyfont line.



Better examples are

 begin example 1
\CONTEXT\ is great.
 end example 1

and

 begin example 2
\setupbodyfont[modern]

\CONTEXT\ is great.
 begin example 2

where the output of the first example is broken.


To ensure the document exists in a proper manner ConTeXt inserts \stoptext
at the end of the document but there is never a \starttext inserted at 
any point

when you process a regular tex file.

You should also notice a message like

    system  > invalid \starttext ... \stoptext structure

on the terminal.

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Do environment files add implicit \starttext ... \stopttext

2022-11-16 Thread Wolfgang Schuster via ntg-context

Denis Maier via ntg-context schrieb am 15.11.2022 um 13:22:


Hi,

if I process an XML buffer, I’ve noticed I need to wrap the 
\xmlprocessbuffer in a \starttext ... \stoptext pair.


[...]

However, if I have the XML and the setups in dedicated files, there 
seems to be no need for \starttext ... \stoptext.


[...]

Running

context text.xml –environment=setups.tex

gives me a proper PDF without errors.

Therefore my question:

Does the use –environment automatically wrap the processed file in 
\starttext ... stoptext ?


If not, what’s the reason for this behaviour? Am I missing something?



ConTeXt uses the file extension to decide who it should handle document,
in your case the extension is xml and the file is processed as

\starttext
\xmlprocess{main}{...}{}
\stoptext

The same thing happens when you have CLD document and use cld as file 
extension.


For more details you can look at the processjob function in cont-run.lmt.

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] \definemeasure / \dimexpr

2022-11-13 Thread Wolfgang Schuster via ntg-context

Henning Hraban Ramm via ntg-context schrieb am 13.11.2022 um 11:37:
One problem left with dimensions that I can’t reproduce in a minimal 
example:


I want to calculate the spine width of the cover from the number of 
content pages:


\useexternalfigure[CONTENT][book.pdf]
\getfiguredimensions[CONTENT]
\definemeasure[SpineWidth][2mm + (0.135mm * \noffigurepages/2)]


You can try

    \expanded{\definemeasure[SpineWidth][...]}

That works so far, if I output \measure{SpineWidth} it shows the right 
size (~42pt).


But if I use this measure in
\setlayer[width=\measure{SpineWidth}]{...}
it’s very small.
I guess \noffigurepages is 1 at that point (from another image) and 
I’d need to expand it first.


Am I right that the expansion happens only at the “execution” of 
\measure? How would I do that? \expanded\noffigurepages doesn’t work.



Another issue:

0.135mm is the paper thickness of 90 g/m² (= 0.09mm per sheet) with 
1.5 bulk. But

\definemeasure[SpineWidth][2mm + (0.09mm * 1.5 * 90)]
doesn’t work:


You can use integers to multiply or divide a length, a float is only allowed
before a length. e.g. 1.5\scratchdimen or 1.5\dimexpr ...\relax

In your case you have to use

    \definemeasure[SpineWidth][2mm + (0.09mm * 3 * 90 / 2)]

or

    \definemeasure[SpineWidth][2mm + (0.09mm * 135)]


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Defineenumeration head offset

2022-11-07 Thread Wolfgang Schuster via ntg-context

Alexandre Christe via ntg-context schrieb am 07.11.2022 um 21:04:

Dear list,

Is there a trick to not apply the leftoffset to the header of a 
defineenumeration?


MWE:

[...]


You can use \offset to shift the enumeration title.

\defineframed
  [ExampleHeadFrame]
  [location=low,
   background=color,
   backgroundcolor=darkgreen,
   width=\textwidth]

\define[1]\ExampleHeadCommand
  {\offset[leftoffset=-2.25ex]{\ExampleHeadFrame{#1}}}

\defineenumeration
  [example]
  [...,
   headcommand=\ExampleHeadCommand,
   ...]

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] \jobname and \doifelse

2022-11-05 Thread Wolfgang Schuster via ntg-context

Pablo Rodriguez via ntg-context schrieb am 05.11.2022 um 16:30:

Dear list,

using current latest (2022.10.22 11:23), I have the following sample:

   \starttext
   \doifelse{\jobname}{a}
 {yes}{no}
   \jobname

   \startluacode
   if tex.jobname == "a" then
 context("yes")
   else
 context("no")
   end
   \stopluacode
   \stoptext

I get "no" as in TeX and "yes" with Lua, being "a.tex" the source file.

The TeX conditional used to work before.

Am I missing something or have I hit a bug?


Are you sure the check worked in the past?

The content of \jobname has catcode 12 while you "a" you check against 
has catcode 11, and even when \jobname result in "a" they are different 
because the catcodes differ.


You can see the same result in the example below where the second check 
compares two a with different catcodes (11 and 12) while the first check 
has the same catcode (11) for both a's.


\starttext

\edef\A{a}
\edef\B{a}

\ifx\A\B
    yes
\else
    no
\fi

\begingroup
    \catcode`a=12
    \gdef\B{a}
\endgroup

\ifx\A\B
    yes
\else
    no
\fi

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Adding support for German language to the Words conversion

2022-10-31 Thread Wolfgang Schuster via ntg-context

Hi Marcus,

do you have an update on the support for german verbose numbers?

Wolfgang


Hans Hagen via ntg-context schrieb am 10.10.2022 um 23:44:

On 10/10/2022 9:21 PM, Marcus Christopher Ludl via ntg-context wrote:

Hello all,

this is my first contribution to this mailing list. 

Recently, when I posted a question on StackExchange.com regarding 
adding support for another language (German) to the "Words" 
conversion in ConTeXt (see here: 
https://tex.stackexchange.com/questions/657534/how-to-add-support-for-another-language-german-to-the-words-conversion-in-cont), 
@mickep suggested that I post the patched file (core-con.lua) to the 
mailing list, once I have it finished, so that it can be added for 
all to use. So, now that I'm confident my code works well, I would 
like to do just that. 


How should I proceed? Should I just send the file including my new 
code as an attachement to the mailing list? Or would it be 
preferrable to paste only the new parts of the code inline into an 
e-mail? Is that even the correct mailing list or would it be better 
to send this to dev-cont...@ntg.nl?

just mail them to me and wolfgang and we'll have a look at it

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___ 

If your question is of interest to others as well, please add an entry 
to the Wiki!


maillist : ntg-context@ntg.nl / 
https://www.ntg.nl/mailman/listinfo/ntg-context

webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___ 



___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] How to make a row of text have vertical centering in tabulate environment?

2022-10-25 Thread Wolfgang Schuster via ntg-context

Joel via ntg-context schrieb am 25.10.2022 um 02:35:

I have a simple tabulate environment like this:

\starttext

 
\starttabulate[|p(.45\textwidth)|cp(.1\textwidth)|p(.45\textwidth)|]

             \NR
                 \HL
                 \NC Cause    \NC \NC Effect    \NC\NR
                 \HL
                 \NC            \NC \NC            \NC\NR
   \NC   text a     \NC text b \NC       \input knuth     \NC\NR 
%<-- vertically center this row

                 \HL
             \NR
         \stoptabulate


\stoptext

I'd like to vertically center the content in the one marked row. By 
default, they seem to place each cell aligned to the top, but how can I 
adjust them vertically so the text is vertically centered just in 
specific rows?


Use natural or extreme tables.

\starttext

\startxtable[frame=off,topframe=on,bottomframe=on]
\startxrow
\startxcell[width=.45\textwidth]
Cause
\stopxcell
\startxcell[width=.1\textwidth]
% empty cell
\stopxcell
\startxcell[width=.45\textwidth]
Effect
\stopxcell
\stopxrow
\startxrow[align={flushleft,lohi}]
\startxcell
text a
\stopxcell
\startxcell
text b
\stopxcell
\startxcell
\input knuth
\stopxcell
\stopxrow
\stopxtable

\stoptext

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Floating Figure in framed-environment

2022-10-19 Thread Wolfgang Schuster via ntg-context

Oliver Sieber via ntg-context schrieb am 19.10.2022 um 11:31:

Dear ConTeXt Users

I am relatively new to context and I am suffering with a problem with the 
framed environment.

I want to use a framed textbox for Definitions in my script. I also want to use 
floating figures.  But this does not work and I haven’t found out why. Maybe I 
totally use it the wrong way. I would appreciate if someone could help me or 
has a tipp.

Here is an example code, where the figure does not behave as expected, i.e. the 
figure is behind the text:

[...]


You have to use the textbackground mechanism to create a block of text 
where floats work as expected.


\definetextbackground
  [Oliver]
  [ location=paragraph,
  corner=round,
   rulethickness=2pt,
  framecolor=black,
   topoffset=1em,
    bottomoffset=1em,
  leftoffset=1em,
 rightoffset=1em,
  before=\blank,
   after=\blank,
  background=]

\setupfloats
  [freeregion=no]

\definedescription
  [Definition]
  [alternative=top,
  text={Definition: },
 title=yes,
    before=\startOliver,
 after=\stopOliver,
 inbetween={\blank[medium]}]

\startbuffer[sampletext]
Carrot cake tiramisu lollipop dragée lollipop marshmallow carrot cake 
sweet pastry. Tiramisu danish jelly tootsie roll tart gummi bears. 
Carrot cake chupa chups cake wafer lemon drops lemon drops tiramisu. 
Chocolate lemon drops sugar plum cheesecake jelly beans sugar plum. 
Tootsie roll cupcake jujubes pie chocolate bar bear claw chupa chups 
shortbread. Candy candy canes jelly-o jelly beans sugar plum muffin 
danish donut. Bonbon lemon drops powder jujubes marshmallow biscuit 
halvah. Powder carrot cake caramels chocolate cake carrot cake jelly-o. 
Topping danish tootsie roll gummi bears oat cake jujubes. Sweet candy 
canes cotton candy pie topping. Jelly-o carrot cake ice cream lemon 
drops macaroon gummies lemon drops tiramisu chocolate cake. Cupcake 
sugar plum shortbread gummi bears tootsie roll. Chocolate cake sugar 
plum macaroon candy canes chocolate bar donut cake icing tootsie roll.

\stopbuffer

\starttext

\startOliver
{\bf Definition: Hello World}
\blank[medium]
\placefigure[right,none]{This is an example of a 
logo.}{\externalfigure[dummy]}

\getbuffer[sampletext]
\stopOliver

\startDefinition[title={Hello World}]
\placefigure[right,none]{This is an example of a 
logo.}{\externalfigure[dummy]}

\getbuffer[sampletext]
\stopDefinition

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] \quotation, protrusion and linebreaking

2022-10-12 Thread Wolfgang Schuster via ntg-context

Alan Braslau schrieb am 13.10.2022 um 00:43:

On 12/10/22 12/10/22, 14:25, Wolfgang Schuster via ntg-context wrote:

Denis Maier via ntg-context schrieb am 12.10.2022 um 21:17:

Instead of what?


By default the symbols are placed with a box because you aren't limited
to normal quotation marks.

\setupexternalfigure [location=default]

\setupdelimitedtext
   [quotation]
   [ left={\externalfigure[cow][height=\strutht]},
    right={\externalfigure[cow][height=\strutht]}]


I *like* cow delimiters (but shouldn't the right one be reflected?) ;-)


Better?

\setupdelimitedtext
  [quotation]
  [ 
left={\offset[y=.5\strutdp]{\externalfigure[cow][height=\dimexpr\strutht+.5\strutdp\relax]}\nbsp},

right={\nbsp\mirror{\offset[y=.5\strutdp]{\externalfigure[cow][height=\dimexpr\strutht+.5\strutdp\relax]}}}]

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] \quotation, protrusion and linebreaking

2022-10-12 Thread Wolfgang Schuster via ntg-context

Denis Maier via ntg-context schrieb am 12.10.2022 um 21:17:

Instead of what?


By default the symbols are placed with a box because you aren't limited
to normal quotation marks.

\setupexternalfigure [location=default]

\setupdelimitedtext
  [quotation]
  [ left={\externalfigure[cow][height=\strutht]},
   right={\externalfigure[cow][height=\strutht]}]

\starttext

\quotation{\input weisman }

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] How to make something appear to the right of every paragraph?

2022-10-10 Thread Wolfgang Schuster via ntg-context

Max Chernoff via ntg-context schrieb am 11.10.2022 um 00:57:

Hi Joel,

On Mon, 2022-10-10 at 12:46 +, Joel wrote:

  Hello Max,
It is preferred if the solution is just three lines per paragraph,
rather than some content parallel to the text

A Lua callback solution:

[...]

An \everypar solution:

\appendtoks%
\vbox to 0pt{%
\dorecurse{3}{%
\rlap{%
\hskip\dimexpr\hsize+1em%
\vrule height 0.4pt width 3cm%
\relax%
}%
}%
}%
\to\everypar


You can use the \EveryPar register but \everypar is off limits.

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] startTEXpage on A4

2022-10-09 Thread Wolfgang Schuster via ntg-context

Leah Neukirchen schrieb am 09.10.2022 um 15:52:

Wolfgang Schuster via ntg-context  writes:


Leah Neukirchen via ntg-context schrieb am 09.10.2022 um 15:19:

Hi,

is there a way to have something like

\setuppapersize[A5][A4]

but have the "inner paper size" be a computed fit like in
\startTEXpage?

Or, alternatively, is there is a way to print crop marks around
an environment like \startTEXpage?

Can you be more concrete what your goal is, there are a few ways to solve
your problem but with a few more information we can give you a good
solution.

Say I want to print some stickers or paper strips of non-fixed size,
and get crop marks around them to know where to cut.

With \setuppapersize and \setuparranging I can do this nicely if I
know the size in advance, but in some cases I don't.


You can use \framed to create a box which takes the size of its content. 
The borders
of the framed box can be used to cut the stickers and with the 
frameoffset key

(or offset if your prefer) you can increase the distance between the borders
and the content.

\setuplayout[page]

\starttext

\centerbox
   {\startframed[width=10cm,align=normal,frameoffset=1cm]
    \input ward
    \stopframed}

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] startTEXpage on A4

2022-10-09 Thread Wolfgang Schuster via ntg-context

Leah Neukirchen via ntg-context schrieb am 09.10.2022 um 15:19:

Hi,

is there a way to have something like

\setuppapersize[A5][A4]

but have the "inner paper size" be a computed fit like in
\startTEXpage?

Or, alternatively, is there is a way to print crop marks around
an environment like \startTEXpage?


Can you be more concrete what your goal is, there are a few ways to solve
your problem but with a few more information we can give you a good 
solution.


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Example from Practex Journal

2022-10-08 Thread Wolfgang Schuster via ntg-context

Jeroen via ntg-context schrieb am 08.10.2022 um 13:17:

Hello,

Could anybody help me out with the setup and a MWE to get a document 
exactly as the one from Steve Peter in the Practex Journal in 2005 as 
in https://tug.org/pracjourn/2005-1/peter/peter.pdf


The articles used a now out of date module [1]  which is MkII only and 
no longer part of the ConTeXt distribution. The filename of the module 
is s-ptj-01.mkii when you're looking for the source.


I find this one hard to replicate. What is the font type that was used 
for this document ?


The document uses TeX Gyre Pagella as main font which can be loaded with 
\setupbodyfont[pagella].


What are your problems with the style of the document?

[1] https://tug.org/pracjourn/stylefiles.html

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Suboptimal German hyphenation

2022-09-28 Thread Wolfgang Schuster via ntg-context

Max Chernoff via ntg-context schrieb am 29.09.2022 um 02:17:

Hi Leah,


I was typesetting some German text on a narrow page when I discovered
the justification wasn't as good as expected.  I think I tracked this
down to differences in hyphenation points, namely, ConTeXt has fewer:

\starttext
\language[de]
\showhyphens{Zusammenhang}
\showhyphens{anderswo}
\showhyphens{anderswoher}
\stoptext

This shows
languages   > hyphenation > show: Zusam[-||]men[-||]hang
languages   > hyphenation > show: anderswo
languages   > hyphenation > show: anders[-||]wo[-||]her

Babel/ngerman sets left/righthyphenmin to 2/2, but ConTeXt sets those to
3/3 for German. (The English default is 2/3). I don't speak German so I
have no idea which is correct, but you can get the same behaviour in
ConTeXt with:

\mainlanguage[de]
\lefthyphenmin=2
\righthyphenmin=2


You can use \setuplanguage to change the values.

\setuplanguage
  [de]
  [ lefthyphenmin=2,
   righthyphenmin=2]

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Lato typescripts (MKIV/LMTX)

2022-09-17 Thread Wolfgang Schuster via ntg-context

Adam Reviczky via ntg-context schrieb am 17.09.2022 um 18:14:

Hi,

With the latest upload (2022-09-16 14:41) I wanted to compare some 
older projects that I've used with MKIV to the LMTX 2.10.00.


In one of which I am using the Lato 2.0 font 
(https://packages.debian.org/sid/fonts-lato).
With MKIV I get the correct output but LMTX complains about not being 
able to find the font.


The problem lies in the debian package because the fonts I get from the 
website [1]
of the lato fonts have the same file names as the referenced one in the 
typescripts.


[1] https://www.latofonts.com/

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Typearea module fails with “Missing number”

2022-09-16 Thread Wolfgang Schuster via ntg-context

Peter Münster via ntg-context schrieb am 31.08.2022 um 23:16:

On Mon, Aug 29 2022, Wolfgang Schuster via ntg-context wrote:


remove one pair of curly braces

Hi Wolfgang,

Thanks. Here a new version: http://pmrb.free.fr/tmp/t-typearea.zip


Even though the module works now with LMTX it needs a proper update to 
ensure

it can be used in future documents.

Another suggestion from myself is to use the \averagecharwidth length 
for the calculation

of the text width because it takes the document language into account.

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] searching in the source browser

2022-09-05 Thread Wolfgang Schuster via ntg-context

Henning Hraban Ramm via ntg-context schrieb am 05.09.2022 um 20:28:

Hi, this is probably for Taco:

Is there a possibility in the source browser to search for macros 
(\something) or anything containing dots (logs.errors)?

Because neither “simple” nor with Lua patterns I get any results.

E.g. I wanted to look for all trackers and/or directives.


To get a list of trackers and directives you can use

    \showtrackers
    \showdirectives

in a document (the list appear in the log file and terminal) or you use 
the following two modules:


    context --global m-trackers.mkiv
    context --global m-directives.mkiv

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Typearea module fails with “Missing number”

2022-08-29 Thread Wolfgang Schuster via ntg-context

Marco Patzer via ntg-context schrieb am 29.08.2022 um 09:49:

On Mon, 29 Aug 2022 09:30:34 +0200
Marco Patzer via ntg-context  wrote:


The typearea module fails on LMTX (runs ok with MkIV):

   tex error   > tex error on line 89 in file
/usr/local/share/context-lmtx/tex/texmf-modules/tex/context/third/typearea/t-typearea.tex:
Missing number, treated as zero

Sorry, forgot the MWE:

   \usemodule[typearea]
   \starttext\null\stoptext


To fix the module you have to change the line

\edef\Ratio{\withoutpt{\the\dimexpr2\paperheight/(\PageWidth/32768)\relax}}

with (remove one pair of curly braces)

\edef\Ratio{\withoutpt\the\dimexpr2\paperheight/(\PageWidth/32768)\relax}


Similar problems can happens with other modules because many of them are 
outdated
and they should be either updated or removed (the files can still be 
archived).


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Parallel texts: verse with blanks between stanzas via tabulate

2022-08-27 Thread Wolfgang Schuster via ntg-context

Denis Maier via ntg-context schrieb am 27.08.2022 um 09:17:

Thanks. I'll try that. But, iirc, these had some other drawbacks I'll check 
if it works for my use case.

Is there a way to have blanks in the tabulate?


\startlines[inbetween={\dontleavehmode\crlf}]
...

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?

2022-08-21 Thread Wolfgang Schuster via ntg-context

黄复雄 via ntg-context schrieb am 21.08.2022 um 10:24:

Currently, the ruby module does not seem to support cjk fonts? I have
a preliminary implementation of furigana(pinyin in Chinese) as:

```lmtx
% define the pinyin font
\definefont[pinyinfont][name:ahpinying*default at 9pt]
% define the pinyin command
\define[2]\pinyin{%
 \setbox1 = \hbox{#1}%
 \setbox2 = \hbox{\darkgray \pinyinfont #2}%
 \newdimen\maxwd%
 \ifdim \wd1>\wd2 \maxwd=\wd1 \else \maxwd=\wd2 \fi%
 \setbox1 = \hbox to \maxwd{\hfill \box1 \hfill}%
 \setbox2 = \hbox to \maxwd{\hfill \box2 \hfill}%
 \hskip0pt plus5pt\vbox{\setupinterlinespace[line=0.5em]\box2\box1}%
above line
 % \hskip0pt
plus5pt\vtop{\setupinterlinespace[line=0.5em]\box1\box2}% under line
}
```
usage as follows:

```lmtx
\pinyin{寖備}{jìn bèi}
```


The ruby command has no problem with chinese but you need a font which 
has support for it.
As can be seen in my previous example you can use the style-key to 
switch to a different font

for the annotation (e.g. \setupruby[style=\pinyinfont]).

 begin example
\definefallbackfamily [documentfont] [rm] [Noto Serif CJK SC] 
[preset=range:chinese]
\definefallbackfamily [documentfont] [ss] [Noto Sans CJK SC] 
[preset=range:chinese]
\definefallbackfamily [documentfont] [tt] [Noto Sans Mono CJK SC] 
[preset=range:chinese]


\definefontfamily [documentfont] [rm] [Noto Serif]
\definefontfamily [documentfont] [ss] [Noto Sans]
\definefontfamily [documentfont] [tt] [Noto Sans Mono]

\setupbodyfont [documentfont]

\setupruby[color=darkgray]

\starttext
\ruby{寖備}{jìn bèi} \ss \ruby{寖備}{jìn bèi} \tt \ruby{寖備}{jìn bèi}
\stoptext
 end example

Wolfgang



test.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Color property of \setupurl

2022-08-20 Thread Wolfgang Schuster via ntg-context

Max Chernoff via ntg-context schrieb am 20.08.2022 um 08:41:

Hi,


Could someone clarify me in what kind of context the color of a
hyperlink is controlled by the "color" property of \setupurl?

This code:

\show\setupurl
\showthe\everysetupurl

produces:


> \setupurl=frozen protected macro: [#1]->\ifarguments \or 
\mult_interfaces_get_parameters \??url [#1]\fi \the \everysetupurl
>

so \setupurl doesn't appear to do anything at all. I suspect that it is an

old MkII relic, and can be safely ignored.


The command has an effect as can be seen below, \from is only affected 
when you omit the fourth argument of \useurl.


\useurl [contextwiki] [https://wiki.contextgarden.net/Main_Page] [] 
[\CONTEXT\ Wiki]

%\useurl [ctan]    [https://ctan.org/]    [] [CTAN]
\useurl [ctan]    [https://ctan.org/]

\starttext

\url[contextwiki]

\start \setupurl[style=italic]
\url[contextwiki]
\stop

\start \setupurl[color=red]
\url[contextwiki]
\stop

\blank

\from[ctan]

\start \setupurl[style=italic]
\from[ctan]
\stop

\start \setupurl[color=red]
\from[ctan]
\stop

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Bug (?) with \placefigure[right]

2022-08-16 Thread Wolfgang Schuster via ntg-context

Bruce Horrocks via ntg-context schrieb am 16.08.2022 um 18:11:

Things start to go awry after about 5 or 6 iterations, 12 shows it up clearly 
with three or so nearly blank (except for the subject) pages produced.

\setuppapersize [A5] [A5]
\starttext
\dorecurse{12}{
\subject{Some heading}
\placefigure[right] {} {\externalfigure[cow.pdf] [width=3cm]}
\input lorem
}
\stoptext

I actually want \placefigure[right,none] in my real doc but that also goes awry.
LMTX current version: 2022.08.05 11:44

My actual requirement is to have a set of short biographies, including a small 
'passport' photo, for each contributor to a book. So any suggestions on how to 
wrap text around the photo that avoids this issue would be welcome.


\setuppapersize [A5] [A5]

\starttext

\dorecurse{12}
  {\subject{Some heading}
   \starthanging[right]{\externalfigure[cow.pdf][width=3cm]}
   \samplefile{lorem}
   \stophanging}

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?

2022-08-16 Thread Wolfgang Schuster via ntg-context

amano.kenji schrieb am 16.08.2022 um 13:33:

At least, furigana seems covered.

How do I know which document to consult? There are many PDF files that come 
with ConTeXt.


You can start with the following thread from 2020: 
https://mailman.ntg.nl/pipermail/ntg-context/2020/098389.html


Useful documents are (both are part of your context installation):

- http://www.pragma-ade.nl/general/manuals/followingup.pdf
- https://www.pragma-ade.nl/general/manuals/lowlevel-boxes.pdf

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?

2022-08-15 Thread Wolfgang Schuster via ntg-context

amano.kenji via ntg-context schrieb am 15.08.2022 um 14:00:

Is there any documentation about \ruby?


You can see all available parameters in setup-en.pdf, the example below 
shows a few of them:


 begin example
\setupinterlinespace[line=4ex]

\setuptype[style=\ttx]

\starttext

\start
x \ruby{aaa}{bbb} x
\stop

\start \setupruby[location=left]
\type{\setupruby[location=left]}\quad x \ruby{aaa}{bbb} x
\stop

\start \setupruby[location=right]
\type{\setupruby[location=right]}\quad x \ruby{aaa}{bbb} x
\stop

\start \setupruby[location=right,left={[},right={]}]
\type{\setupruby[left={[},right={]}]}\quad x \ruby{aaa}{bbb} 
x

\stop

\start \setupruby[align=flushleft]
\type{\setupruby[align=flushleft]}\quad x \ruby{aa}{bbb} 
x

\stop

\start \setupruby[align=flushright]
\type{\setupruby[align=flushright]}\quad x \ruby{aa}{bbb} 
x

\stop

\start \setupruby[style=\itxx]
\type{\setupruby[style=\itxx]}\quad x \ruby{aaa}{bbb} x
\stop

\start \setupruby[color=blue]
\type{\setupruby[color=blue]}\quad x \ruby{aaa}{bbb} x
\stop

\start \setupruby[voffset=-1.2ex]
\type{\setupruby[voffset=-1.2ex]}\quad x \ruby{aaa}{bbb} x
\stop

\stoptext
 end example


What about vertical text?


ConTeXt has a mechanism to produce vertical text but there is nothing 
yet which can
be used out of the box to produce a complete document with vertical 
paragraphs.


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Changing the caption on a split table

2022-08-13 Thread Wolfgang Schuster via ntg-context

Bruce Horrocks via ntg-context schrieb am 13.08.2022 um 10:35:

On 3 Aug 2022, at 00:26, Bruce Horrocks via ntg-context  
wrote:

I have a 5-page table placed using

\setupcaption [table] [way=bytext,prefixsegments=none]
\placetable[split]{My long table}{...}

The caption for the first table page is "Table 1a  My Long table"; for the second table page it is 
"Table 1b  My long table" and so on. I'd like to change these to be "Table 1  My Long table" then 
"Table 1 (cont'd) My long table" for the remaining pages.

I've tried \setupcaption[table][suffix={(cont'd)] but that affects all the 
pages. How can I set it for the second and subsequent pages only, please?

The solution turned out to be really simple (for small tables at least - less 
fun if you have hundreds of pages!). Just use:

\defineconversion[Contd][~,{ (cont’d)},{ (cont’d)},{ (cont’d)},{ (cont’d)},{ 
(cont’d)},
   { (cont’d)},{ (cont’d)},{ 
(cont’d)},{ (cont’d)},{ (cont’d)},
   { (cont’d)},{ (cont’d)},{ 
(cont’d)},{ (cont’d)},{ (cont’d)},
   { (cont’d)},{ (cont’d)},{ 
(cont’d)},{ (cont’d)},{ (cont’d)} ]
\setupfloatsplitting[conversion=Contd]

This results in "Table 1 My Long table", "Table 1 (cont’d) My Long table" and 
so on.


There is already a conversion for this numbering style.

\setuplabeltext [en] [continued={ (cont’d)}]

\setupfloatsplitting [conversion=continued]

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] image with rounded corners

2022-08-12 Thread Wolfgang Schuster via ntg-context

Henning Hraban Ramm via ntg-context schrieb am 12.08.2022 um 10:57:

Hi, can ConTeXt make rounded image corners?
Both of my approaches don’t work:


\externalfigure[mill][
  width=3cm,
  frame=on,
  corner=round,radius=1cm,
  backgroundcorner=round,backgroundradius=1cm,
]

\defineoverlay[Mill][{%
  \externalfigure[mill][width=\overlaywidth]
}]
\framed[background=Mill,width=3cm,height=4cm,
corner=round,radius=1cm,
backgroundcorner=round,backgroundradius=1cm,
offset=overlay]{}


\setupexternalfigures[location=default]

\starttext

\startMPclip{rounded corner}
clip currentpicture to (roundedsquare(OverlayWidth,OverlayHeight,EmWidth));
\stopMPclip

\clip[nx=1,ny=1,mp=rounded corner]{\externalfigure[mill]}

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] How to display these characters

2022-08-09 Thread Wolfgang Schuster via ntg-context

Henning Hraban Ramm via ntg-context schrieb am 09.08.2022 um 16:51:

Am 08.08.22 um 08:01 schrieb Alan Braslau:

On 05/08/22 05/08/22, 12:13, Henning Hraban Ramm via ntg-context wrote:


I recently had the same problem and was wondering if there isn’t a 
Metapost module for directory trees?


There is a Metapost/Context module for drawing flow charts that 
should handle this nicely.


If that’s still the same module that I know, then I don’t think it’s 
suitable (too much fixed on a grid).


There is also a Metapost module for drawing relational charts 
("nodes") that could be another approach.


I actually never really looked into the nodes module, but I guess that 
would work.


There is a simple LaTeX / plain TeX package [1] for this but I don't 
know if the plain TeX version works with ConTeXt.


[1] https://www.ctan.org/pkg/dirtree

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] How to display these characters

2022-08-05 Thread Wolfgang Schuster via ntg-context

juh+ntg-context--- via ntg-context schrieb am 05.08.2022 um 19:04:

Dear all,

I have this:


\starttext

\starttyping
foo
└── bar
    ├── baz
    │   └── index.html
    └── index.html

\stoptyping

\stoptext

The source code is generated with the linux command "tree".

The special characters which indicate the folder depth are not displayed.

I guess that I could define a fallbackfont. Do anyone know the unicode 
range that should be covered and the font that has these characters?


You need box drawing [1] characters.

When you need fonts with a wide range of character the Noto [2] family 
is a good choice.


 begin example
\definefontfamily [noto] [rm] [Noto Serif]
\definefontfamily [noto] [ss] [Noto Sans]
\definefontfamily [noto] [tt] [Noto Sans Mono]
\definetypeface   [noto] [mm] [math] [pagella] [default]

\setupbodyfont [noto]

\starttext

\starttyping
foo
└── bar
    ├── baz
    │   └── index.html
    └── index.html
\stoptyping

\stoptext
 end example

[1] https://unicode.org/charts/PDF/U2500.pdf
[2] https://github.com/notofonts/noto-fonts

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] String substitution using regular expressions and backreferences

2022-08-01 Thread Wolfgang Schuster via ntg-context

Thangalin via ntg-context schrieb am 01.08.2022 um 21:58:

Hi list,

I'm looking to perform text replacements.


Please don't omit important information, on TeX SE you mentioned you 
input is XML which means a lot more can be done than your simple TeX 
based example demonstrates.


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Set up external figure for particular image type

2022-07-18 Thread Wolfgang Schuster via ntg-context

Thangalin via ntg-context schrieb am 18.07.2022 um 19:10:

Thank you, Wolfgang.

That looks promising.

SVG files are converted using MetaPost. I thought the following would 
work:


svg=>{\externalfigure[#1][svg][conversion=mp]}


You can probably remove the second argument ([svg]) which was used in my 
example to pass the default values with \defineexternalfigure. Just 
using \externalfigure[#1][conversion=mp] where you pass the default 
values with the second argument is enough.


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Sudoku module

2022-07-18 Thread Wolfgang Schuster via ntg-context

Otared Kavian via ntg-context schrieb am 18.07.2022 um 18:53:

Hi Wolfgang,

Thank you for your attention and the explanation regarding the « hash option » 
and why the sudoku module written by Jairo does not work. However I was 
reporting the issue when I tried to typeset the example file with LMTX (version 
2022.07.06 21:42).


I have no problems with the examples at the end of the module and LMTX, 
only when I use LuaTeX a error appears.



As a matter of fact I am far from understanding what the « arguments = { « hash 
» } » is supposed to do in interfaces.implement in the code you sent…


The 'interfaces.implement' functions creates the command \test and 
'arguments={"hash"}' creates the argument which accepts key-val lists 
([text=Hello]).


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] How to setup a headertext in a doublesided document in a cld?

2022-07-18 Thread Wolfgang Schuster via ntg-context

Willi Egger via ntg-context schrieb am 16.07.2022 um 17:03:

Hello!

I tried to setup a headertext in a context-lua-document. — No problem for the 
singlesided version, however hoe to pass the info for a double sided version?
Unfortunately the cld-mkiv manual contains an example for a singlesided 
document.

It ried

context.setupheadertexts({
  function()
context("\\bf”)
context.labeltext(monthname)
context("\\hfill”)
context(year)
   end},
   {function()
 context("\\bf”)
 context.labeltext(monthname)
 context("\\hfill”)
 context(year)
  end})

but this is apparently not the good approach.

Does someone of you have experience how to do this correctly?


What is the desired layout/content for the header?

You're using monthname and year in your example but do they come from, a 
proper minimal example can help here.


Is it even necessary to set the header with Lua or can't you use a 
regular TeX file and load it afterwards as environment file when you 
process your document (context --environment=mystyle.tex mydocument.cld).


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Sudoku module

2022-07-18 Thread Wolfgang Schuster via ntg-context

Otared Kavian via ntg-context schrieb am 18.07.2022 um 17:00:

Hi Jairo,

You sent a message last year about your Sudoku module, and today, out of 
curiosity, I wanted to test it. Unfortunately it stops with an error message at 
line 76 of the file t-sudoku.mkiv, where you have:

\def\sudokufunction_direct[#name][#parameters]#content

I would appreciate if you could tell me whether you have a working version of 
you module, or what one has to change in order to typeset your examples.


The error is unrelated to the sudoku module and when you use LMTX the 
error disappears.


The real problem can be seen in the following minimal example and is 
related to the "hash" option for the argument key.


 begin example
\starttext

\startluacode
interfaces.implement {
    name  = "test",
    public    = true,
    arguments = { "hash" },
    actions   = function(t)
    print(table.serialize(t))
    end,
}
\stopluacode

\test[text=Hello]

\stoptext
 end example

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Set up external figure for particular image type

2022-07-12 Thread Wolfgang Schuster via ntg-context

Thangalin via ntg-context schrieb am 12.07.2022 um 20:11:

Thank you for the suggestion Hraban.

The source comes from Markdown, which is converted to XML, then 
typeset using ConTeXt. There's no Markdown-specific mechanism to 
relate images to a particular external figure definition, 
unfortunately. All images use the same syntax and are treated the same 
way. The only part that differs is the file name extension (and header 
within the file).


One possibility would be something like:
|\setupexternalfigure[ width=1em, height=1em, order={svg,pdf,png,jpg}, 
location={local,default,global}, ] \defineexternalfigure[png][ 
width=\textwidth, height=\textheight, ] \unprotect 
\let\old_externalfigure=\externalfigure 
\tolerant\def\externalfigure[#1]#,[#2]#,[#3]{% 
\doifelseinstring{.png}{#1}{% \old_externalfigure[#1][png][#2]% }{% 
\doifelsefileexists{#1.png}{% \old_externalfigure[#1.png][png][#2]% 
}{% \old_externalfigure[#1][#2][#3]% }% }% } \protect |

See: https://tex.stackexchange.com/a/650221/2148

I was wondering if there was a simpler or a solution that's more the 
ConTeXt-way?


When you use XML as input you can add additional code to the setups block
which uses \externalfigure to load the image.


\setupexternalfigures [location={local,global,default}]

\defineexternalfigure [jpg] [width=4cm]
\defineexternalfigure [png] [width=8cm]

\starttexdefinition includegraphics #1

    \splitfilename{#1}

    \processaction
    [\splitofftype]
    [    jpg=>{\externalfigure[#1][jpg]},
 png=>{\externalfigure[#1][png]},
 default=>{\externalfigure[#1]},
 unknown=>{\externalfigure[#1]}]

\stoptexdefinition

%\starttexdefinition includegraphics #1
%
%    \getfiguredimensions[#1]
%
%    \processaction
%    [\figurefiletype]
%    [    jpg=>{\externalfigure[#1][jpg]},
% png=>{\externalfigure[#1][png]},
% default=>{\externalfigure[#1]},
% unknown=>{\externalfigure[#1]}]
%
%\stoptexdefinition

\starttext

\includegraphics{hacker.jpg}

\includegraphics{mill.png}

\includegraphics{cow.pdf}

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Getting started with Japanese

2022-07-10 Thread Wolfgang Schuster via ntg-context

Gerben Wierda via ntg-context schrieb am 09.07.2022 um 13:58:
I’d like to experiment a bit with typesetting Japanese in ConTeXt 
(LMTX), to see if it is doable.


I tried looking for Japanese on ConTeXtgarden, but did not find anything.

Can someone point me to instructions to get started with Japanese in 
LMTX (on macOS).


1. You need a font to typeset japanese.

2. Add \setscript[nihongo] to your document to enable line breaks.

 begin example
\definefontfamily [noto-cjk-jp] [serif] [Noto Serif CJK JP]
  [it={style:regular,features:{*,slanted}},
   bi={style:bold,features:{*,slanted}}]

\definefontfamily [noto-cjk-jp] [sans]  [Noto Sans CJK JP]
  [it={style:regular,features:{*,slanted}},
   bi={style:bold,features:{*,slanted}}]

\definefontfamily [noto-cjk-jp] [mono]  [Noto Sans Mono CJK JP]
  [it={style:regular,features:{*,slanted}},
   bi={style:bold,features:{*,slanted}}]

\definetypeface [noto-cjk-jp] [mm] [math] [pagella] [default]

\setupbodyfont [noto-cjk-jp]

\setscript [nihongo]

\starttext

\rm\tf 日本語 \it 日本語 \bf 日本語 \bi 日本語

\ss\tf 日本語 \it 日本語 \bf 日本語 \bi 日本語

\tt\tf 日本語 \it 日本語 \bf 日本語 \bi 日本語

\stoptext
 end example

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] What is going wrong with this use of --mode for switching language?

2022-07-08 Thread Wolfgang Schuster via ntg-context

Gerben Wierda via ntg-context schrieb am 08.07.2022 um 12:21:

On 8 Jul 2022, at 11:57, Taco Hoekwater  wrote:

On 8 Jul 2022, at 11:42, Gerben Wierda via ntg-context  
wrote:

I have this minimal example:

\startmode[EL]
\setuplanguage[el][patterns={el}]\mainlanguage[el]

That (‘el’) is a non-existent language, so it never becomes active.

Aha. ‘EL’ is the official two-letter language code for the Greek language, so I 
assumed this was the language code as well.

So, what do I use for (modern) Greek?


\mainlanguage[gr] or \mainlanguage[greek]

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] dorecurse within combination

2022-07-07 Thread Wolfgang Schuster via ntg-context

Henning Hraban Ramm via ntg-context schrieb am 07.07.2022 um 21:25:

Am 07.07.22 um 20:52 schrieb Henning Hraban Ramm via ntg-context:

How can I do this?
Sorry for the noise, I solved it with Lua. The cld manual even 
contains a combinations example.


The Lua method is also simpler than a TeX based alternative.

\starttext

\startcollecting
%
\startcollect
\startcombination[3*1]
\stopcollect
%
\dorecurse{3}
  {\startcollect
   {\externalfigure[dummy]}{}
   \stopcollect}
%
\startcollect
\stopcombination
\stopcollect
%
\stopcollecting

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Bug in counter

2022-07-04 Thread Wolfgang Schuster via ntg-context

Johann Birnick via ntg-context schrieb am 04.07.2022 um 18:29:

Hey there,

please consider:


\starttext
 
\defineenumeration[definition][text=Definition, alternative=serried]

\setupnumber[definition][way=bysection, numbersection=yes]


\setupenumeration
  [definition]
  [way=bysection,
   prefix=yes,
   prefixsegments=section]

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] return a labeltext with color...

2022-06-24 Thread Wolfgang Schuster via ntg-context

Willi Egger via ntg-context schrieb am 24.06.2022 um 16:34:

Hi all,


Sorry for bothering you again.

I would like that lua is returning a colored string, which is a label-text.

The following does not work, the labeltext remains black, there is no error 
though:

return context.color({"red"},context.labeltext(s))

What is the correct approach?


\mainlanguage[fr]

\starttext

\startluacode
context.color( { "red" }, context.nested.labeltext("january") )
\stopluacode

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Detailed citation of reference

2022-06-24 Thread Wolfgang Schuster via ntg-context

Johann Birnick via ntg-context schrieb am 24.06.2022 um 11:59:

Thanks! However, if I type \cite[righttext={, section 2.1}] is doesn't work
anymore. Any ideas?


What happens with

    \cite[righttext={{, section 2.1}}]

or

    \cite[righttext={\textcomma\ section 2.1}]

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Failing \doifemptyelse

2022-06-23 Thread Wolfgang Schuster via ntg-context

Hans Hagen via ntg-context schrieb am 23.06.2022 um 23:00:

On 6/23/2022 9:16 PM, Willi Egger via ntg-context wrote:

Good evening gurus!

Why is the minimal example failing? i.e. executing always the 
else-branch?


\setuppapersize[A6][A6]

\setvariables
[Test]
[Number=]


\starttext
Value of variable Number before test: \getvariable{Test}{Number} 
\crlf


  \doifemptyelse{\getvariable{Test}{Number}}
    {\dorecurse
 {5}
 {TEST}
    }
    {Nothing defined \par
 Contents of variable Number: \getvariable{Test}{Number}
    }

\stoptex

there's also

\doifelsevariable {Test} {Number}

that can be used


in this case

\doifelseemptyvariable{Test}{Number}{...}{...}

is the better choice

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Failing \doifemptyelse

2022-06-23 Thread Wolfgang Schuster via ntg-context

Willi Egger via ntg-context schrieb am 23.06.2022 um 21:16:

Good evening gurus!

Why is the minimal example failing? i.e. executing always the else-branch?


\doifempty(else) doesn't expand the argument and any argument counts as 
not empty. To satisfy the command you can expand the first argument 
(\normalexpanded) or you use \doifnothing(else) which expands the argument.


\starttext

\startbuffer
\doifemptyelse{}{YES}{NO}

\doifemptyelse{\empty}{YES}{NO}

\normalexpanded{\doifemptyelse{}}{YES}{NO}

\normalexpanded{\doifemptyelse{\empty}}{YES}{NO}

\doifnothingelse{}{YES}{NO}

\doifnothingelse{\empty}{YES}{NO}
\stopbuffer

\typebuffer \getbuffer

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] \setuplist only for bodypart

2022-06-17 Thread Wolfgang Schuster via ntg-context

Pablo Rodriguez via ntg-context schrieb am 17.06.2022 um 16:07:

On 6/16/22 22:36, Henning Hraban Ramm via ntg-context wrote:

Am 16.06.22 um 21:19 schrieb Pablo Rodriguez via ntg-context:


\startsectionblockenvironment[bodypart]
  ...
\stopsectionblockenvironment

This should work according to documentation.

Many thanks for your reply, Hraban.

Using current latest (from 2022.05.11 11:36) with current sample outputs
no different setup for chapters from bodypart:

   \startsectionblockenvironment[bodypart]
 \setuplist[chapter]
   [alternative=d]
   \stopsectionblockenvironment


With the above setting you change layout of the chapter entries for list 
which are placed in the bodymatter environment, e.g.


    \startbodymatter
    ...
    \placelist[chapter]
    ...
    \stopbodymatter


To create separate styles for chapters within the frontmatter and 
bodymatter you have to create a new section command where you can apply 
different list settings.



   \starttext
   \completecontent


You're now placing \completecontent (and the associated \title) outside 
of any sectionblock.


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to print a random whole number between x and y?

2022-06-17 Thread Wolfgang Schuster via ntg-context

Joel via ntg-context schrieb am 17.06.2022 um 16:10:
I was using this code for a long time in my document. I have a PDF 
with 10 pages, and this would randomly display one of those pages:


    \ctxlua{math.randomseed( os.time() )}

        \getrandomnumber \n {1} {10}

     \placefigure[force, 
none]{}{\framed[frame=off]{\externalfigure[comic.pdf][page=\n, 
width=\textwidth]}}


For reasons I cannot understand, after an update of ConTeXt, the code 
no longer works, though trying to reduce it to a minimum working 
example it works, so I cannot figure out what is wrong in my code.


Undefined control sequence

 ...domseed( os.time() )} \par \getrandomnumber \n
{1} {10} \par \placefigure...
\doifsomething #1->\edef \m_syst_string_one {#1
}\ifx \m_syst_string_one \emp...
\event ... {#6}{{\bf #6}} \par \doifsomething {#7}
{#7 } \par \doifsomething ...


Is there another solution for generating a random whole number between 
1 and 10?


Without a better example there is no way to tell what's wrong with your 
document. The most likely answer is that you try to expand part of your 
code which contains the \getrandomnumber line but since \n isn't defined 
yet you get the error message.


What you can try is to replace \getrandomnumber and "page=\n" with 
"page=\randomnumber{...}{...}".


\startbuffer[dummyfile]
\dorecurse{10}{\centerbox{\definedfont[Sans sa 10]Page \recurselevel}}
\stopbuffer

\setuplayout[page]

\starttext

%\getrandomnumber\n{1}{10}
%\typesetbuffer[dummyfile][page=\n]

\typesetbuffer[dummyfile][page=\randomnumber{1}{10}]

\stoptext

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Problem loading font in LMTX

2022-06-11 Thread Wolfgang Schuster via ntg-context

Stefan Nedeljkovic via ntg-context schrieb am 11.06.2022 um 10:05:

Dear list,

I have the following file:

\starttypescript [lidia]
\definetypeface[lidia][rm][serif][lidiaweb][cpsp=yes]
\stoptypescript
\setupbodyfont[lidia,36pt]
\starttext
\startTEXpage[align=normal,width=100cm,autowidth=force,offset=0pt]
\startalignment[middle]
2{\hskip 0em}412{\hskip 0em}772 {\hskip 0em}КУЋНА {\hskip 0em}БРОЈА\\
{\vskip 2em}ИЗ {\hskip 0em}БАЗЕ {\hskip 0em}РЕПУБЛИЧКОГ {\hskip 
0em}ГЕОДЕТСКОГ {\hskip 0em}ЗАВОДА\\
{\vskip 2em}У {\hskip 0em}ПРОЈЕКЦИЈИ {\hskip 0em}epsg{\hskip 
0em}:{\hskip 0em}32634 {\hskip 0em}И {\hskip 0em}РАЗМЕРИ {\hskip 
0em}1{\hskip 0em}:{\hskip 0em}388{\hskip 0em}000\\

{\vskip 2em}ЈАНУАР {\hskip 0em}2022
\stopalignment
\stopTEXpage
\stoptext


\definefontfeature [default] [default] [cpsp=yes]

\definetypeface [lidia] [rm] [specserif] [lidiaweb] [default]
%\definefontfamily [lidia] [rm] [lidiaweb]

\setupbodyfont[lidia,36pt]

\startTEXpage[align=middle,width=100cm,autowidth=force,offset=0pt]
2412772 КУЋНА БРОЈА
\blank[2em]
ИЗ БАЗЕ РЕПУБЛИЧКОГ ГЕОДЕТСКОГ ЗАВОДА
\blank[2em]
У ПРОЈЕКЦИЈИ epsg:32634 И РАЗМЕРИ 1:388000
\blank[2em]
ЈАНУАР 2022
\stopTEXpage

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Two minor questions

2022-06-07 Thread Wolfgang Schuster via ntg-context

Stefan Nedeljkovic schrieb am 07.06.2022 um 07:25:
Thank you very much Wolfgang! But, there is still something weird 
going on with the font. I updated the files on Drive. Please see line 
19, the last word "and". It is clearly out of alignment with the gid. 
I tested the alignment in MP and it should work, ie 2 characters are 
indeed one grid cell (semms from the fact that IBM Plex Mono was 
designed from a typewriter typeface where 12 characters are exactly 1 
inch long).


Do you use double hyphens (--) in your document because this is what 
causes the problem.


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Two minor questions

2022-06-06 Thread Wolfgang Schuster via ntg-context



Stefan Nedeljkovic via ntg-context schrieb am 06.06.2022 um 22:07:

Wolfgang, Aditya, thank you both very much!

I have 2 more questions:

Observe the files here: 
https://drive.google.com/drive/folders/18ve5_F-BKOa-TxCWmD02mhPqNXQvNyWK?usp=sharing


1. I'd like to shift the text area down so that the red lines 
align with the blue lines (I think this amount is called depth). How 
would I do that?


Quick and dirty:

\setuplayout
  [...,
   topspace=\dimexpr5\measured{base}+2bp+\strutdp\relax,
   ...]

2. The font is such that exactly 2 characters fit into the grid cell, 
but I see that towards the end of the line it gets out of sync with 
the grid. How would I ensure that all text rendered is strictly 
monospaced without any stretching/shrinking trickery?


Change the text alignment:

\setupalign[flushleft,broad]

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Two minor questions

2022-06-06 Thread Wolfgang Schuster via ntg-context

Stefan Nedeljkovic via ntg-context schrieb am 06.06.2022 um 07:55:

Dear list,

I have 2 small questions:

1. In \setuplayout if I try to set topspace=5\measured{base} + 
\dimexpr2bp I get an error. How should I add these 2bp?


\setuplayout
  [topspace=\dimexpr 5\measured{base} + 2bp\relax]

2. I have an mp graphic defined in the file "graphic.mp 
" which has the exact same dimensions as my page. 
I'd like to set that graphic as a background. How do I do this?


\startreusableMPgraphic{backgroundgraphic}
    input graphic.mp;
\stopreusableMPgraphic

\defineoverlay [backgroundimage] [\reuseMPgraphic{backgroundgraphic}]

\setupbackgrounds [page] [background=backgroundimage]

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Can I simplify this to some sort of logic so it scales better?

2022-06-06 Thread Wolfgang Schuster via ntg-context

Gerben Wierda via ntg-context schrieb am 06.06.2022 um 13:34:

I have this:

\definemode[EN,FR,RU,PT][keep]
\doifmodeelse{EN}
{
    \disablemode[FR]
    \disablemode[RU]
  \disablemode[PT]
  }
  {
\doifmodeelse{FR}
    {
      \disablemode[EN]
      \disablemode[RU]
      \disablemode[PT]
    }
    {
      \doifmodeelse{RU}
      {
      \disablemode[EN]
\disablemode[FR]
\disablemode[PT]
      }
      {
      \doifmodeelse{PT}
        {
          \disablemode[EN]
          \disablemode[FR]
          \disablemode[RU]
        }
      {
\enablemode[EN]
        }
      }
  }
  }

But for every language added this becomes more and more complex. I was 
wondering what would be a good approach to simplify it.


I want to make sure that one and only one of these modes is active and 
that if no mode is entered on the command line the mode is EN.


%\enablemode[EN]
\enablemode[FR]
%\enablemode[RU]
%\enablemode[PT]

\definemode[EN,FR,RU,PT][keep]

\startmodeset
    [EN]  {\disablemode[FR,RU,PT]}
    [FR]  {\disablemode[EN,RU,PT]}
    [RU]  {\disablemode[EN,FR,PT]}
    [PT]  {\disablemode[EN,FR,RU]}
    [default] {\enablemode[EN]}
\stopmodeset

\starttext
\doifmode{EN}{english}
\doifmode{FR}{french}
\doifmode{RU}{russian}
\doifmode{PT}{portuguese}
\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Improving pandoc's ConTeXt output

2022-06-05 Thread Wolfgang Schuster via ntg-context

Hans Hagen via ntg-context schrieb am 05.06.2022 um 12:01:

On 6/5/2022 9:07 AM, Albert Krewinkel via ntg-context wrote:

Hi all,

I'm currently trying to improve the ConTeXt output generated by pandoc,
the document convert. There are two questions that we haven't decided
on, and I'd be grateful to receive some feedback from ConTeXt experts on
these issues:

2. Similarly, I'd like to start wrapping paragraphs with
    `\startparagraph`/`\stopparagraph`. It is important for me to get
    properly tagged PDF, but this would also make the output more
    verbose. Is that something that you would find bothering, or do you
    see adding the extra environment by default as an acceptable
    practice?


I assume not that many users see (or manipulate) the output so it is 
harmless.


\startparagraph can lead to unwanted side effects (I can't remember the 
details)

and \bpar ... \epar is the safer alternative to add tags.

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How do I turn off indentation inside a \framed with align=?

2022-06-03 Thread Wolfgang Schuster via ntg-context

Gerben Wierda via ntg-context schrieb am 03.06.2022 um 00:57:
On 19 May 2022, at 18:22, Wolfgang Schuster via ntg-context 
mailto:ntg-context@ntg.nl>> wrote:


You have to provide a minimal example, in the following the example 
the text within the frame isn't indented.


I cannot always provide a minimal example (how much I would like to) 
as my TeX is produced in a pipeline from 5600 lines of lua and 
METAPOST code.


But luckily, in this case I can, the one using \phrasetext is 
indented, the other one is not.:


\setuplanguage[en][patterns={en}]\mainlanguage[en]

\definelabelclass[phrase]

\setupphrasetext[en][metamodelexplanation=  {...}]


The space in your text comes from the space between the = and { when you 
set the text for metamodelexplanation.


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] ugly bug

2022-06-02 Thread Wolfgang Schuster via ntg-context

Steffen Wolfrum schrieb am 01.06.2022 um 14:03:

Hi,

several times I got problems with my publishing house when they noticed that 
the headerlines jump up and down on pages that end/begin with qoutes (i.e. 
smaller interlineskip), see example below: on page 1 the blackrule is about 1mm 
higher than on page 2.

In the past I then used really laborious workarounds to get these single pages 
in the correct way (without jumping)… manual pagebreak, re-define layout etc.

But as the pages are hard to find it would be better that the layout would be 
reliable consistent.

How can this be solved?


\defineinterlinespace[steffen][line=4.2ex]

\starttext

\dorecurse{2}{\samplefile{lorem}\par}

\start
%\setuplocalinterlinespace[line=4.2ex]% wrong header alignment
\setuplocalinterlinespace[steffen]% correct header alignment
\dorecurse{4}{\samplefile{lorem}\par}
\stop

\dorecurse{2}{\samplefile{lorem}\par}

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Align headings on the left

2022-05-30 Thread Wolfgang Schuster via ntg-context

Jürgen Althaus via ntg-context schrieb am 30.05.2022 um 18:37:


Hello all,

my first post in this mailing list and I hope you can help me. I am 
looking for a setting that sets the headings completely left-aligned. 
Have unfortunately found nothing suitable in the online search. Maybe 
I searched for the wrong terms?




The layout of titles can be changed with the \setuphead commmand
and the alternative key is used to select on of the predefined styles,
in your case paragraph is the style you need.

 begin example
\setuphead
  [chapter]
  [alternative=paragraph]

\starttext

\chapter{Bestehen und Reichweite eines arbeitgeberseitigen 
Weisungsrechts auf Anordnung der Teilnahme \unknown}


\input lorem

\stoptext
 end example

The ConTeXt wiki has a separate page with all major documents
(https://wiki.contextgarden.net/Documentation) and the "not so short 
introduction"

gives a overview over many ConTeXt features.

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to include a file with table data within a table?

2022-05-29 Thread Wolfgang Schuster via ntg-context

I sent a fix to the dev list.

Wolfgang

Joel via ntg-context schrieb am 29.05.2022 um 18:34:
After a recent update to ConTeXt, the code no longer seems to allow me 
to \input a file within a table:


\starttext
\starttabulate[|p(.3\textwidth)|p(.7\textwidth)|]
 \HL
        \NC {\bf Term} \NC {\bf Definition} \NC\NR
    \HL
        \input test2.tex %

Re: [NTG-context] Help needed with slide grid layout

2022-05-25 Thread Wolfgang Schuster via ntg-context

Stefan Nedeljkovic via ntg-context schrieb am 25.05.2022 um 13:35:

Dear list,

This is a follow-up question on my previous question about Jean-Luc 
Doumont and his grid layouts. This time I have concrete questions. I 
reverse engineered his slide (slide_grid_overlay.pdf). All his units are 
based on inches, because the inch is an integer multiple (72) of the TeX 
point. His base unit is 0.1in. I tried implementing the layout first, 
but the pdf dimensions do not match the ones I set up. For example the 
width should be 8 inches, but the pdf is over 11 inches wide. I wish to 
shut off all margins and similar things and only have a text area with 
an offset of 0.2in all around the page (see slide_grid_overlay.pdf). 
Here is my current attempt:


You have to use the \measured (with a trailing s) command when you need
multiples of a measure value. When you use something like 2\measure{...}
ConTeXt uses the "2" followed by the value of the measure, the following
example demonstrates this in the second output.

 begin example
\definemeasure [point] [1pt]

\starttext

\startbuffer
\tex{measure}: \measure{point}

\tex{measured}: \the\measured{point}
\stopbuffer

\typebuffer \getbuffer

\startbuffer
2\tex{measure}: 2\measure{point}

2\tex{measured}: \the\dimexpr2\measured{point}\relax
\stopbuffer

\typebuffer \getbuffer

\stoptext
 end example

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] item enumeration

2022-05-25 Thread Wolfgang Schuster via ntg-context

Jorge Manuel via ntg-context schrieb am 25.05.2022 um 12:22:

Hi to All

A have this piece of code that works in old ConText versions but with 
new versions (current version: 2022.04.19 19:53) don’t.


\def\legalconversion#1{
 \dorecurse{\numexpr\currentitemlevel-1}{%
 \rawcounter[itemgroup:\currentparentitemgroup][\recurselevel].}%
 #1%
}
\defineconversion[legal][\legalconversion]

How can fix this?


Are you looking for the repeat keyword?

\starttext

\setupitemize[1][width=\widthofstring    {0},distance=1em]
\setupitemize[2][width=\widthofstring  {0.0},distance=1em]
\setupitemize[3][width=\widthofstring{0.0.0},distance=1em]

\startitemize[n,repeat]
    \item one
    \startitemize[n]
    \item one-one
    \item one-two
    \stopitemize
    \item two
    \startitemize[n,repeat]
    \item two-one
    \startitemize[n]
    \item two-one-one
    \item two-one-two
    \stopitemize
    \item two-two
    \stopitemize
\stopitemize

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] split TABLE cells

2022-05-19 Thread Wolfgang Schuster via ntg-context

Steffen Wolfrum via ntg-context schrieb am 19.05.2022 um 12:44:

do you have a MWE?
the example from https://wiki.contextgarden.net/Tabulate gives an empty page:

[...]


You need \starttext and \stoptext in your document. The examples in the 
wiki don't need

both commands because they are added when the examples are created.

Below is a simple example.

\setuppapersize[A5]

\starttext

\starttabulate[|l|p|]
\NC Donald Knuth  \NC \input{knuth}  \NC\NR
\NC Hermann Zapf  \NC \input{zapf}   \NC\NR
\NC Edward Tufte  \NC \input{tufte}  \NC\NR
\NC Eugene Linden \NC \input{linden} \NC\NR
\stoptabulate

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How do I turn off indentation inside a \framed with align=?

2022-05-19 Thread Wolfgang Schuster via ntg-context

Gerben Wierda via ntg-context schrieb am 19.05.2022 um 17:27:

I have these kinds of statements

\framed[frame=off,align=flushleft,width=\textwidth]{\phrasetext{metamodelexplanation}}

but the text inside the frame is typeset with indentation.

I tried \setupindenting both before and after \starttext, 
(none,no,never) but that doesn’t work.


How do I turn indenting off in all frameds with align=flushleft or 
otherwise *everywhere*?


You have to provide a minimal example, in the following the example the 
text within the frame isn't indented.


 begin example
\setupindenting[yes,medium]

\showframe[text][text]

\starttext

metamodelexplanation

\framed[frame=off,align=flushleft,width=\textwidth]{metamodelexplanation}

metamodelexplanation

\stoptext
 end example

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Table breaks incorrectly between pages

2022-05-15 Thread Wolfgang Schuster via ntg-context

Stefan Nedeljkovic via ntg-context schrieb am 13.05.2022 um 09:00:
Dear list I need your help with a table that seems to completely 
screw up the page when it spans across multiple pages. I'm attaching 
all the necessary files.


Use the TABLEnested environment in your document header which was added 
to avoid problems like in your example.


\startsetups headertext
\bTABLEnested[setups=headertable,option=stretch]
...
\eTABLEnested
\stopsetups

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Reference prefix for sections is ignored

2022-05-12 Thread Wolfgang Schuster via ntg-context

Hi,

the automatic reference prefix for section etc. with the setup

    \setuphead[chapter][referenceprefix=+]

doesn't work anymore (broken since a while).


The following patch for strc-sec.mkxl fixes the missing prefix:

 begin fix
\def\strc_sectioning_set_reference_prefix
  {\ifempty\currentstructurereferenceprefix
 % nothing
\orelse\ifx\currentstructurereferenceprefix\m_strc_references_prefix_yes
-    \global\advance\prefixcounter \plusone % temp here
-    \setupglobalreferenceprefix[\the\prefixcounter]%
+    \ifempty\currentstructurereference
+  \global\advance\prefixcounter \plusone % temp here
+  \setupglobalreferenceprefix[\the\prefixcounter]%
+    \else
+  \setupglobalreferenceprefix[\currentstructurereference]%
+    \fi
\orelse\ifx\currentstructurereferenceprefix\m_strc_references_prefix_nop
 \setupglobalreferenceprefix[]%
   \else
 \setupglobalreferenceprefix[\currentstructurereferenceprefix]%
   \fi
   \glet\currentstructurereferenceprefix\referenceprefix}
 end fix


When I apply the changes above the following document shows the correct 
references in the output.


 begin example
\setuphead[chapter][referenceprefix=+]

\starttext

\chapter[one]{First chapter}

\section[alpha]{First section}

See \in{Section}[alpha].

See \in{Section}[two:beta].

\chapter[two]{Second chapter}

\section[beta]{Second section}

See \in{Section}[one:alpha].

See \in{Section}[beta].

\stoptext
 end example

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Can I use language as a mode (set on the command line) and simplify this?

2022-05-11 Thread Wolfgang Schuster via ntg-context

Pablo Rodriguez via ntg-context schrieb am 11.05.2022 um 17:57:

AfaIk, there is not "--language" option from the command line. (This
also makes sense to me.)


\doifdocumentargument {language}
  {\mainlanguage[\getdocumentargument{language}]}

\starttext
\currentmainlanguage
\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Simple question

2022-05-10 Thread Wolfgang Schuster via ntg-context

Gerben Wierda via ntg-context schrieb am 10.05.2022 um 00:15:
What is the easiest way to have a ‘database’ of translations for 
strings and maybe links?


I now have 4 languages and 2 versions so 8 documents, but I’d like to 
have all translatable strings together so I can maintain these in a 
single file. Ideally I can do a file where the key of the translation 
is one language (say English) and the translations are part of that.


Something I can call like this

\translatephrase[English phrase][nl]
\translatelocation[../LMTX-Output/without-ids/en/file.pdf][nl][simple]

and where I can maintain all the translations a bit like this:

\translationentry[English phrase]{
\definetranslatephrase[nl]Nederlandse frase]
\definetranslatephrase[fr][Phrase français]
}
}

\translatelocation[../LMTX-Output/without-ids/en/file.pdf][simple][nl][../LMTX-Output/without-ids/nl/file-simple.pdf]]
\translatelocation[../LMTX-Output/without-ids/en/file.pdf][none][nl][../LMTX-Output/without-ids/nl/file.pdf]]


Where the \translatelocation command can be used inside an 
\externalfigure command and \translatephrase can be used as as text.


In the end I’d like to compile with

context language=fr mode=simple mainfile.tex

Doable?


To set language dependent texts you can use the labeltext mechanism 
which is used by ConTeXt to change the captions for floats etc.


Besides the default \labeltext and \setuplabeltext commands you can 
create your own instance of the mechanism for your texts.


 begin example
\definelabelclass [gerben]

\setupgerbentext [en] [phrase=English phrase]
\setupgerbentext [nl] [phrase=Nederlandse frase]
\setupgerbentext [fr] [phrase=Phrase français]

%\mainlanguage[nl]
%\mainlanguage[fr]

\starttext
\gerbentext{phrase}
\stoptext
 end example

To change images you use multiple sub folders where each folder has 
images which the same name. In ConTeXt you can use a mode to choose 
which directory is used to load the image. Another method is to map the 
file names of the images to symbolic names and use only the symbolic 
names in your document.


 begin example
\setupexternalfigures [location={local,global,default}]

\useexternalfigure [simple] [cow.pdf]
%\useexternalfigure [simple] [hacker.png]

\starttext
\externalfigure[simple]
\stoptext
 end example

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] context module t-account in LMTX

2022-04-28 Thread Wolfgang Schuster via ntg-context

Heinrich Paeßens schrieb am 28.04.2022 um 16:39:

Many thanks Wolfgang,

I can see the 'values' in a table like form, nothing but the values — 
how can I switch on the 'lines' of the table?


You can either add

    \setuptaccount[mp=taccount:line]

or

    \setuptaccount[mp=taccount:nose]

before the table.

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Problem with a defined colour in MetaFun

2022-04-28 Thread Wolfgang Schuster via ntg-context

Keith McKay via ntg-context schrieb am 28.04.2022 um 12:05:


Hi,

In the MWE below I define an rgb colour, myColor1, using random 
numbers for the r, g and b components. I then use it to fill a 
unitsquare the size of the page, which works as expected. In the loop 
that follows I then use the defined colour, myColor1, along with white 
and the variable r to create shades of myColor1 as in the MWE below. 
However, myColor1 is not recognised in the loop and seems to be 
replaced by black, although if I use a predefined colour, in this case 
BurntSienna from the crayola collection, it works as expected.  I have 
tried a number of ways to get this to work as shown in the code but 
without success. I would be grateful for any suggestions.


Best Wishes

Keith McKay

MWE%

\setuppapersize[A4,portrait]

\usecolors[crayola]

\starttext

\dorecurse{10}{

\startMPpage

StartPage;

\definecolor[name="myColor1", r = uniformdeviate(1), g = 
uniformdeviate(1), b = uniformdeviate(1) ] ;




Remove the backslash in front of the definecolor command.

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] context module t-account in LMTX

2022-04-26 Thread Wolfgang Schuster via ntg-context

Heinrich Paeßens via ntg-context schrieb am 26.04.2022 um 16:13:

Hi there

I just tried to test the use of the /t-account module/, compiling with 
LMTX, but no avail.


What is wrong? Does the module need a fix for LMTX or is the fault on 
my side (having no experience …)?


The module which can be downloaded from the modules section of the 
context wiki page is no longer supported.


I wrote a new version of the module a few years ago after I got a user 
request but I haven't put the new version on the wiki. To use the new 
version of the module you can download the file from my github site [1] 
and put it in the same folder as your document. There are examples how 
to use the module at the end of the file.


[1] https://github.com/wolfgangschuster/taccount/tree/master/files

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] issue with framed texts

2022-04-25 Thread Wolfgang Schuster via ntg-context

Pablo Rodriguez via ntg-context schrieb am 25.04.2022 um 18:17:

On 4/24/22 21:13, Wolfgang Schuster via ntg-context wrote:

Pablo Rodriguez via ntg-context schrieb am 24.04.2022 um 20:56:

[...]
Using current LMTX (2022.04.20 19:18), I’m afraid no format from
\setupframedtext is applied to the backcover framed text.
[...]

While you can pass a instance to \starframed (e.g.
\startframed[backcover]) the same isn't possible with \startframedtext.

Many thanks for your reply, Wolfgang.

I thought I could do that, because
http://www.pragma-ade.com/general/qrcs/setup-en.pdf seems to allow it.


\startframedtext allow the following four keywords for the first 
optional argument


    - left
    - middle
    - right
    - none

These four keywords can be used to control the horizontal alignment of 
the frame but they aren't framedtext instances.


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] issue with framed texts

2022-04-24 Thread Wolfgang Schuster via ntg-context

Pablo Rodriguez via ntg-context schrieb am 24.04.2022 um 20:56:

Dear list,

I have the following sample:

   \defineframedtext[backcover]
   \setupframedtext[backcover]
   [frame=off,
offset=overlay,
width=\textwidth]
   \starttext
   \startframedtext[backcover]
   \input zapf
   \stopframedtext
   \stoptext

Using current LMTX (2022.04.20 19:18), I’m afraid no format from
\setupframedtext is applied to the backcover framed text.

Can anyone confirm the issue or explain what I’m doing wrong?


You have to use

\startbackcover
...
\stopbackcover

in your document.

While you can pass a instance to \starframed (e.g. 
\startframed[backcover]) the same isn't possible with \startframedtext.


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Word wrap of 'part' titles

2022-04-18 Thread Wolfgang Schuster via ntg-context

Bruce Horrocks via ntg-context schrieb am 18.04.2022 um 22:46:

In the MWE below the 'part' title is centred but on one line only and, because 
it is a long title, the beginning and end are lost off the sides of the page.

If it were a 'chapter' title then I could insert '\\' to cause a line break at 
that point. However this does not seem to work for 'part'.

Is there a way of making 'part' titles wrap the same way that 'chapter' titles 
do?

% ---begin---
\define[2]\placePartTitle{\midaligned{#2}}

\definehead [Part] [part]
\setuphead[Part]
   [ placehead=yes,
 style={\tfd},
 command=\placePartTitle,
   ]


\setuphead
  [Part]
  [placehead=yes,
   style=\tfd,
   align=middle,
   number=no]

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] right item marks for associative questions?

2022-04-12 Thread Wolfgang Schuster via ntg-context

Damien Thiriet via ntg-context schrieb am 12.04.2022 um 20:46:

Thank you for all your answers.
I will have a deeper look at them.
My first comments:


If you are certain that the there will be no
multi-line item

Unfortunately there are often some. History
teachers are not known for loving short texts,
at least in France.


Using the “columns" feature is one way to go

Might be, but I do not always give the same
number of answers on both columns

Something I forgot to put in my MWE is that I
randomize both lists. Messing the answers is a
good way to prevent pupils from cheating,
especially with long answers..
That makes a four columns table more cumbersome,
so I believe.


You can use different alignment settings to move the bullet points to 
the right side of your lists.


\starttext

\bTABLE[frame=off,width=.4\textwidth,columndistance=.2\textwidth,align={normal,lohi}]
  \bTR
    \bTD
  \startitemize[circle,random][align=righttoleft]
  \startitem {\lefttoright One} \stopitem
  \startitem {\lefttoright Two} \stopitem
  \startitem {\lefttoright Three} \stopitem
  \stopitemize
    \eTD
    \bTD
  \startitemize[circle,random]
  \startitem First \stopitem
  \startitem Second \stopitem
  \startitem Third \stopitem
  \startitem Foruth \stopitem
  \stopitemize
    \eTD
  \eTR
\eTABLE

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] command line arguments to specify output directory

2022-03-30 Thread Wolfgang Schuster via ntg-context

A A via ntg-context schrieb am 30.03.2022 um 18:24:

Dear All,

I would like to ask whether there exists a command line option to the 
context executable which would allow me to specify the directory in 
which I would like my output to be dumped.


I have noticed that if I call the executable outside the directory in 
which the .tex file resides, my supporting files (and resulting pdf) 
are dumped outside the directory in which the .tex file is located.


context --runpath=... filename

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] mathcal generates error in ConTeXt

2022-03-26 Thread Wolfgang Schuster via ntg-context

A A via ntg-context schrieb am 26.03.2022 um 08:50:

Hi Jan,

Thanks, I was starting to think pandoc is not yet mature enough to 
handle these conversions, but it looks like that might not be the case.


\mathcal works now, but I actually ran into another issue in my real 
document. I have the following defined in my LaTeX:


/$C = ``\textrm{dad}``$/

It looks like context has a hard time compiling the above, even with 
\starttext and \stoptext commands generated with the pandoc -s flag. 
Here's the error:


/The control sequence at the end of the top line of your error
message was never/
/\def'ed. You can just continue as I'll forget about whatever was
undefined./
/mtx-context     | fatal error: return code: 1/
/
/

How can I include quotes in math expressions the same way I do in LaTeX?


When you take a closer look at the error message you can see ConTeXt 
complains about the \textrm command.



tex error   > tex error on line 2 in file ./test.tex: Undefined 
control sequence \undefined



    $C = ``\textrm
    {dad}``$

1 \starttext
2 >>  $C = ``\textrm{dad}``$
3 \stoptext
The control sequence at the end of the top line of your error message 
was never

\def'ed. You can just continue as I'll forget about whatever was undefined.
mtx-context | fatal error: return code: 1


You can solve this by replacing \textrm with \text or when you need more 
control about the style of the text you can use the \mathtext commands 
(e.g. \mathtextrm, \mathtextit etc.).


To get the correct quotes in your document you either use the proper 
quotes in the source (“ and ”) or just use the \quotation command.



\starttext

$C = \text{\quotation{dad}}$

$C = \text{“dad”}$

\stoptext


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Make footnote/endnote number not superscript?

2022-03-20 Thread Wolfgang Schuster via ntg-context

Bruce Horrocks via ntg-context schrieb am 20.03.2022 um 21:10:

I'm editing a book that will be printed, however the authors have included URLs which will no doubt suffer from 
"bit rot" in no time at all. I think it will make the main text cleaner if I use endnotes rather than 
include the URL in-line in the text or as a (distracting) footnote. So when the author writes "See my video at 
" I will print "See my video at link 1". At the back of the book, in an 
appendix somewhere, I then use \placenotes to display a table of the actual URLs for any readers that want to type 
them in.

I want the "link 1" bit to be normal text rather than superscript so it's more 
visible. Using the \setupnote[textstyle=...] command I can change the style of the number 
but not the superscript placing.

Is there a way to remove the superscript placing, please?


\starttext

First\footnote{Footnote one}

\setupnote[footnote][textcommand=]

First\footnote{Footnote two}

\stoptext

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-20 Thread Wolfgang Schuster via ntg-context

Willi Egger via ntg-context schrieb am 20.03.2022 um 17:05:

Hoi Wolfgang,

I tested both variants (bodymatter and bodypart. The compilation runs through, 
however without the thumb-picture in the margin and the metafun error is in the 
log.


1. Do you use \startfrontmatter and \startbodymatter in your document to 
create blocks?


2. Is you installation up-to-date?

Attached is a slightly modified version of your example, the only thing 
which has to be local to the bodypart is the background setting to 
enable the thumb pictures.


Wolfgang

\definecolor [chap_frame] [black]
\definecolor [textcolor]  [white]

\startuseMPgraphic{chapter-thumb}
path chap_frame ;
pair pos,a,b ;
picture Chap ;

if \somenamedheadnumber{chapter}{current} > 0 :
curr_chap := \somenamedheadnumber{chapter}{current} ;
else :
curr_chap := 1 ;
fi;
if \somenamedheadnumber{chapter}{last} > 0 :
last_chap := \somenamedheadnumber{chapter}{last} ;
else :
last_chap := 1 ;
fi;
if \somenamedheadnumber{section}{current} > 0 :
curr_sect := \somenamedheadnumber{section}{current} ;
else:
curr_sect := 1 ;
fi;
if \somenamedheadnumber{section}{last} > 0 :
last_sect := \somenamedheadnumber{section}{last} ;
else:
last_sect := 1;
fi;
if curr_chap < 11 :
skip := TextHeight * (curr_chap-1)/11 ;
elseif curr_chap < 21 :
skip := TextHeight * (curr_chap-11)/11 ;
else:
skip := TextHeight * (curr_chap-21)/11 ;
fi;

Chap := textext("\bfa\textcolor\getmarking[chapter]") ;

StartPage ;
chap_frame := lcircle xscaled (2*RightMarginWidth) yscaled 
(1.5*RightMarginWidth) ;

a := ulcorner chap_frame ;
b := urcorner chap_frame ;

pos := urcorner Field[Text][RightMarginSeparator] - ulcorner chap_frame 
- (-1mm,skip) ;

fill chap_frame shifted pos withcolor "chap_frame" ;
draw Chap rotated 90 shifted (xpart pos-4mm,ypart pos) ;
StopPage ;
\stopuseMPgraphic

\defineoverlay[chapter-thumb][\useMPgraphic{chapter-thumb}]

\startsectionblockenvironment[bodypart]
\setupbackgrounds[rightpage][background=chapter-thumb]
\stopsectionblockenvironment

\showframe

\starttext

\startfrontmatter

\startchapter[title=Test A]
\samplefile{ward}
\stopchapter

\stopfrontmatter

\startbodymatter

\startchapter[title=Test C]
\samplefile{ward}
\stopchapter

\stopbodymatter

\stoptext























% Global settings for all chapters
\setuphead[chapter][style=\ssc]

% Local settings for chapter in the bodymatter block
\startsectionblockenvironment[bodypart]
\setuphead[chapter][color=blue]
\stopsectionblockenvironment

\starttext

\startfrontmatter

\title{Table of content}

\placecontent

\stopfrontmatter

\startbodymatter

\chapter{Knuth}

\input knuth

\chapter{Zapf}

\input zapf

\stopbodymatter

\stoptext





\starttext

a\texttilde b\lettertilde c\textasciitilde d

\stoptext




\definepageinjectionalternative
  [chapter:image]
  [renderingsetup=pageinjection:chapter:image]

\startsetups [pageinjection:chapter:image]
  \centerbox{\externalfigure[\dummyparameter{name}]}
\stopsetups

\definepageinjection
  [chapter:start]
  [empty]
  [page=left]

\definepageinjection
  [chapter:insert]
  [previouspage]
  [alternative=chapter:image,
   offset=1cm,
   pagestate=stop]

\setuphead
  [chapter]
  [beforesection={\pageinjection[chapter:start]},
   
insidesection={\pageinjection[chapter:insert][name={chapter-\namedheadnumber{chapter}}]}]

\setuppagenumbering
  [alternative=doublesided]

\setupexternalfigures
  [location=default]

\useexternalfigure [chapter-1] [mill]   [factor=max]
\useexternalfigure [chapter-2] [hacker] [orientation=90,scale=2000]
\useexternalfigure [chapter-3] [cow][orientation=90,height=\framedwidth]

\starttext

\startchapter [title={Mill}]
\dorecurse{7}{\samplefile{lorem}}
\stopchapter

\startchapter [title={Hacker}]
\dorecurse{11}{\samplefile{lorem}}
\stopchapter

\startchapter [title={cow}]
\dorecurse{7}{\samplefile{lorem}}
\stopchapter

\stoptext




\setupbodyfont[termes]

\starttext

plays \m{\frac{2}{3} A}, \m{\frac{1}{3} D}.

\stoptext






\definefallbackfamily[story][serif][notoserif][range={greekandcoptic,greekextended},force=yes]
\definefontfamily[story][serif][TeX Gyre Schola]

\definefontfamily [story] [sans] [Latin Modern Sans]
\definefontfamily [story] [mono] [Latin Modern Mono] [features=none]

\definetypeface [story] [ss] [sans] [modern] [default]
\definetypeface [story] [ss] [mono] [modern] [default]

\definetypeface [story] [ss] [sans] [modern-designsize] [default]
\definetypeface [story] [ss] [mono] [modern-designsize] [default]

\definefontfamily[story][mm][TeX Gyre Pagella Math]

\definetypeface [story] [mm] [math] [pagella] [default]

\setupbodyfont[story,11pt]

\usebodyfont[termes]

\showframe

\startsetups [blockquote:style]
\switchtobodyfont[termes]
\setupwhitespace[2pt]
\stopsetups


Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-20 Thread Wolfgang Schuster via ntg-context

Willi Egger via ntg-context schrieb am 20.03.2022 um 16:53:

Hoi Wolfgang!

thank you for your suggestion. Your example indeed works. However if I apply 
this to my situation, which is

\startsectionblockenvironment[bodymatter]


You use the wrong name for the argument:

\startsectionblockenvironment[bodypart]

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-20 Thread Wolfgang Schuster via ntg-context

Willi Egger via ntg-context schrieb am 19.03.2022 um 21:42:

Hello Otared,

thanks so much for your testing and comments. — Tthe problem is, that this 
thumb-picture should only be placed in the \startboydmatter..\stopbodymatter 
sections. In the case of this book however there are the title pages and quite 
some text including the TOC in the \startfrontmatter..\stopfrontmatter. SO I 
end up with being forced to invoke the setups at the beginning of the 
bodymatter.


Use sectionblockenvironment to set value which are only applied in the 
frontmatter, bodymatter etc.


 begin example
% Global settings for all chapters
\setuphead[chapter][style=\ssc]

% Local settings for chapter in the bodymatter block
\startsectionblockenvironment[bodypart]
\setuphead[chapter][color=blue]
\stopsectionblockenvironment

\starttext

\startfrontmatter

\title{Table of content}

\placecontent

\stopfrontmatter

\startbodymatter

\chapter{Knuth}

\input knuth

\chapter{Zapf}

\input zapf

\stopbodymatter

\stoptext
 end example

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] tilde character

2022-03-14 Thread Wolfgang Schuster via ntg-context

Henning Hraban Ramm via ntg-context schrieb am 14.03.2022 um 18:36:
Hi, I’ve a stupid question: How do I get the default tilde character 
from a font?


~ is a fixed space
\texttilde gives a tilde accent
\utfchar{0x007E} yields a space (probably the same as ~)


\lettertilde

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] help with facing page image

2022-03-11 Thread Wolfgang Schuster via ntg-context

jbf schrieb am 09.03.2022 um 23:02:
Am endeavouring to explore Wolfgang's very 'elegant' solution to this 
facing page challenge. The exploration has included a look at 
base/mkxl/page-inj.mklx (thanks Sreeram for reminding me of this) 
where I see immediately that the approach is experimental and where it 
says also that 'probably more alternatives will be added'. I wonder if 
that last phrase also includes the ability to manipulate the image(s) 
either generally or in individual cases?


Keep your expectations low. I wrote the code (with some changes from 
Hans) to include full page images in novels and the code hasn't changed 
much since 2013.


So, for example., say I need (and in fact I do!) to change some aspect 
of individual images, e.g. I might want to scale=500, or fiddle with 
width/height of a particular image. At the moment I cannot see a way 
of doing this for each image. I wondered if the commented out setups 
in the response to this question might be a clue, but so far haven't 
been able to get that to have any effect.


You have to use a custom alternative (see below) to place the image on 
the page because the default alternative scales the image to fit on the 
available space. The best solution to change orientation, size etc. of 
the included images is to use the \useexternalfigure command and make 
all changes in the style file.



\definepageinjectionalternative
  [chapter:image]
  [renderingsetup=pageinjection:chapter:image]

\startsetups [pageinjection:chapter:image]
  \centerbox{\externalfigure[\dummyparameter{name}]}
\stopsetups

\definepageinjection
  [chapter:start]
  [empty]
  [page=left]

\definepageinjection
  [chapter:insert]
  [previouspage]
  [alternative=chapter:image,
   offset=1cm,
   pagestate=stop]

\setuphead
  [chapter]
  [beforesection={\pageinjection[chapter:start]},
insidesection={\pageinjection[chapter:insert][name={chapter-\namedheadnumber{chapter}}]}]

\setuppagenumbering
  [alternative=doublesided]

\setupexternalfigures
  [location=default]

\useexternalfigure [chapter-1] [mill]   [factor=max]
\useexternalfigure [chapter-2] [hacker] [orientation=90,scale=2000]
\useexternalfigure [chapter-3] [cow] [orientation=90,height=\framedwidth]

\starttext

\startchapter [title={Mill}]
\dorecurse{7}{\samplefile{lorem}}
\stopchapter

\startchapter [title={Hacker}]
\dorecurse{11}{\samplefile{lorem}}
\stopchapter

\startchapter [title={cow}]
\dorecurse{7}{\samplefile{lorem}}
\stopchapter

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] help with facing page image

2022-03-07 Thread Wolfgang Schuster via ntg-context

jbf via ntg-context schrieb am 07.03.2022 um 09:27:
Appreciate your assistance. I'll do my best with what you offer here. 
Of course, I've always said these images are at the beginning, not 
"the end of their respective chapters" and I've already indicated how 
the images are named, simply as Chapter1.jpg  and so on, so I'll need 
to work around these differences in your example. But with trial and 
error, let's hope I get there!


The example below uses a different mechanism to add images at the start 
of a chapter. In the example you have to pass the name of image as 
userdata argument of \startchapter but in the commented \setuphead 
setting you can see how this can be automated.


 begin example
% \definepageinjectionalternative
%   [chapter:image]
%   [renderingsetup=pageinjection:chapter:image]
%
% \startsetups [pageinjection:chapter:image]
%   \clip
% [width=\framedwidth,height=\framedheight]
% {\centerbox{\externalfigure[\dummyparameter{name}][factor=min]}}
% \stopsetups

\definepageinjection
  [chapter:start]
  [empty]
  [page=left]

\definepageinjection
  [chapter:insert]
  [previouspage]
  [%alternative=chapter:image,
   pagestate=stop]

\setuphead
  [chapter]
  [beforesection={\pageinjection[chapter:start]},
insidesection={\pageinjection[chapter:insert][name=\structureuservariable{image}]}]

% \setuphead
%   [chapter]
%   [beforesection={\pageinjection[chapter:start]},
% 
insidesection={\pageinjection[chapter:insert][name={chapter\namedheadnumber{chapter}}]}]


\setuppagenumbering
  [alternative=doublesided]

\setupexternalfigures
  [location=default]

\starttext

\startchapter [title={Mill}] [image=mill]
\dorecurse{7}{\samplefile{lorem}}
\stopchapter

\startchapter [title={Mill}] [image=mill]
\dorecurse{11}{\samplefile{lorem}}
\stopchapter

\startchapter [title={Mill}] [image=mill]
\dorecurse{7}{\samplefile{lorem}}
\stopchapter

\stoptext
 end example

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Odd Font Behavior in startstop Group

2022-02-06 Thread Wolfgang Schuster via ntg-context

Michael Urban via ntg-context schrieb am 05.02.2022 um 20:28:

I am experiencing an odd behavior switching text styles in a defined startstop group 
("blockquote").   I get different behavior depending on whether the 
switchtobodyfont in the startstop definition includes the dummy {\it } and {\bf } text.   
If they are not there, the italic and boldface switches in the second blockquote revert 
to the gyreschola body font of the main text; but this only happens if there is an 
earlier blockquote with no style changes.  This is with:

[...]

Do I need a newer version of ConTeXt, or am I doing something wrong?
Fonts in ConTeXt are always perilous, alas.  For me, anyway.


\definefallbackfamily[story][serif][notoserif][range={greekandcoptic,greekextended},force=yes]
\definefontfamily[story][serif][TeX Gyre Schola]


The following two font settings are wrong, you're passing the name of a 
typescript for the third argument while \definefontfamily expects the 
family name of a font.


Even though the usage of the command is wrong you didn't notice it 
because as a fallback \definefontfamily uses the Latin Modern version of 
the requested style when no font was found.



\definefontfamily[story][sans][modern]
\definefontfamily[story][mono][modern]


The correct settings for both settings are

    \definefontfamily [story] [sans] [Latin Modern Sans]
    \definefontfamily [story] [mono] [Latin Modern Mono] [features=none]

with the "features=none" for the mono font to ensure no ligatures are 
formed.


An alternative for \definefontfamily is to use \definetypeface and 
choose a predefined typescript for the Latin Modern family. You can 
either use


    \definetypeface [story] [ss] [sans] [modern] [default]
    \definetypeface [story] [ss] [mono] [modern] [default]

which uses the 10pt optical size even for smaller and bigger sizes or 
you enable optical sizes with the following typescript


    \definetypeface [story] [ss] [sans] [modern-designsize] [default]
    \definetypeface [story] [ss] [mono] [modern-designsize] [default]



\definefontfamily[story][mm][TeX Gyre Pagella Math]


I recommend to load the math font with the provided typescript because 
they ensure existing patches (e.g. spacing corrections) for the selected 
font are applied.


    \definetypeface [story] [mm] [math] [pagella] [default]


\setupbodyfont[story,11pt]

\definestartstop[blockquote]
  [
   before={ \blank \startnarrower \setupwhitespace[2pt] \setupindenting[none]
\switchtobodyfont[termes]{\it }{\bf }% This is so weird.  Put a 
comment marker after [termes] for a different result
   },
   after={ \stopnarrower \blank \indenting[next]},
  ]%


ConTeXt already provides a blockquote-environment which can be 
configured to have the same style as your custom environment.


\startsetups [blockquote:style]
    \switchtobodyfont[termes]
    \setupwhitespace[2pt]
\stopsetups

\setupdelimitedtext
  [blockquote]
  [spacebefore=big,
 style=\directsetup{blockquote:style},
 indenting=none,
    indentnext=yes]

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] paragraph notes located in text

2022-01-31 Thread Wolfgang Schuster via ntg-context

Pablo Rodriguez via ntg-context schrieb am 31.01.2022 um 19:49:

Dear list,

with current latest (2022.01.21 20:13), I cannot get paragraph footnotes
when located in text.

Here you have the mandatory sample:

   \setuppapersize[A6]
   \showframe\showgrid
   %~ \setupnote[footnote][paragraph=yes]
   \setupnote[footnote][location=text, paragraph=yes]
   \setupnotation[footnote][alternative=serried, width=broad]
   \starttext
   \startlinenumbering[step=3]
   \dorecurse{25}
{a\footnote{b} }
   \stoplinenumbering
\placenotes[footnote]
   \stoptext

I already asked this twice
(https://mailman.ntg.nl/pipermail/ntg-context/2022/104770.html,
https://mailman.ntg.nl/pipermail/ntg-context/2022/104929.html).

Could anyone confirm that the is no way to get paragraph notes when
location is text, or tell me what I’m missing?


You forgot

    \setupnotation[footnote][display=no]

otherwise each footnote entry starts at a new line.

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] doublesided margin page number

2022-01-31 Thread Wolfgang Schuster via ntg-context

Youssef Cherem via ntg-context schrieb am 24.01.2022 um 02:28:
I've managed to put double-sided page numbers -- but numbers are 
restarting after two, though. What's going on?


Add

    \setupbackgrounds[state=repeat]

to your setups to ensure the text background is refreshed.

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Why isn't bold + italics working together?

2022-01-29 Thread Wolfgang Schuster via ntg-context

Joel via ntg-context schrieb am 29.01.2022 um 15:46:
I am finishing the final touches on a manuscript, which I hope to send 
to a publisher later today and noticed this problem where bold and 
italic text isn't rendered at the same time.


I am using the EB Garamond font in my document. I set it up exactly as 
shown below. Strangely, bold works, italics works, but when bold and 
italics are together, it only display in italics, it doesn't display a 
bold italic text. I've confirmed the `EBGaramond-BoldItalic.otf` font is 
present and seems just fine. I've also tried by just using the default 
ConTeXt font and the error still appears, also in 
live.contextgarden.net. I tried searching the mailing list, as this 
seems like something that must have come up, but couldn't find any 
question about this.


Why won't it render both?


See Adams answer.


\starttypescript[serif] [garamond]
\definefontsynonym[Serif] [file:~/.fonts/12/EBGaramond-Regular.otf]
\definefontsynonym[SerifBold] [file:~/.fonts/12/EBGaramond-Bold.otf]
\definefontsynonym[SerifItalic] [file:~/.fonts/12/EBGaramond-Italic.otf]
\definefontsynonym[SerifBoldItalic] [file:~/.fonts/12/EBGaramond-BoldItalic.otf]
\stoptypescript


Don't use absolute paths in \definefontsynonym, when you use a local 
folder for your font files set the path with \usefontpath.


 begin snippet
\usefontpath [~/fonts/12/]

\starttypescript [serif] [garamond]
\definefontsynonym [Serif] [file:EBGaramond-Regular.otf]
...
\stoptypescript
 end snippet

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Why isn't bold + italics working together?

2022-01-29 Thread Wolfgang Schuster via ntg-context

Adam Reviczky via ntg-context schrieb am 29.01.2022 um 17:19:

Hi Joel,

I don't think you can stack those, just use \bi (see: 
https://wiki.contextgarden.net/Font_Switching)


\starttext
\startitemize
\item This text has {\bf bold} in it.
\item This text has {\it italics} in it.
\item Why doesn't this have {\bi bold and italics} in it?
\stopitemize

See also: https://www.mail-archive.com/ntg-context@ntg.nl/msg4.html


This thread is outdated, you can now stack styles.

\starttext

text {\italicface text {\boldface text} text} text

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to make an in-text list without periods

2022-01-23 Thread Wolfgang Schuster via ntg-context

Thomas A. Schmitz via ntg-context schrieb am 23.01.2022 um 21:13:

This is a FAQ: you can't mix keywords and assignments, hence:

\startitemize [n,text] [stopper=]


Put a comment after the second argument to get rid of the extra space 
before the first item.


    \startitemize [text,n] [stopper=]%

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to achieve true double space text in ConTeXt?

2022-01-17 Thread Wolfgang Schuster via ntg-context

Joel via ntg-context schrieb am 17.01.2022 um 17:18:
I need to display one article within my book that is in double space, 
like what is a basic requirement in US colleges for turning in papers. 
Basically, I need readers to have lots of space above the text to be 
able to write some notes above every line.


This is a line of text.
% <-- here is the space between lines
% <-- this space here is as tall as a line of text.
% <-- here is the next space between lines
This is the next visible line of text.

The closest I can get is the "big" setting in `\setupinterlinespace`, 
but it isn't big enough. I've also tried manual measurements in cm, but 
I have no idea which setting is typographically good.


\setupinterlinespace[on, big]
     \startlinenumbering
     \input article
     \stoplinenumbering
\setupinterlinespace[off]

How can I achieve double space text in ConTeXt?


The \setupinterlinspace accepts also numbers to choose a multiple of the 
default distance or you pass a dimension where you set a fixed value for 
the distance between the baselines.


 begin example
\showgrid

\starttext

\samplefile{lorem}

\page

\start \setupinterlinespace[2]% 2 lines, also possible: 1.5, 3, ...
\samplefile{lorem}\par
\stop

\page

\start \setupinterlinespace[line=5.6ex]% also possible: 
\setupinterlinespace[5.6ex]

\samplefile{lorem}\par
\stop

\stoptext
 end example

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to troubleshoot why my document begins with a blank page?

2022-01-17 Thread Wolfgang Schuster via ntg-context

Joel via ntg-context schrieb am 17.01.2022 um 17:11:
I created a book that strangely renders with an entirely blank page. 
There are tons and tons of macros, in dozens of files defined before the 
document starts, but the document itself starts quite simply with a 
title page set inside \startfrontmatter. How can I identify what types 
of preamble information would be causing an entire blank page to render 
before the document even begins?


This minimum working example won't show me the error, but it does show I 
simply have \starttext followed by my title and nothing is between that 
should be rendering an entire blank page.


It's possible you have something in your setups which produces text 
which isn't visible in the PDF because no font was loaded at this point, 
run my example below to see the effect.


To find the problem in your setup first create a new document where you 
use something simple like in my example as content but add you complete 
setups before \starttext. When this is done you can comment (or delete) 
parts of the setup until the empty page disappears.


 begin example
hidden text

\starttext

\startstandardmakeup
Text
\stopstandardmakeup

\stoptext
 end example

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] XML, dealing with whitespace

2022-01-15 Thread Wolfgang Schuster via ntg-context

Denis Maier via ntg-context schrieb am 15.01.2022 um 13:04:


Hi all,

I have sources that look like this:

%





   Bla Bla Bla



  

 Bla

  , Bla Bla.



%

Typesetting this with context gives me a spurious space after the 
underlined Bla in italics.




There is no spurious space, the line break is just converted to a space 
and I see no reason why this shouldn't happen. To remove space before or 
after certain parts of text within a paragraph you can use the 
\removeunwantedspace and \ignorespaces commands.


 begin example
\starttexdefinition RemovePreceding #1
    \removeunwantedspaces
    #1
\stoptexdefinition

\starttexdefinition RemoveFollowing #1
    #1
    \ignorespaces
\stoptexdefinition

\starttext

Bla \RemovePreceding{Bla} Bla

Bla \RemoveFollowing{Bla} Bla

\stoptext
 end example

When only  following spaces are a problem a better alternative to 
\ignorespace is \autoinsertnextspace which checks the following token 
which ensures there is space when the next character is punctuation.


 begin example
\starttexdefinition Italic #1
    \emphasized{#1}
    \autoinsertnextspace
\stoptexdefinition

\starttexdefinition Underbar #1
    \underbar{#1}
\stoptexdefinition

\starttext

Bla Bla Bla

\Underbar{\Italic{Bla} , Bla Bla.}

\stoptext
 end example

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to let a macro check the previous value of #1 the last time the same macro was called?

2022-01-10 Thread Wolfgang Schuster via ntg-context

Henning Hraban Ramm via ntg-context schrieb am 10.01.2022 um 09:52:

Am 09.01.22 um 16:03 schrieb Wolfgang Schuster via ntg-context:

Joel via ntg-context schrieb am 09.01.2022 um 15:16:
Is there a way for a macro to check the previous value of #1, the 
last time that same macro was called?


To check is the current value differs from the last one you need a 
temp macro where you store the current value at the end of your 
command to check it in the next call.


Would it make more sense, or would it be “cleaner” to use a variable?


You can get rid of the temp variable before the command definition but 
now you have to access it with a different method in \mymacro, below is 
one way (LMTX only) but \setvariable and \getvariable work as well.


\define[1]\mymacro
  {\iftok{#1}{\getvalue{previousmymacro}}%
 same as last time
   \else
 it is different from last time
   \fi
   \setvalue{previousmymacro}{#1}}

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Get Current Section Number

2022-01-09 Thread Wolfgang Schuster via ntg-context

Michael Urban via ntg-context schrieb am 09.01.2022 um 17:25:

I want to put a book title above the Chapter title for the first chapter of a 
book.  I suppose that this can be accomplished with a 'before=' clause that 
checks to see if it is the first chapter... but how do I look at the chapter 
number in order to set up the conditional?


Can you show a example of your document, maybe there is a better way to 
produce the desired result.


\startsetups [document:start]
    \startalignment[middle]
    {\ssd\documentparameter{title}}
    \stopalignment
\stopsetups

\setuphead [chapter] [page=no]

\startdocument [title={Dummy title}]

\dorecurse{5}
  {\startchapter[title={Chapter \convertnumber{word}{#1}}]
   \samplefile{lorem}
   \stopchapter}

\stopdocument

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to let a macro check the previous value of #1 the last time the same macro was called?

2022-01-09 Thread Wolfgang Schuster via ntg-context

Joel via ntg-context schrieb am 09.01.2022 um 15:16:
Is there a way for a macro to check the previous value of #1, the last 
time that same macro was called?


Here is a minimum working example, pretending that `\previousvalue` is 
equal to #1 from the last time the same macro was called:


[...]


To check is the current value differs from the last one you need a temp 
macro where you store the current value at the end of your command to 
check it in the next call.


\let\previousmymacro\empty

\define[1]\mymacro
  {\edef\currentmymacro{#1}%
   \ifx\previousmymacro\currentmymacro
 same as last time
   \else
 it is different from last time
   \fi
   \let\previousmymacro\currentmymacro}

\starttext

\startlines
cat: \mymacro{cat}
cat: \mymacro{cat}
mouse: \mymacro{mouse}
mouse: \mymacro{mouse}
cat: \mymacro{cat}
\stoplines

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to create cell data that spans four rows in a table?

2022-01-09 Thread Wolfgang Schuster via ntg-context

Willi Egger via ntg-context schrieb am 08.01.2022 um 23:57:

I would suggest not to use \starttable at all.

To me the most suitable table environment for such a table is \bTABLE \eTABLE. 
It gives you all kind of control over layout, dimensions, frames on and off etc.



I agree natural tables or extreme tables are the better choice for this 
table layout but it can be improved.



1. Keep the layout/settings local.

To ensure the \setupTABLE settings don't affect other tables you can 
either put \start and \stop at the begin and end of the table, e.g.


\start
\setupTABLE[...]
\bTABLE
...
\eTABLE
\stop

or put the settings in a setup-environment and load them on a pertable 
basis, e.g.


\startsetups[fancytable]
\setupTABLE[...]
\stopsetups
\bTABLE[setups=fancytable]
...
\eTABLE


2. Font changes are local to cells

When you apply a font switch to the whole content of a table cell there 
is no need to put braces around the text, e.g.


\bTD \bf ... \eTD

can be used without problem. When you make this change for a table 
header and the result is bold text there is a even simpler method 
because a special cell type exists here, e.g.


\bTH ... \eTH

creates bold text.


3. Simple markup

For natural tables with short texts in each cell there exists a simple 
mode which uses \starttable inspired markup with the short \NC and \NR 
commands to mark the start of each cell and row.


The example table of the OP can be written like below.

\starttext

\startsetups [tableframe]
\setupTABLE [c] [1][leftframe=off,width=40mm]
\setupTABLE [c] [2][rightframe=off, width=60mm]
\setupTABLE [c] [each] [align={lohi,center}]
\stopsetups

\startTABLE[setups=tableframe]
\NC \bf Eons  \NC \bf Eras \NC\NR
\NC Hadeon Eon\NC  \NC\NR
\NC[ny=4] Archanon Eon\NC Eoarchean Era\NC\NR
\NC   Paleoarchean Era \NC\NR
\NC   Mesoarchean Era  \NC\NR
\NC   Neoarchean Era   \NC\NR
\NC[ny=3] Proterozoic Eon \NC Paleoproterozoic Era \NC\NR
\NC   Mesoproterozoic Era  \NC\NR
\NC   Neoproterozoic Era   \NC\NR
\NC[ny=3] Phanerozoic Eon \NC Paleozoic Era\NC\NR
\NC   Mesozoic Era \NC\NR
\NC   Cenozoic Era \NC\NR
\stopTABLE

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] \its disappeared

2022-01-08 Thread Wolfgang Schuster via ntg-context

Henning Hraban Ramm via ntg-context schrieb am 08.01.2022 um 16:53:


I don’t know since when the questionnaire item command \its doesn’t 
exist any more:

https://wiki.contextgarden.net/Command/its

\starttext
\startitemize[5,packed][items=7,width=5em,distance=1em]
 \ran{\ss\tfx 1 \hss 7}
 \its \CONTEXT\ or \LaTeX?
 \its Tofu or sausage?
 \its Freedom or security?
\stopitemize
\stoptext



strc-itm.mklx

-\protected\tolerant\def\strc_itemgroups_start_items_indeed[#1]%
+\protected\tolerant\def\strc_itemgroups_start_items[#1]%
  {\strc_itemgroups_start_edge
 {\localcontrolledloop
\plusone
\ifchknum#1\or#1\else0\itemgroupparameter\c!items\fi
\plusone
{\strc_itemgroups_used_symbol\hss}%
  \unskip}}


It’s also absent in the interface files, i.e. autosyntax doesn’t work in 
the wiki.



There is no easy way to document them because many of these short 
commands exists in different environment (e.g. \startitemize and 
\startinteractionmenu) with different arguments.


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Align table (framed) top

2022-01-04 Thread Wolfgang Schuster via ntg-context

Mikael Sundqvist via ntg-context schrieb am 04.01.2022 um 13:21:

Oh, thanks!

I can simply wrap my table in a framed environment, then. If it is
still possible to solve without the surrounding framed I'm interested
to hear how.


You have to put the table in a box to change the vertical position.

\starttext

a\tbox{\bTABLE \bTR \bTD xxx\par yyy \eTD \eTR \eTABLE}b

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] \thanks inside author in section

2022-01-01 Thread Wolfgang Schuster via ntg-context

Youssef Cherem via ntg-context schrieb am 01.01.2022 um 13:10:
I've tried to implement a journal-like footnote with the authors' 
affiliation for each section/chapter, by adapting things from the wiki 
(https://wiki.contextgarden.net/Table_of_Contents#Author_in_ToC and 
https://wiki.contextgarden.net/LaTeX_Thanks). However, one thing that 
bugs me is that any note name I choose other than "thanks" does not 
work, and I have no clue why. Am I missing something, or is there a more 
elegant way to implement this?


As an aside, I'd rather have the footnotes below the "thanks" notes. Is 
there any option that does this?


[...]


Do you have a example where anything besides \thanks fails. I changed 
\thanks to another commands in the example below and there was no 
problem to do so. The only thing you *have* to do when you change the 
command is to remove the auxiliary file (context --purge) because the 
old (non existing) command is otherwise used in the next run which 
results then in an error message.


\setuplist
  [section]
  [textcommand=\SectionTocEntry,
 after=\blank]

\define[1]\SectionTocEntry
  {\doifsomething{\rawstructurelistuservariable{author}}
 {{\it\structurelistuservariable{author}} --\crlf}%
   #1%
   \doifsomething{\rawstructurelistuservariable{subtitle}}
 {\crlf\structurelistuservariable{subtitle}}}

\setuphead
  [section]
  [ after=\directsetup{section},
align=center,
   number=no,
style=bold]

\startsetups [section]
\blank
\midaligned{\it\structureuservariable{author}}
\blank
\stopsetups

\setuphead
  [subject]
  [align=flushleft,
   style=\bfb]

\definenote[someothername]

\setupnote
  [someothername]
  [rule=off]

\setupnotation
  [someothername]
  [numberconversion=set 2]

\setupnotation
  [alternative=left,
  hang=fit,
 indenting={yes,small},
indentnext=yes]

\setupinteraction
  [state=start,
   color=,
   contrastcolor=]

\starttext

\subject{Grande lista de autores}

\placecontent[alternative=c]

\startsection[title={Whatever}][author={A. Uthor},subtitle={I’d like to 
say}]

This is a section.
\stopsection

\startsection[title={Segunda seção}][author={Fulano de 
Tal},subtitle={Uma segunda seção de teste}]

This is a section.
\stopsection

\startsection[title={Terceira seção}][author={Alberto de 
Paiva\someothername{asdf}},subtitle={Uma terceira seção de teste}]

This is a section.
\stopsection

\startsection[title={Três autores}][author={Sicrano de 
Tal\someothername{Universidade de Tangerinas} e Alberto 
Steinenberg\someothername{Universidade de Nilfgaard}},

subtitle={Uma seção de teste com dois autores e comentário}]
This is a section.\footnote{Só de teste.}
\stopsection

\stoptext

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] enforcing formation of conjuncts inside \starttyping \stoptyping

2022-01-01 Thread Wolfgang Schuster via ntg-context

Ajith R via ntg-context schrieb am 01.01.2022 um 11:14:

For Malayalam, most often we would be expecting ligation to work even
within \starttyping \stoptyping.


You can anyway make a typescript that matches your needs.

Don't know how. Can you point towards a documentation?


You can use \definefontfamily and \definefallbackfamily also for 
monospaced fonts.


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Asking context to switch to a different font for a single character in many places

2022-01-01 Thread Wolfgang Schuster via ntg-context

Ajith R via ntg-context schrieb am 01.01.2022 um 11:06:

On Sat, 01 Jan 2022 14:28:12 +0530
kauśika  wrote:


Try with the following:

\definefallbackfamily
   [malayalam]
   [serif]
   [TeX Gyre Pagella][range=controlpictures,force=yes]
\definefontfamily
   [malayalam]
   [serif]
   [RIT Rachana][features=malayalam-two]

\setupbodyfont[malayalam]


I have tested that this works on my system. Ensure that the TeX Gyre
Pagella font is available on your system (ConTeXt ships with a copy
of this font). If it still does not work check the log file for any
messages regarding fallback font.

kauśika

Hi Kaushika,

Thanks. This is working.
But, I don't understand why this is working while the other wasn't even
when it could display the open box when it was the solo font defined?


You used "Latin Modern" which isn't a valid font name, the correct name 
is "Latin Modern Roman".


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


  1   2   3   4   5   6   7   8   9   10   >