Re: [NTG-context] fallbacks

2023-04-24 Thread Sylvain Hubert via ntg-context
I believe it's a bug.

https://github.com/contextgarden/context/blob/d025bcdf995be6951f69fed6869048ab22491b9e/tex/context/base/mkxl/font-col.lmt#L278

the newchar[] table, which should contain all chars supported by the
fallback termes font if I'm not mistaken, turns out to have only 392 chars
within 0x20-0x30C, far away from 0x2329-0x232A.

On Sun, 23 Apr 2023 at 03:26, Thomas A. Schmitz via ntg-context <
ntg-context@ntg.nl> wrote:

> Thank you, Pablo, but that doesn't help. I know how to use fallback
> fonts. I was wondering if the check key is working as it should.
>
> Thomas
>
> On 4/22/23 20:33, Pablo Rodriguez via ntg-context wrote:
> > Hi Thomas,
> >
> > I don’t know what check does (maybe just check?), but the standard
> > behaviour with \definefallbackfamily is only to fall back when the
> > character is missing from the main font.
> >
> > To force all characters from the range in the fallback font, "force=yes"
> > is required.
> >
> > Here you have a minimal sample (which doesn‘t use "preset=range:greek"),
> > adding "force=yes" gets all Greek glyphs from GFS Heraklit:
> >
> >\definefallbackfamily [presentation] [serif] [GFSHeraklit]
> >[range={greekandcoptic, greekextended}]
> >\definefontfamily [presentation] [serif] [TeXGyrePagella]
> >\setupbodyfont [presentation,12pt]
> >
> >\starttext
> >Pπμᾷσδ
> >\stoptext
> >
> > Just in case it might help,
>
> --
> Prof. Dr. Thomas A. Schmitz
> Institut für Klassische und Romanische Philologie
> Universität Bonn
> Am Hof 1e
> 53113 Bonn
> http://www.philologie.uni-bonn.de/de/personal/schmitz
>
>
> ___
> 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] horizontal space in CJK document

2023-02-21 Thread Sylvain Hubert via ntg-context
Thanks, but I guess the space width would be fixed.

I just found a hack: 口口\hspace[big]\hbox{}口口 does the trick.

On Tue, 21 Feb 2023 at 06:46, fv leung via ntg-context 
wrote:

> Maybe the ideographic space U+3000 works.
>
> 在 2023年2月21日週二 03:42,Sylvain Hubert via ntg-context 
> 寫道:
>
>> Dear list,
>>
>> Does anyone know how to insert a horizontal space in a CJK document with
>> \setscript[hanzi]?
>>
>> \setscript[hanzi]
>> \definefontfamily[mainface][rm][notoserifcjkhk][]
>> \setupbodyfont[mainface]
>> \starttext
>> 口口\hspace[big]口口   % with \setscript[hanzi], the \hspace is ignored
>>
>> \dorecurse{100}{口}  % without \setscript[hanzi], the line is not properly
>> wrapped
>> \stoptext
>>
>> Many thanks,
>> Sylvain
>>
>> ___
>> 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
>
> ___
>
___
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
___


[NTG-context] horizontal space in CJK document

2023-02-20 Thread Sylvain Hubert via ntg-context
Dear list,

Does anyone know how to insert a horizontal space in a CJK document with
\setscript[hanzi]?

\setscript[hanzi]
\definefontfamily[mainface][rm][notoserifcjkhk][]
\setupbodyfont[mainface]
\starttext
口口\hspace[big]口口   % with \setscript[hanzi], the \hspace is ignored

\dorecurse{100}{口}  % without \setscript[hanzi], the line is not properly
wrapped
\stoptext

Many thanks,
Sylvain
___
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 prevent \subject from being the last line

2023-02-20 Thread Sylvain Hubert via ntg-context
On Mon, 20 Feb 2023 at 23:22, Pablo Rodriguez via ntg-context <
ntg-context@ntg.nl> wrote:

> On 2/20/23 15:47, Sylvain Hubert via ntg-context wrote:
> > [...]
> > Btw, just in case if anyone shares this idea: is it possible to have a
> > zulip channel for ConTeXt? It's free for open source projects, has a
> > interface for existing mailing lists, and has a reasonable builtin
> > search engine, which could serve as another de-facto documentation,
> > considering the fact that very few of the massive useful use cases asked
> > in the mailing lists so far have been transcribed into official
> > documentations.
>
> Hi Sylvain,
>
> one main documentation source is the wiki.
>
> Sorry, but I‘m afraid it is hard for me to understand how adding another
> information source for ConTeXt is a gain.
>

It's a gain exactly because it's not another information source. The posts
are synced. It's just a modern and imo better UI for the mailing list, with
more pleasant searching and tracking UX.


> Best,
>
> Pablo
>
>
> ___
> 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 prevent \subject from being the last line

2023-02-20 Thread Sylvain Hubert via ntg-context
Thanks, Pablo and Bruce. Both solutions work well.

> I had similar issues with \section and only the Latin script was involved.

Btw, just in case if anyone shares this idea: is it possible to have a
zulip channel for ConTeXt? It's free for open source projects, has a
interface for existing mailing lists, and has a reasonable builtin search
engine, which could serve as another de-facto documentation, considering
the fact that very few of the massive useful use cases asked in the mailing
lists so far have been transcribed into official documentations.

On Mon, 20 Feb 2023 at 05:22, Pablo Rodriguez via ntg-context <
ntg-context@ntg.nl> wrote:

> On 2/19/23 20:34, Sylvain Hubert via ntg-context wrote:
> > Dear list,
> >
> > I have a long document (A4 * 170 pages) with some CJK fonts, where some
> > of the \subject{...} are placed at the end of the corresponding pages,
> > which looks awkward. How can one flush those last-line titles to the
> > next pages?
>
> Hi Sylvain,
>
> the hard part for the rest of us is figuring out what you may have on
> your screen.
>
> \setuphead[subject][before={\blank[preference]}] might help.
>
> Another approach would be \setuphead[subject][after={\blank[samepage,
> line]}].
>
> I mean, either you set a preference for breaking pages before \subject
> or you force \subject to be on the same page with next paragraph.
>
> Nothing prevents you from doing both.
>
> BTW, default values for before and after in \setuphead[subject] are
> \blank[2*big] and \blank (respectively [copied from strc-def.mkxl]).
>
> > Currently I don't have a MWE, as trivial filling-up with 1-2 pages of
> > \lipsum doesn't reproduce the problem. I'm optimistically asking without
> > MWE, but if it is necessary anyway, please tell me and I will obfuscate
> > the 170-page document and find a way to upload it.
>
> I hope it might help. It is not clear for me whether the CJK fonts are
> only for fragments in these languages or the main text is written in any
> of these languages.
>
> I had similar issues with \section and only the Latin script was involved.
>
> Again, I hope it might help,
>
> Pablo
>
> ___
> 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
___


[NTG-context] How to prevent \subject from being the last line

2023-02-19 Thread Sylvain Hubert via ntg-context
Dear list,

I have a long document (A4 * 170 pages) with some CJK fonts, where some of
the \subject{...} are placed at the end of the corresponding pages, which
looks awkward. How can one flush those last-line titles to the next pages?

Currently I don't have a MWE, as trivial filling-up with 1-2 pages of
\lipsum doesn't reproduce the problem. I'm optimistically asking without
MWE, but if it is necessary anyway, please tell me and I will obfuscate the
170-page document and find a way to upload it.

Many thanks,
Sylvain
___
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] TOC colors and in-page anchors

2022-10-11 Thread Sylvain Hubert via ntg-context
(heartbeat packet)

I think some kind of modern issue tracker on e.g.
https://github.com/contextgarden/context-mirror would be generally helpful.

On Wed, 28 Sept 2022 at 23:31, Pablo Rodriguez via ntg-context <
ntg-context@ntg.nl> wrote:

> On 9/28/22 12:20, Sylvain Hubert via ntg-context wrote:
> > Thanks for the pointers, but unfortunately I cannot reproduce the second
> > fix with either the system pdf viewer or the browser one.
>
> Hi Sylvain,
>
> it seems that ConTeXt is basically ignoring "focus=standard" in lists.
>
> Compare both links here:
>
>   \setupinteraction[state=start,
> color=darkred,
> contrastcolor=darkred,
> focus=standard]
>   \starttext
>   \completecontent
>   \section[a]{b}
>   \about[a]
>   \stoptext
>
> And this is a regression. I think it was introduced in latest from
> 2022.07.06 21:42, since latest from 2022.05.11 11:36 has no issue with
> this.
>
> Hans, could you see what preventing this from working as expected?
>
> Many thanks for your help,
>
> Pablo
>
> ___
> 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] TOC colors and in-page anchors

2022-09-28 Thread Sylvain Hubert via ntg-context
Thanks for the pointers, but unfortunately I cannot reproduce the second
fix with either the system pdf viewer or the browser one.

\usemodule[ipsum]
\setupinteraction[state=start,focus=standard]

\starttext
\completecontent
\section{s1}\ipsum
\section{s2}\ipsum
\section{s3}\ipsum
\section{s4}\ipsum
\section{s5}\ipsum
\section{s6}\ipsum
\stoptext

context version: 2022.09.11 20:44

The viewer is on 'Continuous Scoll' mode both before and after the click,
but clicking s4 still jumps to the beginning of page 2.

On Wed, 28 Sept 2022 at 16:43, Bruce Horrocks  wrote:

>
>
> > On 28 Sep 2022, at 09:18, Sylvain Hubert via ntg-context <
> ntg-context@ntg.nl> wrote:
> >
> > Dear list,
> >
> > \usemodule[ipsum]
> > \setupinteraction[state=start]
> >
> > \starttext
> > \completecontent
> > \section{s1}\ipsum
> > \section{s2}\ipsum
> > \section{s3}\ipsum
> > \section{s4}\ipsum
> > \section{s5}\ipsum
> > \section{s6}\ipsum
> > \stoptext
> >
> > In the table of contents, s1 and s2 (at page 1) are rendered in red,
> while others in green.
> >
> > Moreover, when I click s4, it jumps to page 2 without locating the
> section precisely within the page.
> > This is not the case when using the latex hyperref package.
> >
> > Does anyone know how to make the colors uniform and the links precise?
> >
> > Any help is appreciated.
>
> The colour change is because those links are on the same page that you are
> jumping to. When you have more text in your document they will be
> consistent. You can override the colors with
> \setupinteraction[state=start,color=black] for example if you wish.
>
> You need focus=standard to jump direct but only when the viewer is in
> scrolling mode. It's explained on the Wiki.
> <https://wiki.contextgarden.net/Command/setupinteraction>
>
> —
> Bruce Horrocks
> Hampshire, UK
>
>
___
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
___


[NTG-context] TOC colors and in-page anchors

2022-09-28 Thread Sylvain Hubert via ntg-context
Dear list,

\usemodule[ipsum]
\setupinteraction[state=start]

\starttext
\completecontent
\section{s1}\ipsum
\section{s2}\ipsum
\section{s3}\ipsum
\section{s4}\ipsum
\section{s5}\ipsum
\section{s6}\ipsum
\stoptext

In the table of contents, s1 and s2 (at page 1) are rendered in red, while
others in green.

Moreover, when I click s4, it jumps to page 2 without locating the section
precisely within the page.
This is not the case when using the latex hyperref package.

Does anyone know how to make the colors uniform and the links precise?

Any help is appreciated.

Sylvain
___
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
___


[NTG-context] Roman PDF labels

2021-09-14 Thread Sylvain Hubert via ntg-context
Dear List,

Do we have something like "\pagenumbering{roman}" in latex, which sets the
pdf labels (page numbers for pdf viewers, not the ones rendered in the
footer) to roman numbers?

Here's a MWE for latex:

\documentclass{report}
\usepackage{hyperref}
\begin{document}
\pagenumbering{roman}
\tableofcontents
\listoffigures
\listoftables
\pagenumbering{arabic}
\chapter{Abc}
\end{document}

Thanks!

Best,
Sylvain
___
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] textbackground for text of different size

2021-09-12 Thread Sylvain Hubert via ntg-context
Dear List,

the red highlight block in the following example is not covering the two
40pt characters:

\definetextbackground[important][frame=no,background=color,backgroundcolor=red]
\starttext
abc\important{123{\switchtobodyfont[40pt]45}xy}z
\stoptext

Is there an option that fixes this?

Thanks!

Best,
Sylvain
___
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] positioning of metapost figure

2021-09-12 Thread Sylvain Hubert via ntg-context
Thanks Hans!

On Sun, 12 Sept 2021 at 19:02, Hans Hagen  wrote:

> On 9/12/2021 6:54 PM, Sylvain Hubert via ntg-context wrote:
> > Dear List,
> >
> > The following code draws a circle at the center of the page, ignoring
> > the "shifted" part.
> >
> > \startuniqueMPgraphic{concept}
> > draw fullcircle scaled 1cm shifted (10cm,10cm);
> > \stopuniqueMPgraphic
> > \defineoverlay[concept][\uniqueMPgraphic{concept}]
> > \setupbackgrounds[page][background=concept]
> > \starttext
> > .
> > \stoptext
> >
> > How should the metapost background figure be positioned correctly?
>
> \startuniqueMPgraphic{concept}
>  StartPage;
>  draw fullcircle scaled 1cm shifted (10cm,10cm);
>  draw Page withpen pencircle scaled 5mm;
>  StopPage;
> \stopuniqueMPgraphic
>
> -
>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 / 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] positioning of metapost figure

2021-09-12 Thread Sylvain Hubert via ntg-context
Dear List,

The following code draws a circle at the center of the page, ignoring the
"shifted" part.

\startuniqueMPgraphic{concept}
draw fullcircle scaled 1cm shifted (10cm,10cm);
\stopuniqueMPgraphic
\defineoverlay[concept][\uniqueMPgraphic{concept}]
\setupbackgrounds[page][background=concept]
\starttext
.
\stoptext

How should the metapost background figure be positioned correctly?

Thanks!

Best,
Sylvain
___
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] Weird error when using \startformula inside lua

2021-09-12 Thread Sylvain Hubert via ntg-context
The problem also concerns \starttyping:

\starttext
.
\startluacode
context([[
\starttyping
\stoptyping
]])
\stopluacode
\stoptext

tex error   > runaway error: end of file encountered
mtx-context | fatal error: return code: 256

%

\starttext
.
\startluacode
context([[
\starttyping

foobar
\stoptyping
]])
\stopluacode
\stoptext

tex error   > tex error on line 5 in file ./test.tex:

lua error:

registered function call [1041]:
...mtx/tex/texmf-context/tex/context/base/mkxl/buff-ini.lmt:534: invalid
value (nil) at index 3 in table for '
concat'
stack traceback:
[C]: in function 'table.concat'
...mtx/tex/texmf-context/tex/context/base/mkxl/buff-ini.lmt:534: in
upvalue 'pickup'
...mtx/tex/texmf-context/tex/context/base/mkxl/buff-ini.lmt:677: in
function <...mtx/tex/texmf-context/tex/context/base/mkxl/buff-ini.lmt:668>
(...tail calls...)


Sylvain

On Sat, 11 Sept 2021 at 05:12, Aditya Mahajan via ntg-context <
ntg-context@ntg.nl> wrote:

> I sometimes define lua functions for showing out worked out calculations.
> The following minimal example shows that
>
>   context([[\startformula ... \stopformula]])
>
> fails in LMTX with an error message:
>
> tex error   > tex error on line 3 in file ./test.tex: Undefined
> control sequence \undefined
>
> MWE:
>
> \startluacode
>   thirddata = thirddata or {}
>
>   local comment = [[
> This is a famous formula
> \startformula
>   a^2 + b^2 = c^2
> \stopformula
>   ]]
>
>   function thirddata.explanation()
>   context(comment)
>   end
>
> \stopluacode
>
> \starttext
> \ctxlua{thirddata.explanation()}
> \stoptext
>
> The actual use case is more complicated (where I use templates, so I don't
> want to convert everything to context.startformula() etc.). The example
> compiles with MkIV but not LMTX.
>
> Any idea what is going on?
>
> Thanks,
> Aditya
>
>
> ___
> 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
>
> ___
>
___
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] Equation alignment

2021-09-07 Thread Sylvain Hubert via ntg-context
Dear List,

The following example of equation alignment copied from An Excursion
is not reproducible under my context 2021.03.05 shipped with texlive
2021:

\starttext
\startformula
\eqalign{
ax^2+bx+c &= 0 \cr
x &= \frac{-b \pm \sqrt{b^2-4ac}}{2a} \cr
}
\stopformula
\stoptext

Both ampersands are rendered literally.

Does anyone know how to properly typeset aligned equations?

Thanks!

Sylvain
___
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] features of fallback font

2021-09-07 Thread Sylvain Hubert via ntg-context
Dear List,

I'm using the chinese simsun font that has no builtin SerifBold.

I'm trying to define a fakebold feature for it, but the following code
does not work:

\definefontfeature[fakebold][effect={width=0.3, delta=0}]

\definefontfallback [sunfallback] [name:simsun] [cjkunifiedideographs]
\definefontfallback [sunbffallback] [name:simsun]
[cjkunifiedideographs][features=fakebold]

\definefontsynonym [Serif] [modern] [fallbacks=sunfallback]
\definefontsynonym [SerifBold] [modern] [fallbacks=sunbffallback]

\starttext
人 foo \bf 人 bar  % bar is bold, the second 人 is not
\stoptext

Does anyone know how to define features for fallback font?

Thanks!

Best,
Sylvain
___
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] Remove vertical space around typing

2021-09-07 Thread Sylvain Hubert via ntg-context
Dear List,

How should we remove the vertical space above and below the following typing?

\starttext
Remove space below
\starttyping
some
code
\stoptyping
\stoptext

Thanks!

Best,
Sylvain
___
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] margin of inner item group

2021-09-07 Thread Sylvain Hubert via ntg-context
Thanks but I believe 'distance' means ' * <--> text',
while margin means '<--> * text'.

On 07/09/2021, fv leung via ntg-context  wrote:
> Use
>
> distance=...
>
> instead of
>
> margin=...
>
> .
>
> 在 2021年9月7日週二 16:58,Sylvain Hubert via ntg-context  寫道:
>
>> Dear List,
>>
>> Does anyone know how to set the margin of an inner item group? The
>> natural way does not seem to work:
>>
>> \showframe
>> \starttext
>> \startitemize[margin=5em]
>> \item 1
>> \startitemize[margin=10em]
>> \item 1
>> \item 2
>> \item 3
>> \stopitemize
>> \item 2
>> \item 3
>> \stopitemize
>> \stoptext
>>
>> In the doc above, only the outer item group has a margin.
>>
>> Any help will be appreciated.
>>
>> Best,
>> Sylvain
>>
>> ___
>> 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
>>
>> ___
>>
>
___
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] itemize problems

2021-09-07 Thread Sylvain Hubert via ntg-context
This works, thanks!

On 07/09/2021, fv leung via ntg-context  wrote:
> Use
>
>  \startitemize[A,text][lefttext=,righttext=,stopper=]
>
> then.
>
> Maybe that's the new way.
>
> Sylvain Hubert via ntg-context  於 2021年9月7日 週二
> 下午4:32寫道:
>
>> Thanks, but this doesn't seem to work on my laptop:
>>
>> \starttext
>> \startitemize[A,text][left=,right=,stopper=]
>> \item 1
>> \item 2
>> \stopitemize
>> \stoptext
>>
>> %output: (A) 1 (B) 2
>>
>> On 07/09/2021, fv leung via ntg-context  wrote:
>> > I add
>> >
>> > left=,right=,
>> >
>> > in the second option group.
>> >
>> > 在 2021年9月7日週二 07:02,Sylvain Hubert via ntg-context 
>> 寫道:
>> >
>> >> A few more information:
>> >>
>> >> For the 1st problem:
>> >>
>> >> It seems that \setupitemize accepts two option groups, to which
>> >> n,packed and margin belong accordingly. However,
>> >> \setupitemize[n][margin=2em] does not seem to work.
>> >>
>> >> For the 2nd problem:
>> >>
>> >> \setupitemize[columns,one], although doing nothing in theory, seems to
>> >> fix the problem.
>> >>
>> >> For the 4th problem:
>> >>
>> >> I've found that we can do \setupitemize[A,text] which makes it like
>> >>
>> >> (A.) 0 (B.) 1 (C.) 2 (D.) 3
>> >>
>> >> The problem now is, how can we remove the parentheses around the item
>> >> labels?
>> >>
>> >> On 07/09/2021, Sylvain Hubert  wrote:
>> >> > Dear List,
>> >> >
>> >> > Here's a collection of four problems about item groups that I've
>> >> > just
>> >> > encountered.
>> >> >
>> >> > 1. 'n' and 'packed' not playing well with other options.
>> >> >
>> >> > This works:
>> >> >
>> >> > \defineitemgroup[myitems][itemize][margin=2em,before=before]
>> >> > \setupmyitems[n,packed]
>> >> >
>> >> > \starttext
>> >> > text
>> >> > \startmyitems
>> >> > \item 1
>> >> > \item 2
>> >> > \stopmyitems
>> >> > \stoptext
>> >> >
>> >> > This does not:
>> >> >
>> >> >
>> >> > \defineitemgroup[myitems][itemize][margin=2em,before=before,n,packed]
>> >> >
>> >> > This does not either:
>> >> >
>> >> > \defineitemgroup[myitems][itemize]
>> >> > \setupmyitems[n,packed,margin=2em,before=before]
>> >> >
>> >> > Is there a rule for this glitch which makes it worth memorizing, or
>> >> > is
>> >> > this just a bug?
>> >> >
>> >> > 2. 'before' not working in nested item groups.
>> >> >
>> >> > \starttext
>> >> > \startitemize[before=before1]
>> >> > \item 1
>> >> > \startitemize[before=before2]
>> >> > \item 2
>> >> > \stopitemize
>> >> > \stopitemize
>> >> > \stoptext
>> >> >
>> >> > Both before1 and before2 should appear, but only before1 is shown.
>> >> >
>> >> > 3. How to wrap the line under the bulletin or number?
>> >> >
>> >> > To be more precise, the current wrapping behavior of, say, "\item 0
>> >> > 1
>> >> > 2 3 4 5 6 7 8 9" is:
>> >> >
>> >> > * 0 1 2 3 4 5 6 7
>> >> >   8 9
>> >> >
>> >> > How can we remove the indentation of the second line and make it
>> >> > like
>> >> >
>> >> > * 0 1 2 3 4 5 6 7
>> >> > 8 9
>> >> >
>> >> > 4. How to put the items on the same line?
>> >> >
>> >> > That is, for "\item 0 \item 1 \item 2", I would like it to be like
>> >> >
>> >> > * 0   * 1   * 2
>> >> >
>> >> > instead of
>> >> >
>> >> > * 0
>> >> > * 1
>> >> > * 2
>> >> >
>> >> > My context version: 2021.03.05 19:11, texlive.
>>

[NTG-context] margin of inner item group

2021-09-07 Thread Sylvain Hubert via ntg-context
Dear List,

Does anyone know how to set the margin of an inner item group? The
natural way does not seem to work:

\showframe
\starttext
\startitemize[margin=5em]
\item 1
\startitemize[margin=10em]
\item 1
\item 2
\item 3
\stopitemize
\item 2
\item 3
\stopitemize
\stoptext

In the doc above, only the outer item group has a margin.

Any help will be appreciated.

Best,
Sylvain
___
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] error: (nodes): fuzzy token cleanup in whatsit node

2021-09-07 Thread Sylvain Hubert via ntg-context
Dear List,

I think I've just encountered a fragile bug. It is only reproducible
with exactly the same layout as the doc below. Any insertion or
removal of an item that changes the pagination would let the document
compile.

\defineitemgroup[choice][itemize]
\setupchoice[packed,columns,one]
\setupchoice[before={\blank[medium]}]

\starttext
.\blank[32*big]

\startitemize
\item 0

\startchoice[text]
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\blank[6*big]
\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\blank[6*big]
\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\stopitemize
\stoptext

test.log:

open source > level 1, order 1, name
'/home/me/apps/texlive/2021/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv'
system  >
system  > ConTeXt  ver: 2021.03.05 19:11 MKIV  fmt: 2021.4.24
int: english/english
system  >
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name
'/home/me/apps/texlive/2021/texmf-dist/tex/context/base/mkiv/cont-new.mkiv'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name
'/home/me/apps/texlive/2021/texmf-dist/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 'test', input './test', result 'test'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name '/home/me/code/qs-cs/test.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
backend > xmp > using file
'/home/me/apps/texlive/2021/texmf-dist/tex/context/base/mkiv/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1, subpage 1
pages   > flushing realpage 2, userpage 2, subpage 2
! error:  (nodes): fuzzy token cleanup in whatsit node with type
whatsit and subtype 29

Could anyone reproduce or explain this bug?

Thanks!

Sylvain
___
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] itemize problems

2021-09-07 Thread Sylvain Hubert via ntg-context
Thanks, but this doesn't seem to work on my laptop:

\starttext
\startitemize[A,text][left=,right=,stopper=]
\item 1
\item 2
\stopitemize
\stoptext

%output: (A) 1 (B) 2

On 07/09/2021, fv leung via ntg-context  wrote:
> I add
>
> left=,right=,
>
> in the second option group.
>
> 在 2021年9月7日週二 07:02,Sylvain Hubert via ntg-context  寫道:
>
>> A few more information:
>>
>> For the 1st problem:
>>
>> It seems that \setupitemize accepts two option groups, to which
>> n,packed and margin belong accordingly. However,
>> \setupitemize[n][margin=2em] does not seem to work.
>>
>> For the 2nd problem:
>>
>> \setupitemize[columns,one], although doing nothing in theory, seems to
>> fix the problem.
>>
>> For the 4th problem:
>>
>> I've found that we can do \setupitemize[A,text] which makes it like
>>
>> (A.) 0 (B.) 1 (C.) 2 (D.) 3
>>
>> The problem now is, how can we remove the parentheses around the item
>> labels?
>>
>> On 07/09/2021, Sylvain Hubert  wrote:
>> > Dear List,
>> >
>> > Here's a collection of four problems about item groups that I've just
>> > encountered.
>> >
>> > 1. 'n' and 'packed' not playing well with other options.
>> >
>> > This works:
>> >
>> > \defineitemgroup[myitems][itemize][margin=2em,before=before]
>> > \setupmyitems[n,packed]
>> >
>> > \starttext
>> > text
>> > \startmyitems
>> > \item 1
>> > \item 2
>> > \stopmyitems
>> > \stoptext
>> >
>> > This does not:
>> >
>> >
>> > \defineitemgroup[myitems][itemize][margin=2em,before=before,n,packed]
>> >
>> > This does not either:
>> >
>> > \defineitemgroup[myitems][itemize]
>> > \setupmyitems[n,packed,margin=2em,before=before]
>> >
>> > Is there a rule for this glitch which makes it worth memorizing, or is
>> > this just a bug?
>> >
>> > 2. 'before' not working in nested item groups.
>> >
>> > \starttext
>> > \startitemize[before=before1]
>> > \item 1
>> > \startitemize[before=before2]
>> > \item 2
>> > \stopitemize
>> > \stopitemize
>> > \stoptext
>> >
>> > Both before1 and before2 should appear, but only before1 is shown.
>> >
>> > 3. How to wrap the line under the bulletin or number?
>> >
>> > To be more precise, the current wrapping behavior of, say, "\item 0 1
>> > 2 3 4 5 6 7 8 9" is:
>> >
>> > * 0 1 2 3 4 5 6 7
>> >   8 9
>> >
>> > How can we remove the indentation of the second line and make it like
>> >
>> > * 0 1 2 3 4 5 6 7
>> > 8 9
>> >
>> > 4. How to put the items on the same line?
>> >
>> > That is, for "\item 0 \item 1 \item 2", I would like it to be like
>> >
>> > * 0   * 1   * 2
>> >
>> > instead of
>> >
>> > * 0
>> > * 1
>> > * 2
>> >
>> > My context version: 2021.03.05 19:11, texlive.
>> >
>> > Any help with any of the problems above would be greatly appreciated.
>> >
>> > Best,
>> > Sylvain
>> >
>>
>> ___
>> 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
>>
>> ___
>>
>>
>
___
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] error: (nodes): fuzzy token cleanup in whatsit node ...

2021-09-06 Thread Sylvain Hubert via ntg-context
% context version: 2021.03.05 19:11
% This seems to be a bug of a very subtle layout problem.
% Inserting or removing anything will likely to suppress the bug

\defineitemgroup[choice][itemize]
\setupchoice[packed,columns,one]
\setupchoice[before={\blank[medium]}]

\starttext
.\blank[32*big]

\startitemize
\item 0

\startchoice[text]
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\blank[6*big]
\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\blank[6*big]
\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\item 0
\startchoice
\item 0
\item 0
\item 0
\item 0
\stopchoice

\stopitemize
\stoptext

% ! error:  (nodes): fuzzy token cleanup in whatsit node with type
whatsit and subtype 29mtx-context | fatal error: return code: 256
___
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] itemize problems

2021-09-06 Thread Sylvain Hubert via ntg-context
A few more information:

For the 1st problem:

It seems that \setupitemize accepts two option groups, to which
n,packed and margin belong accordingly. However,
\setupitemize[n][margin=2em] does not seem to work.

For the 2nd problem:

\setupitemize[columns,one], although doing nothing in theory, seems to
fix the problem.

For the 4th problem:

I've found that we can do \setupitemize[A,text] which makes it like

(A.) 0 (B.) 1 (C.) 2 (D.) 3

The problem now is, how can we remove the parentheses around the item labels?

On 07/09/2021, Sylvain Hubert  wrote:
> Dear List,
>
> Here's a collection of four problems about item groups that I've just
> encountered.
>
> 1. 'n' and 'packed' not playing well with other options.
>
> This works:
>
> \defineitemgroup[myitems][itemize][margin=2em,before=before]
> \setupmyitems[n,packed]
>
> \starttext
> text
> \startmyitems
> \item 1
> \item 2
> \stopmyitems
> \stoptext
>
> This does not:
>
> \defineitemgroup[myitems][itemize][margin=2em,before=before,n,packed]
>
> This does not either:
>
> \defineitemgroup[myitems][itemize]
> \setupmyitems[n,packed,margin=2em,before=before]
>
> Is there a rule for this glitch which makes it worth memorizing, or is
> this just a bug?
>
> 2. 'before' not working in nested item groups.
>
> \starttext
> \startitemize[before=before1]
> \item 1
> \startitemize[before=before2]
> \item 2
> \stopitemize
> \stopitemize
> \stoptext
>
> Both before1 and before2 should appear, but only before1 is shown.
>
> 3. How to wrap the line under the bulletin or number?
>
> To be more precise, the current wrapping behavior of, say, "\item 0 1
> 2 3 4 5 6 7 8 9" is:
>
> * 0 1 2 3 4 5 6 7
>   8 9
>
> How can we remove the indentation of the second line and make it like
>
> * 0 1 2 3 4 5 6 7
> 8 9
>
> 4. How to put the items on the same line?
>
> That is, for "\item 0 \item 1 \item 2", I would like it to be like
>
> * 0   * 1   * 2
>
> instead of
>
> * 0
> * 1
> * 2
>
> My context version: 2021.03.05 19:11, texlive.
>
> Any help with any of the problems above would be greatly appreciated.
>
> Best,
> Sylvain
>
___
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] itemize problems

2021-09-06 Thread Sylvain Hubert via ntg-context
Dear List,

Here's a collection of four problems about item groups that I've just
encountered.

1. 'n' and 'packed' not playing well with other options.

This works:

\defineitemgroup[myitems][itemize][margin=2em,before=before]
\setupmyitems[n,packed]

\starttext
text
\startmyitems
\item 1
\item 2
\stopmyitems
\stoptext

This does not:

\defineitemgroup[myitems][itemize][margin=2em,before=before,n,packed]

This does not either:

\defineitemgroup[myitems][itemize]
\setupmyitems[n,packed,margin=2em,before=before]

Is there a rule for this glitch which makes it worth memorizing, or is
this just a bug?

2. 'before' not working in nested item groups.

\starttext
\startitemize[before=before1]
\item 1
\startitemize[before=before2]
\item 2
\stopitemize
\stopitemize
\stoptext

Both before1 and before2 should appear, but only before1 is shown.

3. How to wrap the line under the bulletin or number?

To be more precise, the current wrapping behavior of, say, "\item 0 1
2 3 4 5 6 7 8 9" is:

* 0 1 2 3 4 5 6 7
  8 9

How can we remove the indentation of the second line and make it like

* 0 1 2 3 4 5 6 7
8 9

4. How to put the items on the same line?

That is, for "\item 0 \item 1 \item 2", I would like it to be like

* 0   * 1   * 2

instead of

* 0
* 1
* 2

My context version: 2021.03.05 19:11, texlive.

Any help with any of the problems above would be greatly appreciated.

Best,
Sylvain
___
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] \usemodule[chinese] not found

2021-09-06 Thread Sylvain Hubert via ntg-context
Thanks Hans!

On 06/09/2021, Hans Hagen via ntg-context  wrote:
> On 9/6/2021 6:51 PM, Sylvain Hubert via ntg-context wrote:
>> Dear List,
>>
>> I'm trying to typeset an item group (itemize) with chinese numbering. It
>> is suggested in multiple older documentations and answers that
>> \startitemize[c] should be used, for which \usemodule[chinese] is
>> required.
>>
>> But I can no longer find the 'chinese' module neither in texlive, in
>> lmtx, nor on the website. Has this module been removed or replaced by
>> something else?
> we moved on to unicode etc etc
>
> \starttext
>
>   \startitemize[cn]
>  \startitem x \stopitem
>   \stopitemize
>
> \stoptext
>
> but it assumes a font that has chinese
>
> -
>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 /
> 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
> ___
>
___
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] \usemodule[chinese] not found

2021-09-06 Thread Sylvain Hubert via ntg-context
Dear List,

I'm trying to typeset an item group (itemize) with chinese numbering. It is
suggested in multiple older documentations and answers that
\startitemize[c] should be used, for which \usemodule[chinese] is required.

But I can no longer find the 'chinese' module neither in texlive, in lmtx,
nor on the website. Has this module been removed or replaced by something
else?

Thanks!

Best,
Sylvain
___
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] Automatically adjust number of table columns

2021-09-05 Thread Sylvain Hubert via ntg-context
Dear List,

I'm trying to make "\startchoice", "\stopchoice", and "\choice", such that:

\startchoice
\choice -1
\choice 0
\choice 1
\choice N/A
\stopchoice

results in (_ for whitespace)

A. -1__B. 0__C. 1__D. N/A

while

\startchoice
\choice not so short choice
\choice must wrap here
\choice another choice
\choice yet another choice
\stopchoice

results in

A. not so short choiceB. must wrap here
C. another choice___D. yet another choice

In another word, it should have the same effect as the addData() function
in the page below (save as whatever.html and open it)




table { width: 100%; border: 1px solid black; }
#root { width: 10cm; }








function make(tag, children) {
const node = document.createElement(tag);
for (const c of children) {
if (typeof c === "string") {
node.appendChild(document.createTextNode(c));
} else {
node.appendChild(c);
}
}
return node;
}

function addData(data) {
const root = document.getElementById("root");

let table = make("table", [make("tr", data.map(d => make("td", [d])))]);
root.appendChild(table);
if (table.scrollWidth <= root.offsetWidth) {
return;
}

root.removeChild(table);
table = make("table", [
make("tr", [make("td", [data[0]]), make("td", [data[1]])]),
make("tr", [make("td", [data[2]]), make("td", [data[3]])]),
]);
root.appendChild(table);
if (table.scrollWidth <= root.offsetWidth) {
return;
}

root.removeChild(table);
table = make("table", data.map(d => make("tr", [make("td", [d])])));
root.appendChild(table);
}

addData(["1".repeat(10), "2".repeat(10), "3".repeat(10), "4".repeat(10), ]);
addData(["1".repeat(20), "2".repeat(20), "3".repeat(20), "4".repeat(20), ]);
addData(["1".repeat(30), "2".repeat(30), "3".repeat(30), "4".repeat(30), ]);




Does anyone have an idea how it can be implemented in context?

Thanks in advance!

Best,
Sylvain
___
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: missing Lua API in binaries

2021-04-23 Thread Sylvain Hubert
You're right, I just checked the symbols of luatex and they contain all the
APIs of lua 5.3.
So I guess the problem is specific to luametatex and the latest context.

> but in any case you should compile against the luatex headers, not the
stock lua 5.3.6.

Does luatex have dedicated headers different from the ones for stock lua?

On Fri, 23 Apr 2021 at 23:53, luigi scarso  wrote:

>
>
> On Fri, Apr 23, 2021 at 10:08 PM Sylvain Hubert 
> wrote:
>
>> Dear Devs,
>>
>> Sorry if this is not the best place for reporting bugs.
>>
>> I'm trying to use the lpeglabel library written in C and delivered as
>> lpeglabel.so.
>>
>> $ ls
>> testlabel.lua lpeglabel.so
>> $ cat testlabel.lua
>> require("lpeglabel")
>>
>> The ConTeXt binary cannot load the library because it lacks certain Lua
>> API:
>>
>> $ context --forcecld --permitloadlib testlabel.lua
>> ...
>> fatal lua error:
>> registered function call [1542]:
>> ...tx/tex/texmf-context/tex/context/base/mkiv/l-package.lua:348: error
>> loading module 'lpeglabel' from file './lpeglabel.so':
>> ./lpeglabel.so: undefined symbol: lua_gettop
>>
>>
> hm, lua_gettop  is a global symbol in latest luatex, it's not undefined...
>
>
>>
>> nor does LuaTeX:
>> $ luatex -luaonly testlabel.lua
>> error loading module 'lpeglabel' from file './lpeglabel.so':
>> ./lpeglabel.so: undefined symbol: lua_getiuservalue
>>
>>
> lua_getiuservalue is in lua 5.4 API, luatex is lua 5.3.6 API
> but in any case you should compile against the luatex headers, not the
> stock lua 5.3.6.
> I don't know lpeglabel, but luatex has the lpeg embedded and perhaps it
> can clash with the library.
>
> --
> luigi
>
> ___
> 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
>
> ___
>
___
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] Bug: missing Lua API in binaries

2021-04-23 Thread Sylvain Hubert
Dear Devs,

Sorry if this is not the best place for reporting bugs.

I'm trying to use the lpeglabel library written in C and delivered as
lpeglabel.so.

$ ls
testlabel.lua lpeglabel.so
$ cat testlabel.lua
require("lpeglabel")

The ConTeXt binary cannot load the library because it lacks certain Lua API:

$ context --forcecld --permitloadlib testlabel.lua
...
fatal lua error:
registered function call [1542]:
...tx/tex/texmf-context/tex/context/base/mkiv/l-package.lua:348: error
loading module 'lpeglabel' from file './lpeglabel.so':
./lpeglabel.so: undefined symbol: lua_gettop
...

nor does LuaTeX:
$ luatex -luaonly testlabel.lua
error loading module 'lpeglabel' from file './lpeglabel.so':
./lpeglabel.so: undefined symbol: lua_getiuservalue

It seems that lua_gettop and others are optimized out from the `context`
binary, while lua_getiuservalue and others are missing from `luatex`.

I'm not sure if it works but I would suggest adding `__attribute__
((used))` to the `LUA_API` macro if the binaries are compiled with gcc.

Best,
Sylvain
___
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] context() does not ignore space in empty line

2021-04-19 Thread Sylvain Hubert
Dear list,

does anyone have an idea why, in the example below, context() starts a new
paragraph at "\n\n" but not at "\n \n" with a space in between? Is there
any way to fix it?

\starttext
Without using context(), inside the next parentheses is a new line: (

) note that a space sits between the two line breaks.

\startluacode
  context('Using context(), inside the next parentheses is also a new line:
(\n\n) because there is *no* space between the two line breaks.\n\n')
  context('Using context(), inside the next parentheses is however *no* new
line: (\n \n) because of the space between the two line breaks.\n\n')
\stopluacode
\stoptext

Any help is appreciated.

Best,
Sylvain
___
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 can I make the notes under this table inherit the width of the table, and not the \textwidth?

2020-11-10 Thread Sylvain Hubert
Hi Andrés,

You could probably put the notes inside a \start...\stopxtablefoot

Sylvain

On Tue, 10 Nov 2020 at 21:49, Andres Conrado Montoya <
andresconr...@gmail.com> wrote:

> MWE (sorry for the long table, I hadn't anything else at hand):
>
> 
> \definehighlight[emph][style={\em}]
> \definehighlight[strong][style={\bf}]
>
> \setupfloat[table][default={here}]
>
> \definereferenceformat[figura][text={Figura~}]
> \definereferenceformat[tabla][text={Tabla~}]
>
> \setupcaptions[style={\sans\small},
>   width=max,
>   prefix=no,
>   align={flushleft,nothyphenated},
>   way=bytext]
> \setupcaption[table][location=top]
>
> \setupthinrules[width=15em] % width of horizontal rules
>
> \setupxtable[frame=off,option=stretch,bodyfont=small,foregroundstyle=sans]
> \setupxtable[head][topframe=on,bottomframe=on,foregroundstyle=sansbold]
> \setupxtable[body][bottomframe=on]
> \setupxtable[foot][bottomframe=on]
>
> \define[1]\fuentent{\start\switchtobodyfont[sans,small]#1\par\stop}
>
> \define[1]\fuente{\start\switchtobodyfont[sans,small]\emph{Fuente:}~#1\par\stop}
>
> \starttext
> \reference[tbl:t03]{}%
> \startplacetable[title={Composición química y valor energético de recursos
> forrajeros de corte en el área de influencia del Subproyecto Carne Bovina
> (trópico de altura).}]
> \startxtable[option=tight,bodyfont=7pt]
> \startxtablehead[head]
> \startxrow
> \startxcell[align=right,width=.1\textwidth] \strong{Altura\crlf (msnm)}
> \stopxcell
> \startxcell[align=right,width=.28\textwidth] \strong{Gramíneas forrajeras
> de corte} \stopxcell
> \startxcell[align=middle,width=.06\textwidth] \strong{Edad (días)}
> \stopxcell
> \startxcell[align=middle,width=.05\textwidth] \strong{MS
> (\letterpercent{})} \stopxcell
> \startxcell[align=middle,width=.1\textwidth] \strong{PC\crlf
>  (\letterpercent{} MS)} \stopxcell
> \startxcell[align=middle,width=.1\textwidth] \strong{FDN\crlf
> (\letterpercent{} MS)} \stopxcell
> \startxcell[align=middle,width=.1\textwidth] \strong{FDA\crlf
> (\letterpercent{} MS)} \stopxcell
> \startxcell[align=middle,width=.1\textwidth] \strong{EM\crlf {\bfxx
> (Mcal/kg MS)}} \stopxcell
> \startxcell[align=middle,width=.1\textwidth] \strong{ENm\crlf {\bfxx
> (Mcal/kg MS)}} \stopxcell
> \startxcell[align=middle,width=.1\textwidth] \strong{ENg\crlf {\bfxx
> (Mcal/kg MS)}} \stopxcell
> \startxcell[align=middle,width=.1\textwidth] \strong{ENl\crlf {\bfxx
> (Mcal/kg MS)}} \stopxcell
> \stopxrow
> \stopxtablehead
> \startxtablebody[body]
> \startxrow
> \startxcell[align=right,ny=2] 1800-1860 \stopxcell
> \startxcell[align=right,ny=2] \strong{Cuba 22}\crlf (\emph{P. glaucum} x
> \emph{P. thyphoides}) \stopxcell
> \startxcell[align=middle] 90 \stopxcell
> \startxcell[align=middle] 29,0 \stopxcell
> \startxcell[align=middle] 10,6 \stopxcell
> \startxcell[align=middle] 64,1 \stopxcell
> \startxcell[align=middle] 30,8 \stopxcell
> \startxcell[align=middle] 1,92 \stopxcell
> \startxcell[align=middle] 1,08 \stopxcell
> \startxcell[align=middle] 0,52 \stopxcell
> \startxcell[align=middle] 1,19 \stopxcell
> \stopxrow
> \startxrow
> \startxcell[align=middle] 210 \stopxcell
> \startxcell[align=middle] 27,8 \stopxcell
> \startxcell[align=middle] 6,2 \stopxcell
> \startxcell[align=middle] 69,1 \stopxcell
> \startxcell[align=middle] 33,6 \stopxcell
> \startxcell[align=middle] 1,78 \stopxcell
> \startxcell[align=middle] 0,94 \stopxcell
> \startxcell[align=middle] 0,40 \stopxcell
> \startxcell[align=middle] 1,09 \stopxcell
> \stopxrow
> \startxrow
> \startxcell[align=right,ny=3] 1800-2186 \stopxcell
> \startxcell[align=right,ny=3] \strong{King Grass} \crlf (\emph{P.
> purpureum} x \emph{P. typhoides}) \stopxcell
> \startxcell[align=middle] 91 \stopxcell
> \startxcell[align=middle] 22,3 \stopxcell
> \startxcell[align=middle] 8,7 \stopxcell
> \startxcell[align=middle] 65,4 \stopxcell
> \startxcell[align=middle] 32,1 \stopxcell
> \startxcell[align=middle] 1,86 \stopxcell
> \startxcell[align=middle] 1,02 \stopxcell
> \startxcell[align=middle] 0,46 \stopxcell
> \startxcell[align=middle] 1,14 \stopxcell
> \stopxrow
> \startxrow
> \startxcell[align=middle] 150 \stopxcell
> \startxcell[align=middle] 23,6 \stopxcell
> \startxcell[align=middle] 7,2 \stopxcell
> \startxcell[align=middle] 66,9 \stopxcell
> \startxcell[align=middle] 32,8 \stopxcell
> \startxcell[align=middle] 1,81 \stopxcell
> \startxcell[align=middle] 0,98 \stopxcell
> \startxcell[align=middle] 0,42 \stopxcell
> \startxcell[align=middle] 1,11 \stopxcell
> \stopxrow
> \startxrow
> \startxcell[align=middle] 182 \stopxcell
> \startxcell[align=middle] 27,0 \stopxcell
> \startxcell[align=middle] 6,7 \stopxcell
> \startxcell[align=middle] 68,8 \stopxcell
> \startxcell[align=middle] 35,6 \stopxcell
> \startxcell[align=middle] 1,77 \stopxcell
> \startxcell[align=middle] 0,93 \stopxcell
> \startxcell[align=middle] 0,38 \stopxcell
> \startxcell[align=middle] 1,08 \stopxcell
> \stopxrow
> \startxrow
> 

Re: [NTG-context] page ends with a section title followed by a table

2020-11-10 Thread Sylvain Hubert
On Tue, 10 Nov 2020 at 19:23, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Sylvain Hubert schrieb am 10.11.2020 um 19:11:
>
> > Weirdly enough, "\hskip 0pt" solves the problem.
> >
> >  \setuphead[section][after={\blank[samepage]\hskip 0pt}]
> >  \starttext
> >  \showframe
> >  \dorecurse{50}{a }
> >  \startsection[title=spec]
> >  \startxtable
>
>
> What happens when you \hskip is that you switch to horizontal
> mode and the preferred to do this is to use \dontleavehmode.
>
> \dontleavehmode
> \startxtable
>
> Wolfgang
>

Indeed. Thanks for the information!

For the record, this is how the problem is finally solved:

\setuphead[section][after={\blank[sampage]}]
\begingroup\setupindenting[no]\dontleavehmode\startxtable …
\stopxtable\endgroup

Sylvain
___
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] page ends with a section title followed by a table

2020-11-10 Thread Sylvain Hubert
On Tue, 10 Nov 2020 at 18:25, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Sylvain Hubert schrieb am 10.11.2020 um 18:06:
>
> > Thanks for the suggestion, but as illustrated by the second example,
> > copied here, where the section title is at the top of the page:
> >
> >  \starttext
> >  \showframe
> >  \dorecurse{50}{a }
> >  \startsection[title=spec][before={\blank[preference,big]},
> > after={\blank[samepage,big]}]
>
> Your settings in the second argument of \startsection make no sense
> because the optional argument is for userdata (values like author etc.)
>
> >  \startxtable
> >  \startxrow
> >  \startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell
> >  \stopxrow
> >  \dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow}
> >  \stopxtable
> >  \stoptext
> >
> > it is sometimes difficult to predict how much remaining space should
> > trigger a line break.
>
> You can either reformat your table or put the table in a float
> environment to move it to a place where it fits.
>
> Wolfgang
>

Weirdly enough, "\hskip 0pt" solves the problem.

\setuphead[section][after={\blank[samepage]\hskip 0pt}]
\starttext
\showframe
\dorecurse{50}{a }
\startsection[title=spec]
\startxtable
\startxrow
\startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell
\stopxrow
\dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow}
\stopxtable
\stoptext

Sylvain
___
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] Indentation after \placefigure

2020-11-10 Thread Sylvain Hubert
On Tue, 10 Nov 2020 at 18:05, Aditya Mahajan  wrote:

> On Tue, 10 Nov 2020, mf wrote:
>
> > Il 10/11/20 09:42, Sylvain Hubert ha scritto:
> > > Dear List,
> > >
> > > Does anyone know how to indent the paragraph beneath \placefigure in
> the
> > > following example?
> > >
> > >  \indenting[2em]
> > >  \setupindenting[yes]
> > >
> > >  \starttext
> > >
> > >  \dorecurse{50}{a b c }
> > >
> > >  \placefigure[here,none][indentnext=yes]{}{
> > >  \startMPcode
> > >  draw fullcircle scaled 1cm;
> > >  \stopMPcode
> > >  }
> > >
> > >  \dorecurse{50}{d e f } % not indented
> > >
> > >  \dorecurse{50}{g h i }
> > >  \stoptext
> > >
> >
> > The second bracket group of \placefigure is for references.
> > Instead of
> >
> > \placefigure[here,none][indentnext=yes]{}{...
> >
> > write
> >
> > \setupfloat[figure][indentnext=yes]
> > \placefigure[here,none]{}{...
> >
> > That way you enable indentation after every figure.
>
> If you want to change the behavior for a particular figure, you can also
> use the \start...stop variant:
>
> \startplacefigure[location={here,none}, indentnext=yes]
>
> \stopplacefigure
>

Thanks for the information, Aditya!

Sylvain
___
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] page ends with a section title followed by a table

2020-11-10 Thread Sylvain Hubert
On Tue, 10 Nov 2020 at 17:54, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Pablo Rodriguez schrieb am 10.11.2020 um 15:59:
> > On 11/10/20 9:55 AM, Sylvain Hubert wrote:
> >> Dear List,
> >>
> >> In the following example, the section title appears at the very end of
> >> the first page.
> >> [...]
> >> Does anyone know where to adjust the penalty in this case, so that the
> >> section title can be repositioned to the next page?
> > Hi Sylvain,
> >
> >\setuphead[title]
> >  [before={\blank[preference, big],
> >   after={\blank[samepage, big]]
> >
> > In this case, the blank space before sets a preference for inserting a
> > page break. The blank space after requires to be in the same page with
> > next paragraph.
>
> Another method is to move the section title to the next page when the
> remaining spaces
> is below a specified number of lines. The following setup forces a page
> break when
> less than 4 lines remain on the current page.
>
> \setuphead
>[section]
>[before={\testpage[4]\blank[2*big]}]
>
> Wolfgang
>

Hi Wolfgang,

Thanks for the suggestion, but as illustrated by the second example, copied
here, where the section title is at the top of the page:

\starttext
\showframe
\dorecurse{50}{a }
\startsection[title=spec][before={\blank[preference,big]},
after={\blank[samepage,big]}]
\startxtable
\startxrow
\startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell
\stopxrow
\dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow}
\stopxtable
\stoptext

it is sometimes difficult to predict how much remaining space should
trigger a line break.

Sylvain
___
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] page ends with a section title followed by a table

2020-11-10 Thread Sylvain Hubert
On Tue, 10 Nov 2020 at 17:37, Pablo Rodriguez  wrote:

> On 11/10/20 5:23 PM, Sylvain Hubert wrote:
> > My mistake, but the problem survives the fix:
> >
> > \setuphead[section][after={\blank[samepage,big]}]
> > \starttext
> > \showframe
> > \dorecurse{50}{a }
> > \startsection[title=spec]
> > \startxtable
> Hi Sylvain,
>
> no fix is required when you allow the table to be split:
>
> \startxtable[split=yes]
>
> Pablo
>

Hi Pablo,

Thanks for the suggestion, but unlike the MWE, in the original document,
the table has ten rows and is visually not suitable for a split. The large
row span is meant to represent this restriction.

Sylvain
___
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] page ends with a section title followed by a table

2020-11-10 Thread Sylvain Hubert
My mistake, but the problem survives the fix:

\setuphead[section][after={\blank[samepage,big]}]
\starttext
\showframe
\dorecurse{50}{a }
\startsection[title=spec]
\startxtable
\startxrow
\startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell
\stopxrow
\dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow}
\stopxtable
\stoptext

Sylvain

On Tue, 10 Nov 2020 at 17:11, Sylvain Hubert  wrote:

>
> On Tue, 10 Nov 2020 at 16:00, Pablo Rodriguez  wrote:
>
>> On 11/10/20 9:55 AM, Sylvain Hubert wrote:
>> > Dear List,
>> >
>> > In the following example, the section title appears at the very end of
>> > the first page.
>> > [...]
>> > Does anyone know where to adjust the penalty in this case, so that the
>> > section title can be repositioned to the next page?
>>
>> Hi Sylvain,
>>
>>   \setuphead[title]
>> [before={\blank[preference, big],
>>  after={\blank[samepage, big]]
>>
>> In this case, the blank space before sets a preference for inserting a
>> page break. The blank space after requires to be in the same page with
>> next paragraph.
>>
>> Of course, you don’t need both simultaneously.
>>
>> Just in case it helps,
>>
>> Pablo
>>
>
> Hello Pablo,
>
> Thank you very much for the help. The penalty of \blank indeed brings the
> solution closer and it does format the previous example correctly.
>
> However, when I went back to the original document, neither
> [before={\blank[preference, big]}] nor [after={\blank[samepage, big]}] nor
> both worked. I trimmed it into the following example which behaves the same:
>
> \starttext
> \showframe
> \dorecurse{50}{a }
> \startsection[title=spec][before={\blank[preference,big]},
> after={\blank[samepage,big]}]
> \startxtable
> \startxrow
> \startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell
> \stopxrow
> \dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow}
> \stopxtable
> \stoptext
>
> Do you have an idea on how this could also be formatted correctly or how
> one could inspect and debug the penalty?
>
> Thanks again!
>
> Sylvain
>
___
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] page ends with a section title followed by a table

2020-11-10 Thread Sylvain Hubert
On Tue, 10 Nov 2020 at 16:00, Pablo Rodriguez  wrote:

> On 11/10/20 9:55 AM, Sylvain Hubert wrote:
> > Dear List,
> >
> > In the following example, the section title appears at the very end of
> > the first page.
> > [...]
> > Does anyone know where to adjust the penalty in this case, so that the
> > section title can be repositioned to the next page?
>
> Hi Sylvain,
>
>   \setuphead[title]
> [before={\blank[preference, big],
>  after={\blank[samepage, big]]
>
> In this case, the blank space before sets a preference for inserting a
> page break. The blank space after requires to be in the same page with
> next paragraph.
>
> Of course, you don’t need both simultaneously.
>
> Just in case it helps,
>
> Pablo
>

Hello Pablo,

Thank you very much for the help. The penalty of \blank indeed brings the
solution closer and it does format the previous example correctly.

However, when I went back to the original document, neither
[before={\blank[preference, big]}] nor [after={\blank[samepage, big]}] nor
both worked. I trimmed it into the following example which behaves the same:

\starttext
\showframe
\dorecurse{50}{a }
\startsection[title=spec][before={\blank[preference,big]},
after={\blank[samepage,big]}]
\startxtable
\startxrow
\startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell
\stopxrow
\dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow}
\stopxtable
\stoptext

Do you have an idea on how this could also be formatted correctly or how
one could inspect and debug the penalty?

Thanks again!

Sylvain
___
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] Indentation after \placefigure

2020-11-10 Thread Sylvain Hubert
On Tue, 10 Nov 2020 at 10:05, mf  wrote:

> Il 10/11/20 09:42, Sylvain Hubert ha scritto:
> > Dear List,
> >
> > Does anyone know how to indent the paragraph beneath \placefigure in the
> > following example?
> >
> >  \indenting[2em]
> >  \setupindenting[yes]
> >
> >  \starttext
> >
> >  \dorecurse{50}{a b c }
> >
> >  \placefigure[here,none][indentnext=yes]{}{
> >  \startMPcode
> >  draw fullcircle scaled 1cm;
> >  \stopMPcode
> >  }
> >
> >  \dorecurse{50}{d e f } % not indented
> >
> >  \dorecurse{50}{g h i }
> >  \stoptext
> >
>
> The second bracket group of \placefigure is for references.
> Instead of
>
> \placefigure[here,none][indentnext=yes]{}{...
>
> write
>
> \setupfloat[figure][indentnext=yes]
> \placefigure[here,none]{}{...
>
> That way you enable indentation after every figure.
>
> Massi
>

Hi Massi,

It works! Thanks for the help!

Sylvain
___
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] page ends with a section title followed by a table

2020-11-10 Thread Sylvain Hubert
Dear List,

In the following example, the section title appears at the very end of the
first page.

\showframe

\starttext
\dorecurse{94}{a b c }\\
\dorecurse{94}{a b c }\\
\dorecurse{94}{a b c }\\
\dorecurse{94}{a b c }\\
\dorecurse{94}{a b c }\\
\dorecurse{30}{a b c }

\section{title}
\startxtable
\startxrow
\startxcell[ny=10]a\stopxcell\startxcell 1\stopxcell
\stopxrow
\dorecurse{9}{\startxrow\startxcell 2\stopxcell\stopxrow}
\stopxtable
\stoptext

Does anyone know where to adjust the penalty in this case, so that the
section title can be repositioned to the next page?

Thanks!

Best,
Sylvain
___
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] Indentation after \placefigure

2020-11-10 Thread Sylvain Hubert
Dear List,

Does anyone know how to indent the paragraph beneath \placefigure in the
following example?

\indenting[2em]
\setupindenting[yes]

\starttext

\dorecurse{50}{a b c }

\placefigure[here,none][indentnext=yes]{}{
\startMPcode
draw fullcircle scaled 1cm;
\stopMPcode
}

\dorecurse{50}{d e f } % not indented

\dorecurse{50}{g h i }
\stoptext

Thanks!

Best,
Sylvain
___
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] embed metapost figure into document

2020-11-09 Thread Sylvain Hubert
On Mon, 9 Nov 2020 at 23:40, Jairo A. del Rio 
wrote:

> Hi, Sylvain.
>
> LuaMetaTeX and LuaTeX, the engines used by ConTeXt nowadays, use an
> embedded library, so external compilations/files are not necessary. Just
> out of curiosity, wouldn't it be easier to use a ConTeXt environment? E.g.:
>
> \starttext
> \startMPcode %\startuseMPgraphic{} if you want to reuse your graphic
> with \useMPgraphic{}
> draw fullcircle scaled cm
> %withcolor black % black is default
> ;
> \stopMPcode %\stopuseMPgraphic
> \stoptext
>
> More info here:
> https://wiki.contextgarden.net/MetaFun_-_MetaPost_in_ConTeXt
> To actually answer your question, if you actually want to load a Metapost
> graphic externally generated, you should have something like:
>
> %nice.mp
> %"begin ... endfig", as well as "end" are important
> beginfig (1);
> draw fullcircle scaled cm
> %withcolor black
> ;
> endfig;
> end
>
> so when you compile it via
>
> mpost nice.mp
>
> (obviously supposing you have Metapost installed) you'll get a file called
> nice.1 and
>
> \starttext
>
> \externalfigure[nice.1][width=4cm]
>
> \stoptext
>
> will work. However, as you can see, ConTeXt deals with such minutiae for
> you and extends Metapost capabilities too, so the second alternative is not
> the ConTeXt way to go.
>
> I hope it helps.
>
> Jairo :)
>

Hi Jairo,

Thank you very much for the suggestion and the thorough explanation.

I extracted the metapost code to a new file because I felt it would be a
bit lengthy and noisy to stay with the text content.

But you're right, an extra compilation step is not any better. I should
probably use \component figure.tex, in place of \externalfigure[figure.1]

Sylvain
___
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] embed metapost figure into document

2020-11-09 Thread Sylvain Hubert
Dear List,

I'm trying to embed a metapost image into the document. According the MetaFun
manual ,
"embedding such a graphic is done by:
\externalfigure[graphic.123][width=4cm]", but the following example
produces an empty page:

% test.mkxl
\starttext
\externalfigure[test.123][width=4cm]
\stoptext

% test.123
draw fullcircle scaled cm withcolor black;

Does anyone know how to properly embed a metapost image into a context
document?

Thanks!

Best,
Sylvain
___
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] extra warning in the lua version

2020-11-09 Thread Sylvain Hubert
Dear List,

The following code does the same thing twice, once with lua and once
without, but the lua version triggers a warning:

\starttext

% this triggers a warning: fonts > checking > char [sub] in font
'LMMono12-Regular' with id 8: missing
\startluacode
context.startxtable()
context.startxrow()
context.startxcell()
context.starttyping()
context('1')
context.stoptyping()
context.stopxcell()
context.stopxrow()
context.stopxtable()
\stopluacode

% this does not
\startxtable
\startxrow
\startxcell
\starttyping
1
\stoptyping
\stopxcell
\stopxrow
\stopxtable

\stoptext

Does anyone have an idea why this has happened?

Thanks!

Best,
Sylvain
___
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] indentation of item separators

2020-11-09 Thread Sylvain Hubert
On Mon, 9 Nov 2020 at 20:35, Pablo Rodriguez  wrote:

> On 11/9/20 8:09 PM, Sylvain Hubert wrote:
> > Dear List,
> >
> > In the following example, what is indented is the text instead of the
> > numbers.
> > [...]
> > Does anyone know how to indent the whole item group altogether?
>
> Hi Sylvain,
>
> margin is the option here, not indenting.
>
> You can see the difference:
>
>   \showframe\showgrid
>   \starttext
>   \startitemize[n, packed][indenting=2em]
>   \item abc
>   \stopitemize
>   \startitemize[n, packed][margin=2em]
>   \item def
>   \stopitemize
>   \startitemize[n, packed][margin=2em,indenting=2em]
>   \item ghi
>   \stopitemize
>   \stoptext
>
> I hope it helps,
>

Thanks again for the help, Pablo!

Sylvain
___
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] indentation of item separators

2020-11-09 Thread Sylvain Hubert
Dear List,

In the following example, what is indented is the text instead of the
numbers.

\starttext
\startitemize[n, packed][indenting=2em]
\item abc
\item def
\item ghi
\stopitemize
\stoptext

Does anyone know how to indent the whole item group altogether?

Thanks!

Best,
Sylvain
___
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] \type{...} as macro argument

2020-11-08 Thread Sylvain Hubert
On Sun, 8 Nov 2020 at 18:27, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Sylvain Hubert schrieb am 08.11.2020 um 17:56:
> > Hi Wolfgang,
> >
> > I'm sorry that the question was not clear enough. Let me ask in this way:
> > how to define a \dorecurse, such that \dorecurse{10}{\type{ab c}}
> > does not squash the spaces?
>
> Verbatim in arguments of other commands is tricky because in case with
> \dorecurse the loop reads the content before it is passed to type, as a
> result of this process all spaces are collapsed.
>
> One way to work around this is to use a buffer for the content of the loop.
>
> \startbuffer[type]
> \type{ab c}
> \stopbuffer
>
> \starttext
> \dorecurse{10}{\inlinebuffer[type]\par}
> \stoptext
>

Many thanks for the answer!
It seems that the buffer mechanism is quite a powerful resort for the macro
language.

Sylvain
___
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] \type{...} as macro argument

2020-11-08 Thread Sylvain Hubert
Hi Wolfgang,

I'm sorry that the question was not clear enough. Let me ask in this way:
how to define a \dorecurse, such that \dorecurse{10}{\type{ab c}} does
not squash the spaces?

Sylvain

On Sun, 8 Nov 2020 at 15:03, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Sylvain Hubert schrieb am 08.11.2020 um 14:47:
> > Dear List,
> >
> > I would like to ask how to define a command, \same, such that
> >
> >  \same{\type{a   b c}}
> >
> > produces the same result as its argument does
> >
> >  \type{a   b c}
> >
> > The naive way doesn't work because it makes all the spaces collapse:
> >
> >  \define[1]\same{#1}
>
>
> \definetype [typeTEX] [option=tex]
>
> \starttext
>
> \type{\startsection[title=\tex{type}]}
>
> \typeTEX{\startsection[title=\tex{typeTEX}]}
>
> \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] "page i/n" in footer

2020-11-08 Thread Sylvain Hubert
On Sun, 8 Nov 2020 at 13:44, Pablo Rodriguez  wrote:

> On 11/8/20 11:48 AM, Sylvain Hubert wrote:
> > Indeed, \setupfooterexts is much clearer for page numbering. Thanks for
> > the help!.
> >
> > Btw, do you know whether there is any difference between \lastpagenumber
> > and \lastuserpagenumber mentioned both by Wolfgang and by the excursion
> > book <http://www.pragma-ade.com/general/manuals/ma-cb-en.pdf>?
>
> Besides Wolfgang’s reply (way far more authoritative than mine), my
> approach is basic.
>
> grep the and read the source:
>
>   $ grep -irl lastpagenumber ~/lmtx
> ~/lmtx/mlib-int.lua
> ~/lmtx/mlib-int.lmt
> ~/lmtx/meta-pag.mkiv
> ~/lmtx/mult-def.lua
> ~/lmtx/strc-pag.mkxl
> ~/lmtx/strc-pag.mkiv
>
> ~/lmtx is only a symlink for
> ~/context/tex/texmf-context/tex/context/base/mkiv/.
>
> I created that symlink, because grepping for commands or options is a
> way to learn by reading the code.
>
> Not that I understand the whole, but I see which options are available
> and I can check some samples included.
>
> strc-pag.mkxl is your friend here. There are three page series. You
> could even create more page series (not normally needed).
>

Thank you very much for the pointers. It does save me from drowning in the
code base as I have been for multiple occasions.

Sylvain
___
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] \type{...} as macro argument

2020-11-08 Thread Sylvain Hubert
Dear List,

I would like to ask how to define a command, \same, such that

\same{\type{a   b c}}

produces the same result as its argument does

\type{a   b c}

The naive way doesn't work because it makes all the spaces collapse:

\define[1]\same{#1}

I would also like to ask whether this could be achieved using the lua
interface:

\startluacode
interfaces.definecommand {
   name="same",
   -- catcode/mode/arguments = ???
}

Thanks in advance.

Best,
Sylvain
___
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] temporarily move up a section title

2020-11-08 Thread Sylvain Hubert
On Sun, 8 Nov 2020 at 10:12, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Sylvain Hubert schrieb am 08.11.2020 um 03:19:
> > Dear List,
> >
> > I'm trying to move up a section title (section b) 2cm upward:
> >
> >  \starttext
> >  \section{a}
> >  \blank[-2cm,force]\
>
> \blank[back,disable]
>
> Wolfgang
>

Works as a charm! Thanks!

Sylvain
___
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] temporarily move up a section title

2020-11-08 Thread Sylvain Hubert
Hi Hraban,

On Sun, 8 Nov 2020 at 07:57, Henning Hraban Ramm  wrote:

>
>
> > Am 08.11.2020 um 03:19 schrieb Sylvain Hubert :
> >
> > Dear List,
> >
> > I'm trying to move up a section title (section b) 2cm upward:
> >
> > \starttext
> > \section{a}
> > \blank[-2cm,force]\
> > \section{b}
> > \section{c}
> > \stoptext
> >
> > The empty space (\ ) after the \blank is necessary here, without which
> the \blank does nothing.
> > I would like to ask whether there is a less hacky way to let \blank work
> than the hidden space.
>
> You could use the low level method of \vskip-2cm
>

Indeed this is a clearer hack.
Thank you for the suggestion!

Sylvain
___
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] \switchtobodyfont behaves differenctly with splitted parameters

2020-11-08 Thread Sylvain Hubert
On Sun, 8 Nov 2020 at 12:52, Hans Hagen  wrote:

> On 11/8/2020 12:46 PM, Sylvain Hubert wrote:
> > On Sun, 8 Nov 2020 at 12:14, Hans Hagen  > <mailto:j.ha...@xs4all.nl>> wrote:
> >
> > when yyou use several bodyfonts you can do this before \starttext:
> >
> > \usebodyfont[face,24pt]
> > \usebodyfont[deface]
> >
> > \starttext
> > 
> > \stoptext
> >
> >
> > Thank you for the information, Hans!
> >
> > Could you please also shed some light on the relation/difference among
> > \{setup,switchto,use}bodyfont?
> > There seems to be not much documentation on this. Can one conclude, from
> > the wiki <https://wiki.contextgarden.net/Command/switchtobodyfont> and
> > the source code
> > <
> https://source.contextgarden.net/tex/context/base/mkiv/font-ini.mklx#l2287>,
>
> > that they are mostly the same, except that \switchtobodyfont is
> > restricted to the content area, and \usebodyfont is a helper to call
> > \setupbodyfont in the beginning?
> >
> > If this is the case, is it recommended to always put a
> > \setupbodyfont[...] in the beginning, even if it's just a
> > \setupbodyfont[modern]?
> > One reason might be that the following example somehow enlarges the page
> > number in the header, intuitively contradicting what is claimed by the
> > wiki <https://wiki.contextgarden.net/Command/switchtobodyfont>:
> >
> >  \switchtobodyfont[dejavu]
> >  \starttext \switchtobodyfont[dejavu, 24pt]a\stoptext
>
> \setup  is document wide
> \switch is for local usage
>

So \switchtobodyfont before \starttext is semantically an error then.
Thanks for the confirmation!


> (has to do with picking up font/space related issues after page breaks
> and when typesetting page ornaments like headers and footers)
>
>
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>

Sylvain
___
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] weird behavior of font.feature.effect

2020-11-08 Thread Sylvain Hubert
On Sun, 8 Nov 2020 at 11:24, Pablo Rodriguez  wrote:

> Hi Sylvain,
>
> this is the same as:
>
>   \definefontfamily[face1][rm][gabriola]
>
> Just in case, "slanted" is an already defined feature. It slants the font.
>
> > \definefontfamily[face2][rm][gabriola][it={features:{default,
> > effect={}}}]
> > \definefontfamily[face3][rm][gabriola][it={features:{default,
> > effect={width=1.0}}}]
>
> BTW, the documentation is clear
> (
> http://texdoc.net/texmf-dist/doc/context/presentations/bachotex/2018/bachotex-2018-fonteffects.pdf#search=fontfeature
> ):
> font features should be defined as such before being deployed.
>
> > Could someone explain:
>
> I will try from what I understand.
>
> > 1. What does "effect" mean?
>
> A ConTeXt (and not OpenType) font feature?
>
> > Why does "effect={}" embolden the fonts even though nothing ({}) is
> > given as arguments?
> "effect={}" may be reading default values (it might be intended behavior
> or not).
>
> But it also could be reading or calculating from previously defined values.
>
> > 2. Similarly, what does "width" do? Why does "width=1.0" shrink the
> > width of the line instead of doing nothing?
>
> This might be a bug, because of all the code improvements.
>
> I’m reporting a proper bug.
>

Thank you very much for the explanation and the bug report!

Just in case it helps: the line shrinking disappears with an additional
"delta=0":

\definefontfamily[face3][rm][gabriola][it={features:{default,
effect={width=1.0, delta=0}}}]

Sylvain
___
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] \switchtobodyfont behaves differenctly with splitted parameters

2020-11-08 Thread Sylvain Hubert
On Sun, 8 Nov 2020 at 12:14, Hans Hagen  wrote:

> when yyou use several bodyfonts you can do this before \starttext:
>
> \usebodyfont[face,24pt]
> \usebodyfont[deface]
>
> \starttext
>
> \stoptext
>

Thank you for the information, Hans!

Could you please also shed some light on the relation/difference among
\{setup,switchto,use}bodyfont?
There seems to be not much documentation on this. Can one conclude, from the
wiki  and the source
code
,
that they are mostly the same, except that \switchtobodyfont is restricted
to the content area, and \usebodyfont is a helper to call \setupbodyfont in
the beginning?

If this is the case, is it recommended to always put a \setupbodyfont[...]
in the beginning, even if it's just a \setupbodyfont[modern]?
One reason might be that the following example somehow enlarges the page
number in the header, intuitively contradicting what is claimed by the wiki
:

\switchtobodyfont[dejavu]
\starttext \switchtobodyfont[dejavu, 24pt]a\stoptext

Thanks!

Sylvain
___
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] "page i/n" in footer

2020-11-08 Thread Sylvain Hubert
On Sun, 8 Nov 2020 at 12:07, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Sylvain Hubert schrieb am 08.11.2020 um 11:48:
> > On Sun, 8 Nov 2020 at 10:31, Pablo Rodriguez  > <mailto:oi...@gmx.es>> wrote:
> >
> > Hi Sylvain,
> >
> >\setupfootertexts[\pagenumber/\lastpagenumber]
> >\starttext
> >\dorecurse{25}{\null\page}
> >\stoptext
> >
> >
> > Indeed, \setupfooterexts is much clearer for page numbering. Thanks for
> > the help!.
> >
> > Btw, do you know whether there is any difference between \lastpagenumber
> > and \lastuserpagenumber mentioned both by Wolfgang and by the excursion
> > book <http://www.pragma-ade.com/general/manuals/ma-cb-en.pdf>?
>
> \defineconversionset [bodypart:pagenumber] [] [Romannumerals]
>
> \startsetups [footer]
>  \starttabulate[|l|c|c|]
>  \NC \bf Command  \NC \bf Current page \NC \bf Last page
>\NC\NR
>  \NC \tex{pagenumber} \NC \pagenumber  \NC \lastpagenumber
>\NC\NR
>  \NC \tex{userpagenumber} \NC \userpagenumber  \NC
> \lastuserpagenumber \NC\NR
>  \stoptabulate
> \stopsetups
>
> \setupfootertexts[\directsetup{footer}]
>
> \starttext

\dorecurse{10}{\dontleavehmode\page}
> \stoptext
>

Thanks, so basically \(last-)userpagenumber is a configurable descendent
of \(last-)pagenumber if I've got the right message from this example?

Sylvain
___
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] \switchtobodyfont behaves differenctly with splitted parameters

2020-11-08 Thread Sylvain Hubert
On Sun, 8 Nov 2020 at 11:37, Pablo Rodriguez  wrote:

> On 11/8/20 11:18 AM, Sylvain Hubert wrote:
> > Hi Pablo,
> >
> > thanks for the suggestion. Here's the minimal example which shows the
> > difference:
> >
> > \definefontfamily[face][rm][dejavuserif]
> > \starttext\switchtobodyfont[face, 24pt]ɑ\stoptext
> >
> > this should warn:
> >
> > fonts   > checking > char ɑ (U+00251) in font
> > 'LatinModernMath-Regular-4' with id 10: missing
>
> Well, you are switching before setting up a body font.
>
> I don’t know whether this might be a bug in ConTeXt (see previous
> report), but I would set up the body font always first:
>
> \definefontfamily[face][rm][dejavuserif]
> \definefontfamily[deface][rm][dejavusans]
> \setupbodyfont[deface]
> \starttext a\switchtobodyfont[face, 24pt]ɑ\stoptext
>

Thanks, it works!

And I agree that it probably indicates the existence of a bug, since by
changing "\setupbodyfont[deface]" to "\setupbodyfont[dejavu]" in your
example, the problem reappears:

\definefontfamily[face][rm][dejavuserif]
\setupbodyfont[dejavu]
\starttext a\switchtobodyfont[face, 24pt]ɑ\stoptext

Sylvain
___
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] "page i/n" in footer

2020-11-08 Thread Sylvain Hubert
On Sun, 8 Nov 2020 at 10:31, Pablo Rodriguez  wrote:

> Hi Sylvain,
>
>   \setupfootertexts[\pagenumber/\lastpagenumber]
>   \starttext
>   \dorecurse{25}{\null\page}
>   \stoptext
>

Indeed, \setupfooterexts is much clearer for page numbering. Thanks for the
help!.

Btw, do you know whether there is any difference between \lastpagenumber
and \lastuserpagenumber mentioned both by Wolfgang and by the excursion book
?


>
> I never used you approach with \setuppagenubering (all being said).
>
> This might help,
>
___
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] "page i/n" in footer

2020-11-08 Thread Sylvain Hubert
Many thanks for the help!

On Sun, 8 Nov 2020 at 10:20, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Sylvain Hubert schrieb am 08.11.2020 um 02:58:
> > Dear List,
> >
> > Does anyone know how to set the footer to be "page i/n" where i=current
> > page number, n=total number of page? I've tried
> >
> >  \setuppagenumbering[location=footer, command=\groupedcommand{page
> > }{/\lastcounter[userpage]}]
> >
> > but \lastcounter[userpage] results in empty string.
>
>
> \setuppagenumbering
>[ left={Page },
> right={/\lastuserpagenumber}]
>
> \starttext
> \unknown
> \stoptext
>
> or
>
>
> \setuppagenumbering
>[location=]
>
> \setupfootertexts
>[Page \userpagenumber/\lastuserpagenumber]
>
> \starttext
> \unknown
> \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] \switchtobodyfont behaves differenctly with splitted parameters

2020-11-08 Thread Sylvain Hubert
On Sun, 8 Nov 2020 at 11:18, Sylvain Hubert  wrote:

> Hi Pablo,
>
> thanks for the suggestion. Here's the minimal example which shows the
> difference:
>
> \definefontfamily[face][rm][dejavuserif]
> \starttext\switchtobodyfont[face, 24pt]ɑ\stoptext
>
> this should warn:
>
> fonts   > checking > char ɑ (U+00251) in font
> 'LatinModernMath-Regular-4' with id 10: missing
>
> while
>
> \definefontfamily[face][rm][dejavuserif]
> \starttext\switchtobodyfont[face, 24pt]ɑ\stoptext
>

sorry, this should read

\definefontfamily[face][rm][dejavuserif]
\starttext\switchtobodyfont[face]\switchtobodyfont[24pt]ɑ\stoptext



> produces the expected result despite a harmless warning.
>
> Sylvain
>
>
___
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] \switchtobodyfont behaves differenctly with splitted parameters

2020-11-08 Thread Sylvain Hubert
Hi Pablo,

thanks for the suggestion. Here's the minimal example which shows the
difference:

\definefontfamily[face][rm][dejavuserif]
\starttext\switchtobodyfont[face, 24pt]ɑ\stoptext

this should warn:

fonts   > checking > char ɑ (U+00251) in font
'LatinModernMath-Regular-4' with id 10: missing

while

\definefontfamily[face][rm][dejavuserif]
\starttext\switchtobodyfont[face, 24pt]ɑ\stoptext

produces the expected result despite a harmless warning.

Sylvain

On Sun, 8 Nov 2020 at 10:41, Pablo Rodriguez  wrote:

> On 11/8/20 2:35 AM, Sylvain Hubert wrote:
> > Dear List,
> >
> > after hours of debugging, I finally found out that
> > \switchtobodyfont[face, 20pt] does NOT behave the same with
> > \switchtobodyfont[face]\switchtobodyfont[20pt]. In my case the latter is
> > the correct one, while the former does nothing but falling back to
> > latinmodern.
> >
> > Does anyone know when or why \switchtobodyfont behaves differently with
> > splitted and joined parameters?
>
> Hi Sylvain,
>
> as a general rule, it helps when there is a minimal sample that provides
> the problematic behavior.
>
> I don’t get diffferent results:
>
>   \definefontfamily[mainface][rm][TeX Gyre Pagella]
>   \definefontfamily[face][rm][TeX Gyre Heros]
>   \setupbodyfont[mainface]
>   \startbuffer
>   In my case, the latter is the correct one, while the former does
>   nothing but falling back to latinmodern.\par
>   \stopbuffer
>
>   \starttext
>   \getbuffer
>   \switchtobodyfont[face]\switchtobodyfont[20pt]
>   \getbuffer
>   \switchtobodyfont[face, 20pt]
>   \getbuffer
>   \stoptext
>
> Correct the sample to show what I got wrong from your message.
>
> Pablo
> --
> http://www.ousia.tk
>
> ___
> 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
>
> ___
>
___
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] \define in conflict with \startxtable[]

2020-11-07 Thread Sylvain Hubert
Dear List,

Could anyone manage to typeset the following example? Here [] causes an
error "Extra }, or forgotten \endgroup".

\starttext
\define\sample{
\startxtable[]
\startxtablehead
\startxrow
\startxcell 123\stopxcell
\stopxrow
\stopxtablehead
\stopxtable
}
\sample
\stoptext

Thanks in advance.

Best,
Sylvain
___
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] \setupindenting[first] not working

2020-11-07 Thread Sylvain Hubert
Dear List,

The first paragraph of the following example is not indented.

\setupindenting[yes,first,4cm]
\starttext
\section{a}

\dorecurse{84}{abc }

\dorecurse{84}{abc }

\stoptext

Does anyone know how to actually get the first paragraph indented?

Thanks!

Best,
Sylvain
___
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] temporarily move up a section title

2020-11-07 Thread Sylvain Hubert
Dear List,

I'm trying to move up a section title (section b) 2cm upward:

\starttext
\section{a}
\blank[-2cm,force]\
\section{b}
\section{c}
\stoptext

The empty space (\ ) after the \blank is necessary here, without which the
\blank does nothing.
I would like to ask whether there is a less hacky way to let \blank work
than the hidden space.

Thanks in advance.

Best,
Sylvain
___
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] "page i/n" in footer

2020-11-07 Thread Sylvain Hubert
Dear List,

Does anyone know how to set the footer to be "page i/n" where i=current
page number, n=total number of page? I've tried

\setuppagenumbering[location=footer, command=\groupedcommand{page
}{/\lastcounter[userpage]}]

but \lastcounter[userpage] results in empty string.

Thanks in advance.

Best,
Sylvain
___
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] \switchtobodyfont behaves differenctly with splitted parameters

2020-11-07 Thread Sylvain Hubert
Dear List,

after hours of debugging, I finally found out that \switchtobodyfont[face,
20pt] does NOT behave the same with
\switchtobodyfont[face]\switchtobodyfont[20pt]. In my case the latter is
the correct one, while the former does nothing but falling back to
latinmodern.

Does anyone know when or why \switchtobodyfont behaves differently with
splitted and joined parameters?

Thanks.

Best,
Sylvain
___
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] weird behavior of font.feature.effect

2020-11-07 Thread Sylvain Hubert
Dear List,

I'm confused by the result of the following example (see attached):

\definefontfamily[face1][rm][gabriola][it={features:{default}}]
\definefontfamily[face2][rm][gabriola][it={features:{default,
effect={}}}]
\definefontfamily[face3][rm][gabriola][it={features:{default,
effect={width=1.0}}}]
\starttext

\startitemize[n, packed]
\item \switchtobodyfont[face1]\it\dorecurse{100}{a b c }
\item \switchtobodyfont[face2]\it\dorecurse{100}{a b c }
\item \switchtobodyfont[face3]\it\dorecurse{100}{a b c }
\stopitemize

\stoptext

Could someone explain:
1. What does "effect" mean? Why does "effect={}" embolden the fonts even
though nothing ({}) is given as arguments?
2. Similarly, what does "width" do? Why does "width=1.0" shrink the width
of the line instead of doing nothing?

Thanks in advance.

Best,
Sylvain
___
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] \section with userdata

2020-11-07 Thread Sylvain Hubert
The motivation of using \section was to avoid \stopsection, but I just
found out that \stopsection is not really necessary.

Now I would like to ask whether there is any difference between
\section{Title} and \startsection[title=Title].

Thanks.

On Sat, 7 Nov 2020 at 22:33, Sylvain Hubert  wrote:

> Dear List,
>
> it is known that we can supply additional userdata like authors to
> \startsection:
>
> \startsection[title=Title][author=Someone]
>
> so that the author can be included in the table of contents using
> \structurelistuservariable{author}.
>
> Now I would like to do the same with \section, but according to the wiki
> <https://wiki.contextgarden.net/Command/_section>, \section doesn't seem
> to accept any additional parameters like \startsection does.
>
> Does anyone know whether there is a workaround to let \section accept
> userdata parameters?
>
> Thanks!
>
> Best,
> Sylvain
>
___
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] \section with userdata

2020-11-07 Thread Sylvain Hubert
Dear List,

it is known that we can supply additional userdata like authors to
\startsection:

\startsection[title=Title][author=Someone]

so that the author can be included in the table of contents using
\structurelistuservariable{author}.

Now I would like to do the same with \section, but according to the wiki
, \section doesn't seem to
accept any additional parameters like \startsection does.

Does anyone know whether there is a workaround to let \section accept
userdata parameters?

Thanks!

Best,
Sylvain
___
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 section's uservarialbe inside the section

2020-11-07 Thread Sylvain Hubert
On Sat, 7 Nov 2020 at 20:37, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> \structurelistuservariable is for lists (e.g. the table of contents),
> to access the values in your text use \structureuservariable.
>

Indeed. Thanks for the help, 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] Get section's uservarialbe inside the section

2020-11-07 Thread Sylvain Hubert
Dear List,

I have sections tagged with authors:

\startsection[title={Title}][author={Author}] ... \stopsection

The authors were to be included in the table of contents using
\structurelistuservariable{author}. Now I would also like to mention the
authors inside the sections, but

\startsection[title={Title}][author={Author}]
\structurelistuservariable{author} \stopsection

doesn't work.

Could anyone help me with this? Thanks!

Best,
Sylvain
___
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 quote the section names in advance like the table of contents?

2020-11-07 Thread Sylvain Hubert
Hi Pablo,

thanks for the suggestion, but I was looking for an automated method for
writing a module, therefore manual reference is not feasible here.

Sylvain

On Sat, 7 Nov 2020 at 16:46, Pablo Rodriguez  wrote:

> On 11/7/20 4:32 PM, Sylvain Hubert wrote:
> > Dear List,
> >
> > say I have three sections in the document:
> >
> > \section{foo} ... \section{bar} ... \section{baz} ...
> >
> > Now I would like to auto generate a heavily customized table of contents
> > like the following text, which cannot be done by the stock \placecontent
> > in general, and put it into the preface:
> >
> >This book has 3 sections: foo, bar, and baz.
>
> How about the following?
>
> \starttext
> as in \about[section-one], \about[section-two],
> \about[section-three]...
>
> \section[section-one]{Section One}
> \section[section-two]{Section Two}
> \section[section-three]{Section Three}
> \stoptext
>
> Pablo
> --
> http://www.ousia.tk
>
> ___
> 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
>
> ___
>
___
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 define a {\bf}-compatible fake-bold switcher?

2020-11-07 Thread Sylvain Hubert
Thank you so much, Pablo. This is exactly what I needed.

Could you also tell me where you have learnt these features? I had been
searching for this for hours but \effect was still the best of what I've
got. Indeed, googling 'context+tex+boldened' or 'contextgarden+boldened'
results in nothing useful.

Sylvain

On Sat, 7 Nov 2020 at 16:41, Pablo Rodriguez  wrote:

> On 11/7/20 4:06 PM, Sylvain Hubert wrote:
> > [...]
> > Could anyone help me define a {\bf}-aware version of \fakebf which can
> > render the "4 5 6" in the example above in latinmodern's bold?
>
> Hi Sylvain,
>
> there is an already defined font feature that fakes boldened fonts:
> boldened (and also boldened-10, boldened-15, boldened-20 and boldened-25
> [boldened is actually boldened-30]).
>
> But I don’t use \definefont myself, so this is my sample:
>
> \definefontfamily[mainface][rm][Latin Modern Sans]
> [bf={style:tf, features:{default, boldened}}]
> \setupbodyfont[mainface]
> \starttext
> normal \bf boldened
> \stoptext
>
> Handle with care, since faked fonts are to be used sparingly,
>
> Pablo
> --
> http://www.ousia.tk
>
> ___
> 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
>
> ___
>
___
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] How to quote the section names in advance like the table of contents?

2020-11-07 Thread Sylvain Hubert
Dear List,

say I have three sections in the document:

\section{foo} ... \section{bar} ... \section{baz} ...

Now I would like to auto generate a heavily customized table of contents
like the following text, which cannot be done by the stock \placecontent in
general, and put it into the preface:

   This book has 3 sections: foo, bar, and baz.

The text generation should be trivial with lua, but I don't know how such
forward reference of section names works. Could anyone help me with it?

Thanks in advance.

Best,
Sylvain
___
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] How to define a {\bf}-compatible fake-bold switcher?

2020-11-07 Thread Sylvain Hubert
Dear List,

I'm using a weirdfont that does not have a pre-defined bold variant but
still want to emboldening short extracts of text occasionally, so I've
defined

\defineeffect[thicker][alternative=both,rulethickness=0.3pt]
\define\fakebf{\effect[thicker]}

but in situations like

{\fakebf \definedfont[weridfont] 1 2 3 \definedfont[modern]4 5 6}

the "4 5 6" is faked bold even if latinmodern has a proper bold font.

Could anyone help me define a {\bf}-aware version of \fakebf which can
render the "4 5 6" in the example above in latinmodern's bold?

Thanks in advance.

Best,
Sylvain
___
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] math symbol for "is an element of"

2020-11-06 Thread Sylvain Hubert
If you happen to use ibus on a linux, there's a emoji/unicode picker
,
where you can type `elem` and pick one from the
candidates “∈∉∊⋲⋳⋴⋵⋶⋷⋸⋹⟒⫙” .

On Thu, 5 Nov 2020 at 21:25,  wrote:

> A quick question for the ConTeXt mailing list:
>
> Other than typing it directly (or cutting and pasting it), how does one get
> the character ∈ (in case this gets garbled in emailing, this is supposed to
> be the mathematical symbol that looks more or less like an epsilon, and
> which is the mathematical symbol for "is an element of" a set).
>
> \showmathfontcharacters gives the following information about it:
>
> U+02208: ∈ ∈ element of
> width: 524262, height: 426798, depth: 33798, italic: 0
> mathclass: relation, mathname: in
>
> I'm not completely sure how to read this information, but if I read it
> correctly, perhaps this character should be gotten with \in. Also, the
> Basic
> Math page of the Wiki (https://wiki.contextgarden.net/Math/basic) states
> that you should be able to type this character with "\in". But that doesn't
> work (even inside a formula), since \in is used for references in ConTeXt.
> And in fact the link on the Basic Math page for \in takes you to the
> explanation of \in as used for ConTeXt references.
>
> This is a very common character in mathematics, so I wanted to ask: what is
> the recommended way to type this character? (I'm hoping to avoid having to
> cut and paste the character into the document every time I want to use it.
> And I don't have a utf enabled keyboard that would allow me to type this
> symbol readily from the keyboard.)
>
> Thanks in advance,
>
>
> Sciurus
>
>
>
>
> ___
> 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
>
> ___
>
___
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 is the textarea not centered by default?

2020-11-05 Thread Sylvain Hubert
On Thu, 5 Nov 2020 at 16:25, Pablo Rodriguez  wrote:

> Hi Sylvain,
>
> you can avoid this with the following code (althought the "height"
> option is probably not needed):
>
>   \setuplayout[width=middle, height=middle]
>

Thanks Pablo. This happens to be what I've been looking for for a long time.

I’m not expert on typesetting, but I read somewhere (too long ago to be
> able to remember when) that printed papers should have wider outer
> margins to put your fingers on it.
>

Yes, this makes sense.


> See the following the output from:
>
>   \setuppagenumbering[alternative=doublesided]
>   \starttext \showframe \showsetups \stoptext
>
> Just in case it helps,
>

Sylvain
___
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] \blank[] doesn't work when nothing precedes it

2020-11-05 Thread Sylvain Hubert
On Thu, 5 Nov 2020 at 14:21, mf  wrote:

> \blank[.25\paperheight,force]
>
> A blank at the top of a page is ignored, because usually you use a blank
> as a separator, that is useless at the top of a page, because the page
> break is enough to separate two texts.
>
> Sometimes you need a blank on top anyway, i.e. at the start of a chapter.
> In that case use "force".
>

Thanks Massi, this is exactly what I was looking for.

Sylvain
___
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] \blank[] doesn't work when nothing precedes it

2020-11-05 Thread Sylvain Hubert
Hi Thomas,

Thanks for sharing the trick, it did help me!

Sylvain

On Thu, 5 Nov 2020 at 13:55, Tomas Hala  wrote:

> Hi Sylvain,
>
> on my computer (TL2020) I am not able to compile \blank with any command
> defining the dimension (2\paperheight, 0.25\paperheight, .25\paperheight).
> I do not know why...
>
> But if I use another dimension, eg. 5*big or 20cc, it works with
> \dontleavehmode:
>
> \starttext
> \dontleavehmode
> \blank[5*big]
> %\blank[20cc]
> foo
> \stoptext
>
> Maybe it will help you.
>
> The best,
>
> Tomáš
>
>
> Thu, Nov 05, 2020 ve 01:26:02PM +0100 Sylvain Hubert napsal(a):
> #Dear List,
> #I'm trying to put the document title at around .25\paperheight by
> #inserting a \blank:
> #\setuplayout[topspace=0cm, header=0cm, height=\paperheight]
> #\starttext \blank[.25\paperheight] foo \stoptext
> #But the "foo" still appears at the very top.
> #Does anyone know why it behaves like that, or whether there is a more
> #authentic way to put the first word at .25\paperwidth than inserting a
> #tiny invisible space before the \blank?
> #Thanks!
> #Best,
> #Sylvain
>
> #
> ___
> # 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
> #
> ___
>
>
> ___
> 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
>
> ___
>
___
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] \blank[] doesn't work when nothing precedes it

2020-11-05 Thread Sylvain Hubert
Dear List,

I'm trying to put the document title at around .25\paperheight by inserting
a \blank:

\setuplayout[topspace=0cm, header=0cm, height=\paperheight]
\starttext \blank[.25\paperheight] foo \stoptext

But the "foo" still appears at the very top.

Does anyone know why it behaves like that, or whether there is a more
authentic way to put the first word at .25\paperwidth than inserting a tiny
invisible space before the \blank?

Thanks!

Best,
Sylvain
___
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 is the textarea not centered by default?

2020-11-05 Thread Sylvain Hubert
On Thu, 5 Nov 2020 at 11:57, Henri Menke  wrote:

> %D The default dimensions are quite old and will not change. The funny
> fractions
> %D were introduced when we went from fixed dimensions to relative ones.
> Since
> %D \CONTEXT\ is a dutch package, the dimensions are based on the metric
> system.
> The
> %D asymmetrical layout is kind of handy for short quick||and||dirty stapled
> %D documents.
>
>
> https://github.com/contextgarden/context-mirror/blob/343fdd99ef79884fca1f86b49c950e03939aeedf/tex/context/base/mkiv/page-lay.mkiv#L1373-L1377


So it's for backward compatibility then.
Thanks for the nice anecdote!
___
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: context/mtxrun makes Firefox eat up cpu

2020-11-05 Thread Sylvain Hubert
On Thu, 5 Nov 2020 at 12:07, Taco Hoekwater  wrote:

>
>
> > On 5 Nov 2020, at 11:48, Sylvain Hubert  wrote:
> >
> > After dozens of compilations of various minimal examples using the newly
> installed context, the problem reappeared.
> >
> > Removing tex/texmf-cache does not help.
> >
> > Does anyone know what files context modifies apart from tex/texmf-cache?
>
> None.
>
> Are you sure your disk(-driver) is OK?
>

tbh I'm not sure. I tried to figure that out by experimenting with
different kinds of stress tests and none of them triggered the same
problem, but I don't have much experience on this kind of problem anyway.
___
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: context/mtxrun makes Firefox eat up cpu

2020-11-05 Thread Sylvain Hubert
After dozens of compilations of various minimal examples using the newly
installed context, the problem reappeared.

Removing tex/texmf-cache does not help.

Does anyone know what files context modifies apart from tex/texmf-cache?

Sylvain

On Wed, 4 Nov 2020 at 16:01, Sylvain Hubert  wrote:

> The problem disappeared after a fresh installation of context with
> everything else untouched.
>
> On Thu, 29 Oct 2020 at 11:29, Sylvain Hubert 
> wrote:
>
>> Hi,
>>
>> sorry if this is not the best place to file a bug but I found no working
>> bug tracker for context.
>>
>> Environment:
>> Manjaro 20.1.2, context 2020.09.20 23:02, firefox 82.0
>>
>> Step to reproduce:
>> 1. `firefox --safe-mode  # start firefox without add-ons`
>> 2.a`context --version  # or --help, or without arguments`
>> 2.b or: `mtxrun --script font --list --all`
>>
>> Expected behavior:
>> Nothing surprising should happen.
>>
>> Actual behavior:
>> Firefox suddenly eats 100% of cpu
>>
>> I've noticed that `context` symlinks to `luametatex`, but the latter
>> itself does not trigger the bug, neither do `luatex` or `latex`, so I
>> believe this is a context-specific thing.
>>
>> Best,
>> Sylvain
>>
>
___
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] Why is the textarea not centered by default?

2020-11-05 Thread Sylvain Hubert
Dear List,

\starttext \showframe \showsetups \stoptext

This minimal example without further configuration shows that the default
value for backspace, textwidth and paperwidth are 2.5cm, 15cm, 21cm resp.,
which means that the textarea is horizontally 0.5cm off the center by
default, and one can indeed see a clear extra margin on the right side.

This seems weird but I'm no expert of typesetting, so does anyone know why
it has been set like that?

Thanks.

Best,
Sylvain
___
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] What is "cutspace" and "bottomspace"?

2020-11-05 Thread Sylvain Hubert
Dear List,

according to https://wiki.contextgarden.net/Command/setuplayout ,
"cutspace" and "bottomspace" are the counterparts of "backspace" and
"topspace", and "If cutspace is set to 0, it is taken to be equal to the
backspace". But in fact, the following document stays the same no matter
what value is given to cutspace.

\setuplayout[cutspace=0.01cm]
\starttext x  \showframe \stoptext

Has anyone actually used these two parameters?

Best,
Sylvain
___
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] What does --errors and --noconsole do?

2020-11-04 Thread Sylvain Hubert
On Wed, 4 Nov 2020 at 22:22, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> There was never a real test for the performance but when you enable the
> checker in the example below (which works only with LuaTeX) the second list
> is slower.
>
> % engine=luatex
> \starttext
> \testfeatureonce{1}{\getcheckedparameters[test][xx][a=b,c= d, e = f]}
> \enablecheckparameters
> \testfeatureonce{1}{\getcheckedparameters[test][xx][a=b,c= d, e = f]}
> \stoptext
>

Indeed the checked version is almost twice as slow, and the definition of
\getchecked parameters looks confusingly intimidating to follow, so I give
up figuring out the logic here.
___
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] What does --errors and --noconsole do?

2020-11-04 Thread Sylvain Hubert
On Wed, 4 Nov 2020 at 21:32, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> 4. it performance issues and leads to a noticeable performance drop.
>

This sounds a bit surprising, since intuitively it takes no less effort to
deal with the registered key than to determine that a key is not registered.

Sylvain
___
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] Is there any intuitive way of handling missing characters?

2020-11-04 Thread Sylvain Hubert
Dear List,

Is there any way to give a sequence of fonts to context and let it try one
after another in case of missing characters? Ideally it should be something
like \usefallback[font1,font2,font3,...]

The methods I've found are all way too complicated for someone who does not
really care about fine-grained control over unicode coverage or customizing
a typeface with different serif/sans/math/... combinations from different
typefaces.

Thanks!

Best,
Sylvain
___
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 does lua callback work?

2020-11-04 Thread Sylvain Hubert
On Wed, 4 Nov 2020 at 19:25, Hans Hagen  wrote:

> no callback
>
> \checkcharactersinfont
>
> will report missing chars
>
Thanks, but this command doesn't seem to add any information on top of the
missing characters that context already reported without the command.

My motivation was to write a module that suggests fallback fonts to the
user, ideally at the moment of encountering a missing character, but at the
end of processing is still acceptable.
___
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 draw a horizontal line of 0.5\paperwidth ?

2020-11-04 Thread Sylvain Hubert
On Wed, 4 Nov 2020 at 18:44, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> \blackrule[width=.5\paperwidth]
>

It works! Thanks!
___
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] How to draw a horizontal line of 0.5\paperwidth ?

2020-11-04 Thread Sylvain Hubert
Dear List,

I've tried \hl[0.5\paperwidth] but context complains 'a number should have
been here' since \hl assumes 'em' as unit.

Does anyone know how to draw a horizontal line of 0.5\paperwidth ?

Thanks!

Best,
Sylvain
___
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.delayed as parameter of setuphead[before=...]

2020-11-04 Thread Sylvain Hubert
again, sorry for replying on the wrong channel.

On Wed, 4 Nov 2020 at 17:35, Hans Hagen  wrote:

>
> it would harm performance because it involves parsing all values and
> also ways around cases where the title is "function" (lieral text).
>

I'm not sure I understand what you mean by literal text "function" here,
but in any case isn't it a one-off <1ms cost to parse a function?

> "function() local x=1; return function() x=1-x; return ({'black',
> > 'gray'})[x] end end"
> > can be way much easier for lua speakers than digging up a bunch of
> > documentations to figure out whether it's implemented, or how it can be
> > implemented in a language like TeX, or both which is worse.
> Really? I have no clue what that function makec clearer than tex. And
> one still needs some documentation that explains what it does.
>
> Often there often is a pretty clean way to do it with less code.
>

For an experienced tex speaker, indeed.
But for an average user who just wants to typeset a bit of fancy stuff,
programming in tex is probably not the most pleasant thing to do and
arguably not the most reasonable either in light of any modern language
like lua.

Sylvain
___
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] How does lua callback work?

2020-11-04 Thread Sylvain Hubert
Dear List,

I'm trying to intervene whenever context encounters a character that it
cannot render in the current font. I guess this should have something to do
with lua callbacks (pls correct me if I'm wrong), but the document
 does not seem to
elaborate on this.

Does anyone know how the aforementioned task can be done, or how lua
callbacks work in terms of the meaning of the concerned events and
parameters?

Thanks!

Best,
Sylvain
___
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 really set the paper margin?

2020-11-04 Thread Sylvain Hubert
On Wed, 4 Nov 2020 at 17:06, Duncan Hothersall  wrote:

> Hi Sylvain,
>
> This page may be useful: https://wiki.contextgarden.net/Layout
>

I was aware of this page but have mistakenly inferred from the figure that
the backspace is an automatically calculated sum of other parameters.

Basically the core parameters are backspace and width, and topspace and
> height. Everything else hangs off them.
>

Indeed. Thanks for the information!

Sylvain
___
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 really set the paper margin?

2020-11-04 Thread Sylvain Hubert
Never mind, there's a 'backspace=0cm' to be set.

On Wed, 4 Nov 2020 at 16:47, Sylvain Hubert  wrote:

> Dear List,
>
> The following example results in a pdf that has a wide margin on both
> sides despite the \setuplayout :
>
> \showframe
> \setuppapersize[A4][A4]
> \setuplayout[margin=0cm, edge=0cm, margindistance=0cm,
> edgedistance=0cm]
> \starttext
> hello world
> \stoptext
>
> Does anyone know how to really set the paper margin?
>
> Thanks!
>
> Best,
> Sylvain
>
___
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.delayed as parameter of setuphead[before=...]

2020-11-04 Thread Sylvain Hubert
% Hans, sorry for having replied on the wrong channel before.

On Tue, 3 Nov 2020 at 09:03, Hans Hagen  wrote:

> On 11/3/2020 4:05 AM, Sylvain Hubert wrote:
> >  > as tables like those in setuphead({somehead}, {somesettings}) are
> > actual Lua tables and follow Lua, not TeX, rules
> > But there are lua apis that support delayed TeX like
> > `context.chapter(context.delayed'text')`.
> > Whether or not the function is stored in a table should be theoretically
> > irrelevant.
> > I guess there should be a switch somewhere that let the command
> > recognized delayed function.
> all is possible but not all is reasonable to support .. adding layer
> upon layed doesn't make it more pretty
>
Indeed, but still it would be nice to have a complete and consistent
interface between tex and lua unless it would harm the functionality.


>
> anyway, chapter (section) titles go tinto a toc table and storing lua
> delayed function definitions there makes not much sense
>
> It might be helpful in cases like alternative coloring. Writing
   "function() local x=1; return function() x=1-x; return ({'black',
'gray'})[x] end end"
can be way much easier for lua speakers than digging up a bunch of
documentations to figure out whether it's implemented, or how it can be
implemented in a language like TeX, or both which is worse. In such cases,
it would also be much natural to write 'before=function()..' than
'before=\ctxlua{function()...}` unless, again, the former harms the
functionality.

Sylvain
___
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] How to really set the paper margin?

2020-11-04 Thread Sylvain Hubert
Dear List,

The following example results in a pdf that has a wide margin on both sides
despite the \setuplayout :

\showframe
\setuppapersize[A4][A4]
\setuplayout[margin=0cm, edge=0cm, margindistance=0cm, edgedistance=0cm]
\starttext
hello world
\stoptext

Does anyone know how to really set the paper margin?

Thanks!

Best,
Sylvain
___
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] What does --errors and --noconsole do?

2020-11-04 Thread Sylvain Hubert
Moreover, is there any way to let context give an error at all when
encountering something like `\setuppagenumbering[position=footer]` ?

On Wed, 4 Nov 2020 at 15:53, Sylvain Hubert  wrote:

> Dear List,
>
> I was reading workflow-mkiv
> <http://www.pragma-ade.nl/general/manuals/workflows-mkiv.pdf> and have
> found the '--errors' and '--noconsole' arguments which seemed quite helpful
> since, according to the documentation, "show errors at the end of a run"
> and "disables logging to the console" while "error reporting mentioned in
> the previous section will never be silenced". But when I run 'context
> --errors' for the following document
>
> \setuppagenumbering[footer]
> \starttext
> hi
> \stoptext
>
> the message
>
> setup   > error in line 1, namespace 'pagenumbering', key
> 'footer,'
>
> still lies in the middle of a bunch of messages and is not shown in the
> end. When I add '--noconsole' to the arguments, the error disappears along
> with all the other messages.
>
> So is there any combination of arguments that can let context only display
> what matters to the user?
>
> Thanks in advance.
>
> Best,
> Syiain
>
___
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] cannot update LMTX

2020-11-04 Thread Sylvain Hubert
Here a fresh standalone installed an hour ago doesn't seem to have the
problem.

On Wed, 4 Nov 2020 at 16:11, Pablo Rodriguez  wrote:

> Dear list,
>
> after latest from 2020.09.20, I afraid I get this error when running
> install.sh on Linux or install.bat on Windows (both 64bit):
>
> mtx-install | updating tex/texmf, 1541 files
> mtx-install | updating tex/texmf-context, 3757 files
> mtx-install | changed  :   0 % :24110 :
>
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua
> mtx-install |
>
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua,
> trying again:
> mtx-install | changed  :   0 % :24110 :
>
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua
> mtx-install |
>
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua,
> trying again:
> mtx-install | changed  :   0 % :24110 :
>
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua
> mtx-install |
>
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua,
> trying again:
> mtx-install | changed  :   0 % :24110 :
>
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua
> mtx-install |
>
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua,
> trying again:
> mtx-install | changed  :   0 % :24110 :
>
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua
> mtx-install |
>
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua,
> try again later:
>
> If you want to run ConTeXt everywhere, you need to adapt the path, like:
>
> I don’t know what has changed to prevent the update.
>
> Could anyone confirm this issue with current LMTX?
>
> Many thanks for your help,
>
> Pablo
> --
> http://www.ousia.tk
>
> ___
> 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
>
> ___
>
___
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   >