[NTG-context] Re: incosistent output of --- dash

2024-04-06 Thread Pablo Rodriguez via ntg-context
On 4/6/24 11:43, madiazm.eo...@gmail.com wrote:
> Hi everyone,

Hi Miguel,

> […]
> Am I missing something on the use of this ligature?

I don’t think so.

In some cases you may not get the ligature for a good reason:

  \starttyping
  program --option=value file.ext
  \stoptyping

It would make no sense to get an en-dash there (but I guess you don’t
mean that).

But all OSes provide character maps to get single characters. And also
Unicodia works fine in Windows (https://mercury13.github.io/unicodia/,
just in case it might suit your needs).

Having a single character (emoji, dashes or whatever) is way more
readable than a character combination for a ligature or a TeX command.

This single-character approach also makes easier to copy and paste text
to other formats.

> (the question is just out of curiosity, since I plan to create a
> command that adds a hairspace after or before the dash, since I don't
> like it to stick to some letters like "o").
Just consider that you should add an horizontal box (or pair both space
and hyphen), otherwise you may get a line break between character and
hyphen (instead of the hair space):

  \starttext
  \startTEXpage[offset=2st]
  \hsize\zeropoint
  this —\hairspace or so\hairspace— that

  this \hbox{—\hairspace}or so\hbox{\hairspace—} that
  \stopTEXpage
  \stoptext

Just in case 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: can we do binding correction?

2024-03-19 Thread Willi Egger
Hi Hraban,

> On 19 Mar 2024, at 21:56, Hraban Ramm  wrote:
> 
> Thank you Willi!
> 
> Generally I know for what binding correction is used, I just never tried to 
> set it up. If I look carefully at one of our printed booklets, the printshop 
> also didn’t. So I'd need pageshift without applying imposition (setting it up 
> wouldn’t hurt).

I organise this always with correction to the backspace.

> 
> I didn’t think about vertical pageshift, but of course that’s also needed for 
> cross-folded sheets.
> 
> I'm not sure how (horizontal) pageshift is supposed to work with full page 
> images without introducing white borders, but bleed at the inner edge should 
> be enough.
> 
> Theoretically the shift value should be the same as the paper thickness 
> (don’t you think?), but there’s some deformation involved, so a factor might 
> make sense?

I think that this would be quite cumbersome, paper thickness of higly coated 
papers vs. novel-printing paper… I believe one would have to establish this 
thickness for each project unless the same paper is used...


> Unfortunately I threw out my old books on printing technology long ago, and 
> my newer one doesn’t cover bookbinding (I’m not at home anyway).

I think, that many printshops do not possess neither old books including 
bookbinding nor do they care about the wishes of the binder … Pity, that you 
threw them out, but i understand, that circumstances might be such that you 
have to take decisions…

Willi
> 
> Hraban
> 
> Am 19.03.24 um 17:01 schrieb Willi Egger:
>> Hi Hraban,
>> 
>> I think we should clarify this.
>> 
>> Binding correction is a fixed amount of whitespace in the spine added to the 
>> inner white-space. This is to ensure, that the binding, which is consuming 
>> white-space, keeps the inner white-space optically as intended..
>> 
>> The page shift mechanism works only with imposition enabled. This ensures, 
>> that the type-setting area does not creep towards the spine because multiple 
>> sheets of paper are folded in the spine.
>> 
>> I doubt whether it is enough to have the measure of the thickness do 
>> determine this creeping effect, because we are making folds which are 
>> probably more circles than just adding thickness of paper.
>> 
>> 
>> Willi
>> 
>>> On 18 Mar 2024, at 17:35, Hraban Ramm  wrote:
>>> 
>>> 
>>> Am 17.03.24 um 23:54 schrieb Wolfgang Schuster:
>>>> Hraban Ramm schrieb am 17.03.2024 um 22:48:
>>>>> Hi, this question was rised in my ConTeXt beginners workshop* at Chemnitz 
>>>>> Linux Days today:
>>>>> 
>>>>> Can I configure binding correction for saddle-stitched or thread-bound 
>>>>> booklets, and if, does it only work with arranging (imposition) or can I 
>>>>> enable it somehow for the layout (if the printshop does the imposition)?
>>>> 1. \definepageshift + \setuppageshift
>>>> 
>>>> 2. \setuplayout[horoffset=]
>>>> 
>>>>> Also I recognized I'm not sure about the difference of the layout 
>>>>> parameters backspace and cutspace.
>>>> backspace is the inner margin and cutspace the outer
>>>> 
>>> Hi Wolfgang, thank you! Seems like I was too dense to understand the 
>>> description for the \setuplayout parameters in the wiki (and there are more 
>>> that I never used, oh my…), and since I never use ConTeXt’s imposition for 
>>> serious print products (and never set up a scheme myself), I didn’t know 
>>> about pageshift.
>>> 
>>> Ok, if I leave imposition to the printshop and they don't do binding 
>>> correction in their workflow, I'd need to set horoffset differently for 
>>> every single page (i.e. first, second, second-to-last and last the same; 
>>> 3th, 4th and from back the same etc.). Or is pageshift applied 
>>> independently from arranging?
>>> 
>>> And then, it makes no sense to add the same value all the time. I don’t 
>>> know if BCOR works this way in LaTeX, but one value (paper thickness) 
>>> should be enough in combination with an imposition schema. I.e. if I define 
>>> a paper thickness and the number of pages that are in one booklet (as a 
>>> single booklet or part of a "proper" book), then the page shift should work 
>>> automatically.
>>> 
>>> Well, for a single booklet, it could. In a book, booklets can have 
>>> different numbers of pages, and then you'd need to define a list… Okay, too 
>>> c

[NTG-context] Re: can we do binding correction?

2024-03-19 Thread Hraban Ramm

Thank you Willi!

Generally I know for what binding correction is used, I just never tried 
to set it up. If I look carefully at one of our printed booklets, the 
printshop also didn’t. So I'd need pageshift without applying imposition 
(setting it up wouldn’t hurt).


I didn’t think about vertical pageshift, but of course that’s also 
needed for cross-folded sheets.


I'm not sure how (horizontal) pageshift is supposed to work with full 
page images without introducing white borders, but bleed at the inner 
edge should be enough.


Theoretically the shift value should be the same as the paper thickness 
(don’t you think?), but there’s some deformation involved, so a factor 
might make sense?


Unfortunately I threw out my old books on printing technology long ago, 
and my newer one doesn’t cover bookbinding (I’m not at home anyway).


Hraban

Am 19.03.24 um 17:01 schrieb Willi Egger:

Hi Hraban,

I think we should clarify this.

Binding correction is a fixed amount of whitespace in the spine added to the 
inner white-space. This is to ensure, that the binding, which is consuming 
white-space, keeps the inner white-space optically as intended..

The page shift mechanism works only with imposition enabled. This ensures, that 
the type-setting area does not creep towards the spine because multiple sheets 
of paper are folded in the spine.

I doubt whether it is enough to have the measure of the thickness do determine 
this creeping effect, because we are making folds which are probably more 
circles than just adding thickness of paper.


Willi


On 18 Mar 2024, at 17:35, Hraban Ramm  wrote:


Am 17.03.24 um 23:54 schrieb Wolfgang Schuster:

Hraban Ramm schrieb am 17.03.2024 um 22:48:

Hi, this question was rised in my ConTeXt beginners workshop* at Chemnitz Linux 
Days today:

Can I configure binding correction for saddle-stitched or thread-bound 
booklets, and if, does it only work with arranging (imposition) or can I enable 
it somehow for the layout (if the printshop does the imposition)?

1. \definepageshift + \setuppageshift

2. \setuplayout[horoffset=]


Also I recognized I'm not sure about the difference of the layout parameters 
backspace and cutspace.

backspace is the inner margin and cutspace the outer


Hi Wolfgang, thank you! Seems like I was too dense to understand the 
description for the \setuplayout parameters in the wiki (and there are more 
that I never used, oh my…), and since I never use ConTeXt’s imposition for 
serious print products (and never set up a scheme myself), I didn’t know about 
pageshift.

Ok, if I leave imposition to the printshop and they don't do binding correction 
in their workflow, I'd need to set horoffset differently for every single page 
(i.e. first, second, second-to-last and last the same; 3th, 4th and from back 
the same etc.). Or is pageshift applied independently from arranging?

And then, it makes no sense to add the same value all the time. I don’t know if BCOR 
works this way in LaTeX, but one value (paper thickness) should be enough in combination 
with an imposition schema. I.e. if I define a paper thickness and the number of pages 
that are in one booklet (as a single booklet or part of a "proper" book), then 
the page shift should work automatically.

Well, for a single booklet, it could. In a book, booklets can have different 
numbers of pages, and then you'd need to define a list… Okay, too complicated. 
It’s the printshops's responsibility anyway, and nobody complained about my 
books so far. (I'm not perfectionist enough to care.)

Hraban


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki  

[NTG-context] Re: can we do binding correction?

2024-03-19 Thread Willi Egger
Hi Hraban,

I think we should clarify this.

Binding correction is a fixed amount of whitespace in the spine added to the 
inner white-space. This is to ensure, that the binding, which is consuming 
white-space, keeps the inner white-space optically as intended..

The page shift mechanism works only with imposition enabled. This ensures, that 
the type-setting area does not creep towards the spine because multiple sheets 
of paper are folded in the spine.

I doubt whether it is enough to have the measure of the thickness do determine 
this creeping effect, because we are making folds which are probably more 
circles than just adding thickness of paper.


Willi

> On 18 Mar 2024, at 17:35, Hraban Ramm  wrote:
> 
> 
> Am 17.03.24 um 23:54 schrieb Wolfgang Schuster:
>> Hraban Ramm schrieb am 17.03.2024 um 22:48:
>>> Hi, this question was rised in my ConTeXt beginners workshop* at Chemnitz 
>>> Linux Days today:
>>> 
>>> Can I configure binding correction for saddle-stitched or thread-bound 
>>> booklets, and if, does it only work with arranging (imposition) or can I 
>>> enable it somehow for the layout (if the printshop does the imposition)?
>> 
>> 1. \definepageshift + \setuppageshift
>> 
>> 2. \setuplayout[horoffset=]
>> 
>>> Also I recognized I'm not sure about the difference of the layout 
>>> parameters backspace and cutspace.
>> 
>> backspace is the inner margin and cutspace the outer
>> 
> Hi Wolfgang, thank you! Seems like I was too dense to understand the 
> description for the \setuplayout parameters in the wiki (and there are more 
> that I never used, oh my…), and since I never use ConTeXt’s imposition for 
> serious print products (and never set up a scheme myself), I didn’t know 
> about pageshift.
> 
> Ok, if I leave imposition to the printshop and they don't do binding 
> correction in their workflow, I'd need to set horoffset differently for every 
> single page (i.e. first, second, second-to-last and last the same; 3th, 4th 
> and from back the same etc.). Or is pageshift applied independently from 
> arranging?
> 
> And then, it makes no sense to add the same value all the time. I don’t know 
> if BCOR works this way in LaTeX, but one value (paper thickness) should be 
> enough in combination with an imposition schema. I.e. if I define a paper 
> thickness and the number of pages that are in one booklet (as a single 
> booklet or part of a "proper" book), then the page shift should work 
> automatically.
> 
> Well, for a single booklet, it could. In a book, booklets can have different 
> numbers of pages, and then you'd need to define a list… Okay, too 
> complicated. It’s the printshops's responsibility anyway, and nobody 
> complained about my books so far. (I'm not perfectionist enough to care.)
> 
> Hraban
> 
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: can we do binding correction?

2024-03-18 Thread Hraban Ramm


Am 17.03.24 um 23:54 schrieb Wolfgang Schuster:

Hraban Ramm schrieb am 17.03.2024 um 22:48:
Hi, this question was rised in my ConTeXt beginners workshop* at 
Chemnitz Linux Days today:


Can I configure binding correction for saddle-stitched or 
thread-bound booklets, and if, does it only work with arranging 
(imposition) or can I enable it somehow for the layout (if the 
printshop does the imposition)?


1. \definepageshift + \setuppageshift

2. \setuplayout[horoffset=]

Also I recognized I'm not sure about the difference of the layout 
parameters backspace and cutspace.


backspace is the inner margin and cutspace the outer

Hi Wolfgang, thank you! Seems like I was too dense to understand the 
description for the \setuplayout parameters in the wiki (and there are 
more that I never used, oh my…), and since I never use ConTeXt’s 
imposition for serious print products (and never set up a scheme 
myself), I didn’t know about pageshift.


Ok, if I leave imposition to the printshop and they don't do binding 
correction in their workflow, I'd need to set horoffset differently for 
every single page (i.e. first, second, second-to-last and last the same; 
3th, 4th and from back the same etc.). Or is pageshift applied 
independently from arranging?


And then, it makes no sense to add the same value all the time. I don’t 
know if BCOR works this way in LaTeX, but one value (paper thickness) 
should be enough in combination with an imposition schema. I.e. if I 
define a paper thickness and the number of pages that are in one booklet 
(as a single booklet or part of a "proper" book), then the page shift 
should work automatically.


Well, for a single booklet, it could. In a book, booklets can have 
different numbers of pages, and then you'd need to define a list… Okay, 
too complicated. It’s the printshops's responsibility anyway, and nobody 
complained about my books so far. (I'm not perfectionist enough to care.)


Hraban


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Wiki page : Mixed languages sample (French, Ancient Greek, Arabic, Chinese)

2024-03-01 Thread Jean-Pierre Delange

Dear List,

Several years ago I tried to write documents, mainly lectures, but also 
essays, in which I tried to make several languages (Romance and 
non-Romance) coexist.
Here below is an example of an attempt to compose an acceptable 
document, in the form of an exercise in which Arabic and Chinese are 
introduced into a document written in French. With footnotes and a few 
framed lines.


I submit this example for your perusal and ask you whether it could 
possibly appear on a wiki page devoted to the combination of 
non-European languages in the same text. In English translation, of course.


%We are giving below an example of a text written in a Latin language, 
in which we want to print here and there some text in ancient Greek, 
Arabic and Chinese.


\setuplanguage[fr][patterns={fr,agr}]

\mainlanguage[fr]

\setuplayout [backspace=40mm]

\setuppagenumbering[alternative=doublesided, location={header, inmargin}]

\setupmargindata[inmargin][location=inner, 
style={\ssx\setupinterlinespace[line=2.8ex]}]


\setupmarginframed[inmargin][align=right]

\setupbodyfontenvironment[default][em=italic]

% Use Theano Didot as Ancient Greek font

\definefallbackfamily[mainface][serif][Theano Didot][preset=range:greek, 
it={Old Standard Italic}, force=yes]


% Choose between Ipaexmincho font and NotoSansTC (Traditional Chinese)

%\definefallbackfamily [mainface] [rm] [ipaexmincho] 
[range=cjkunifiedideographs]


\definefallbackfamily [mainface] [rm] [notosanstc] 
[range=cjkunifiedideographs]


% Choose between two Arabic fonts

%\definefallbackfamily[mainface] [serif] [nafeesnastaleeq] [range=arabic]

\definefallbackfamily[mainface] [serif] [hussaininastaleeq] [range=arabic]

\definefontfamily [mainface] [serif] [GaramondNo8][sc=NewG8 Regular SC]

\definefontfamily [mainface] [sans] [FreeSans] [rscale=0.7]

\definefontfamily[mainface] [serif] [GFS Didot]

\setupbodyfont[mainface]

\setupindenting[1.5em]

\setupindenting[yes]

\setupcolors[state=start]


\defineframedtext

[MyFrame]

[before={\blank},

after={\blank},

frame=off,

background=MyFrame,

%width=\textwidth,

width=max,

height=fit,

style=italic]


\definelabel

[Définition]

[headstyle=\bf\smallcaps]


\startuseMPgraphic{MyFrame}

path b;

picture p;

%p := textext.rt("\white\Définition");

p := textext.rt("\white\framedtextparameter{Title}");

%p := textext.rt("\white\getvariable{text}{text1}");

p := p shifted (2BodyFontSize,OverlayHeight-ypart center p+.25ExHeight);

b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth;

fill OverlayBox withcolor lightgray; %\MPcolor{

fill b withcolor darkred;

draw bottomboundary OverlayBox withpen pencircle scaled 1pt withcolor

darkred;

draw topboundary OverlayBox withpen pencircle scaled 1pt withcolor

darkred;

draw p;

setbounds currentpicture to boundingbox currentpicture enlarged 2mm;

\stopuseMPgraphic


\defineoverlay

[MyFrame]

[\useMPgraphic{MyFrame}]



\setupwhitespace[medium]

\setupinterlinespace[line=3.2ex]


\setupitemize[each][margin=yes]


\setuphead[title][header=empty]


\setupheader[style={\sc}]

\setupfooter[style={\itxx}]

\setupheadertexts[Utilisation de plusieurs langues dans un même texte 
avec \ConTeXt][][][{\getmarking[section]}]


\setupfootertexts[][][][© J.-P. Delange, 2016 — La reproduction de ce 
texte est soumise à autorisation.]


\defineparagraphs[TwoColumns][n=2, align={hz, hanging}]

\setupparagraphs[TwoColumns][1][width=210pt, style=rm, align=left]

\starttext

\title{\ConTeXt, ou comment imprimer des langues non-romanes}

\section {\sc Préambule}


Lorsqu'il s'agit de proposer un document dans une langue nationale (le 
français), tout va bien. Lorsqu'il s'agit de rédiger en français un 
document un peu complexe, avec des citations — ou des références — dans 
une autre langue, qui en particulier n'a pas les mêmes exigences que le 
français, ni les mêmes {\em signes diacritiques} on se heurte à quelques 
difficultés. Les suites logicielles comme Microsoft Office ou 
LibreOffice ne manquent pas de puissance, mais à vrai dire, dès que nous 
entrons dans les exigences de l'édition professionnelle, qui consistent 
à présenter un texte lisible et enrichi (en notes, etc.), la situation 
devient vite techniquement assez pénible. La situation la plus courante 
que nous rencontrons dans les Lettres, en Philosophie, en Histoire, et 
plus généralement dans les Humanités, est celle d'un texte dans lequel 
il y a des citations d'auteurs grecs ou latin, avec des références en 
notes de bas de page, qui contiennent du grec. Cela pourrait être 
quelque chose comme ceci :


\blank\startnarrower[1*left,1*right]\tfx\setupinterlinespace

\noindent \quotation{Ἔφη γάρ οἱ Σωκράτη ἐντυχεῖν λελουμένον τε καὶ τὰς 
βλαύτας ὑποδεδεμένον, ἃ ἐκεῖνος ὀλιγάκις ἐποίει· καὶ ἐρέσθαι αὐτὸν ὅποι 
ἴοι οὕτω καλὸς γεγενημένος. καὶ τὸν εἰπεῖν ὅτι· Ἐπὶ δεῖπνον εἰς 
Ἀγάθωνος. χθὲς γὰρ αὐτὸν διέφυγον τοῖς ἐπινικίοις, φοβηθεὶς τὸν ὄχλον· 
ὡμολόγησα δ᾽ εἰς τήμερον παρέσεσθα

[NTG-context] Re: Sorry for once more asking, i am at Work

2024-02-21 Thread Ursula Hermann
Dear Pablo and Gavin, 

Many many many Thanks. Ok so I took pdflatex away now, and could compile 
selected. 

Uschi 

-Ursprüngliche Nachricht-
Von: Pablo Rodriguez via ntg-context  
Gesendet: Mittwoch, 21. Februar 2024 10:24
An: Gavin via ntg-context 
Cc: Pablo Rodriguez 
Betreff: [NTG-context] Re: Sorry for once more asking, i am at Work

On 2/20/24 19:03, Gavin via ntg-context wrote:
> […]
> I don’t know how you are calling PdfLaTeX to typeset your document, 
> context-test.tex, but that is what you are doing.

Hi Uschi and Gavin,

I will try to go the same way you propose, Gavin. Otherwise, Uschi may find it 
hard to follow totally independent suggestions.

Uschi, if you are compiling your ConTeXt sources using WinEdt, your issue might 
be the wrong button (or the wrong keystroke combination).

You might be invoking pdflatex directly, or maybe a button or keystroke 
combination is labelled ConTeXt and it may really be invoking pdflatex.

In that case, you have to check WinEdt to see which command is run when you 
start the compilation process (which command you really invoke).

Another way to see which ConTeXt binary you invoke would be to type in the 
command prompt "context --version" (with no path specified) and "where context".

But this is independent from the issue that you get pdflatex when you intend 
context.

I hope it helps now,

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) 
archive  : https://github.com/contextgarden/context
wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Sorry for once more asking, i am at Work

2024-02-21 Thread Pablo Rodriguez via ntg-context
On 2/20/24 19:03, Gavin via ntg-context wrote:
> […]
> I don’t know how you are calling PdfLaTeX to typeset your document,
> context-test.tex, but that is what you are doing.

Hi Uschi and Gavin,

I will try to go the same way you propose, Gavin. Otherwise, Uschi may
find it hard to follow totally independent suggestions.

Uschi, if you are compiling your ConTeXt sources using WinEdt, your
issue might be the wrong button (or the wrong keystroke combination).

You might be invoking pdflatex directly, or maybe a button or keystroke
combination is labelled ConTeXt and it may really be invoking pdflatex.

In that case, you have to check WinEdt to see which command is run when
you start the compilation process (which command you really invoke).

Another way to see which ConTeXt binary you invoke would be to type in
the command prompt "context --version" (with no path specified) and
"where context".

But this is independent from the issue that you get pdflatex when you
intend context.

I hope it helps now,

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Memory consumption in new upload

2024-02-17 Thread Hans Hagen

On 2/17/2024 10:50 PM, Shiv Shankar Dayal wrote:
I assume you would have created typescripts for those fonts. Can you 
please add them to

ConTeXt distribution, at least for the popular fonts?


Many of those are covered by typescripts. Those that are not, are on my 
machine because we needed them (often long ago) for a project (these are 
commercial fonts, in most cases typeone and of such a collection 
actually a few were used then). There are also some commercial fonts 
that I got for free. Then there are fonts that I have to check because 
users had an issue (public ones, of different quality and useability). 
Of those 'trying to cover all of unicode with  different fonts of the 
same design' I tested subsets. And of course the fonts that come with 
the operating system (basically all fonts that context can access during 
a run).


We're not going to make typescripts for every combination as in practice 
for most documents one needs a single setup and therefore only a handful 
of lines of code (and likely use some typescript file for a math font). 
There's also the selectfont mechanism that uses heuristics to do the 
same. There are plenty of examples in the distribution and for a 
specific style that demands certain fonts one can also put the 
definitions in the style.


On Sun, Feb 18, 2024 at 3:12 AM Shiv Shankar Dayal 
mailto:shivshankar.da...@gmail.com>> wrote:


The only change I made was that I started using a 9pt modern font
than a 10 pt modern font.

My document decreased from 580+ pages to 500 pages after that.

About your document, I assume you had a lot of Graphics because text
only 180MB is too high.
I have only few diagrams and my file size is only 3MB.

On Sun, Feb 18, 2024 at 2:13 AM Hans Hagen mailto:j.ha...@xs4all.nl>> wrote:

On 2/17/2024 6:17 PM, Shiv Shankar Dayal wrote:
 > Thanks for new upload. I see that memory consumption is much
less than
 > previous version. So
 > once again, thanks a lot.
 >
 > I am curious about what has changed in recent upload, that
memory
 > consumption is about 60% of earlier versions.
it's hard to tell what exact consumpiton is becaue for instance
when lua
creates tables, they grow by factors two when then have to
(maybe 5.5 is
a bit less consuming)

on the one hand luametatex is more efficient than luatex due to
all kind
of ímprovements' but some nodes are larger so that takes more
memory,
which is only noticed when one has lots of text on a page (or keeps
boxes stuff around)

anyway, not that much changed since the previous upload, so
maybe you
just stay below a threshold

I recently generated a 180MB document with 2500 fonts + metapost
outlines of them and that could bump mem usage (with empty
cache) to 30
GB (less after fonts were cached) but normally we stay around
125 MB for
a document. Anyway, tex mem consumption can often be neglected
compared
to other applications.

Hans


-
                                            Hans Hagen | PRAGMA ADE
                Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
         tel: 038 477 53 69 | www.pragma-ade.nl
<http://www.pragma-ade.nl> | www.pragma-pod.nl
<http://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 <mailto:ntg-context@ntg.nl> /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
<https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl>
webpage  : https://www.pragma-ade.nl <https://www.pragma-ade.nl>
/ https://context.aanhet.net <https://context.aanhet.net> (mirror)
archive  : https://github.com/contextgarden/context
<https://github.com/contextgarden/context>
wiki     : https://wiki.contextgarden.net
<https://wiki.contextgarden.net>

___



-- 
Respect,

Shiv Shankar Dayal



--
Respect,
Shiv Shankar Dayal

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : http

[NTG-context] Re: [External] Re: Looking for itemize help

2024-01-15 Thread Jim
Hi Michael,

thanks for getting back.  But the problem is not the text in front of the
items, but rather vertical whitespace that I don't want.  (Or, with
'nowhite', vertical space that I might want not being there.)

Cheers.
Jim

On Mon, Jan 15, 2024 at 15:51 (+), Rogers, Michael K wrote:

> Hi Jim,

> I think you want alternative “a”, if the dot instead of a letter is the 
> problem and not the whitespace:

> %%

> \starttext

> This is a short paragraph.

> This is a line before a {\bf packed, joinedup} itemization.
> \startitemize[a,packed,joinedup]
> \item First item.
> \item Second item.
> \stopitemize
> This is a line immediately following the above itemization.

> This is a short paragraph.

> \stoptext

> %%

> Cheers,

> Michael

>> On Jan 15, 2024, at 6:36 AM, Jim  wrote:

>> Hi Hraban,

>> thanks for your response.  But...

>> On Mon, Jan 15, 2024 at 08:17 (+0100), Henning Hraban Ramm wrote:

>>> Am 15.01.24 um 01:42 schrieb Jim:

>>>> Some text preceding the list of items:
>>>> a. Item one.
>>>> b. Second item.
>>>> This sentence is part of the same paragraph.

>>>> The next paragraph starts here...

>>> \startitemize[packed,joinedup] should be the right combination.

>> I won't argue about "should", but I will point out it isn't, at least on my
>> computer with a recently updated context.

>> Here is a non-minimal but short non-working example.

>> %%%

>> \setupwhitespace [big]

>> \setuppapersize [letter]

>> \starttext
>> This is a short paragraph.

>> This is a line before a {\bf packed, joinedup} itemization.
>> \startitemize[packed,joinedup]
>> \item First item.
>> \item Second item.
>> \stopitemize
>> This is a line immediately following the above itemization.

>> This is a short paragraph.

>> This is a line before a {\bf packed, joinedup} itemization.
>> \startitemize[packed,joinedup]
>> \item First item.
>> \item Second item.
>> \stopitemize

>> This is another short paragraph.

>> \stoptext

>> %%%

>> Thoughts?

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

>> maillist : ntg-context@ntg.nl / 
>> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
>> webpage  : https://www.pragma-ade.nl/ / https://context.aanhet.net/ (mirror)
>> archive  : https://github.com/contextgarden/context
>> wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Looking for itemize help

2024-01-15 Thread Jim
Two replies in one...

On Mon, Jan 15, 2024 at 15:47 (+0100), Aditya Mahajan wrote:

> On Mon, 15 Jan 2024, Jim wrote:

>> Thoughts?


> \startitemize[nowhite, after]
>   . . .
> \stopitemize

> See: https://adityam.github.io/context-blog/post/spacing-in-itemize/

Aditya,

thanks for the suggestion, and thanks for the link.

"after" does the trick, but not in an automatic way.  I would like
something which automagically "does the right thing".

Perhaps it just doesn't exist in ConTeXt.  The plain TeX macros I wrote for
itemization do what I want, so I know it isn't (at least in plain TeX) a
difficult thing.



On Mon, Jan 15, 2024 at 16:08 (+0100), Henning Hraban Ramm wrote:

> Am 15.01.24 um 15:36 schrieb Jim:
>>> \startitemize[packed,joinedup] should be the right combination.

>> I won't argue about "should", but I will point out it isn't, at least on my
>> computer with a recently updated context.

>> Here is a non-minimal but short non-working example.

> Sorry, then you need "nowhite". Usually that’s synonymous to
> "packed,joineup", but apparently not if whitespace is active.

"Usually" is in the eye of the beholder.  ;-)

I would have thought that having non-zero whitespace between paragraphs is
common.  For example, Aditya's blog linked to above has whitespace between
paragraphs.  Are you suggesting that is uncommon, or (showing my
Context-noobness) is \setupwhitespace not the usual ConTeXt way to do this?

> I added a few comments to
> https://wiki.contextgarden.net/Command/setupitemgroup
> Unfortunately, this is one of the areas where we have a plethora of options
> and no documentation about them.

Thanks for adding them.  I see you did not document the all-important (to
me) "after" (or "before") in the wiki.  Would you like to add that?  If
you don't have time right now, I'd be happy to do so.

Cheers.

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: [External] Re: Looking for itemize help

2024-01-15 Thread Rogers, Michael K
Hi Jim,

I think you want alternative “a”, if the dot instead of a letter is the problem 
and not the whitespace:

%%

\starttext

This is a short paragraph.

This is a line before a {\bf packed, joinedup} itemization.
\startitemize[a,packed,joinedup]
\item First item.
\item Second item.
\stopitemize
This is a line immediately following the above itemization.

This is a short paragraph.

\stoptext

%%

Cheers,

Michael

> On Jan 15, 2024, at 6:36 AM, Jim  wrote:
>
> Hi Hraban,
>
> thanks for your response.  But...
>
> On Mon, Jan 15, 2024 at 08:17 (+0100), Henning Hraban Ramm wrote:
>
>> Am 15.01.24 um 01:42 schrieb Jim:
>
>>> Some text preceding the list of items:
>>> a. Item one.
>>> b. Second item.
>>> This sentence is part of the same paragraph.
>
>>> The next paragraph starts here...
>
>> \startitemize[packed,joinedup] should be the right combination.
>
> I won't argue about "should", but I will point out it isn't, at least on my
> computer with a recently updated context.
>
> Here is a non-minimal but short non-working example.
>
> %%%
>
> \setupwhitespace [big]
>
> \setuppapersize [letter]
>
> \starttext
> This is a short paragraph.
>
> This is a line before a {\bf packed, joinedup} itemization.
> \startitemize[packed,joinedup]
> \item First item.
> \item Second item.
> \stopitemize
> This is a line immediately following the above itemization.
>
> This is a short paragraph.
>
> This is a line before a {\bf packed, joinedup} itemization.
> \startitemize[packed,joinedup]
> \item First item.
> \item Second item.
> \stopitemize
>
> This is another short paragraph.
>
> \stoptext
>
> %%%
>
> Thoughts?
>
>Jim
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl/ / https://context.aanhet.net/ (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Looking for itemize help

2024-01-15 Thread Henning Hraban Ramm

Am 15.01.24 um 15:36 schrieb Jim:

\startitemize[packed,joinedup] should be the right combination.


I won't argue about "should", but I will point out it isn't, at least on my
computer with a recently updated context.

Here is a non-minimal but short non-working example.


Sorry, then you need "nowhite". Usually that’s synonymous to 
"packed,joineup", but apparently not if whitespace is active.


I added a few comments to 
https://wiki.contextgarden.net/Command/setupitemgroup
Unfortunately, this is one of the areas where we have a plethora of 
options and no documentation about them.


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Looking for itemize help

2024-01-15 Thread Jim
Hi Hraban,

thanks for your response.  But...

On Mon, Jan 15, 2024 at 08:17 (+0100), Henning Hraban Ramm wrote:

> Am 15.01.24 um 01:42 schrieb Jim:

>> Some text preceding the list of items:
>> a. Item one.
>> b. Second item.
>> This sentence is part of the same paragraph.

>> The next paragraph starts here...

> \startitemize[packed,joinedup] should be the right combination.

I won't argue about "should", but I will point out it isn't, at least on my
computer with a recently updated context.

Here is a non-minimal but short non-working example.

%%%

\setupwhitespace [big]

\setuppapersize [letter]

\starttext
This is a short paragraph.

This is a line before a {\bf packed, joinedup} itemization.
\startitemize[packed,joinedup]
\item First item.
\item Second item.
\stopitemize
This is a line immediately following the above itemization.

This is a short paragraph.

This is a line before a {\bf packed, joinedup} itemization.
\startitemize[packed,joinedup]
\item First item.
\item Second item.
\stopitemize
 
This is another short paragraph.

\stoptext

%%%

Thoughts?

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Looking for itemize help

2024-01-14 Thread Henning Hraban Ramm

Am 15.01.24 um 01:42 schrieb Jim:


Some text preceding the list of items:
a. Item one.
b. Second item.
This sentence is part of the same paragraph.

The next paragraph starts here...


\startitemize[packed,joinedup] should be the right combination.

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Colored Paragraph

2023-12-05 Thread Ursula Hermann
Dear Hraban, 

It was \startnarrower \stopnarrower, I put it out, now it is perfekt. I also 
send the pdf. 

Many thanks. 
Uschi 

-Ursprüngliche Nachricht-
Von: Henning Hraban Ramm  
Gesendet: Dienstag, 05. Dezember 2023 15:47
An: ntg-context@ntg.nl
Betreff: [NTG-context] Re: Colored Paragraph

Hi Uschi,
unfortunately you also forgot the source code.

I’m not sure if the examples in the wiki are good – the combination with 
\startnarrower might be a problem.

Maybe setting the width helps (e.g. to \makeupwidth).

Hraban

Am 05.12.23 um 15:29 schrieb Ursula Hermann:
> Dear Hraban,
> Sorry, forgot my name
> Uschi
> 
> -Ursprüngliche Nachricht-
> Von: Ursula Hermann
> Gesendet: Dienstag, 05. Dezember 2023 15:27
> An: 'mailing list for ConTeXt users' 
> Betreff: AW: [NTG-context] Re: Colored Paragraph
> 
> Dear Hraban,
> 
> I have tried it now, I have sent you the pdf. This works. But the paragraph 
> should fill the whole blackrule.
> 
> -Ursprüngliche Nachricht-
> Von: Henning Hraban Ramm 
> Gesendet: Dienstag, 05. Dezember 2023 14:58
> An: mailing list for ConTeXt users 
> Betreff: [NTG-context] Re: Colored Paragraph
> 
> Am 05.12.23 um 14:16 schrieb Ursula Hermann:
>> The paragraph should have a color in the background. How can I get an 
>> colored paragraph?
> 
> Did you try \definetextbackground?
> 
> https://wiki.contextgarden.net/TextBackground
> https://wiki.contextgarden.net/Command/definetextbackground
> 
> Hraban
> __
> _ If your question is of interest to others as well, 
> please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) 
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net 
> (mirror) archive  : https://github.com/contextgarden/context
> wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) 
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Colored Paragraph

2023-12-05 Thread Henning Hraban Ramm

Hi Uschi,
unfortunately you also forgot the source code.

I’m not sure if the examples in the wiki are good – the combination with 
\startnarrower might be a problem.


Maybe setting the width helps (e.g. to \makeupwidth).

Hraban

Am 05.12.23 um 15:29 schrieb Ursula Hermann:

Dear Hraban,
Sorry, forgot my name
Uschi

-Ursprüngliche Nachricht-
Von: Ursula Hermann
Gesendet: Dienstag, 05. Dezember 2023 15:27
An: 'mailing list for ConTeXt users' 
Betreff: AW: [NTG-context] Re: Colored Paragraph

Dear Hraban,

I have tried it now, I have sent you the pdf. This works. But the paragraph 
should fill the whole blackrule.

-Ursprüngliche Nachricht-
Von: Henning Hraban Ramm 
Gesendet: Dienstag, 05. Dezember 2023 14:58
An: mailing list for ConTeXt users 
Betreff: [NTG-context] Re: Colored Paragraph

Am 05.12.23 um 14:16 schrieb Ursula Hermann:

The paragraph should have a color in the background. How can I get an
colored paragraph?


Did you try \definetextbackground?

https://wiki.contextgarden.net/TextBackground
https://wiki.contextgarden.net/Command/definetextbackground

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) 
archive  : https://github.com/contextgarden/context
wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Bold TeX Gyre Pagella Math results in Math error: parameter 'subshiftdown' with id 48 in style 2 is not set

2023-12-01 Thread Marco Patzer
On Fri, 1 Dec 2023 15:09:32 +0100
Wolfgang Schuster  wrote:

> You get the same error with Latin Modern as soon as you use a non 
> predefined font size in combination with bold math.

True, thanks for pointing that out. I wasn't aware and frankly,
that's rather unexpected behaviour.

So to put it all together, this now works for me:

\definefontfamily [mainface] [rm] [TeX Gyre Pagella]
\definefontfamily [mainface] [ss] [TeX Gyre Heros]

\starttypescript [math] [default] [size]
  \definebodyfont [8.5pt] [mm] [default]
\stoptypescript

\definetypeface [mainface] [mm] [math] [pagella]

\setupbodyfont [mainface, 8.5pt]

\starttext
  \math{V_y}
  \bold{\math{V_y}}
\stoptext

Thank you for your replies.

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Bold TeX Gyre Pagella Math results in Math error: parameter 'subshiftdown' with id 48 in style 2 is not set

2023-12-01 Thread Wolfgang Schuster

Marco Patzer schrieb am 30.11.2023 um 22:23:

On Thu, 30 Nov 2023 20:51:42 +0100
Wolfgang Schuster  wrote:


Use the \definetypeface command to load the math font. Math fonts
always use special
settings or load additional settings which are missing when you use
\definefontfamily.

\definetypeface [mainface] [mm] [math] [pagella]

\definetypeface generates the same error message if the font size is
changed:

\definefontfamily [mainface] [rm] [TeX Gyre Pagella]
\definefontfamily [mainface] [ss] [TeX Gyre Heros]

\definetypeface [mainface] [mm] [math] [pagella]

%% 8pt works
\setupbodyfont [mainface, 8.5pt]

\starttext
   \bold{\math{x_y}}
\stoptext


You get the same error with Latin Modern as soon as you use a non 
predefined font size in combination with bold math.


 begin example
% \starttypescript [math] [default] [size]
%   \definebodyfont [8.5pt] [mm] [default]
% \stoptypescript

\setupbodyfont[8.5pt]

\starttext

\im{x_y}

\mb\im{x_y}

\stoptext
 end example

Wolfgang

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Using Farad with \unit messes up feet, µ not recognised as prefix

2023-10-03 Thread Marco Patzer
On Tue, 3 Oct 2023 15:42:57 +0200
Wolfgang Schuster  wrote:

> Marco Patzer schrieb am 03.10.2023 um 12:31:
> > Hi!
> >
> > I struggle using the unit Farad (unit of capacitance):  
> 
> The unit "farad" exists.

You're right \unit{10 Farad} works.

> The unit for feet is "foot" and "ft" is a combination of a prefix 
> (femto) and a unit (tonne).

Makes sense if you think about it. Never crossed my mind that ft not
meaning feet in this instance and also never contemplated the
existence of a “femto tonne”.

> You can list the individual parts in the log file with the 
> "physics.units" tracker.

That gives some insight, indeed. Thanks.

What about:

\unit{10 um}
\unit{10 µm}

Can I assign µ to mean micro (prefix)?

Marco
___
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] Re: Using Farad with \unit messes up feet, µ not recognised as prefix

2023-10-03 Thread Wolfgang Schuster

Marco Patzer schrieb am 03.10.2023 um 12:31:

Hi!

I struggle using the unit Farad (unit of capacitance):


The unit "farad" exists.


\starttext

%% prints 10 10 ft
\unit{10 F}
\unit{20 ft}

\registerunit  [F=Farad]
\setupunittext [Farad=F]

%% prints 10 F 20 F⋅t
\unit{10 F}
\unit{20 ft}

\stoptext

When registering Farad as new unit it messes up feet. This looks
like a bug to me, since “20 ft” does not contain a capital “F” and
units are case-sensitive. How to use Farad correctly without messing
up other units?


The unit for feet is "foot" and "ft" is a combination of a prefix 
(femto) and a unit (tonne).


You can list the individual parts in the log file with the 
"physics.units" tracker.


To get a short unit you have to use the following method (it works 
because farad exists):


    \registerunitshortcut [F=farad]

Wolfgang

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

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

[NTG-context] Re: item list inside a blockquote

2023-09-26 Thread Pablo Rodriguez
On 9/26/23 20:46, Wolfgang Schuster wrote:
> [...]
> The \startblockquote command removes the last skip to ensure only the
> space which is set by the environment appears in the output.

Many thanks for your explanation, Wolfgang.

> The default method to put some space before and after the environment is
> to use the spacebefore and spaceafter keys.

Now it is clear to me how the after and spaceafter differ in delimited
texts.

> It would interesting to know what you're trying to achieve with your
> combination of itemize and blockquote.

I’m quoting laws in footnotes, such as in:

   Relevant to the discusssion, see »Grundgesetz«, §73: :

 Der Bund hat die ausschließliche Gesetzgebung über:

   1. die auswärtigen Angelegenheiten;
   2. die Staatsangehörigkeit im Bunde;
   3. [...]

I need to quote the legal text and the list inside the legal text.

BTW, German legislation is only a sample.

I hope it is clear now,

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
___

[NTG-context] Re: item list inside a blockquote

2023-09-26 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 26.09.2023 um 20:32:

On 9/26/23 12:52, gerard.degreve wrote:

Hello Pablo,

Just try to do this :

\setupitemgroup
[itemize][1]
[ before={\blank[.125th]},
after={\blank[.125th]}\strut]

Hi Gerard,

this also works with \null, but not well with small dimensions:

 \showframe\showgrid\showstruts
 \setuppapersize[A6]
 \setupitemgroup
[itemize][1]
[   before={\blank[quarterline]},
 after={\blank[quarterline]\null}]
 \starttext
 one
 \startblockquote
 \startitemize
  \item a.
 \stopitemize
 \stopblockquote
 two
 \stoptext

I tend to think this might be a bug.


The \startblockquote command removes the last skip to ensure only the 
space which is set by the environment appears in the output.


The default method to put some space before and after the environment is 
to use the spacebefore and spaceafter keys.


 begin example
\setupquotation
  [spacebefore=line,
    spaceafter=line]

\starttext

\samplefile{knuth}

\startblockquote
\samplefile{knuth-gpt}
\stopblockquote

\samplefile{knuthmath}

\stoptext
 end example

It would interesting to know what you're trying to achieve with your 
combination of itemize and blockquote.


Wolfgang

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

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

[NTG-context] Re: new upload

2023-08-15 Thread Hans Hagen via ntg-context

On 8/15/2023 9:27 PM, Pablo Rodriguez wrote:

On 8/15/23 19:08, Hans Hagen wrote:

[...]
The units starting with 'u' are considered user units but be carefulk
with other combinations as we have (and will have more) built into
context ones, like

pi : pi for Mikael
ft : foot for Alan
fs : (global body) font size
tw : (layout) text width
th : (layout) text height
hs : (current) hsize
vs : (current) vsize
cd : (when set) column distance
cw : (when set) column width
cx : combination cell width
uu : user unit (\METAFUN)


Many thanks for the new release, Hans.

I wonder whether we could have (current) frame width and height as unit.

we can have

  fw fh fo lw (width height offset linewidth)

but keep in mind that only properties that are set up have a meaningful 
value (so with autoheight it is zero)


and then you realize that you are the one going to wikify it

Hans



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

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

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


[NTG-context] Re: new upload

2023-08-15 Thread Pablo Rodriguez
On 8/15/23 19:08, Hans Hagen wrote:
> [...]
> The units starting with 'u' are considered user units but be carefulk
> with other combinations as we have (and will have more) built into
> context ones, like
>
> pi : pi for Mikael
> ft : foot for Alan
> fs : (global body) font size
> tw : (layout) text width
> th : (layout) text height
> hs : (current) hsize
> vs : (current) vsize
> cd : (when set) column distance
> cw : (when set) column width
> cx : combination cell width
> uu : user unit (\METAFUN)

Many thanks for the new release, Hans.

I wonder whether we could have (current) frame width and height as unit.

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
___


[NTG-context] Re: [ odd spacing ]

2023-08-15 Thread Wolfgang Schuster

vm via ntg-context schrieb am 15.08.2023 um 21:13:


Placing identical images in a n x m grid
shows extra space every two rows.

Also the vertical and horizontal spaces are different.

There is probably a reason for this to happen, but how to avoid it ?


1. You're missing the caption (even if it's empty) entry for each cell.

    \startcontent ... \stopcontent
    \startcaption \stopcaption

2. You create 15 cells but include 16 images.

3. When you need a combination without caption/label you can just use 
natural tables or extreme tables.


Wolfgang

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

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

[NTG-context] new upload

2023-08-15 Thread Hans Hagen

Hi,

I uploaded a new lmtx (some new - experimental - things will be 
explained after the ctx meeting), but there's one thing that is somewhat 
important.


In addition to the built in units we can now have so called user units. 
There is some more info about this in the lowlevel-registers manual. One 
of the predefined units is 'uu' with an associated \ununit (dimension) 
variable and it's is also interfaced to metafun. That means that when 
you use uu in metapost graphics you have to make sure that you save the 
meaning and/or numeric uu now.


The idea is that just as in mp one can say 20xx with xx being a (sort 
of) unit, one can do the same in tex. Think of


\newdimension \MyUnitA  \MyUnitA 1.23pt

\pushoverloadmode % just in case
\newuserunit\MyUnitA ua % binds the unit to the variable
\popoverloadmode

x\hskip 10ua\relax x

The units starting with 'u' are considered user units but be carefulk 
with other combinations as we have (and will have more) built into 
context ones, like


pi : pi for Mikael
ft : foot for Alan
fs : (global body) font size
tw : (layout) text width
th : (layout) text height
hs : (current) hsize
vs : (current) vsize
cd : (when set) column distance
cw : (when set) column width
cx : combination cell width
uu : user unit (\METAFUN)

So Mikael can now have

  test \hskip 3pi\relax test

and Alan can have

  \setuplayout
[width=1ft]

to be consistent with inches.

The reason why we have this mechanism is that it provides a level of 
abstraction. It might evolve over time but don't expect the 600+ units 
possible to show up because one needs sensible shortcuts. Already built 
in unit always win and you cna only bind to already defined quantities.


Here's one for those who want to go beyond the normal:

\newdimension \FooA   \FooA 1.23pt
\newdimen \FooB   \FooB 12.3pt
\protected\def\FooC   {\the\dimexpr\FooA +\FooB\relax}

So you can now figure how 'cx' is defined in a dynamic way.


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: Pass string into text background graphic

2023-08-12 Thread Hans Hagen via ntg-context

On 8/12/2023 7:19 PM, Thangalin wrote:

Thanks Hans.

The \newinteger approach would always increment the value, regardless of
conditionals within the MetaPost code (i.e., it was like legend :=
"\ConcurrentTextGet" would always invoke the macro just be referencing the
MPgraphic and nothing would prevent its execution). This meant that the Get
indexes would not correspond to the Set indexes. Switching to \definenumber
resolved the issue. There were a few other oddities, such as the "Get"
counter incrementing twice. Here's the code:


you could remove the \localcontrolled around the advance


\definenumber[ConcurrentTextSetCounter][prefix=no]
\definenumber[ConcurrentTextGetCounter][prefix=no]

\setnumber[ConcurrentTextSetCounter][0]
\setnumber[ConcurrentTextGetCounter][0]

% Map each label as global key/value pairs.
\def\ConcurrentTextSet#1{%
   \incrementnumber[ConcurrentTextSetCounter]%
   \setxvariable
 {concurrent}
 {text:\rawcountervalue[ConcurrentTextSetCounter]}
 {#1}}

% Account for the counter incrementing twice and the index being 1-based.
\def\ConcurrentTextGet{%
   \incrementnumber[ConcurrentTextGetCounter]%
   \getvariable
 {concurrent}


why twice ? you only have to typeset the text once, right?


{text:\number\numexpr1+\rawcountervalue[ConcurrentTextGetCounter]/2\relax}}

\startuseMPgraphic{GraphicConcurrent}
   numeric index;
   index := 1;

   % Differentiate between new text blocks and those crossing pages.
   if (multikind[ index ] = "single") or (multikind[ index ] = "first"):
 string legend;
 legend := "\ConcurrentTextGet";

 % For new text blocks, write the title.
 picture p;
 p := textext.rt( legend )
   shifted ulcorner multipars[ index ]
   shifted (1cm, 0);

 % Draw the horizontal rule only for the initial text block.
 draw
   ulcorner multipars[ index ] shifted (1mm + xpart lrcorner p, 0) --
   urcorner multipars[ index ];

 % Draw the vertical rule for the initial text block.
 draw
   llcorner multipars[ index ] --
   ulcorner multipars[ index ] --
   ulcorner multipars[ index ] shifted (9mm, 0);

 draw p;
   else:
 % Draw only the vertical rule only when crossing page boundaries.
 draw
   llcorner multipars[ index ] --
   ulcorner multipars[ index ];
   fi
\stopuseMPgraphic

\definetextbackground[TextConcurrentFrame][
   mp=GraphicConcurrent,
   frame=off,
   topoffset=1em,
   leftoffset=1em,
   before=\blank[2*big],
   after=\blank,
   location=paragraph,
]

\startsetups concurrent:before
   \ConcurrentTextSet{%
 % Be sure to format "a.m." and other special phrases.
 \expandafter\TextReplacement{%
   \xmlatt{\getvariable{div}{concurrent}}{data-title}%
 }
   }
   \startTextConcurrentFrame
\stopsetups

\startsetups concurrent:after
   \stopTextConcurrentFrame
\stopsetups

\definestartstop[concurrent][
   before=\directsetup{concurrent:before},
   after=\directsetup{concurrent:after}
]

This allows for typesetting a wider range of pandoc-style Markdown
annotations, such as:

::: {.concurrent title="Terminal Berth 5, 3:17 a.m."}
text goes here
:::

With these changes, the titles now only appear at the start of the
demarcated text, in any combination of "concurrent" annotation instances
spanning any number of pages.

Much appreciated.

Cheers!
P.S.
The following line requires KeenWrite themes:

\expandafter\TextReplacement{ ... }

For details, see:

-

https://github.com/DaveJarvis/keenwrite-themes/blob/main/xhtml/xml-blocks.tex
-
https://github.com/DaveJarvis/keenwrite-themes/blob/main/boschet/replace.tex


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


--

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

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

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


[NTG-context] Re: Pass string into text background graphic

2023-08-12 Thread Thangalin
Thanks Hans.

The \newinteger approach would always increment the value, regardless of
conditionals within the MetaPost code (i.e., it was like legend :=
"\ConcurrentTextGet" would always invoke the macro just be referencing the
MPgraphic and nothing would prevent its execution). This meant that the Get
indexes would not correspond to the Set indexes. Switching to \definenumber
resolved the issue. There were a few other oddities, such as the "Get"
counter incrementing twice. Here's the code:

\definenumber[ConcurrentTextSetCounter][prefix=no]
\definenumber[ConcurrentTextGetCounter][prefix=no]

\setnumber[ConcurrentTextSetCounter][0]
\setnumber[ConcurrentTextGetCounter][0]

% Map each label as global key/value pairs.
\def\ConcurrentTextSet#1{%
  \incrementnumber[ConcurrentTextSetCounter]%
  \setxvariable
{concurrent}
{text:\rawcountervalue[ConcurrentTextSetCounter]}
{#1}}

% Account for the counter incrementing twice and the index being 1-based.
\def\ConcurrentTextGet{%
  \incrementnumber[ConcurrentTextGetCounter]%
  \getvariable
{concurrent}

{text:\number\numexpr1+\rawcountervalue[ConcurrentTextGetCounter]/2\relax}}

\startuseMPgraphic{GraphicConcurrent}
  numeric index;
  index := 1;

  % Differentiate between new text blocks and those crossing pages.
  if (multikind[ index ] = "single") or (multikind[ index ] = "first"):
string legend;
legend := "\ConcurrentTextGet";

% For new text blocks, write the title.
picture p;
p := textext.rt( legend )
  shifted ulcorner multipars[ index ]
  shifted (1cm, 0);

% Draw the horizontal rule only for the initial text block.
draw
  ulcorner multipars[ index ] shifted (1mm + xpart lrcorner p, 0) --
  urcorner multipars[ index ];

% Draw the vertical rule for the initial text block.
draw
  llcorner multipars[ index ] --
  ulcorner multipars[ index ] --
  ulcorner multipars[ index ] shifted (9mm, 0);

draw p;
  else:
% Draw only the vertical rule only when crossing page boundaries.
draw
  llcorner multipars[ index ] --
  ulcorner multipars[ index ];
  fi
\stopuseMPgraphic

\definetextbackground[TextConcurrentFrame][
  mp=GraphicConcurrent,
  frame=off,
  topoffset=1em,
  leftoffset=1em,
  before=\blank[2*big],
  after=\blank,
  location=paragraph,
]

\startsetups concurrent:before
  \ConcurrentTextSet{%
% Be sure to format "a.m." and other special phrases.
\expandafter\TextReplacement{%
  \xmlatt{\getvariable{div}{concurrent}}{data-title}%
}
  }
  \startTextConcurrentFrame
\stopsetups

\startsetups concurrent:after
  \stopTextConcurrentFrame
\stopsetups

\definestartstop[concurrent][
  before=\directsetup{concurrent:before},
  after=\directsetup{concurrent:after}
]

This allows for typesetting a wider range of pandoc-style Markdown
annotations, such as:

::: {.concurrent title="Terminal Berth 5, 3:17 a.m."}
text goes here
:::

With these changes, the titles now only appear at the start of the
demarcated text, in any combination of "concurrent" annotation instances
spanning any number of pages.

Much appreciated.

Cheers!
P.S.
The following line requires KeenWrite themes:

\expandafter\TextReplacement{ ... }

For details, see:

   -
   https://github.com/DaveJarvis/keenwrite-themes/blob/main/xhtml/xml-blocks.tex
   -
   https://github.com/DaveJarvis/keenwrite-themes/blob/main/boschet/replace.tex


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

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

[NTG-context] Re: Can ConTeXt write its pdf to a different directory?

2023-08-06 Thread Jethro Djan
Sorry. I have the same problem. This may seem basic but how do I pass
multiple paths to the --path option?

Jethro

On Sat, May 27, 2023 at 10:09 AM Hans Hagen via ntg-context <
ntg-context@ntg.nl> wrote:

> On 5/27/2023 11:51 AM, Denis Maier via ntg-context wrote:
> > I usually use a makefile for this.
> > There I have build rule that first cds into the target directory, then
> calls context from there.
> That is indeed the solution (also because the --path option will then
> fetch from the source). The more lua hackery the more danger of
> interference. The problem here is that a rename won't work in all
> scenarios (different drives on windows for instance, or from local disk
> to network drive).
>
> Anyway, one can also give
>
>--runpath=sometargetpath
>
> which i actually use to run for instance manuals, but there it is driven
> in the file itself:
>
>    % language=us runpath=texruns:manuals/musings
>
> in combination with
>
>TEXRUNS=c:\data\temporary\texruns
>
> so that I don't overwrite a stable manual in the source path. Over the
> decades that context evolved there have been plenty such tricks added.
>
> I could probably add a move option to the job ticket mechanism but that
> has not changed in ages so ... workflows demands are too different.
>
> Hans
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Re: Title pages makeup extra blank pages

2023-07-06 Thread Wolfgang Schuster

Alan Braslau schrieb am 06.07.2023 um 17:14:

On 06/07/23 06/07/23, 17:07, Wolfgang Schuster wrote:


Add "doublesided=no" to your makeup settings.

Wolfgang


Thank you.
I have doublesided=no in the makeup, but this makeup is not used by 
\startpagefigure.


The problem is with \startpagefigure that is outside of makeup, that 
is it is using the standard makeup (with doublesided=yes). Is this a 
bug, that is should \startpagefigure use the makeup of the included 
PDF document and ignore the local makeup? Or is this, rather, what is 
intended, requiring one to wrap the included pages in an explicit 
makeup (as I am now doing)?


\pagefigure[...][...] (no need for \startpagefigure .. \stoppagefigure) 
is a combination of \startTeXpage and \externalfigure and you shouldn't 
put the command in a makeup environment.


Wolfgang

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

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


[NTG-context] Re: {\rm foo {\it bar}}

2023-07-05 Thread Gerben Wierda
And the reason probably is that the font is defined as sans serif [ss]?Sent from my iPhoneOn 5 Jul 2023, at 00:12, Gerben Wierda  wrote:Found it (I think)\definefontfamily defines tf= but the text says \rmIf I use \tf in the text it works.If I use \rm in the text it works for default Latin Modern but not for any font defined. This is true regardless of using rm= or tf= in the definition.So, it seems to be the combination of using definefontfamily and \rmOn 4 Jul 2023, at 23:48, Gerben Wierda <gerben.wie...@rna.nl> wrote:Also doesn't work with ConTeXt  ver: 2023.06.22 14:13 LMTX  fmt: 2023.7.4  int: english/englishOn 4 Jul 2023, at 23:42, Gerben Wierda <gerben.wie...@rna.nl> wrote:On 4 Jul 2023, at 23:26, Wolfgang Schuster <wolfgang.schuster.li...@gmail.com> wrote:Gerben Wierda schrieb am 04.07.2023 um 23:17:After erasing the font cache and regenerating LM was doing it right again.Helvetica did not, but maybe I made a mistake in\definefontfamily  [helvetica]  [ss]  [Helvetica]  [tf=style:Regular,   bf=style:Bold,   it=style:Oblique,   bi=style:Bold Oblique]Does it work when you remove the manual assignments to tf, it, etc. or when you use lowercase names (without spaces), e.g. "bi=boldoblique" (or "bi=bolditalic").No and no. With th elatter it doesn't load Helvetica at all, Error shown:selectfont      > the requested font 'Helvetica' has no files for the 'tf' alternative, Latin Modern is used instead.mkiv lua stats  > loaded fonts: 4 files: latinmodern-math.otf, lmroman10-italic.otf, lmroman10-regular.otf, lmsans10-regular.otfWith my original it does load (but no italic):mkiv lua stats  > loaded fonts: 4 files: helvetica.ttc, latinmodern-math.otf, lmroman10-italic.otf, lmroman10-regular.otfErase cache, regenerate formats, reload fonts (force) does give another (probably unrelated) error:fonts           | names | identifying system font files with suffix 'ttf'fonts           | names | globbing path '/Library/Fonts/**.ttf'fonts           | names | globbing path '/System/Library/Fonts/**.ttf'otf reader      | fatal error in file '/System/Library/Fonts/SFCompactRounded.ttf': ...-64/tex/texmf-context/tex/context/base/mkiv/font-dsp.lua:3689: attempt to index a nil value (field '?')stack traceback:	...-64/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2344: in metamethod 'index'	...-64/tex/texmf-context/tex/context/base/mkiv/font-dsp.lua:3689: in local 'reader'	...-64/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2089: in upvalue 'readtable'Gerben Wierda (LinkedIn, Mastodon)R IT Strategy (main site)Book: Chess and the Art of Enterprise ArchitectureBook: Mastering ArchiMate___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-contextwebpage  : https://www.pragma-ade.nl / http://context.aanhet.netarchive  : https://bitbucket.org/phg/context-mirror/commits/wiki : https://contextgarden.net___
Gerben Wierda (LinkedIn, Mastodon)R IT Strategy (main site)Book: Chess and the Art of Enterprise ArchitectureBook: Mastering ArchiMate

___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-contextwebpage  : https://www.pragma-ade.nl / http://context.aanhet.netarchive  : https://bitbucket.org/phg/context-mirror/commits/wiki : https://contextgarden.net___
Gerben Wierda (LinkedIn, Mastodon)R IT Strategy (main site)Book: Chess and the Art of Enterprise ArchitectureBook: Mastering ArchiMate

___
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] Re: {\rm foo {\it bar}}

2023-07-04 Thread Gerben Wierda
Found it (I think)

\definefontfamily defines tf= but the text says \rm

If I use \tf in the text it works.
If I use \rm in the text it works for default Latin Modern but not for any font 
defined. This is true regardless of using rm= or tf= in the definition.

So, it seems to be the combination of using definefontfamily and \rm

> On 4 Jul 2023, at 23:48, Gerben Wierda  wrote:
> 
> Also doesn't work with ConTeXt  ver: 2023.06.22 14:13 LMTX  fmt: 2023.7.4  
> int: english/english
> 
>> On 4 Jul 2023, at 23:42, Gerben Wierda > <mailto:gerben.wie...@rna.nl>> wrote:
>> 
>> 
>> 
>>> On 4 Jul 2023, at 23:26, Wolfgang Schuster 
>>> >> <mailto:wolfgang.schuster.li...@gmail.com>> wrote:
>>> 
>>> Gerben Wierda schrieb am 04.07.2023 um 23:17:
>>>> After erasing the font cache and regenerating LM was doing it right again.
>>>> 
>>>> Helvetica did not, but maybe I made a mistake in
>>>> 
>>>> \definefontfamily
>>>>   [helvetica]
>>>>   [ss]
>>>>   [Helvetica]
>>>>   [tf=style:Regular,
>>>>bf=style:Bold,
>>>>it=style:Oblique,
>>>>bi=style:Bold Oblique]
>>> 
>>> Does it work when you remove the manual assignments to tf, it, etc. or when 
>>> you use lowercase names (without spaces), e.g. "bi=boldoblique" (or 
>>> "bi=bolditalic").
>> 
>> No and no. With th elatter it doesn't load Helvetica at all, Error shown:
>> selectfont  > the requested font 'Helvetica' has no files for the 'tf' 
>> alternative, Latin Modern is used instead.
>> mkiv lua stats  > loaded fonts: 4 files: latinmodern-math.otf, 
>> lmroman10-italic.otf, lmroman10-regular.otf, lmsans10-regular.otf
>> 
>> With my original it does load (but no italic):
>> mkiv lua stats  > loaded fonts: 4 files: helvetica.ttc, 
>> latinmodern-math.otf, lmroman10-italic.otf, lmroman10-regular.otf
>> 
>> 
>> Erase cache, regenerate formats, reload fonts (force) does give another 
>> (probably unrelated) error:
>> 
>> fonts   | names | identifying system font files with suffix 'ttf'
>> fonts   | names | globbing path '/Library/Fonts/**.ttf'
>> fonts   | names | globbing path '/System/Library/Fonts/**.ttf'
>> otf reader  | fatal error in file 
>> '/System/Library/Fonts/SFCompactRounded.ttf': 
>> ...-64/tex/texmf-context/tex/context/base/mkiv/font-dsp.lua:3689: attempt to 
>> index a nil value (field '?')
>> stack traceback:
>>  ...-64/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2344: in 
>> metamethod 'index'
>>  ...-64/tex/texmf-context/tex/context/base/mkiv/font-dsp.lua:3689: in 
>> local 'reader'
>>  ...-64/tex/texmf-context/tex/context/base/mkiv/font-otr.lua:2089: in 
>> upvalue 'readtable'
>> 
>> 
>> Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>, Mastodon 
>> <https://newsie.social/@gctwnl>)
>> R IT Strategy <https://ea.rna.nl/> (main site)
>> Book: Chess and the Art of Enterprise Architecture 
>> <https://ea.rna.nl/the-book/>
>> Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>
>> 
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / 
>> https://www.ntg.nl/mailman/listinfo/ntg-context 
>> <https://www.ntg.nl/mailman/listinfo/ntg-context>
>> webpage  : https://www.pragma-ade.nl <https://www.pragma-ade.nl/> / 
>> http://context.aanhet.net <http://context.aanhet.net/>
>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>> <https://bitbucket.org/phg/context-mirror/commits/>
>> wiki : https://contextgarden.net <https://contextgarden.net/>
>> ___
> 
> Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>, Mastodon 
> <https://newsie.social/@gctwnl>)
> R IT Strategy <https://ea.rna.nl/> (main site)
> Book: Chess and the Art of Enterprise Architecture 
> <https://ea.rna.nl/the-book/>
> Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist :

Re: [NTG-context] Can ConTeXt write its pdf to a different directory?

2023-05-27 Thread Hans Hagen via ntg-context

On 5/27/2023 11:51 AM, Denis Maier via ntg-context wrote:

I usually use a makefile for this.
There I have build rule that first cds into the target directory, then calls 
context from there.
That is indeed the solution (also because the --path option will then 
fetch from the source). The more lua hackery the more danger of 
interference. The problem here is that a rename won't work in all 
scenarios (different drives on windows for instance, or from local disk 
to network drive).


Anyway, one can also give

  --runpath=sometargetpath

which i actually use to run for instance manuals, but there it is driven 
in the file itself:


  % language=us runpath=texruns:manuals/musings

in combination with

  TEXRUNS=c:\data\temporary\texruns

so that I don't overwrite a stable manual in the source path. Over the 
decades that context evolved there have been plenty such tricks added.


I could probably add a move option to the job ticket mechanism but that 
has not changed in ages so ... workflows demands are too different.


Hans

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

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

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


Re: [NTG-context] Layout with equal margins.

2023-05-22 Thread Wolfgang Schuster via ntg-context

Pawel Urbanski via ntg-context schrieb am 21.05.2023 um 22:27:

Thanks Wolfgang!

Just last few questions and I og wiht cows home... :)

** Does backspace or cutspace cover the inner space where bhe book 
binding is located?


backspace sets the inner margin and cutspace the outer margin.

** What about the margin where one would like to place chapter and 
section numbers?


This is where you use leftmargin for the width of the are of margin 
texts and leftmargindistance

for the distance between the left side margin block and the text block.

Since my printing house requires 3mm of space around the page for 
trimming. Does defining a paper size taller and wider than the 6x9 
'pawel' paper size you gave in hte example is a solution?


For the example purposes:

\definepapersize[printing_sheet][width440pt,height=656pt]


Then use:

\setuppapersize[pawel][printing_sheet]

As I understand using 'location=middle in \seputlayout would place my 
6x9 page in the middle of this wider and taller sheet.



So many more htings are much more clear and I am copying these 
messages to propose osme changes to the wiki.


ConTeXt already provides a named layout "oversized" where you can 
control the extra height/width for cutting.


To get an extra of 3mm on each side you have to add 
\setuppapersize[distance=6mm] (you need 6mm because it's the combined 
value for the left and right side) in combination with 
\setuplayout[location=middle].


 begin example
\enablemode[print]
%\enablemode[screen]

\startmode[print]

\setuppapersize [distance=6mm]

\definepapersize [pawel] [width=432pt,height=648pt]

\setuppapersize [pawel] [oversized]

\setuplayout
  [ location=middle,
   backspace=52pt,
    cutspace=68pt,
   width=middle]

\stopmode

\startmode[screen]

\definepapersize [pawel] [width=432pt,height=648pt]

\setuppapersize [pawel]

\setuplayout
  [backspace=60pt,
   width=312pt]

\stopmode

\starttext
\showlayout
\stoptext
 end example

Wolfgang

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

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


Re: [NTG-context] Absolute positioning of \startcombination... \stopcombination

2023-03-17 Thread Keith McKay via ntg-context
Thanks for your reply Pablo. I didn't see it till just now because for 
some reason it ended up in my junk folder, along with a number of other 
ConTeXt messages. You will probably have seen my reply to the list with 
the three solutions, now we have four!


Yep, I know that A4 is the default page size and I always start with 
that but sometimes I play about with page sizes when typesetting and so 
can just change when coding.


In the document I'm working on, some pages will only contain images 
and/or combination of images so I went down the Layers route since this 
also allows me to absolutely position these images on the page.


Thanks again for your help!

Best Wishes

Keith McKay

On 16/03/2023 17:58, Pablo Rodriguez via ntg-context wrote:

On 3/16/23 17:59, Keith McKay via ntg-context wrote:

Hi,

I would like to position a combination of images where the centre of the
combination coincides with the centre of the text area of a page.

Hi Keith,

I think the following sample might achieve what you want:

   \showframe
   \setupexternalfigures[location={default}]
   \setuplayout
 [backspace=2.5cm,
 topspace=1cm,
 height=28cm,
 width=17cm,
 header=0cm,
 footer=0.75cm,
 ]
   \definelayer[test3]
   %[x=.5\paperwidth, y=.5\paperheight]
   [x=.5\textwidth, y=.5\textheight]
   %\setupbackgrounds[page]
   \setupbackgrounds[text]
   [background=test3]
   \starttext
   \setlayer[test3][location={middle}]
  \framed[offset=overlay]{{\startcombination[nx=3,ny=1,distance=15mm]
 {\externalfigure[cow][width=15mm]}{}
 \rotate[rotation=90]{\externalfigure[cow][width=15mm]}{}
 {\externalfigure[cow][width=15mm]}{}
  \stopcombination}}
   \null
   \stoptext

BTW, A4 portrait is the default page size.

\setupbackgrounds is the standard way to place layers.

Page and text centering would require different positions (I have
commented out the option for page centering).

I hope it helps (since I’m not sure I’m getting your point here),

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] Absolute positioning of \startcombination... \stopcombination

2023-03-16 Thread Keith McKay via ntg-context
Thanks Wolfgang and Alan! I will experiment with them tomorrow.
Best Wishes
Keith McKay


On Thu, 16 Mar 2023, 18:07 Alan Braslau,  wrote:

> On Thu, 16 Mar 2023 18:27:53 +0100
> Wolfgang Schuster via ntg-context  wrote:
>
> > Keith McKay via ntg-context schrieb am 16.03.2023 um 17:59:
> > >
> > > Hi,
> > >
> > > I would like to position a combination of images where the centre
> > > of the combination coincides with the centre of the text area of a
> > > page. In the example below I have made the combination into a layer
> > > thinking that this would be the easiest way to position it where I
> > > wanted. However to position in the centre of the page I would need
> > > to know the size of the combination and use this to calculate the x
> > > and y values for positioning of the layer. I have looked at the
> > > Wiki page on image size of combinations but still cant figure out
> > > how to do it. Any suggestions on how to go about this or is their a
> > > better way?
> > >
> > > Wiki Page reference:
> > > https://wiki.contextgarden.net/Combinations#Image_Width
> > >
> > > Thanks
> > >
> > > Keith McKay
> > >
> > > %%% example %%%
> > >
> > > \setuppapersize[A4,portrait]%[A4,portrait]
> > >
> > > \setuplayout
> > >
> > > [backspace=2.5cm,
> > >
> > > topspace=1cm,
> > >
> > > height=28cm,
> > >
> > > width=17cm,
> > >
> > > header=0cm,
> > >
> > > footer=0.75cm,
> > >
> > > ]
> > >
> > > \useMPlibrary [dum]
> > >
> > > \starttext
> > >
> > > \definelayer[test3]
> > >
> > > \setlayer[test3][x=2cm,y=15cm]
> > >
> > > {\startcombination[nx=3,ny=1,distance=15mm,after=,location=middle]
> > >
> > > {\externalfigure[dummy]}{}
> > >
> > > \rotate[rotation=90]{\externalfigure[dummy]}{}
> > >
> > > {\externalfigure[dummy][]}{}
> > >
> > > \stopcombination}
> > >
> > > \flushlayer[test3]
> > >
> > > \stoptext
> > >
> >
> > \useMPlibrary [dum]
> >
> > \showframe [text] [text]
> >
> > \setuplayout [tight]
> >
> > \starttext
> >
> > \centerbox
> > {\bTABLE[frame=off,offset=7.5mm,align={middle,lohi}]
> >  \bTR
> >  \bTD
> >  \externalfigure[dummy]
> >  \eTD
> >  \bTD
> >  \rotate[rotation=90]{\externalfigure[dummy]}
> >  \eTD
> >  \bTD
> >  \externalfigure[dummy]
> >  \eTD
> >  \eTR
> >  \eTABLE}
> >
> > \stoptext
> >
> > Wolfgang
>
> Or you could put the combination in a frame:
>
> \startparagraph [align=middle]
>   \startframed [frame=off,offset=\zeropoint]
> \startcombination [nx=3,ny=1]
>   {first} {}
>   {second}{}
>   {third} {}
> \stopcombination
>   \stopframed
> \stopparagraph
>
> Alan
>
___
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] Absolute positioning of \startcombination... \stopcombination

2023-03-16 Thread Alan Braslau via ntg-context
On Thu, 16 Mar 2023 18:27:53 +0100
Wolfgang Schuster via ntg-context  wrote:

> Keith McKay via ntg-context schrieb am 16.03.2023 um 17:59:
> >
> > Hi,
> >
> > I would like to position a combination of images where the centre
> > of the combination coincides with the centre of the text area of a
> > page. In the example below I have made the combination into a layer
> > thinking that this would be the easiest way to position it where I
> > wanted. However to position in the centre of the page I would need
> > to know the size of the combination and use this to calculate the x
> > and y values for positioning of the layer. I have looked at the
> > Wiki page on image size of combinations but still cant figure out
> > how to do it. Any suggestions on how to go about this or is their a
> > better way?
> >
> > Wiki Page reference: 
> > https://wiki.contextgarden.net/Combinations#Image_Width
> >
> > Thanks
> >
> > Keith McKay
> >
> > %%% example %%%
> >
> > \setuppapersize[A4,portrait]%[A4,portrait]
> >
> > \setuplayout
> >
> > [backspace=2.5cm,
> >
> > topspace=1cm,
> >
> > height=28cm,
> >
> > width=17cm,
> >
> > header=0cm,
> >
> > footer=0.75cm,
> >
> > ]
> >
> > \useMPlibrary [dum]
> >
> > \starttext
> >
> > \definelayer[test3]
> >
> > \setlayer[test3][x=2cm,y=15cm]
> >
> > {\startcombination[nx=3,ny=1,distance=15mm,after=,location=middle]
> >
> > {\externalfigure[dummy]}{}
> >
> > \rotate[rotation=90]{\externalfigure[dummy]}{}
> >
> > {\externalfigure[dummy][]}{}
> >
> > \stopcombination}
> >
> > \flushlayer[test3]
> >
> > \stoptext
> >  
> 
> \useMPlibrary [dum]
> 
> \showframe [text] [text]
> 
> \setuplayout [tight]
> 
> \starttext
> 
> \centerbox
>     {\bTABLE[frame=off,offset=7.5mm,align={middle,lohi}]
>      \bTR
>      \bTD
>      \externalfigure[dummy]
>      \eTD
>      \bTD
>      \rotate[rotation=90]{\externalfigure[dummy]}
>      \eTD
>      \bTD
>      \externalfigure[dummy]
>      \eTD
>      \eTR
>      \eTABLE}
> 
> \stoptext
> 
> Wolfgang

Or you could put the combination in a frame:

\startparagraph [align=middle]
  \startframed [frame=off,offset=\zeropoint]
\startcombination [nx=3,ny=1]
  {first} {}
  {second}{}
  {third} {}
\stopcombination
  \stopframed
\stopparagraph

Alan
___
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] Absolute positioning of \startcombination... \stopcombination

2023-03-16 Thread Pablo Rodriguez via ntg-context
On 3/16/23 17:59, Keith McKay via ntg-context wrote:
> Hi,
> 
> I would like to position a combination of images where the centre of the
> combination coincides with the centre of the text area of a page.

Hi Keith,

I think the following sample might achieve what you want:

  \showframe
  \setupexternalfigures[location={default}]
  \setuplayout
[backspace=2.5cm,
topspace=1cm,
height=28cm,
width=17cm,
header=0cm,
footer=0.75cm,
]
  \definelayer[test3]
  %[x=.5\paperwidth, y=.5\paperheight]
  [x=.5\textwidth, y=.5\textheight]
  %\setupbackgrounds[page]
  \setupbackgrounds[text]
  [background=test3]
  \starttext
  \setlayer[test3][location={middle}]
 \framed[offset=overlay]{{\startcombination[nx=3,ny=1,distance=15mm]
{\externalfigure[cow][width=15mm]}{}
\rotate[rotation=90]{\externalfigure[cow][width=15mm]}{}
{\externalfigure[cow][width=15mm]}{}
 \stopcombination}}
  \null
  \stoptext

BTW, A4 portrait is the default page size.

\setupbackgrounds is the standard way to place layers.

Page and text centering would require different positions (I have
commented out the option for page centering).

I hope it helps (since I’m not sure I’m getting your point here),

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
___


Re: [NTG-context] Absolute positioning of \startcombination... \stopcombination

2023-03-16 Thread Wolfgang Schuster via ntg-context

Keith McKay via ntg-context schrieb am 16.03.2023 um 17:59:


Hi,

I would like to position a combination of images where the centre of 
the combination coincides with the centre of the text area of a page. 
In the example below I have made the combination into a layer thinking 
that this would be the easiest way to position it where I wanted. 
However to position in the centre of the page I would need to know the 
size of the combination and use this to calculate the x and y values 
for positioning of the layer. I have looked at the Wiki page on image 
size of combinations but still cant figure out how to do it. Any 
suggestions on how to go about this or is their a better way?


Wiki Page reference: 
https://wiki.contextgarden.net/Combinations#Image_Width


Thanks

Keith McKay

%%% example %%%

\setuppapersize[A4,portrait]%[A4,portrait]

\setuplayout

[backspace=2.5cm,

topspace=1cm,

height=28cm,

width=17cm,

header=0cm,

footer=0.75cm,

]

\useMPlibrary [dum]

\starttext

\definelayer[test3]

\setlayer[test3][x=2cm,y=15cm]

{\startcombination[nx=3,ny=1,distance=15mm,after=,location=middle]

{\externalfigure[dummy]}{}

\rotate[rotation=90]{\externalfigure[dummy]}{}

{\externalfigure[dummy][]}{}

\stopcombination}

\flushlayer[test3]

\stoptext



\useMPlibrary [dum]

\showframe [text] [text]

\setuplayout [tight]

\starttext

\centerbox
   {\bTABLE[frame=off,offset=7.5mm,align={middle,lohi}]
    \bTR
    \bTD
    \externalfigure[dummy]
    \eTD
    \bTD
    \rotate[rotation=90]{\externalfigure[dummy]}
    \eTD
    \bTD
    \externalfigure[dummy]
    \eTD
    \eTR
    \eTABLE}

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / 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] Absolute positioning of \startcombination... \stopcombination

2023-03-16 Thread Keith McKay via ntg-context

Hi,

I would like to position a combination of images where the centre of the 
combination coincides with the centre of the text area of a page. In the 
example below I have made the combination into a layer thinking that 
this would be the easiest way to position it where I wanted. However to 
position in the centre of the page I would need to know the size of the 
combination and use this to calculate the x and y values for positioning 
of the layer. I have looked at the Wiki page on image size of 
combinations but still cant figure out how to do it. Any suggestions on 
how to go about this or is their a better way?


Wiki Page reference: https://wiki.contextgarden.net/Combinations#Image_Width

Thanks

Keith McKay

%%% example %%%

\setuppapersize[A4,portrait]%[A4,portrait]

\setuplayout

[backspace=2.5cm,

topspace=1cm,

height=28cm,

width=17cm,

header=0cm,

footer=0.75cm,

]

\useMPlibrary [dum]

\starttext

\definelayer[test3]

\setlayer[test3][x=2cm,y=15cm]

{\startcombination[nx=3,ny=1,distance=15mm,after=,location=middle]

{\externalfigure[dummy]}{}

\rotate[rotation=90]{\externalfigure[dummy]}{}

{\externalfigure[dummy][]}{}

\stopcombination}

\flushlayer[test3]

\stoptext
___
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] Chapter cover page

2023-02-23 Thread Alex Leray via ntg-context

Hi Bruce, and thanks for your answer.

In the end, I think a combination of `insidesection` and `placehead` 
does what I want:


###

\setuphead[interview][
placehead=hidden,
insidesection={\setup{interview:cover}},
]

###

I'll test it harder in the coming days!

Alex

Le 23/02/23 à 14:24, Bruce Horrocks via ntg-context a écrit :

Hi Alex,

I couldn't get it to work with \tabulate so I switched to TABLE instead. The 
workaround for the horizontal mode problem is to put the chapter title into row 
two of the table. Hopefully this works with your actual text. Also I'm not sure 
where \layoutcolumnwidth is coming from so I just hard-coded a width for now. 
Lastly there are neater ways (using \setuptable) to define the table but it's 
just an example...

\define[2]\MyChapter{
\bTABLE[frame=off]
\bTR
  \bTD[width=4cm] \structureuservariable{author} \eTD
  \bTD \structureuservariable{bio} \eTD
\eTR
\bTR
  \bTD[nc=2] #1 #2 \eTD
\eTR
\eTABLE
}

\definehead[interview][chapter]
\setuphead[interview][
page=right,
command=\MyChapter,
% insidesection={\page},
style={\tfa},
]

\starttext
\startinterview[title={My Interview}][
author={Jane Doe},
year={2022},
month={Decembre},
bio={\input ward}
]

\dorecurse{10}{\input ward \crlf}
\stopinterview
\stoptext



On 23 Feb 2023, at 10:21, Alex Leray via ntg-context  wrote:

Hello,

I'm trying to figure out how to design a chapter page for a custom head section 
with uservariables defined.

I'd like to have the chapter page start on a right page. I'd like this page to feature 
the title of the chapter (here: an interview) along with some other info like the 
interviewee name and bio. All in a "fancy" layout.

I'm having issue putting it all together. The command parameter allow me to 
override the content of the title but has some drawbacks (it seems to be stuck 
in horizontal mode for instance).

I'm open to any solution but would find it nice to keep the \startstopinterview 
structure.

Here is my code at the moment:

%%%

\define[2]\MyChapter{
\starttabulate[|p(\layoutcolumnwidth)|p(\layoutcolumnwidth)|]
\NC \structureuservariable{author} \NC \structureuservariable{bio} \NR
\stoptabulate
}

\definehead[interview][chapter]
\setuphead[interview][
page=right,
command=\MyChapter,
% insidesection={\page},
style={\tfa},
]


\starttext
\startinterview[title={My Interview}][
author={Jane Doe},
year={2022},
month={Decembre},
bio={\input ward}
]

\dorecurse{10}{\input ward \crlf}
\stopinterview
\stoptext

%%%

Many thanks

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


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


--
Alexandre Leray
+32 487 947 030

Avez-vous pensé à (vous) offrir Médor ?
https://medor.coop/ideescadeau
___
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] autospacing and colonequals (was Lucida-1.901 (2023-01-21) available)

2023-01-27 Thread Otared Kavian via ntg-context
Hi Hans,

Thank you for the hint: indeed 
\setupmathematics[collapsing=2]
does exactly what I was looking for… 

Now, like many others, I am just waiting for the 3145 pages document about 
maths in ConTeXt :-)

Best regards: Otared


> On 26 Jan 2023, at 23:23, Hans Hagen via ntg-context  
> wrote:
> 
> On 1/26/2023 10:52 PM, Otared Kavian via ntg-context wrote:
> 
>> Indeed the command \colonequals give the precise expected alignment for the 
>> combination glyph « := ». Befors changing the combination « := » to 
>> \columnequals in my documents, I am wondering whether one could add a small 
>> lua code in order to make an automatic replacement at run time. Actually, 
>> since I don’t know of any other instance in which the combination « := » is 
>> used to mean something else, would it not be reasonnable to make « := » 
>> synonym to \colonequals?
> 
> that's what the (has-always-been-there)
> 
> \setupmathematics[collapsing=2]
> 
> is for (needs latest version to work when the space trickery i senabled)
> 
> Hans
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___

Otared Kavian
e-mail: ota...@gmail.com
Phone: +33 6 88 26 70 95




___
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] autospacing and colonequals (was Lucida-1.901 (2023-01-21) available)

2023-01-26 Thread Hans Hagen via ntg-context

On 1/26/2023 10:52 PM, Otared Kavian via ntg-context wrote:

Indeed the command \colonequals give the precise expected alignment for 
the combination glyph « := ». Befors changing the combination « := » to 
\columnequals in my documents, I am wondering whether one could add a 
small lua code in order to make an automatic replacement at run time. 
Actually, since I don’t know of any other instance in which the 
combination « := » is used to mean something else, would it not be 
reasonnable to make « := » synonym to \colonequals?


that's what the (has-always-been-there)

\setupmathematics[collapsing=2]

is for (needs latest version to work when the space trickery i senabled)

Hans

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

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

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


Re: [NTG-context] autospacing and colonequals (was Lucida-1.901 (2023-01-21) available)

2023-01-26 Thread Otared Kavian via ntg-context
Hi Hans and Mikael,

Thank you both for your attention to my reply and the clarification and hints 
regarding the comman \colonequals and 
\setupmathematics[autospacing=yes]

Indeed the command \colonequals give the precise expected alignment for the 
combination glyph « := ». Befors changing the combination « := » to 
\columnequals in my documents, I am wondering whether one could add a small lua 
code in order to make an automatic replacement at run time. Actually, since I 
don’t know of any other instance in which the combination « := » is used to 
mean something else, would it not be reasonnable to make « := » synonym to 
\colonequals?

I played a little bit with 
\setupmathematics[autospacing=yes]
and it seems to me that without this command one gets automatic spacing in math 
mode, while with the above command the spacing obeys what has been inserted in 
the source. Is this behaviour intended, or is there a mismatch between 
\setupmathematics[autospacing=yes]
and
\setupmathematics[autospacing=no]

Best regards: Otared


> On 26 Jan 2023, at 10:33, Hans Hagen via ntg-context  <mailto:ntg-context@ntg.nl>> wrote:
> 
> On 1/25/2023 6:24 PM, Mikael Sundqvist via ntg-context wrote:
>> On Wed, Jan 25, 2023 at 11:02 AM Otared Kavian via ntg-context
>> mailto:ntg-context@ntg.nl>> wrote:
>>> 
>>> Hi,
>>> 
>>> Thanks Hraban for the information and the link to the article by Hans and 
>>> Mikael about the math fonts in Lucida.
>>> 
>>> I very much appreciated that article: one sees how the handling of almost 
>>> impercebtile details in ConTeXt make us to adhere to and love LuaMetaTeX… 
>>> So a great thank you to Hans and Mikael for all this work!
>>> 
>>> Regarding the details of vertical alignment in math, I wonder whether the 
>>> column « : » in front of the equal sign « = », in the combination « := » 
>>> (used to define for instance a new variable) should be alos centered around 
>>> the math axis, as explained in the article. For instance in the following 
>>> example
>>> 
>>> \setupbodyfont[lucidaot,12pt]
>>> \starttext
>>> \startformula
>>> f(x) := -(u|x) := - \langle u, x \rangle
>>> \stopformula
>>> \stopformula
>>> \startformula
>>> f : A \longrightarrow B
>>> \stopformula
>>> \stoptext
>>> 
>>> it seems to me that the lower dot (or square…) in the semicolumn of the 
>>> first formula (in front of the equal sign) is lower than in the second 
>>> formula.
>>> 
>>> Best regards: Otared
>> Thank you for the kind words, Otared,
>> Regarding the colons (and other symbols with "dots"), I would say it
>> is still not optimal in Lucida (and difficult to make it "consistent",
>> there are too many symbols that are at the moment different). But in
>> your example you can use \colonequals and \colon if you prefer. They
>> are centered around the math axis.
>> Best, Mikael
>> \setupbodyfont[lucidaot,12pt]
>> \starttext
>> \startformula
>> f(x) := -(u|x) \colonequals - \langle u, x \rangle
>> \stopformula
>> \startformula
>> f : A \longrightarrow B \breakhere
>> f \colon A \longrightarrow B
>> \stopformula
>> \startformula
>> \mathaxisbelow := \colonequals : \colon
>> \stopformula
>> \stoptext
> There is a (experimental as we played with it and then got distracted) 
> feature that makes some symbols adapt to spacing in the input.
> 
> \starttext
> 
>\setupmathematics[autospacing=yes]
> 
>\setupmathematics[collapsing=2]
> 
>\im{A:B} and \im{A : B}\par
>\im{A:=B} and \im{A := B}\par
>\im{A\colonequals B} and \im{A {\colonequals} B}\par
> 
> \stoptext
> 
> the second line is not yet ok as collapsing the := (old feature) comes at the 
> wrong time when we do autospacing (something Mikasl and I now need to discuss 
> and test)
> 
> This autospacing is part of some larger effort, for instance we can also auto 
> handle fences and so. All this relates to minimizing the input and make it a 
> bit more natural. Think (1,2) vb (1, 2) where we - due to the many more 
> classes that we have - want spacing to be right.
> 
> All will be revealed in the upcoming releases and the upcoming 3145 page math 
> manual.
> 
> Hans
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl/> |

Re: [NTG-context] Lucida-1.901 (2023-01-21) available

2023-01-26 Thread Hans Hagen via ntg-context

On 1/25/2023 6:24 PM, Mikael Sundqvist via ntg-context wrote:

On Wed, Jan 25, 2023 at 11:02 AM Otared Kavian via ntg-context
 wrote:


Hi,

Thanks Hraban for the information and the link to the article by Hans and 
Mikael about the math fonts in Lucida.

I very much appreciated that article: one sees how the handling of almost 
impercebtile details in ConTeXt make us to adhere to and love LuaMetaTeX… So a 
great thank you to Hans and Mikael for all this work!

Regarding the details of vertical alignment in math, I wonder whether the 
column « : » in front of the equal sign « = », in the combination « := » (used 
to define for instance a new variable) should be alos centered around the math 
axis, as explained in the article. For instance in the following example

\setupbodyfont[lucidaot,12pt]
\starttext
\startformula
f(x) := -(u|x) := - \langle u, x \rangle
\stopformula
\stopformula
\startformula
f : A \longrightarrow B
\stopformula
\stoptext

it seems to me that the lower dot (or square…) in the semicolumn of the first 
formula (in front of the equal sign) is lower than in the second formula.

Best regards: Otared


Thank you for the kind words, Otared,

Regarding the colons (and other symbols with "dots"), I would say it
is still not optimal in Lucida (and difficult to make it "consistent",
there are too many symbols that are at the moment different). But in
your example you can use \colonequals and \colon if you prefer. They
are centered around the math axis.

Best, Mikael

\setupbodyfont[lucidaot,12pt]
\starttext
\startformula
f(x) := -(u|x) \colonequals - \langle u, x \rangle
\stopformula
\startformula
f : A \longrightarrow B \breakhere
f \colon A \longrightarrow B
\stopformula
\startformula
\mathaxisbelow := \colonequals : \colon
\stopformula
\stoptext
There is a (experimental as we played with it and then got distracted) 
feature that makes some symbols adapt to spacing in the input.


\starttext

\setupmathematics[autospacing=yes]

\setupmathematics[collapsing=2]

\im{A:B} and \im{A : B}\par
\im{A:=B} and \im{A := B}\par
\im{A\colonequals B} and \im{A {\colonequals} B}\par

\stoptext

the second line is not yet ok as collapsing the := (old feature) comes 
at the wrong time when we do autospacing (something Mikasl and I now 
need to discuss and test)


This autospacing is part of some larger effort, for instance we can also 
auto handle fences and so. All this relates to minimizing the input and 
make it a bit more natural. Think (1,2) vb (1, 2) where we - due to the 
many more classes that we have - want spacing to be right.


All will be revealed in the upcoming releases and the upcoming 3145 page 
math manual.


Hans

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

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

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


Re: [NTG-context] Lucida-1.901 (2023-01-21) available

2023-01-25 Thread Mikael Sundqvist via ntg-context
On Wed, Jan 25, 2023 at 11:02 AM Otared Kavian via ntg-context
 wrote:
>
> Hi,
>
> Thanks Hraban for the information and the link to the article by Hans and 
> Mikael about the math fonts in Lucida.
>
> I very much appreciated that article: one sees how the handling of almost 
> impercebtile details in ConTeXt make us to adhere to and love LuaMetaTeX… So 
> a great thank you to Hans and Mikael for all this work!
>
> Regarding the details of vertical alignment in math, I wonder whether the 
> column « : » in front of the equal sign « = », in the combination « := » 
> (used to define for instance a new variable) should be alos centered around 
> the math axis, as explained in the article. For instance in the following 
> example
>
> \setupbodyfont[lucidaot,12pt]
> \starttext
> \startformula
> f(x) := -(u|x) := - \langle u, x \rangle
> \stopformula
> \stopformula
> \startformula
> f : A \longrightarrow B
> \stopformula
> \stoptext
>
> it seems to me that the lower dot (or square…) in the semicolumn of the first 
> formula (in front of the equal sign) is lower than in the second formula.
>
> Best regards: Otared

Thank you for the kind words, Otared,

Regarding the colons (and other symbols with "dots"), I would say it
is still not optimal in Lucida (and difficult to make it "consistent",
there are too many symbols that are at the moment different). But in
your example you can use \colonequals and \colon if you prefer. They
are centered around the math axis.

Best, Mikael

\setupbodyfont[lucidaot,12pt]
\starttext
\startformula
f(x) := -(u|x) \colonequals - \langle u, x \rangle
\stopformula
\startformula
f : A \longrightarrow B \breakhere
f \colon A \longrightarrow B
\stopformula
\startformula
\mathaxisbelow := \colonequals : \colon
\stopformula
\stoptext
___
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] Lucida-1.901 (2023-01-21) available

2023-01-25 Thread Otared Kavian via ntg-context
Hi,

Thanks Hraban for the information and the link to the article by Hans and 
Mikael about the math fonts in Lucida.

I very much appreciated that article: one sees how the handling of almost 
impercebtile details in ConTeXt make us to adhere to and love LuaMetaTeX… So a 
great thank you to Hans and Mikael for all this work!

Regarding the details of vertical alignment in math, I wonder whether the 
column « : » in front of the equal sign « = », in the combination « := » (used 
to define for instance a new variable) should be alos centered around the math 
axis, as explained in the article. For instance in the following example

\setupbodyfont[lucidaot,12pt]
\starttext
\startformula
f(x) := -(u|x) := - \langle u, x \rangle
\stopformula
\stopformula
\startformula
f : A \longrightarrow B
\stopformula
\stoptext

it seems to me that the lower dot (or square…) in the semicolumn of the first 
formula (in front of the equal sign) is lower than in the second formula.

Best regards: Otared

> On 23 Jan 2023, at 09:39, Henning Hraban Ramm via ntg-context 
>  wrote:
> 
> https://tug.org/pipermail/lucida/2023-January/000921.html
> 
> A new version (1.901) of the Lucida OpenType fonts from TUG is
> available.  As with previous updates, there's no additional charge if
> you've already purchased licenses; you can use the same download
> information sent to you at the time of purchase to get the new fonts.
> (If you've lost the download info, you can email us at
> lucida-admin at tug.org.)
> 
> I will append the changes for this release. The same information is also
> online at https://tug.org/store/lucida/NEWS.txt.
> 
> To summarize, the most significant changes have been to the math fonts,
> especially the regular-weight LucidaBrightMathOT. Many of these changes
> were discussed in greater detail in the recent article about Lucida math
> by Hans Hagen and Mikael Sundqvist:
>  https://tug.org/TUGboat/tb43-3/tb135hagen-lucida.pdf
> 
> The four Lucida Sans fonts and the three specialized fonts (Blackletter,
> Calligraphy, Handwriting) are not changed at all from the last release
> (not even version numbers or dates). All other fonts were changed.
> 
> On behalf of TUG, I thank Hans, Mikael, and Michael Sharpe, who among
> them did essentially all of the technical font editing for this
> release. And we must thank Chuck Bigelow and Kris Holmes (they approved
> this release, as always), without whom nothing could be done.
> 
> Bug reports and character/feature requests are welcome (email to this
> list is best), though, as usual, we cannot promise any particular
> timeline for the next release.
> 
> Happy typesetting,
> Karl [Berry]
> ___
> 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
> ___

Otared Kavian
e-mail: ota...@gmail.com
Phone: +33 6 88 26 70 95




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

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


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

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

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

I have some combinations used throughout my document like this:

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

\stoptext

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


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


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


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


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


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


Wolfgang

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

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


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

2022-11-25 Thread Joel via ntg-context
I have some combinations used throughout my document like this:
\starttext
   \startcombination[4*2]            {%
                \framed[width=.25\textwidth, height=.25\textwidth]{}%
            }{%
                \strut word \\ \thinrule\hairline\hairline%
            }%
        \stopcombination    \input knuth

\stoptext
This makes a box, then displays a word underneath, and then some blank lines.
The problem I'm having is many times the caption text is covering up whatever 
appears after. In this minimal example, I tried showing the problem, but 
somehow this is rendering find, not covering the \input knuth text.
Also, if I add more more items to the combination, the second row appears above 
the first row!

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

Any ideas what might be causing the caption text to overlap and cover whatever 
appears after it?
--Joel
___
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 set the vertical spacing between a sequence of images?

2022-10-25 Thread Henning Hraban Ramm via ntg-context

Am 25.10.22 um 02:32 schrieb Joel via ntg-context:
I have code like this which randomly pulls a page from `comic2.pdf` and 
displays it, scaled to fit \textwidth, then displays four more random 
pages afterwares.


\starttext
     \dorecurse{5}{
             \placefigure[force, 
none]{}{\framed[frame=off]{\externalfigure[comic2.pdf][page=\randomnumber{1}{34}, width=\textwidth]}}

         }
\stoptext

The problem is I need to adjust the vertical space between the images. 
It seems to be set to some lineheight or such, but I need the distance 
between each image to be at 1/50th or 0.02 of \textwidth. ...though the 
last image can have the ordinary gap afterwards.


How can I se the vertical spacing between this sequence of image to 
0.02\textwidth?


Do you need floats at all? Otherwise a combination might fit your needs, 
and there you can setup the distances.


https://wiki.contextgarden.net/Combinations

Hraban

___
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] Spacing in \unit - degrees

2022-10-12 Thread Gavin via ntg-context
Hi Alan

> On Oct 12, 2022, at 5:55 PM, Alan Braslau via ntg-context 
>  wrote:
> 
> \unit{135℃} adds a space after the digits 135.
> I do not believe that this is correct
> (for ℃ is *not* a "real" unit, unlike \unit{408.15 K} which *is* a real
> unit).

According to “Scientific Style and Format: The CSE Manual for Authors, Editors, 
and Publishers, 8th Ed.” by the Council of Science Editors:

> The symbol for degrees Celsius, ℃ (not simply C), is separated from the 
> number on its left by one space, whereas the degree symbol for a plane angle 
> (e.g. a 45° angle) and for longitude and latitude (e.g. 45°30’N) is not 
> separated from the numeral by a space. [§12.2.1.1 SI Rules, pp.169-170]

As a recovering string theorist, I cannot help but speculate that this rule 
extends to spherical coordinates in any number of dimensions. However, if you 
don’t want the space, you can use 135\unit{℃}, which does not add a space.

> Also,
> \unit{135°C} drops the "C". Is this a parsing bug?

It is not a parsing bug; it is a limitation. In general, units must be spelled 
out (newton, joule, etc.) which produces the correct SI symbol (N, J, etc.). 
Some units are also recognized by their symbols (m, s, kg,…). Celsius is 
recognized by the single character “℃” and by the name “celsius”, but not by 
the two character combination “°C”. Probably, the parser could be expanded to 
recognize the two character combination. That requires mucking around in 
phys-dim.lua, which I’m not going to touch.

Use \unit{135 celsius} if you want the space, and 135\unit{celsius} if you 
don’t. Or you can add your favorite abbreviations:

\registerunit[
  °C=°C,
  ]
\setupunittext[
  °C=℃,
  ]

Then use \unit{135°C} if you want the space and 135\unit{°C} if you don’t.

> Related,
> \unit{90°} does not seem to introduce a space, as indeed it should not.

Also related, using \unit for just the units, and not the number, is useful 
when they follow something that is not a number, like a vector: $ \vec v = 
(4.0, -3.2, 1.5)\unit{m/s} $. You frequently do not want a space in that 
situation.

Now that I’ve had this success messing with other people’s code, I’ve got your 
luagraph module on my mind.

Gavin
___
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] \setuparranging values for perfect bound A5 on A3?

2022-10-09 Thread Bruce Horrocks via ntg-context


> On 9 Oct 2022, at 02:58, Max Chernoff  wrote:
> 
> 
> Hi Bruce,
> 
>> I have a book to be perfect bound[1] and I'm trying to work out what
>> imposition to use.
>> 
>> The printer would like 4 A5 pages laid out on A3 e.g.
>> 
>> +---+---+
>> |   |   |
>> | a | b |
>> |   |   |
>> +---+---+
>> |   |   |
>> | c | d |
>> |   |   |
>> +---+---+
>> 
>> so that he can cut the paper and simply stack a, b, c, & d on top of
>> each other and then put them in the binding machine[2].
>> 
>> If the book is 40 pages long, say, then stack 'a' has page 1 on the
>> top, page 2 on the reverse, then the next sheet has page 3 and 4, and
>> so on down to the last sheet which has page 9 on the front and page 10
>> on the back. Stack 'b' would have page 11 on the front, 12 on the back
>> and so on, so that each stack has a quarter of the book.
>> 
>> Is this something LMTX can do and if so what combination of
>> \setuplayout and \setuppaper do I need to use? If they can be printed
>> in reverse order then great but I assume the printer can do that
>> fairly easily.
> 
> I don't think that there's any way to do this from within a document
> run, so I think that you'll need to use an external program.
> 
>> If not, is there a recommended external program that can do it?
> 
> But, you can use ConTeXt as the external program here. 
> 
> Save as "imposition.cld":
> 
>   local filename = document.getargument("filename")
>   local pdf = lpdf.epdf.image.open(filename)
>   local pages = pdf.nofpages
>   local max = math.ceil(pages / 4)
> 
>   context.setuppapersize({ "A5" }, { "A3" })
>   context.setuppaper { nx = 2, ny = 2 }
>   context.setuparranging { "XY" }
> 
>   local function insert_page(n)
>   context.startpagemakeup()
>   context.filterpages({ filename }, { n })
>   context.stoppagemakeup()
>   end
> 
>   context.starttext()
>   for i = 1, max do
>   if i % 2 == 1 then
>   insert_page(i + 0 * max)
>   insert_page(i + 1 * max)
>   insert_page(i + 2 * max)
>   insert_page(i + 3 * max)
>   else
>   insert_page(i + 1 * max)
>   insert_page(i + 0 * max)
>   insert_page(i + 3 * max)
>   insert_page(i + 2 * max)
>   end
>   end
>   context.stoptext()
> 
> Then run:
> 
>   context imposition.cld --filename=document.pdf
> 
> where "document.pdf" is replaced by your document name.
> 
> I'm not sure if I got your desired output quite right here, but
> hopefully you can easily modify the script if something isn't quite
> right.

Thank-you Max - that is exactly what I wanted and your code worked first time. 
:)

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


Re: [NTG-context] \setuparranging values for perfect bound A5 on A3?

2022-10-09 Thread Henning Hraban Ramm via ntg-context

Am 09.10.22 um 02:29 schrieb Bruce Horrocks via ntg-context:

I have a book to be perfect bound[1] and I'm trying to work out what imposition 
to use.

The printer would like 4 A5 pages laid out on A3 e.g.

+---+---+
|   |   |
| a | b |
|   |   |
+---+---+
|   |   |
| c | d |
|   |   |
+---+---+

so that he can cut the paper and simply stack a, b, c, & d on top of each other 
and then put them in the binding machine[2].

If the book is 40 pages long, say, then stack 'a' has page 1 on the top, page 2 
on the reverse, then the next sheet has page 3 and 4, and so on down to the 
last sheet which has page 9 on the front and page 10 on the back. Stack 'b' 
would have page 11 on the front, 12 on the back and so on, so that each stack 
has a quarter of the book.

Is this something LMTX can do and if so what combination of \setuplayout and 
\setuppaper do I need to use? If they can be printed in reverse order then 
great but I assume the printer can do that fairly easily. If not, is there a 
recommended external program that can do it?

I've tried \setuplayout[4*2] and XY with 2x2 but neither output is what I need.


You meant \setuparranging, didn’t you?

https://wiki.contextgarden.net/Imposition
has an example on how to create your own scheme.

Good luck!
Hraban


___
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] \setuparranging values for perfect bound A5 on A3?

2022-10-08 Thread Max Chernoff via ntg-context

Hi Bruce,

> I have a book to be perfect bound[1] and I'm trying to work out what
> imposition to use.
> 
> The printer would like 4 A5 pages laid out on A3 e.g.
> 
> +---+---+
> |   |   |
> | a | b |
> |   |   |
> +---+---+
> |   |   |
> | c | d |
> |   |   |
> +---+---+
> 
> so that he can cut the paper and simply stack a, b, c, & d on top of
> each other and then put them in the binding machine[2].
> 
> If the book is 40 pages long, say, then stack 'a' has page 1 on the
> top, page 2 on the reverse, then the next sheet has page 3 and 4, and
> so on down to the last sheet which has page 9 on the front and page 10
> on the back. Stack 'b' would have page 11 on the front, 12 on the back
> and so on, so that each stack has a quarter of the book.
> 
> Is this something LMTX can do and if so what combination of
> \setuplayout and \setuppaper do I need to use? If they can be printed
> in reverse order then great but I assume the printer can do that
> fairly easily.

I don't think that there's any way to do this from within a document
run, so I think that you'll need to use an external program.

> If not, is there a recommended external program that can do it?

But, you can use ConTeXt as the external program here. 

Save as "imposition.cld":

   local filename = document.getargument("filename")
   local pdf = lpdf.epdf.image.open(filename)
   local pages = pdf.nofpages
   local max = math.ceil(pages / 4)
   
   context.setuppapersize({ "A5" }, { "A3" })
   context.setuppaper { nx = 2, ny = 2 }
   context.setuparranging { "XY" }
   
   local function insert_page(n)
   context.startpagemakeup()
   context.filterpages({ filename }, { n })
   context.stoppagemakeup()
   end
   
   context.starttext()
   for i = 1, max do
   if i % 2 == 1 then
   insert_page(i + 0 * max)
   insert_page(i + 1 * max)
   insert_page(i + 2 * max)
   insert_page(i + 3 * max)
   else
   insert_page(i + 1 * max)
   insert_page(i + 0 * max)
   insert_page(i + 3 * max)
   insert_page(i + 2 * max)
   end
   end
   context.stoptext()
   
Then run:

   context imposition.cld --filename=document.pdf
   
where "document.pdf" is replaced by your document name.

I'm not sure if I got your desired output quite right here, but
hopefully you can easily modify the script if something isn't quite
right.

Thanks,
-- Max
___
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] \setuparranging values for perfect bound A5 on A3?

2022-10-08 Thread Bruce Horrocks via ntg-context
I have a book to be perfect bound[1] and I'm trying to work out what imposition 
to use.

The printer would like 4 A5 pages laid out on A3 e.g.

+---+---+
|   |   |
| a | b |
|   |   |
+---+---+
|   |   |
| c | d |
|   |   |
+---+---+

so that he can cut the paper and simply stack a, b, c, & d on top of each other 
and then put them in the binding machine[2].

If the book is 40 pages long, say, then stack 'a' has page 1 on the top, page 2 
on the reverse, then the next sheet has page 3 and 4, and so on down to the 
last sheet which has page 9 on the front and page 10 on the back. Stack 'b' 
would have page 11 on the front, 12 on the back and so on, so that each stack 
has a quarter of the book.

Is this something LMTX can do and if so what combination of \setuplayout and 
\setuppaper do I need to use? If they can be printed in reverse order then 
great but I assume the printer can do that fairly easily. If not, is there a 
recommended external program that can do it?

I've tried \setuplayout[4*2] and XY with 2x2 but neither output is what I need.

Thanks in advance.

[1] glued spine (if that term isn't used outside the UK)
[2] I'm sure it's actually harder than that. :-)

—
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] lmtx status

2022-09-27 Thread Hans Hagen via ntg-context

Hi,

At the ctx meeting we released luametatex, that is, the source code is 
now in the context zip (so it grew a few MB). At the same time Mojca set 
up some contextgarden repositories on github. We're working on a setup 
for users to generate older snapshots, if needed (for instance because 
there are platform changes). She's also working on cmake based 
installation helpers.


One of the things we did was pruning the fonts that are part of the 
installation. With a few exceptions the type one fonts were dropped, 
which is most noticeable for math. There is no need for px and tx fonts, 
they served their puspose in the transition from old style t1 fonts to 
opentype math (when we started with mkiv; we could have dropped them 
already).


We're looking into antykwa math as well as in alternative script and 
calligraphic math alphabets so eventually virtual math from t1 
construction can be dropped completely (in principle if can be 
integrated in the tweak mechanisms) because it is not wirth the effort 
to make them better. That means that we will ship some additional 
companion fonts.


There are math times fonts but they are currently not free and there is 
some effort going on to turn them opentype so we can ditch their setups 
too (we can't test anyway; to some extend that is also true for minion 
math).


High on the agenda is euler (in combination with pagella). This also 
relates to upgraded mixed script and calligraphic support in math. It 
actually means that enabling alternative alphabets will happen a bit 
differently (more naturally integrated as we introduced dedicated ranges 
of slots). Again a side effect is that we have more granular math glyph 
properties (opentype math is too limited but basically frozen so we have 
to get over that and move on). We (Mikael and me) also try to compensate 
for the ommissions and weird things in unicode math but it will take 
some time before we have that all documented.


One of the next uploads will have the pruned / upgraded texmf tree (one 
can always install more in the local tree of course). At some point 
installing from the garden (or from a git clone) will also be supported 
(basically anyone can host a lmtx install).


For the next texlive we hope to switch to lmtx as default and that also 
means that luametatex is the runner then. One can (as currently in lmtx) 
always run luatex with "--luatex".


Als-in-all it's a lot of work but we're getting there.

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Write a long chapter title in two lines

2022-08-18 Thread Jeong Dal via ntg-context
Dear all,

A few days ago, I sent an email as follows. But it is linked to another subject 
because I choose reply of another subject.
So, I send the same mail again.

Thank you for reading.

Best regards,
Dalyoung

**
I’d like to write a long chapter title in two lines if it is longer than the 
textwidth.
It is OK when I use just bigger fonts.

But it writes the long title in one line if I use outlined font for title as in 
MWE.

Is there a way to write it in two lines using the outlined font?

Thanks,

Best regards,

Dalyoung

\startuseMPgraphic{outlineT}
  draw outlinetext.b (\MPvar{tt})
  (withcolor .75white)
  (withcolor .725blue withpen pencircle scaled .75pt);%\MPvar{thick});
\stopuseMPgraphic
\definefont[BigFontOne][NotoSansCJKkr-Bold sa 4]
\define[1]\outlineTitle{\useMPgraphic{outlineT}{tt="#1"}}

\setuphead[chapter]
[textcommand=\outlineTitle,
 style=\BigFontOne,
 numbercommand=\outlineTitle,
% align = middle,
 number=yes]

\setupexternalfigures[location={default,local,global}]
%\definefont[fancy][Zapfino at 24pt]

\starttext
\startchapter[title={Very Long Long Long Title}]
\startcombination[3*1]
 {\externalfigure[cow]   [combination]}{cow}
 {\externalfigure[mill]  [combination]}{mill}
 {\externalfigure[hacker][combination]}{hacker}
\stopcombination
\stopchapter
\stoptext___
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] Write a long chapter title in two lines

2022-08-15 Thread Jeong Dal via ntg-context
Dear all,

I’d like to write a long chapter title in two lines if it is longer than the 
textwidth.
It is OK when I use just bigger fonts.

But it writes the long title in one line if I use outlined font for title as in 
MWE.

Is there a way to write it in two lines using the outlined font?

Thanks,

Best regards,

Dalyoung

\startuseMPgraphic{outlineT}
  draw outlinetext.b (\MPvar{tt})
  (withcolor .75white)
  (withcolor .725blue withpen pencircle scaled .75pt);%\MPvar{thick});
\stopuseMPgraphic
\definefont[BigFontOne][NotoSansCJKkr-Bold sa 4]
\define[1]\outlineTitle{\useMPgraphic{outlineT}{tt="#1"}}

\setuphead[chapter]
[textcommand=\outlineTitle,
 style=\BigFontOne,
 numbercommand=\outlineTitle,
% align = middle,
 number=yes]

\setupexternalfigures[location={default,local,global}]
%\definefont[fancy][Zapfino at 24pt]

\starttext
\startchapter[title={Very Long Long Long Title}]
\startcombination[3*1]
 {\externalfigure[cow]   [combination]}{cow}
 {\externalfigure[mill]  [combination]}{mill}
 {\externalfigure[hacker][combination]}{hacker}
\stopcombination
\stopchapter
\stoptext


> On Aug 15, 2022, at 7:42 PM, Pablo Rodriguez via ntg-context 
>  wrote:
> 
> Dear list,
> 
> adapting a the sample from mkxl/page-str.mkxl (and code from the list),
> I came with the following sample:
> 
>  \setuppapersize[A6]
>  \showgrid
>  %\setuplayout[grid=yes]
>  \starttext
>  \input tufte
>  \startoutputstream[es]
>   \dorecurse{25}
>{\startlanguage[es]\input cervantes-es\stoplanguage%
>  \par\pushoutputstream}
>  \enableoutputstream[en]
>   \dorecurse{25}
>{\input zapf\par\pushoutputstream}
>  \disableoutputstream
>  \stopoutputstream
>  \synchronizestreams[es,en]
>  \page \flushoutputstream[es]
>  \page \flushoutputstream[en]
>  \stoptext
> 
> To reorder pages, I rename the output to "wg.pdf" and run the following
> code:
> 
>  \setuppapersize[A6]
>  \setuplayout[page]
>  \starttext
>  \dorecurse{26}
>  {\ifnum\recurselevel = 1
>\externalfigure[wg.pdf][page=\recurselevel]\else
>\externalfigure[wg.pdf][page=\recurselevel]
>\externalfigure[wg.pdf][page={\the\numexpr \recurselevel + 25}]\fi}
>  \stoptext
> 
> I’m afraid that the paragraph mistmatch is clear (the number of pages is
> way different for each versions).
> 
> Using the grid, the mismatch is not so evident (but there is still a
> different number of pages for each version).
> 
> Page reordering would be in this case:
> 
>  \setuppapersize[A6]
>  \setuplayout[page]
>  \starttext
>  \dorecurse{20}
>  {\ifnum\recurselevel = 1
>\externalfigure[wg.pdf][page=\recurselevel]\else
>\externalfigure[wg.pdf][page=\recurselevel]
>\externalfigure[wg.pdf][page={\the\numexpr \recurselevel + 19}]\fi}
>  \stoptext
> 
> I would need that for a bilingual edition. I don’t mind reodering the
> pages (if there is no other option).
> 
> But what am I doing wrong not to get synced text streams for facing pages?
> 
> 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
___


[NTG-context] TIL: figure combinations

2022-08-11 Thread Henning Hraban Ramm via ntg-context

You probably know about combinations to place images side by side:

\startcombination[3*1]
  {\externalfigure[cow]}{cow}
  {\externalfigure[mill]}{mill}
  {\externalfigure[hacker]}{hacker}
\stopcombination

Now, the widths aren’t calculated automatically.
You could define them on your own:

\startcombination[3*1]
  {\externalfigure[cow]   [width=.3\textwidth]}{cow}
  {\externalfigure[mill]  [width=.3\textwidth]}{mill}
  {\externalfigure[hacker][width=.3\textwidth]}{hacker}
\stopcombination

But that’s ugly and tedious. Hans did it for you:

\definemeasure[combination][
  (\textwidth
  -\effectiveleftskip
  -\effectiverightskip

-\numexpr\combinationparameter\nx-\plusone\relax\dimexpr\combinationparameter\distance\relax
  )/\combinationparameter]

So you can say:

\startcombination[3*1]
  {\externalfigure[cow]   [width=\measure{combination}]}{cow}
  {\externalfigure[mill]  [width=\measure{combination}]}{mill}
  {\externalfigure[hacker][width=\measure{combination}]}{hacker}
\stopcombination

But that’s still tedious.

With the power of \defineexternalfigure:

\defineexternalfigure[combination][width=\measure{combination}]
(That’s predefined, no need to copy!)

\startcombination[3*1]
  {\externalfigure[cow]   [combination]}{cow}
  {\externalfigure[mill]  [combination]}{mill}
  {\externalfigure[hacker][combination]}{hacker}
\stopcombination

Beautiful. ;)


Have fun,
Hraban
___
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] Unwanted blank page before page figures when using non-placed (hidden) heads

2022-07-29 Thread cryo shock via ntg-context
Of course it works, it's the order.
For me TeX wouldn't be the same without you. Thank you very much Hans.

Hans Hagen via ntg-context  schrieb am Mo., 25. Juli
2022, 09:20:

> On 7/24/2022 11:35 PM, cryo shock via ntg-context wrote:
> > Hey there,
> >
> > I am having trouble understanding some basic blank page behavior. I hope
> > that somebody of you can point me in the right direction.
> >
> > My primary goal is to create application documents consisting of various
> > .tex components and with external PDF pages inserted as well. The second
> > part of that goal is to use multiple-level bookmarking as well.
> > Bookmarking should look like this:
> >
> > - Letter
> > - Resume
> > - Testimonies
> > -- Testimony A
> > -- Testimony B
> > -- Testimony C
> >
> > In the following MWE you can see my progress along with some notes to
> > help understanding.
> >
> > There are two questions, I'd wish could be answered:
> >
> > 1. Why does TeX insert a blank page before a pagefigure I enclose within
> > a (hidden) head?
> >
> > 2. Can the \bookmark[list]{text} command be somehow used for multi-level
> > bookmarking?
> >
> > While the first question would make up for a more consistent solution,
> > the second question would do the job as well.
> >
> > I hope some of you can enlighten me.
> >
> > Cheers, k
> >
> >
> > %%% START of MWE
> >
> > \definehead[VisiSection][section]
> > \setuphead[VisiSection][number=no]
> >
> > \definehead[InvisiSection][VisiSection]
> > \setuphead[InvisiSection][placehead=no]
> >
> > \definelist[CustomBMarks]
> >
> > \setupinteraction[state=start]
> > \placebookmarks[VisiSection,InvisiSection,CustomBMarks]
> >
> > \startcomponent * % not a product, no
> >\startVisiSection[title={Custom Section A}]
> >  Text of Custom Section A
> >\stopVisiSection
> >\page
> >\startVisiSection[title={Custom Section B}]
> >  Text of Custom Section B
> >\stopVisiSection
> >\startInvisiSection[title={Hidden Custom Section A}]
> >  Text of Hidden Custom Section A
> >\stopInvisiSection
> >\page
> >\startInvisiSection[title={Hidden Custom Section B}]
> >  Text of Hidden Custom Section B
> >\stopInvisiSection
> >\page
> >TEST\bookmark[CustomBMarks]{Start of Teststack} \dorecurse{800}{TEST
> > }NEEDLE\bookmark[CustomBMarks]{Needle in the Teststack}
> > \dorecurse{400}{TEST }TEST.\bookmark[CustomBMarks]{End of Teststack}
> >%%%
> >%%% So far no problems.
> >%%% The following combination does the job, but I see no possibility
> >%%% to arrange the "CustomBMarks"-list in multi-levels.
> >%%%
> >\page
> >\startstandardmakeup
> >  \filterpages[{test.pdf}][1]\bookmark[CustomBMarks]{Pagefigure}
> >\stopstandardmakeup
> >%%%
> >%%% So the following method would be the best choice to work with
> >%%% multi-level bookmarks. But as soon as I start working with
> >%%% (custom) heads together with pagefigures, CTX places a blank
> >%%% page before every figure...
> >%%% Note: you don't need a dummy file. The last (unnumbered) page is
> >%%% the wanted external PDF. The numbered page before is the unwanted
> > one.
> >%%%
> >\startInvisiSection[title={External Testpage A}]
> >  \startstandardmakeup
> >\filterpages[{test.pdf}][1]
> >  \stopstandardmakeup
> >\stopInvisiSection
> > \stopcomponent
> because even a hidden head is something (anchor on page), you can try this:
>
>  \startstandardmakeup
>\startInvisiSection[title={External Testpage A}]
>\filterpages[{test.pdf}][1]
>\stopInvisiSection
>  \stopstandardmakeup
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Unwanted blank page before page figures when using non-placed (hidden) heads

2022-07-25 Thread Hans Hagen via ntg-context

On 7/24/2022 11:35 PM, cryo shock via ntg-context wrote:

Hey there,

I am having trouble understanding some basic blank page behavior. I hope 
that somebody of you can point me in the right direction.


My primary goal is to create application documents consisting of various 
.tex components and with external PDF pages inserted as well. The second 
part of that goal is to use multiple-level bookmarking as well. 
Bookmarking should look like this:


- Letter
- Resume
- Testimonies
-- Testimony A
-- Testimony B
-- Testimony C

In the following MWE you can see my progress along with some notes to 
help understanding.


There are two questions, I'd wish could be answered:

1. Why does TeX insert a blank page before a pagefigure I enclose within 
a (hidden) head?


2. Can the \bookmark[list]{text} command be somehow used for multi-level 
bookmarking?


While the first question would make up for a more consistent solution, 
the second question would do the job as well.


I hope some of you can enlighten me.

Cheers, k


%%% START of MWE

\definehead[VisiSection][section]
\setuphead[VisiSection][number=no]

\definehead[InvisiSection][VisiSection]
\setuphead[InvisiSection][placehead=no]

\definelist[CustomBMarks]

\setupinteraction[state=start]
\placebookmarks[VisiSection,InvisiSection,CustomBMarks]

\startcomponent * % not a product, no
   \startVisiSection[title={Custom Section A}]
     Text of Custom Section A
   \stopVisiSection
   \page
   \startVisiSection[title={Custom Section B}]
     Text of Custom Section B
   \stopVisiSection
   \startInvisiSection[title={Hidden Custom Section A}]
     Text of Hidden Custom Section A
   \stopInvisiSection
   \page
   \startInvisiSection[title={Hidden Custom Section B}]
     Text of Hidden Custom Section B
   \stopInvisiSection
   \page
   TEST\bookmark[CustomBMarks]{Start of Teststack} \dorecurse{800}{TEST 
}NEEDLE\bookmark[CustomBMarks]{Needle in the Teststack} 
\dorecurse{400}{TEST }TEST.\bookmark[CustomBMarks]{End of Teststack}

   %%%
   %%% So far no problems.
   %%% The following combination does the job, but I see no possibility
   %%% to arrange the "CustomBMarks"-list in multi-levels.
   %%%
   \page
   \startstandardmakeup
     \filterpages[{test.pdf}][1]\bookmark[CustomBMarks]{Pagefigure}
   \stopstandardmakeup
   %%%
   %%% So the following method would be the best choice to work with
   %%% multi-level bookmarks. But as soon as I start working with
   %%% (custom) heads together with pagefigures, CTX places a blank
   %%% page before every figure...
   %%% Note: you don't need a dummy file. The last (unnumbered) page is
   %%% the wanted external PDF. The numbered page before is the unwanted 
one.

   %%%
   \startInvisiSection[title={External Testpage A}]
     \startstandardmakeup
       \filterpages[{test.pdf}][1]
     \stopstandardmakeup
   \stopInvisiSection
\stopcomponent

because even a hidden head is something (anchor on page), you can try this:

\startstandardmakeup
  \startInvisiSection[title={External Testpage A}]
  \filterpages[{test.pdf}][1]
  \stopInvisiSection
\stopstandardmakeup

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Unwanted blank page before page figures when using non-placed (hidden) heads

2022-07-24 Thread cryo shock via ntg-context
Hey there,

I am having trouble understanding some basic blank page behavior. I hope
that somebody of you can point me in the right direction.

My primary goal is to create application documents consisting of various
.tex components and with external PDF pages inserted as well. The second
part of that goal is to use multiple-level bookmarking as well. Bookmarking
should look like this:

- Letter
- Resume
- Testimonies
-- Testimony A
-- Testimony B
-- Testimony C

In the following MWE you can see my progress along with some notes to help
understanding.

There are two questions, I'd wish could be answered:

1. Why does TeX insert a blank page before a pagefigure I enclose within a
(hidden) head?

2. Can the \bookmark[list]{text} command be somehow used for multi-level
bookmarking?

While the first question would make up for a more consistent solution, the
second question would do the job as well.

I hope some of you can enlighten me.

Cheers, k


%%% START of MWE

\definehead[VisiSection][section]
\setuphead[VisiSection][number=no]

\definehead[InvisiSection][VisiSection]
\setuphead[InvisiSection][placehead=no]

\definelist[CustomBMarks]

\setupinteraction[state=start]
\placebookmarks[VisiSection,InvisiSection,CustomBMarks]

\startcomponent * % not a product, no
  \startVisiSection[title={Custom Section A}]
Text of Custom Section A
  \stopVisiSection
  \page
  \startVisiSection[title={Custom Section B}]
Text of Custom Section B
  \stopVisiSection
  \startInvisiSection[title={Hidden Custom Section A}]
Text of Hidden Custom Section A
  \stopInvisiSection
  \page
  \startInvisiSection[title={Hidden Custom Section B}]
Text of Hidden Custom Section B
  \stopInvisiSection
  \page
  TEST\bookmark[CustomBMarks]{Start of Teststack} \dorecurse{800}{TEST
}NEEDLE\bookmark[CustomBMarks]{Needle in the Teststack}
\dorecurse{400}{TEST }TEST.\bookmark[CustomBMarks]{End of Teststack}
  %%%
  %%% So far no problems.
  %%% The following combination does the job, but I see no possibility
  %%% to arrange the "CustomBMarks"-list in multi-levels.
  %%%
  \page
  \startstandardmakeup
\filterpages[{test.pdf}][1]\bookmark[CustomBMarks]{Pagefigure}
  \stopstandardmakeup
  %%%
  %%% So the following method would be the best choice to work with
  %%% multi-level bookmarks. But as soon as I start working with
  %%% (custom) heads together with pagefigures, CTX places a blank
  %%% page before every figure...
  %%% Note: you don't need a dummy file. The last (unnumbered) page is
  %%% the wanted external PDF. The numbered page before is the unwanted one.
  %%%
  \startInvisiSection[title={External Testpage A}]
\startstandardmakeup
  \filterpages[{test.pdf}][1]
\stopstandardmakeup
  \stopInvisiSection
\stopcomponent

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

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


Re: [NTG-context] dorecurse within combination

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

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

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

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


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

\starttext

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

\stoptext

Wolfgang

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

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


Re: [NTG-context] dorecurse within combination

2022-07-07 Thread Henning Hraban Ramm via ntg-context

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

How can I do this?


Sorry for the noise, I solved it with Lua. The cld manual even contains 
a combinations example.


Hraban

___
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] dorecurse within combination

2022-07-07 Thread Henning Hraban Ramm via ntg-context

Hi, I’d like to place pages from a multipage PDF in a combination:

\startcombination[3*1]
\dorecurse{3}{%
  {\externalfigure[multipage][width=\textwidth/3,page=\recurselevel]}{}
}
\stopcombination

That doesn’t work, because ConTeXt expects a { after \startcombination. 
(“A left brace was mandatory here, so I've put one in.”)

I guess I need some expansion, but \expanded doesn’t help.

How can I do this?

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

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


Re: [NTG-context] Xml - Lua - context

2022-03-28 Thread Adam Reviczky via ntg-context
Hi Thomas,

Not sure whether it helps or not, but in regards to combinations and Lua I
have had some challenges as well, but Hans' and Wolfgangs' solution with
externalfigures works fine for me now:

https://mailman.ntg.nl/pipermail/ntg-context/2021/103822.html
https://mailman.ntg.nl/pipermail/ntg-context/2021/103827.html

Adam

On Mon, Mar 28, 2022 at 2:42 PM Thomas A. Schmitz via ntg-context <
ntg-context@ntg.nl> wrote:

> And here comes question 2, a very basic one: on A4 landscape pages, I want
> to place two images next to each other (like the spread pages of a book).
> What would be the preferred way of the really competent users to do this,
> again keeping in mind that I want to loop over page numbers in a pdf file
> and thus am coding in Lua. So far, I have tried or thought about:
>
> 1. Embedded xtable
>
> This is what I’m using now, an xtable of two columns for every A4 page. It
> works, but I wonder if it’s a good method.
>
> 2. combinations
>
> This appeared to be the most natural approach (because it’s what
> combinations are for), but I ran into expansion problems, added a few
> “function () end” in my code, but couldn’t make it compile. Combinations,
> combined with framed and externalfigure, are difficult to write in Lua - or
> am I too stupid to find the winning combination (sorry for the puns).
>
> 3. columns
>
> Again, this would seen like a natural approach, having every A4 page set
> up as two columns, but maybe that’s overkill?
>
> I’d be curious to know what you think!
>
> All best
>
> Thomas
>
> ___
> 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] Xml - Lua - context

2022-03-28 Thread Thomas A. Schmitz via ntg-context
And here comes question 2, a very basic one: on A4 landscape pages, I want to 
place two images next to each other (like the spread pages of a book). What 
would be the preferred way of the really competent users to do this, again 
keeping in mind that I want to loop over page numbers in a pdf file and thus am 
coding in Lua. So far, I have tried or thought about:

1. Embedded xtable

This is what I’m using now, an xtable of two columns for every A4 page. It 
works, but I wonder if it’s a good method.

2. combinations

This appeared to be the most natural approach (because it’s what combinations 
are for), but I ran into expansion problems, added a few “function () end” in 
my code, but couldn’t make it compile. Combinations, combined with framed and 
externalfigure, are difficult to write in Lua - or am I too stupid to find the 
winning combination (sorry for the puns).

3. columns

Again, this would seen like a natural approach, having every A4 page set up as 
two columns, but maybe that’s overkill? 

I’d be curious to know what you think!

All best

Thomas
___
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] new upload

2022-03-14 Thread Mikael Sundqvist via ntg-context
Hi!

On Mon, Mar 14, 2022 at 9:01 AM Hans Hagen via ntg-context
 wrote:
>
> On 3/13/2022 7:58 PM, Rik Kabel via ntg-context wrote:
>
> > With regard to math fonts, I notice that the goodies file for Libertinus
> > expects version 6.8 of the font, but the current version (since February
> > 2021) is 7.040, and much work appears to have gone into the math font.
>
> the main issue with math font is in 'unfortunate' glyph dimensions and
> we doubt that these will change over time (as fonts are supposed to be
> stable); adding shapes is another matter
>
> > Two questions, then:
> >
> >  1. Is Libertinus Math considered a "useful" math font?
>
> Mikael knows .. I never used libertinus (and am an unlike candidate; i
> mostly use cambria, pagella, dejavu, lucida)

I think it could be useful, yes (I like the look of the libertinus
font, in particular in combination with the biolinum font; it is
probably worth trying to get the math font to work as well as
possible). I think there were some problems with accents and such, but
not too big. I think you could try to use it and see what you think.

>
> >  2. How does the goodies mechanism work when the expected version
> > differs from the found version?
>
> we check the version number in the font file (a bit of fuzzyness due to
> the way version numbers ar ento standardized); comparing internals would
> be an option but also a waste of time i think
>
> > (I understand that keeping up with evolving fonts is somewhere between
> > difficult and impossible.)
>
> which is why we want to freeze on versions ... an update to another
> version then becomes explicit; of course we can also consider having
> multiple instances of a font but then we also need to set up a repository
>
> > I also note that the typescript for libertinus is quite old and does not
> > reflect the semibold variants that have been available for some time. I
> > prefer them to the bold variants, and my own typescript for libertinus
> > does incorporate them. I am happy to share it if anyone wants it.
> We cannot suddenly change the 'default', but we can have additional
> choices in the file for semi versions (some more fonts have that).  You
> can send your typesctipt file to Mikael and me and we can have a look.
>
> (Not sure if I should update libertinus now. Sometimes fonts change too
> much, like for instance ebgaramond did, and one can get rather different
> output.)
>
> Hans

I put it on my todo-list to download the new version and to run some test files.

I could also mention here that in the upload Hans did some days ago,
most changes are "behind the scenes", so the user should not really
write their code differently. One exception:

In integrals, texers have usually a \, in front of the differential.
Now there is a differential class, and the macro \dd will give a
differential d, with (hopefully) correct spacing. Thus, write for
example \int_0^1 f(x)\dd x.

If you find any strange distances between atoms, please mail me
examples. With the introduction of new classes, there are many new
pairs, and perhaps not all of them are setup "correct".

/Mikael
___
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] Counter names

2022-01-20 Thread Hans Hagen via ntg-context

On 1/20/2022 2:24 PM, Joaquín Ataz López via ntg-context wrote:
Good morning to all. I would like to ask where I can find information 
about the name of the different counters that are handled in ConTeXt, in 
order to manipulate them manually.


I guess the number of internal ConTeXt counters will be tremendous. But 
I would like to know what the "most common" counters are called, for 
example the ones that control the different structural units (chapter, 
section...) or the elements of a structured list, etc.


I have tried to apply \incrementcounter or \decrementcounter to some 
counters that also exist in TeX as, for example, chapter, section... but 
I don't get any result.


most counters are 'protected' from messing them up and section related 
counters are kind of grouped anyway and have their own system


other counters, like those for floats are more directly accessible

\starttext

\chapter{test}

\setupheadnumber[chapter][+5]

\placefigure{}{}

\chapter{test}

\placefigure{}{}

\setcounter[figure][4]

\placefigure{}{}

\stoptext

chemical combination endnote figure footnote formula graphic
intermezzo itemgroup:itemize itemgroup:itemize:note linenote
paragraph realpage subpage table textnote:note userpage

otherw will be defined when you create instances

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Bug in alignment with LMTX version 2022.01.15 17:32

2022-01-18 Thread Otared Kavian via ntg-context
Hi Hans and Aditya,

Thanks for the clarification. Since for some documents I still use mkiv, I 
ended up using a definition which depends on whether one is using mkiv or lmtx, 
as in the example below. I wonder if there is a better solution.

Best regards: Otared
% begin bug-aligned-solved.tex
\doifmode{mkiv}{\definemathmatrix[alignedcases]
[align={right,left,left},
distance=3pt,
left={\left\{},
right={\right.},
style=\displaystyle]}

\doifmode{mkiv}{\definemathmatrix[matrix]
[align={right,left,left}]}

\doifmode{lmtx}{\definemathmatrix[alignedcases]
[align={1:right,2:left,3:left},
distance=3pt,
left={\left\{},
right={\right.},
style=\displaystyle]}

\doifmode{lmtx}{\definemathmatrix[matrix]
[align={1:right,2:left,3:left}]}

\starttext

\doifelsemode{lmtx}{We are using LMTX}{We are using mkiv}

\placeformula[eq:1]
\startformula
\startalignedcases
\NC  \partial_{t} u  \NC = \Delta u + \epsilon^{-2}f(u) \NC\qquad\text{in }\, 
\Omega\times (0,+\infty) \NR
\NC {\partial\phi(u) \over \partial{\bi n}} \NC = 0 \NC\qquad\text{on }\,  
\partial \Omega\times (0,+\infty)\NR
\NC u(x,0) \NC = u_{0}(x)\NC\qquad\text{in }\, \Omega.\NR
\stopalignedcases
\stopformula

\startformula
 \startmatrix
\NC ABC\NC ABC\NC ABC\NR
\NC AA \NC AA \NC AA \NR
  \stopmatrix
\stopformula
% end bug-aligned-solved.tex

> On 17 Jan 2022, at 23:53, Hans Hagen via ntg-context  
> wrote:
> 
> On 1/17/2022 11:35 PM, Aditya Mahajan via ntg-context wrote:
>> On Mon, 17 Jan 2022, Aditya Mahajan via ntg-context wrote:
>>> I confirm that this is a bug, which was not there in the version from mid 
>>> Dec.
>> Not a bug, but new interface. You need:
>> \definemathmatrix[matrix]
>>  [align={1:right,2:left,3:left}]
>> It is also possible to say: align={all:middle}. Combination of the two don't 
>> seem to work.
> basically we increment each element but a number sets the column so one can 
> go to a specific column; empty (whatever non number will start again at zero)
> 
> Hans
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 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] Bug in alignment with LMTX version 2022.01.15 17:32

2022-01-17 Thread Hans Hagen via ntg-context

On 1/17/2022 11:35 PM, Aditya Mahajan via ntg-context wrote:

On Mon, 17 Jan 2022, Aditya Mahajan via ntg-context wrote:


I confirm that this is a bug, which was not there in the version from mid Dec.


Not a bug, but new interface. You need:

\definemathmatrix[matrix]
  [align={1:right,2:left,3:left}]

It is also possible to say: align={all:middle}. Combination of the two don't 
seem to work.
basically we increment each element but a number sets the column so one 
can go to a specific column; empty (whatever non number will start again 
at zero)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Bug in alignment with LMTX version 2022.01.15 17:32

2022-01-17 Thread Aditya Mahajan via ntg-context
On Mon, 17 Jan 2022, Aditya Mahajan via ntg-context wrote:

> I confirm that this is a bug, which was not there in the version from mid 
> Dec. 

Not a bug, but new interface. You need:

\definemathmatrix[matrix]
 [align={1:right,2:left,3:left}]

It is also possible to say: align={all:middle}. Combination of the two don't 
seem to work.

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
___


Re: [NTG-context] Defining new float types fails in LMTX

2021-12-25 Thread Marco Patzer via ntg-context
On Tue, 30 Nov 2021 15:51:24 +0100
Marco Patzer via ntg-context  wrote:

> There's an issue with defining new floats in LMTX in combination
> with bottom placement.
> 
> The following works in MkIV, but throws an error in LMTX:

Short followup: This issue is still present in 2021.12.25 00:55.

Marco
___
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 setup path of ConTeXtLMTX for MacVim?

2021-12-14 Thread Jan-Erik Hägglöf via ntg-context
olerant\protected\def\usepgflibrary[#1]#;#2% somehow both variants are used
>> {\starttikzinput
>>  \normalusepgflibrary[#1#2]%
>>  \stoptikzinput}
>> 
>> \usepgfmodule[shapes]
>> \usepgfmodule[plot]
>> \usepgfmodule[matrix]
>> \usepgfmodule[decorations]
>> 
>> \stopmodule
>> -- next part --
>> %D \module
>> %D   [   file=m-circuitikz,
>> %Dversion=2021.12.03,
>> %D  title=\CONTEXT\ Extra Modules,
>> %D   subtitle=CURCUITIKZ support,
>> %D author=Hans Hagen,
>> %D   date=\currentdate,
>> %D  copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
>> %C
>> %C This module is part of the \CONTEXT\ macro||package and is
>> %C therefore copyrighted by \PRAGMA. See mreadme.pdf for
>> %C details.
>> 
>> %D A fixed variant of the t-curcuitikz module distributed with tikz. This one
>> %D is for \LMTX.
>> 
>> \usemodule[m][tikz]
>> 
>> \startmodule[circuitikz]
>> 
>> \def\pgfcircversion {1.4.4}
>> \def\pgfcircversiondate {2021/10/31}
>> 
>> \usetikzlibrary[calc]
>> \usetikzlibrary[arrows.meta]
>> \usetikzlibrary[bending]
>> \usetikzlibrary[fpu] % may be needed for use fpu reciprocal (v1.0.1)
>> 
>> \tikzinputfile{pgfcirc.defines.tex}
>> \tikzinputfile{pgfcircutils.tex}
>> \tikzinputfile{pgfcircpath.tex}
>> 
>> \tikzinputfile{pgfcircshapes.tex}
>> \tikzinputfile{pgfcircmonopoles.tex}
>> \tikzinputfile{pgfcircbipoles.tex}
>> \tikzinputfile{pgfcirctripoles.tex}
>> \tikzinputfile{pgfcircquadpoles.tex}
>> \tikzinputfile{pgfcircmultipoles.tex}
>> 
>> \tikzinputfile{pgfcirclabel.tex}
>> \tikzinputfile{pgfcircvoltage.tex}
>> \tikzinputfile{pgfcirccurrent.tex}
>> \tikzinputfile{pgfcircflow.tex}
>> 
>> % defaults
>> 
>> \setupmodule
>> [current=european,
>>  voltage=european,
>>  resistor=american,
>>  inductor=cute,
>>  logic=american,
>>  siunitx=true,
>>  arrowmos=false]
>> 
>> % can be done nicer ... todo
>> 
>> \processaction
>> [\currentmoduleparameter{voltage}]
>> [european=>\ctikzset{voltage=european},
>>  american=>\ctikzset{voltage=american}]
>> 
>> \processaction
>> [\currentmoduleparameter{current}]
>> [european=>\ctikzset{ current=european},
>>  american=>\ctikzset{ current=american}]
>> 
>> \processaction
>> [\currentmoduleparameter{label}]
>> [straight=>\ctikzset{label/align = straight},
>>  align=>\ctikzset{label/align = rotate},
>>  smart=>\ctikzset{label/align = smart}]
>> 
>> \processaction
>> [\currentmoduleparameter{resistor}]
>> [european=>\ctikzset{ resistor=european},
>>  american=>\ctikzset{ resistor=american}]
>> 
>> \processaction
>> [\currentmoduleparameter{inductor}]
>> [european=>\ctikzset{ inductor=european},
>>  american=>\ctikzset{ inductor=american},
>>  cute=>\ctikzset{ inductor=cute}]
>> 
>> \processaction
>> [\currentmoduleparameter{diode}]
>> [full=>\ctikzset{ diode=full},
>>  empty=>\ctikzset{ diode=empty}]
>> 
>> \processaction
>> [\currentmoduleparameter{logic}]
>> [european=>\ctikzset{ logic ports=european},
>>  american=>\ctikzset{ logic ports=american}]
>> 
>> % hm, we have units built in and in mkii one can load the units module
>> % ... always been so ...
>> 
>> \processaction
>> [\currentmoduleparameter{siunitx}]
>> [true=>\def\SI#1#2{#1\,#2}
>>\def\ampere{\rm{A}}
>>\def\volt  {\rm{V}}
>>\def\ohm   {\Omega}
>>\def\siemens   {\rm{S}}
>>\def\farad {\rm{F}}
>>\def\henry {\rm{H}}
>>\def\second{\rm{s}}
>>\def\coulomb   {\rm{C}}
>>\def\siemens   {\rm{S}}
>>\def\radians   {\rm{rad}}
>>\def\milli {\rm{m}}
>>\def\micro {\mu}
>>\def\nano  {\rm{n}}
>>\def\pico  {\rm{p}}
>>\def\kilo  {\rm{k}}
>>\def\mega  {\rm{M}}
>>\def\giga  {\rm{G}}
>>\def\tera  {\rm{T}}]
>> 
>> \unprotect
>> 
>> \processaction
>> [\currentmoduleparameter{arrowmos}]
>> [true=>\pgf@circuit@mos@arrowstrue,
>>  false=>\pgf@circuit@mos@arrowsfalse]
>> 
>> \protect
>> 
>> \ctikzset{tripoles/op amp/font/.initial=\switchtobodyfont[small]}
>> 
>> \aliase

Re: [NTG-context] how to setup path of ConTeXtLMTX for MacVim?

2021-12-14 Thread Jeong Dal via ntg-context
x SOLVED
> Message-ID: <119632cf-08d9-4a73-922c-9c59d7eb3...@scorecrow.com>
> Content-Type: text/plain; charset=utf-8
> 
> For those searching in future, the minimum needed to make synctex work with 
> ConTeXt and TeXShop on macOS Monterey is:
> 
> 1) Reasonably new LMTX. I have version 2021.12.10 11:41. (It might well work 
> going back a few versions but not too far.)
> 
> 2) TeXShop version 4.68
> 
> 3) TeXShop -> Preferences -> Engines -> Alternate path *must* be set to your 
> LMTX installation.
>   For me on an Intel Mac that is: 
> /Users/bruce/Applications/context-osx-64/tex/texmf-osx-64/bin
> 
> TeXShop uses this path to launch the program it needs to convert a synctex 
> location into a file name
> and line number. If this path is wrong then the editor just does nothing.
> 
> 4) These two lines at the top of each source file you want to sync to/from:
> 
> % !TEX useAlternatePath
> % !TEX useConTeXtSyncParser
> 
> 5) Either --synctex="1" on the command line in the .engine file or 
> \setupsynctex [state=start, method=max]
> somewhere in your source (which can be in the current file or in an 
> environment file).
> 
> 6) Most times you will need to quit and restart TeXShop when you change any 
> of the above.
> 
> 
> You *do not* need:
> 
> 1) You do not need the "ConTeXt2021.engine" file: you can use your own engine 
> file as long as it invokes your local LMTX. So, for me, the two key commands 
> in the .engine file are:
> 
> set path=(/Users/bruce/Applications/context-osx-64/tex/texmf-osx-64/bin $path 
> /Library/TeX/texbin /usr/texbin /usr/local/bin)
> mtxrun --script context --autogenerate "$1"
> 
> 2) You do not need the following magic line:
> 
> % !TEX TS-program = ConTeXt2021
> 
> If you do include it then it will override the engine you select from the 
> drop down.
> 
> 
> Hopefully this answer will help others with this problem:- at least until the 
> version of ConTeXt shipped with TexShop is new enough to support the new 
> synctex and then there won't be any need to configure anything.
> 
> 
>> On 13 Dec 2021, at 09:45, Bruce Horrocks via ntg-context 
>>  wrote:
>> 
>> I'm having trouble getting the new synctex to work on a Mac. I've completely 
>> re-installed MacTeX and TeXWorks and synctex works fine for LaTeX documents. 
>> But for ConTeXt no combination of magic lines etc will work for me. The 
>> symptoms are... nothing - no errors but no synching, either way.
>> 
>> Q1: is there a log file created somewhere or a debugging flag that can be 
>> turned on which will tell me what is happening when I try to jump from PDF 
>> to editor or vice versa?
>> 
>> Q2: Is this the same error as reported at the bottom of 
>> https://wiki.contextgarden.net/SyncTeX ? Or has that been fixed?
>> 
>> PS: \enabletrackers[system.synctex.visualize] works as expected - i.e. the 
>> .synctex file seems to be correct.
> 
> —
> Bruce Horrocks
> Hampshire, UK
> 
> 
> 
> --
> 
> Subject: Digest Footer
> 
> ___
> 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://tex.aanhet.net
> archive  : https://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___
> 
> 
> --
> 
> End of ntg-context Digest, Vol 210, Issue 34
> 

___
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] TeXWorks and synctex SOLVED

2021-12-13 Thread Bruce Horrocks via ntg-context
For those searching in future, the minimum needed to make synctex work with 
ConTeXt and TeXShop on macOS Monterey is:

1) Reasonably new LMTX. I have version 2021.12.10 11:41. (It might well work 
going back a few versions but not too far.)

2) TeXShop version 4.68

3) TeXShop -> Preferences -> Engines -> Alternate path *must* be set to your 
LMTX installation.
   For me on an Intel Mac that is: 
/Users/bruce/Applications/context-osx-64/tex/texmf-osx-64/bin

TeXShop uses this path to launch the program it needs to convert a synctex 
location into a file name
and line number. If this path is wrong then the editor just does nothing.

4) These two lines at the top of each source file you want to sync to/from:

% !TEX useAlternatePath
% !TEX useConTeXtSyncParser

5) Either --synctex="1" on the command line in the .engine file or 
\setupsynctex [state=start, method=max]
somewhere in your source (which can be in the current file or in an environment 
file).

6) Most times you will need to quit and restart TeXShop when you change any of 
the above.


You *do not* need:

1) You do not need the "ConTeXt2021.engine" file: you can use your own engine 
file as long as it invokes your local LMTX. So, for me, the two key commands in 
the .engine file are:

set path=(/Users/bruce/Applications/context-osx-64/tex/texmf-osx-64/bin $path 
/Library/TeX/texbin /usr/texbin /usr/local/bin)
mtxrun --script context --autogenerate "$1"

2) You do not need the following magic line:

% !TEX TS-program = ConTeXt2021

If you do include it then it will override the engine you select from the drop 
down.


Hopefully this answer will help others with this problem:- at least until the 
version of ConTeXt shipped with TexShop is new enough to support the new 
synctex and then there won't be any need to configure anything.


> On 13 Dec 2021, at 09:45, Bruce Horrocks via ntg-context  
> wrote:
> 
> I'm having trouble getting the new synctex to work on a Mac. I've completely 
> re-installed MacTeX and TeXWorks and synctex works fine for LaTeX documents. 
> But for ConTeXt no combination of magic lines etc will work for me. The 
> symptoms are... nothing - no errors but no synching, either way.
> 
> Q1: is there a log file created somewhere or a debugging flag that can be 
> turned on which will tell me what is happening when I try to jump from PDF to 
> editor or vice versa?
> 
> Q2: Is this the same error as reported at the bottom of 
> https://wiki.contextgarden.net/SyncTeX ? Or has that been fixed?
> 
> PS: \enabletrackers[system.synctex.visualize] works as expected - i.e. the 
> .synctex file seems to be correct.

—
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 / 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] TeXWorks and synctex

2021-12-13 Thread Bruce Horrocks via ntg-context
I'm having trouble getting the new synctex to work on a Mac. I've completely 
re-installed MacTeX and TeXWorks and synctex works fine for LaTeX documents. 
But for ConTeXt no combination of magic lines etc will work for me. The 
symptoms are... nothing - no errors but no synching, either way.

Q1: is there a log file created somewhere or a debugging flag that can be 
turned on which will tell me what is happening when I try to jump from PDF to 
editor or vice versa?

Q2: Is this the same error as reported at the bottom of 
https://wiki.contextgarden.net/SyncTeX ? Or has that been fixed?

PS: \enabletrackers[system.synctex.visualize] works as expected - i.e. the 
.synctex file seems to be correct.
—
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 / 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] Defining new float types fails in LMTX

2021-12-10 Thread Hans Hagen via ntg-context

On 12/10/2021 4:00 PM, Marco Patzer via ntg-context wrote:

On Tue, 30 Nov 2021 15:51:24 +0100
Marco Patzer via ntg-context  wrote:


There's an issue with defining new floats in LMTX in combination
with bottom placement.

The following works in MkIV, but throws an error in LMTX:


I don't know if the error changed or if I copied the wrong error
message in the OP, but a current LMTX throws:

   close source> level 1, order 2, name './t.tex'
   (\end occurred when parameter character
   luatex warning  > print: bad string offset
was incomplete)error (nodes): attempt to double-free glue node 2986, ignored

LMTX 2021.12.10 11:29

no example code

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 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] Defining new float types fails in LMTX

2021-12-10 Thread Marco Patzer via ntg-context
On Tue, 30 Nov 2021 15:51:24 +0100
Marco Patzer via ntg-context  wrote:

> There's an issue with defining new floats in LMTX in combination
> with bottom placement.
> 
> The following works in MkIV, but throws an error in LMTX:

I don't know if the error changed or if I copied the wrong error
message in the OP, but a current LMTX throws:

  close source> level 1, order 2, name './t.tex'
  (\end occurred when parameter character 
  luatex warning  > print: bad string offset
   was incomplete)error (nodes): attempt to double-free glue node 2986, ignored

LMTX 2021.12.10 11:29

Marco
___
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] double underbars

2021-11-30 Thread Hans Hagen via ntg-context

On 11/30/2021 2:52 PM, Taco Hoekwater via ntg-context wrote:




On 30 Nov 2021, at 14:38, Denis Maier via ntg-context  
wrote:

Thanks, Taco. Good to know. Although it's not what I wanted to hear, of 
course...

I was thinking using mp to draw the combination could be solution, but 
unfortunately I don't know metafun yet.

If my understanding of https://source.contextgarden.net/node-rul.mkiv is 
correct, it should be possible to build upon the defintion of rules:under:dots 
(l. 327) Any hints how I could get this started?


Yes, that is the right part to get started with. You could just copy the whole 
\startuseMPgraphic and rename it for editing (to let’s say 
rules:under:bardots), then do

   \definebar[underbardot][undergraphic][mp=rules:under:bardots]

and play with the mp until you are happy with the output.

But the problem is that you have to create an “underbardot" that contains both the 
bar and the dots, to fix the non-nesting problem. It is then quite hard to get that 
definition to align properly with any enclosing “underbar” (I tried something like that a 
while ago and basically gave up. I did not want to spend a whole of time on it so I just 
told the client “computer says no").



Another question: what do you mean with a dy-shift version?


Nested bars have a parameter ‘dy’ which controls the vertical shifts needed to 
make sure that they do not overlap. Text backgrounds do not have that option at 
all.
i've added that so one can nest the mp driven ones but still within the 
same category ... i'll look into a mix (more complex management wise so 
typically a rainy weekend thing; i know how to do it but ...)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 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] Defining new float types fails in LMTX

2021-11-30 Thread Marco Patzer via ntg-context
Hi!

Apologies for spamming this list with my all the floaty stuff.
There's an issue with defining new floats in LMTX in combination
with bottom placement.

The following works in MkIV, but throws an error in LMTX:

  I'm ignoring this; it doesn't match any \if.
  mtx-context | fatal error: return code: 256

\setupfloat [figure]
  [default=bottom]  %% fails
  %% [default=top]  %% works

\definefloat
  [foo] [foos]
  [figure]

\starttext
  \startplacefigure [title=Foo]
\framed{Foo}
  \stopplacefigure

  \startplacefoo [title=Bar]
\framed{Bar}
  \stopplacefoo
\stoptext

Marco

LMTX 2021.11.26 11:38
___
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] double underbars

2021-11-30 Thread Denis Maier via ntg-context
Ok, so I will see. But, if even you gave up, I should better hope that someone 
else hears our desperate cries ;)

Denis

> -Ursprüngliche Nachricht-
> Von: Taco Hoekwater 
> Gesendet: Dienstag, 30. November 2021 14:52
> An: mailing list for ConTeXt users 
> Cc: Maier, Denis Christian (UB) 
> Betreff: Re: [NTG-context] double underbars
> 
> 
> 
> > On 30 Nov 2021, at 14:38, Denis Maier via ntg-context  cont...@ntg.nl> wrote:
> >
> > Thanks, Taco. Good to know. Although it's not what I wanted to hear, of
> course...
> >
> > I was thinking using mp to draw the combination could be solution, but
> unfortunately I don't know metafun yet.
> >
> > If my understanding of https://source.contextgarden.net/node-rul.mkiv is
> correct, it should be possible to build upon the defintion of rules:under:dots
> (l. 327) Any hints how I could get this started?
> 
> Yes, that is the right part to get started with. You could just copy the whole
> \startuseMPgraphic and rename it for editing (to let’s say
> rules:under:bardots), then do
> 
>   \definebar[underbardot][undergraphic][mp=rules:under:bardots]
> 
> and play with the mp until you are happy with the output.
> 
> But the problem is that you have to create an “underbardot" that contains
> both the bar and the dots, to fix the non-nesting problem. It is then quite
> hard to get that definition to align properly with any enclosing “underbar” (I
> tried something like that a while ago and basically gave up. I did not want to
> spend a whole of time on it so I just told the client “computer says no").
> 
> 
> > Another question: what do you mean with a dy-shift version?
> 
> Nested bars have a parameter ‘dy’ which controls the vertical shifts needed
> to make sure that they do not overlap. Text backgrounds do not have that
> option at all.
> 
> >
> > Best,
> > Denis
> >
> >> -Ursprüngliche Nachricht-
> >> Von: Taco Hoekwater 
> >> Gesendet: Dienstag, 30. November 2021 14:19
> >> An: mailing list for ConTeXt users 
> >> Cc: Maier, Denis Christian (UB) 
> >> Betreff: Re: [NTG-context] double underbars
> >>
> >>
> >>
> >>> On 30 Nov 2021, at 12:06, Denis Maier via ntg-context  >> cont...@ntg.nl> wrote:
> >>>
> >>> Hi,
> >>>
> >>> for a current project I’ll need different variants of underbars.
> >>>
> >>> - A normal underbar
> >>> - A dotted underbar
> >>> - A combination of both
> >>>
> >>> Is there a way to combine them? I was hoping to have the dotted
> >>> variant
> >> above the normal bar.
> >>
> >> I would like to have this type of “complete” bar nesting as well.
> >>
> >> As it stands, you can nest \underbars inside \underbars and
> >> \overstrikes inside \overstrikes and \overbars inside \overbars, but
> >> no other combinations work. Interoperability between these (as well
> >> as \underdot, \underdash, \underrandom ...) would be really cool.
> >>
> >> Either with \bar or a nestable dy-shift version of
> >> textbackgrounds would be really handy sometimes. :)
> >>
> >>
> >>
> >>>
> >>> This is not working
> >>>
> >>> %%%
> >>> \starttext
> >>>
> >>> \underbar{asdf}
> >>>
> >>> \underdot{asdf}
> >>>
> >>> \underbar{\underdot{asdf}}
> >>>
> >>> \stoptext
> >>> %%%
> >>>
> >>>
> >>> Best,
> >>> Denis
> >>>
> >>>
> >>
> __
> >> 
> >>> _ 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
> >>>
> >>
> __
> >> 
> >>> _
> >>
> >> —
> >> Taco Hoekwater  E: t...@bittext.nl
> >> genderfluid (all pronouns)
> >>
> >>
> 

Re: [NTG-context] double underbars

2021-11-30 Thread Taco Hoekwater via ntg-context


> On 30 Nov 2021, at 14:38, Denis Maier via ntg-context  
> wrote:
> 
> Thanks, Taco. Good to know. Although it's not what I wanted to hear, of 
> course...
> 
> I was thinking using mp to draw the combination could be solution, but 
> unfortunately I don't know metafun yet.
> 
> If my understanding of https://source.contextgarden.net/node-rul.mkiv is 
> correct, it should be possible to build upon the defintion of 
> rules:under:dots (l. 327) Any hints how I could get this started?

Yes, that is the right part to get started with. You could just copy the whole 
\startuseMPgraphic and rename it for editing (to let’s say 
rules:under:bardots), then do

  \definebar[underbardot][undergraphic][mp=rules:under:bardots]

and play with the mp until you are happy with the output.

But the problem is that you have to create an “underbardot" that contains both 
the bar and the dots, to fix the non-nesting problem. It is then quite hard to 
get that definition to align properly with any enclosing “underbar” (I tried 
something like that a while ago and basically gave up. I did not want to spend 
a whole of time on it so I just told the client “computer says no").


> Another question: what do you mean with a dy-shift version?

Nested bars have a parameter ‘dy’ which controls the vertical shifts needed to 
make sure that they do not overlap. Text backgrounds do not have that option at 
all.

> 
> Best,
> Denis
> 
>> -Ursprüngliche Nachricht-
>> Von: Taco Hoekwater 
>> Gesendet: Dienstag, 30. November 2021 14:19
>> An: mailing list for ConTeXt users 
>> Cc: Maier, Denis Christian (UB) 
>> Betreff: Re: [NTG-context] double underbars
>> 
>> 
>> 
>>> On 30 Nov 2021, at 12:06, Denis Maier via ntg-context > cont...@ntg.nl> wrote:
>>> 
>>> Hi,
>>> 
>>> for a current project I’ll need different variants of underbars.
>>> 
>>> - A normal underbar
>>> - A dotted underbar
>>> - A combination of both
>>> 
>>> Is there a way to combine them? I was hoping to have the dotted variant
>> above the normal bar.
>> 
>> I would like to have this type of “complete” bar nesting as well.
>> 
>> As it stands, you can nest \underbars inside \underbars and \overstrikes
>> inside \overstrikes and \overbars inside \overbars, but no other
>> combinations work. Interoperability between these (as well as \underdot,
>> \underdash, \underrandom ...) would be really cool.
>> 
>> Either with \bar or a nestable dy-shift version of textbackgrounds would
>> be really handy sometimes. :)
>> 
>> 
>> 
>>> 
>>> This is not working
>>> 
>>> %%%
>>> \starttext
>>> 
>>> \underbar{asdf}
>>> 
>>> \underdot{asdf}
>>> 
>>> \underbar{\underdot{asdf}}
>>> 
>>> \stoptext
>>> %%%
>>> 
>>> 
>>> Best,
>>> Denis
>>> 
>>> 
>> __
>> 
>>> _ 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
>>> 
>> __
>> 
>>> _
>> 
>> —
>> Taco Hoekwater  E: t...@bittext.nl
>> genderfluid (all pronouns)
>> 
>> 
> 
> ___
> 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
> ___

— 
Taco Hoekwater  E: t...@bittext.nl
genderfluid (all pronouns)



___
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] double underbars

2021-11-30 Thread Denis Maier via ntg-context
Thanks, Taco. Good to know. Although it's not what I wanted to hear, of 
course...

I was thinking using mp to draw the combination could be solution, but 
unfortunately I don't know metafun yet.

If my understanding of https://source.contextgarden.net/node-rul.mkiv is 
correct, it should be possible to build upon the defintion of rules:under:dots 
(l. 327) Any hints how I could get this started?

Another question: what do you mean with a dy-shift version?

Best,
Denis

> -Ursprüngliche Nachricht-
> Von: Taco Hoekwater 
> Gesendet: Dienstag, 30. November 2021 14:19
> An: mailing list for ConTeXt users 
> Cc: Maier, Denis Christian (UB) 
> Betreff: Re: [NTG-context] double underbars
> 
> 
> 
> > On 30 Nov 2021, at 12:06, Denis Maier via ntg-context  cont...@ntg.nl> wrote:
> >
> > Hi,
> >
> > for a current project I’ll need different variants of underbars.
> >
> > - A normal underbar
> > - A dotted underbar
> > - A combination of both
> >
> > Is there a way to combine them? I was hoping to have the dotted variant
> above the normal bar.
> 
> I would like to have this type of “complete” bar nesting as well.
> 
> As it stands, you can nest \underbars inside \underbars and \overstrikes
> inside \overstrikes and \overbars inside \overbars, but no other
> combinations work. Interoperability between these (as well as \underdot,
> \underdash, \underrandom ...) would be really cool.
> 
> Either with \bar or a nestable dy-shift version of textbackgrounds would
> be really handy sometimes. :)
> 
> 
> 
> >
> > This is not working
> >
> > %%%
> > \starttext
> >
> > \underbar{asdf}
> >
> > \underdot{asdf}
> >
> > \underbar{\underdot{asdf}}
> >
> > \stoptext
> > %%%
> >
> >
> > Best,
> > Denis
> >
> >
> __
> 
> > _ 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
> >
> __
> 
> > _
> 
> —
> Taco Hoekwater  E: t...@bittext.nl
> genderfluid (all pronouns)
> 
> 

___
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] double underbars

2021-11-30 Thread Taco Hoekwater via ntg-context


> On 30 Nov 2021, at 12:06, Denis Maier via ntg-context  
> wrote:
> 
> Hi,
>  
> for a current project I’ll need different variants of underbars.
>  
> - A normal underbar
> - A dotted underbar
> - A combination of both
>  
> Is there a way to combine them? I was hoping to have the dotted variant above 
> the normal bar.

I would like to have this type of “complete” bar nesting as well. 

As it stands, you can nest \underbars inside \underbars and \overstrikes inside 
\overstrikes and \overbars inside \overbars, but no other combinations work. 
Interoperability between these (as well as \underdot, \underdash, \underrandom 
...) would be really cool.

Either with \bar or a nestable dy-shift version of textbackgrounds would be 
really handy sometimes. :)



>  
> This is not working
>  
> %%%
> \starttext
>  
> \underbar{asdf}
>  
> \underdot{asdf}
>  
> \underbar{\underdot{asdf}}
>  
> \stoptext
> %%%
>  
>  
> Best,
> Denis
>  
> ___
> 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
> ___

— 
Taco Hoekwater  E: t...@bittext.nl
genderfluid (all pronouns)



___
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] double underbars

2021-11-30 Thread Denis Maier via ntg-context
Hi,

for a current project I'll need different variants of underbars.

- A normal underbar
- A dotted underbar
- A combination of both

Is there a way to combine them? I was hoping to have the dotted variant above 
the normal bar.

This is not working

%%%
\starttext

\underbar{asdf}

\underdot{asdf}

\underbar{\underdot{asdf}}

\stoptext
%%%


Best,
Denis

___
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 prime issues for some fonts

2021-11-27 Thread Wolfgang Schuster via ntg-context

Jack Hill schrieb am 26.11.2021 um 19:53:

On Fri, 26 Nov 2021 at 17:39, Wolfgang Schuster
 wrote:

Jack Hill via ntg-context schrieb am 26.11.2021 um 18:18:

Hi list,

When I run this test code

[...]

on my machine, the prime symbols are being placed too high (except for
latin modern which is normal).
Running the same code on the wiki gives the correct output though.
Does anyone else get the same output? Screenshot attached.

Use \definetypeface to load/set the math fonts.

\starttext

\starttabulate[|l|c|]
\FL
\BC Font name  \BC Math prime\NC\NR
\ML
\NC Latin Modern Roman \NC\m{x'} \NC\NR
\NC TeX Gyre Termes\NC \switchtobodyfont[termes]  \m{x'} \NC\NR
\NC TeX Gyre Pagella   \NC \switchtobodyfont[pagella] \m{x'} \NC\NR
\NC TeX Gyre Bonum \NC \switchtobodyfont[bonum]   \m{x'} \NC\NR
\NC TeX Gyre Schola\NC \switchtobodyfont[schola]  \m{x'} \NC\NR
\NC STIX Two   \NC \switchtobodyfont[stixtwo] \m{x'} \NC\NR
\BL
\stoptabulate

\stoptext

Wolfgang

Thanks, \definetypeface fixes it. Should I not be using \definefontfamily?
I've just checked eulernova and the prime is still too high for this font.

\switchtobodyfont[eulernova]
\starttext
\m{x'}
\stoptext


To set the math font \definetypeface is the better choice because 
ConTeXt loads patches for most math fonts to improve the spacing for 
primes etc.


You can use \definefontfamily to set the math font but then you have to 
load these patches yourself (\definefontfamily [...] [...] [...] 
[extras=...,goodies=...]). For a few fonts these patches are loaded 
automatically but the system is not always up to date.


What I suggest is to use \definefontfamily to select your text fonts 
(serif, sans and mono) in combination with \definetypeface for the math 
font. One reason where \definefontfamily is the better choice for the 
math font is when you try to use fallbacks for the math font (e.g. to 
have sans serif letters in math mode).


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] Space before/after combinations + centring

2021-11-17 Thread Hans Hagen via ntg-context

On 11/17/2021 11:50 PM, Marco Patzer via ntg-context wrote:

On Wed, 17 Nov 2021 20:17:52 +0100
Wolfgang Schuster  wrote:


2. There are no changes to adjust the vertical before and after a
combination environment.


That's unfortunate.


Local patches can also be tricky because ConTeXt tries to freeze
the definitions of many user level commands which means they can't
be redefined when you use a strict overload mode (look at the
lowlevel security manual for this feature).


An overload like mine is probably exactly what the strict overload
mode is supposed to protect against.


The most reliable way to center you combination blocks is to put
them either in a float or put a framedtext environment around it.


The project comprises several hundred source files. That's why I
stayed away from rewriting the sources in the first place. I'll try
to bulk-change the sources.
combinations are really just a way to package things, not meant for 
direct usage in the page flow


\startlinecorrection[blank]
...
\stoplinecorrection

is one way to use them, or in floats; the same is true for natural tables

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 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] Space before/after combinations + centring

2021-11-17 Thread Marco Patzer via ntg-context
On Wed, 17 Nov 2021 20:17:52 +0100
Wolfgang Schuster  wrote:

> 2. There are no changes to adjust the vertical before and after a
> combination environment.

That's unfortunate.

> Local patches can also be tricky because ConTeXt tries to freeze
> the definitions of many user level commands which means they can't
> be redefined when you use a strict overload mode (look at the
> lowlevel security manual for this feature).

An overload like mine is probably exactly what the strict overload
mode is supposed to protect against.

> The most reliable way to center you combination blocks is to put
> them either in a float or put a framedtext environment around it.

The project comprises several hundred source files. That's why I
stayed away from rewriting the sources in the first place. I'll try
to bulk-change the sources.

Thanks for your explanations.

Marco
___
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] Space before/after combinations + centring

2021-11-17 Thread Wolfgang Schuster via ntg-context

Marco Patzer via ntg-context schrieb am 17.11.2021 um 16:54:

Hi!

I'm in the process of converting some projects to LMTX. Combinations
lacking “”before” and “after” keys (that place content before/after
the *entire* combination, rather than the individual cell pairs), I
came up with the following ugliness – which worked for longer than
it deserved:

[...]

I added vertical spacing and mid-aligned the content without having
to change the sources, that was the idea. However, this fails in
LMTX:

   Undefined control sequence \pack_combinations_start

Does LMTX offer finer control over the combinations or do I have to
rewrite the sources files (to either use floats or surround the
combinations with the required commands)?


1. Your changes don't work anymore because LMTX handles optional 
arguments in a different way than MkIV. As a result of this change a few 
commands have disappeared.


2. There are no changes to adjust the vertical before and after a 
combination environment. Local patches can also be tricky because 
ConTeXt tries to freeze the definitions of many user level commands 
which means they can't be redefined when you use a strict overload mode 
(look at the lowlevel security manual for this feature).


The most reliable way to center you combination blocks is to put them 
either in a float or put a framedtext environment around it.


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] Space before/after combinations + centring

2021-11-17 Thread Marco Patzer via ntg-context
Hi!

I'm in the process of converting some projects to LMTX. Combinations
lacking “”before” and “after” keys (that place content before/after
the *entire* combination, rather than the individual cell pairs), I
came up with the following ugliness – which worked for longer than
it deserved:

\unprotect

\unexpanded\def\startcombination
  {\blank[halfline]%%
   \startalignment[middle]%%
   \dontleavehmode
   \bgroup
   \pack_combinations_push
   \dodoubleempty\pack_combinations_start}

\unexpanded\def\stopcombination
  {\bgroup\normalexpanded{\egroup{}\ntimes{{}{}}\c_pack_combinations_y}% brr
   \dostoptagged
   \egroup
   \pack_combinations_pop
   \egroup
   \stopalignment
   \goodbreak\blank[halfline]}

\protect

\starttext
  \startcombination [2*2]
\startcontent foo \stopcontent \startcaption 1 \stopcaption
\startcontent bar \stopcontent \startcaption 2 \stopcaption
  \stopcombination
\stoptext

I added vertical spacing and mid-aligned the content without having
to change the sources, that was the idea. However, this fails in
LMTX:

  Undefined control sequence \pack_combinations_start

Does LMTX offer finer control over the combinations or do I have to
rewrite the sources files (to either use floats or surround the
combinations with the required commands)?

Marco

LMTX: current version: 2021.11.16 22:36
___
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] new upload, new trickery

2021-11-16 Thread Marcus Vinicius Mesquita via ntg-context
dhbox{\smallinfofont[R #1.3]}}%
>  %
>  \samplefile{tufte}
> }
>
> But as this is not really user friendly, there is more: a mechanism for
> hooking in handlers.
>
> \definelocalboxes
>[linenumber]
>[command=\LeftNumber,
> location=left,
> width=3em,
> style=\bs,
> color=darkred]
>
> \definelocalboxes
>[linenumbertwo]
>[linenumber]
>[command=\RightNumber,
> location=right,
> width=6em,
> style=\bf,
> color=darkgreen]
>
> \definelocalboxes
>[linetext]
>[command=\LeftText,
> location=lefttext,
> style=\bs,
> color=darkblue]
>
> \definelocalboxes
>[linetexttwo]
>[linetext]
>[command=\RightText,
> location=righttext,
> style=\bf,
> color=darkgray]
>
> % just using the content
>
> % \protected\def\LeftNumber {\hbox to
> \localboxesparameter{width}{\strut\box\localboxcontentbox\hss)}}
> % \protected\def\RightNumber{\hbox to
> \localboxesparameter{width}{\strut(\hss\box\localboxcontentbox)}}
>
> % using the provided line number:
>
> % \def\LineNumberL{\the\localboxlinenumber}
> % \def\LineNumberR{\the\localboxlinenumber}
>
> % using a tex counter
>
> % \newcount\MyLineNumberL
> % \newcount\MyLineNumberR
> % \def\LineNumberL{\global\advance\MyLineNumberL\plusone\the\MyLineNumberL}
> % \def\LineNumberR{\global\advance\MyLineNumberR\plusone\the\MyLineNumberR}
>
> % using proper counters
>
> \definecounter[MyLineNumberL]
> \definecounter[MyLineNumberR]
>
> \setupcounter[MyLineNumberL][numberconversion=characters]
> \setupcounter[MyLineNumberR][numberconversion=romannumerals]
>
>
> \def\LineNumberL{\incrementcounter[MyLineNumberL]\convertedcounter[MyLineNumberL]}
>
> \def\LineNumberR{\incrementcounter[MyLineNumberR]\convertedcounter[MyLineNumberR]}
>
> \protected\def\LeftNumber {\hbox to
> \localboxesparameter{width}{\strut(\LineNumberL\hss)}}
> \protected\def\RightNumber{\hbox to
> \localboxesparameter{width}{\strut(\hss\LineNumberR)}}
>
> \protected\def\LeftText #1{#1\quad}
> \protected\def\RightText#1{\quad#1}
>
> \showframe
>
> \starttext
>
> \start
>  \localbox[linenumber]{}%
>  \localbox[linenumbertwo]{}%
>  \localbox[linetext]{L}%
>  \startlocalbox[linetexttwo]
>  R
>  \stoplocalbox
>  \dorecurse{100}{
>  \samplefile{tufte}
>  \par
>  }
> \stop
>
> If you play a bit with these low level mechanism the luametatex /
> context combination now permits weird applications (which for sure some
> of you will (ab)use). The above example shows how to implement line
> numbers (there are drawbacks compared to the existing mechanisms) and
> other stuff in the margins and text edges but the most important aspect
> is that when the content in these boxes has width, it will be taken into
> account in the par builder because that is what this is about: these
> local boxes are taken into acount when breaking lines. When the handlers
> kick in, you have
>
> \localboxattribute : more for internal use
> \localboxlinenumber: as the par builder sees it
> \localboxwidth : the local box width
> \localboxoffset: the total distance to the edge
> \localboxleftskip  : the effective leftskip
> \localboxrightskip : the effective rightskip
> \localboxlefthang  : the current shape related value
> \localboxrighthang : the current shape related value
> \localboxindent: only first line
> \localboxparfillleftskip   : effective value (onky last line)
> \localboxparfillrightskip  : effective value (only last line)
> \localboxovershoot : overfull compensation
>
> most of these relate to normalized lines and as such there is plenty to
> play with. Others can be seen in the examples.
>
> I might add some more control to both these 'injection' mechanism
> because directly out of the (pdftex/omega/luatex) they are not that
> useful (which is probably also why we don't use them.) These are cheap
> extensions so they don't really influence runtime much, so .. when not
> used ... no harm done. I really have no clue how useful this is.
>
> I need to ponder this usage:
>
> \definelocalboxes
>[linetextA]
>[command=\LeftTextA,
> location=lefttext,
> style=\bs,
> color=darkblue]
>
> \protected\def\LeftTextA#1{\llap{#1}\quad}
>
> \definelocalboxes
>[linetextB]
>[command=\LeftTextB,
> location=left,
> style=\bs,
> color=darkgreen]
>
> \protected\def\LeftTextB{\llap{\unhbox\localboxcontentbox}\quad}
>
> \starttext
>
> \dorecurse{10}{some text #1

[NTG-context] new upload, new trickery

2021-10-28 Thread Hans Hagen via ntg-context
 the provided line number:

% \def\LineNumberL{\the\localboxlinenumber}
% \def\LineNumberR{\the\localboxlinenumber}

% using a tex counter

% \newcount\MyLineNumberL
% \newcount\MyLineNumberR
% \def\LineNumberL{\global\advance\MyLineNumberL\plusone\the\MyLineNumberL}
% \def\LineNumberR{\global\advance\MyLineNumberR\plusone\the\MyLineNumberR}

% using proper counters

\definecounter[MyLineNumberL]
\definecounter[MyLineNumberR]

\setupcounter[MyLineNumberL][numberconversion=characters]
\setupcounter[MyLineNumberR][numberconversion=romannumerals]

\def\LineNumberL{\incrementcounter[MyLineNumberL]\convertedcounter[MyLineNumberL]}
\def\LineNumberR{\incrementcounter[MyLineNumberR]\convertedcounter[MyLineNumberR]}

\protected\def\LeftNumber {\hbox to 
\localboxesparameter{width}{\strut(\LineNumberL\hss)}}
\protected\def\RightNumber{\hbox to 
\localboxesparameter{width}{\strut(\hss\LineNumberR)}}


\protected\def\LeftText #1{#1\quad}
\protected\def\RightText#1{\quad#1}

\showframe

\starttext

\start
\localbox[linenumber]{}%
\localbox[linenumbertwo]{}%
\localbox[linetext]{L}%
\startlocalbox[linetexttwo]
R
\stoplocalbox
\dorecurse{100}{
\samplefile{tufte}
\par
}
\stop

If you play a bit with these low level mechanism the luametatex / 
context combination now permits weird applications (which for sure some 
of you will (ab)use). The above example shows how to implement line 
numbers (there are drawbacks compared to the existing mechanisms) and 
other stuff in the margins and text edges but the most important aspect 
is that when the content in these boxes has width, it will be taken into 
account in the par builder because that is what this is about: these 
local boxes are taken into acount when breaking lines. When the handlers 
kick in, you have


\localboxattribute : more for internal use
\localboxlinenumber: as the par builder sees it
\localboxwidth : the local box width
\localboxoffset: the total distance to the edge
\localboxleftskip  : the effective leftskip
\localboxrightskip : the effective rightskip
\localboxlefthang  : the current shape related value
\localboxrighthang : the current shape related value
\localboxindent: only first line
\localboxparfillleftskip   : effective value (onky last line)
\localboxparfillrightskip  : effective value (only last line)
\localboxovershoot : overfull compensation

most of these relate to normalized lines and as such there is plenty to 
play with. Others can be seen in the examples.


I might add some more control to both these 'injection' mechanism 
because directly out of the (pdftex/omega/luatex) they are not that 
useful (which is probably also why we don't use them.) These are cheap 
extensions so they don't really influence runtime much, so .. when not 
used ... no harm done. I really have no clue how useful this is.


I need to ponder this usage:

\definelocalboxes
  [linetextA]
  [command=\LeftTextA,
   location=lefttext,
   style=\bs,
   color=darkblue]

\protected\def\LeftTextA#1{\llap{#1}\quad}

\definelocalboxes
  [linetextB]
  [command=\LeftTextB,
   location=left,
   style=\bs,
   color=darkgreen]

\protected\def\LeftTextB{\llap{\unhbox\localboxcontentbox}\quad}

\starttext

\dorecurse{10}{some text #1 }
\leftparbox {\red \bf keyword}HERE\leftparbox{}
\dorecurse{10}{some text #1 }
\blank

{\dorecurse{10}{some text #1 }
\leftparbox {\red \bf keyword}test
\dorecurse{10}{some text #1 }}
\blank

{\dorecurse{10}{some text #1 }
\localbox[linetextA]{keyword}HERE
\dorecurse{10}{some text #1 }}

{\dorecurse{10}{some text #1 }
\localbox[linetextB]{keyword}HERE
\dorecurse{10}{some text #1 }}

{\dorecurse{10}{some text #1 }
\localbox[linetextB]{keyword 1}HERE1
\dorecurse{10}{some text #1 }
\localbox[linetextB]{keyword 2}HERE2
\dorecurse{10}{some text #1 }}

\stoptext

so there's always so echallenge left.

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 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] vertical align in combination

2021-10-22 Thread Pablo Rodriguez via ntg-context
On 10/22/21 5:46 PM, Hans Hagen via ntg-context wrote:
> On 10/22/2021 5:20 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> How could I get all lines with images vertically centered?
>
> maybe by using the command the right way ...
>
>\setupexternalfigure[location=default]
>\startcombination[nx=3, ny=2, location={middle}]
>{\externalfigure[mill.png][width=.25\textwidth]}  {}

Many thanks for your fast reply and your help, Hans.


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
___


Re: [NTG-context] vertical align in combination

2021-10-22 Thread Hans Hagen via ntg-context

On 10/22/2021 5:20 PM, Pablo Rodriguez via ntg-context wrote:

Dear list,

I have the following sample:

   \starttext
   \setupexternalfigure[location=default]
   \startcombination[nx=3, ny=2, location={middle}]
   {\externalfigure[mill.png][width=.25\textwidth]}
   {\externalfigure[cow.pdf][width=.25\textwidth]}
   {\externalfigure[cow.pdf][width=.25\textwidth]}
   {\externalfigure[spider.eps][width=.25\textwidth]}
   {\externalfigure[hacker.png][width=.25\textwidth]}
   {\externalfigure[mill.png][width=.25\textwidth]}
   \stopcombination
   \stoptext

The first line has the images vertically centered, but the second line
has them aligned to the top. Using "align=middle" made no difference.

How could I get all lines with images vertically centered?


maybe by using the command the right way ...

  \setupexternalfigure[location=default]
  \startcombination[nx=3, ny=2, location={middle}]
  {\externalfigure[mill.png][width=.25\textwidth]}  {}
  {\externalfigure[cow.pdf][width=.25\textwidth]}   {}
  {\externalfigure[cow.pdf][width=.25\textwidth]}   {}
  {\externalfigure[spider.eps][width=.25\textwidth]}{}
  {\externalfigure[hacker.png][width=.25\textwidth]}{}
  {\externalfigure[mill.png][width=.25\textwidth]}  {}
  \stopcombination



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
___




--

-
  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] vertical align in combination

2021-10-22 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \starttext
  \setupexternalfigure[location=default]
  \startcombination[nx=3, ny=2, location={middle}]
  {\externalfigure[mill.png][width=.25\textwidth]}
  {\externalfigure[cow.pdf][width=.25\textwidth]}
  {\externalfigure[cow.pdf][width=.25\textwidth]}
  {\externalfigure[spider.eps][width=.25\textwidth]}
  {\externalfigure[hacker.png][width=.25\textwidth]}
  {\externalfigure[mill.png][width=.25\textwidth]}
  \stopcombination
  \stoptext

The first line has the images vertically centered, but the second line
has them aligned to the top. Using "align=middle" made no difference.

How could I get all lines with images vertically centered?

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
___


Re: [NTG-context] combination with lua

2021-10-12 Thread Adam Reviczky via ntg-context
Thank you Hans and Wolfgang for the explanation!

Adam

On Tue, Oct 12, 2021 at 4:22 PM Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Hans Hagen via ntg-context schrieb am 12.10.2021 um 14:12:
> > On 10/11/2021 1:38 PM, Adam Reviczky via ntg-context wrote:
> >> Hi,
> >>
> >> I am trying to use a combination figure with luacode (both with
> >> latest MKIV and LMTX).
> >> However, the figures do not line up in the grid of the combination.
> >>
> >> I get the correct result with examples 1 and 2 below, but example 3
> >> using lua functions for combination and externalfigure is what I
> >> wanted to use in the first place.
> >>
> >> MWE:
> >>
> >> \starttext
> >>
> >> \startluacode
> >>
> >> -- Combination 1
> >> context.startplacefigure({title = "Figure"})
> >> context.startcombination({nx = "2", ny = "2"},
> >>
> >> "\\externalfigure[cow][width=50mm]","Caption 1",
> >> "\\externalfigure[cow][width=50mm]","Caption 2",
> >> "\\externalfigure[cow][width=50mm]","Caption 3",
> >> "\\externalfigure[cow][width=50mm]","Caption 4"
> >> )
> >>
> >> context.stopcombination()
> >> context.stopplacefigure()
> >>
> >> -- Combination 2
> >>
> >> context.startplacefigure({title = "Figure"})
> >> context.startcombination({nx = "2", ny = "2"},
> >>
> >> "Picture 1","Caption 1",
> >> "Picture 2","Caption 2",
> >> "Picture 3","Caption 3",
> >> "Picture 4","Caption 4"
> >> )
> >>
> >> context.stopcombination()
> >> context.stopplacefigure()
> >>
> >> -- Combination 3
> >>
> >> context.startplacefigure({title = "Figure"})
> >> context.startcombination({nx = "2", ny = "2"},
> >>
> >> context.externalfigure({"cow"},{width = "50mm"}),"Caption 1",
> >> context.externalfigure({"cow"},{width = "50mm"}),"Caption 2",
> >> context.externalfigure({"cow"},{width = "50mm"}),"Caption 3",
> >> context.externalfigure({"cow"},{width = "50mm"}),"Caption 4"
> >> )
> >>
> >> context.stopcombination()
> >> context.stopplacefigure()
> >>
> >> \stopluacode
> >> \stoptext
> >>
> >> Any hints on what I am doing wrong in example 3?
> > as in any prodedural language a function as argument gets immediately
> > executed so you need to delay:
> >
> > context.startplacefigure({title = "Figure"})
> > context.startcombination({nx = "2", ny = "2"},
> > context.delayed.externalfigure({"cow"},{width = "50mm"}),
> > "Caption 1",
> > context.delayed.externalfigure({"cow"},{width = "50mm"}),
> > "Caption 2",
> > context.delayed.externalfigure({"cow"},{width = "50mm"}),
> > "Caption 3",
> > context.delayed.externalfigure({"cow"},{width = "50mm"}),
> > "Caption 4"
> > )
> > context.stopcombination()
> > context.stopplacefigure()
> >
> > (this is why encoding complex documents completely in a scrtipt
> > language is non trivial and why for instance these template systems
> > are there because these accumulate)
>
> Another solution is to use the content and caption blocks for each
> combination entry.
>
> \starttext
>
> \startluacode
>
> context.startplacefigure({title = "Figure"})
>  context.startcombination({nx = 1, ny = 1})
>  context.startcontent()
>  context.externalfigure({"cow"},{width = "50mm"})
>  context.stopcontent()
>  context.startcaption()
>  context("Caption 1")
>  context.stopcaption()
>  context.stopcombination()
> context.stopplacefigure()
>
> \stopluacode
>
> \stoptext
>
> Wolfgang
>
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] combination with lua

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

Hans Hagen via ntg-context schrieb am 12.10.2021 um 14:12:

On 10/11/2021 1:38 PM, Adam Reviczky via ntg-context wrote:

Hi,

I am trying to use a combination figure with luacode (both with 
latest MKIV and LMTX).

However, the figures do not line up in the grid of the combination.

I get the correct result with examples 1 and 2 below, but example 3 
using lua functions for combination and externalfigure is what I 
wanted to use in the first place.


MWE:

\starttext

\startluacode

-- Combination 1
context.startplacefigure({title = "Figure"})
context.startcombination({nx = "2", ny = "2"},

"\\externalfigure[cow][width=50mm]","Caption 1",
"\\externalfigure[cow][width=50mm]","Caption 2",
"\\externalfigure[cow][width=50mm]","Caption 3",
"\\externalfigure[cow][width=50mm]","Caption 4"
)

context.stopcombination()
context.stopplacefigure()

-- Combination 2

context.startplacefigure({title = "Figure"})
context.startcombination({nx = "2", ny = "2"},

"Picture 1","Caption 1",
"Picture 2","Caption 2",
"Picture 3","Caption 3",
"Picture 4","Caption 4"
)

context.stopcombination()
context.stopplacefigure()

-- Combination 3

context.startplacefigure({title = "Figure"})
context.startcombination({nx = "2", ny = "2"},

context.externalfigure({"cow"},{width = "50mm"}),"Caption 1",
context.externalfigure({"cow"},{width = "50mm"}),"Caption 2",
context.externalfigure({"cow"},{width = "50mm"}),"Caption 3",
context.externalfigure({"cow"},{width = "50mm"}),"Caption 4"
)

context.stopcombination()
context.stopplacefigure()

\stopluacode
\stoptext

Any hints on what I am doing wrong in example 3?
as in any prodedural language a function as argument gets immediately 
executed so you need to delay:


context.startplacefigure({title = "Figure"})
    context.startcombination({nx = "2", ny = "2"},
    context.delayed.externalfigure({"cow"},{width = "50mm"}), 
"Caption 1",
    context.delayed.externalfigure({"cow"},{width = "50mm"}), 
"Caption 2",
    context.delayed.externalfigure({"cow"},{width = "50mm"}), 
"Caption 3",
    context.delayed.externalfigure({"cow"},{width = "50mm"}), 
"Caption 4"

    )
    context.stopcombination()
context.stopplacefigure()

(this is why encoding complex documents completely in a scrtipt 
language is non trivial and why for instance these template systems 
are there because these accumulate)


Another solution is to use the content and caption blocks for each 
combination entry.


\starttext

\startluacode

context.startplacefigure({title = "Figure"})
    context.startcombination({nx = 1, ny = 1})
    context.startcontent()
    context.externalfigure({"cow"},{width = "50mm"})
    context.stopcontent()
    context.startcaption()
    context("Caption 1")
    context.stopcaption()
    context.stopcombination()
context.stopplacefigure()

\stopluacode

\stoptext

Wolfgang

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

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


Re: [NTG-context] combination with lua

2021-10-12 Thread Hans Hagen via ntg-context

On 10/11/2021 1:38 PM, Adam Reviczky via ntg-context wrote:

Hi,

I am trying to use a combination figure with luacode (both with latest 
MKIV and LMTX).

However, the figures do not line up in the grid of the combination.

I get the correct result with examples 1 and 2 below, but example 3 
using lua functions for combination and externalfigure is what I wanted 
to use in the first place.


MWE:

\starttext

\startluacode

-- Combination 1
context.startplacefigure({title = "Figure"})
context.startcombination({nx = "2", ny = "2"},

"\\externalfigure[cow][width=50mm]","Caption 1",
"\\externalfigure[cow][width=50mm]","Caption 2",
"\\externalfigure[cow][width=50mm]","Caption 3",
"\\externalfigure[cow][width=50mm]","Caption 4"
)

context.stopcombination()
context.stopplacefigure()

-- Combination 2

context.startplacefigure({title = "Figure"})
context.startcombination({nx = "2", ny = "2"},

"Picture 1","Caption 1",
"Picture 2","Caption 2",
"Picture 3","Caption 3",
"Picture 4","Caption 4"
)

context.stopcombination()
context.stopplacefigure()

-- Combination 3

context.startplacefigure({title = "Figure"})
context.startcombination({nx = "2", ny = "2"},

context.externalfigure({"cow"},{width = "50mm"}),"Caption 1",
context.externalfigure({"cow"},{width = "50mm"}),"Caption 2",
context.externalfigure({"cow"},{width = "50mm"}),"Caption 3",
context.externalfigure({"cow"},{width = "50mm"}),"Caption 4"
)

context.stopcombination()
context.stopplacefigure()

\stopluacode
\stoptext

Any hints on what I am doing wrong in example 3?
as in any prodedural language a function as argument gets immediately 
executed so you need to delay:


context.startplacefigure({title = "Figure"})
context.startcombination({nx = "2", ny = "2"},
context.delayed.externalfigure({"cow"},{width = "50mm"}), 
"Caption 1",
context.delayed.externalfigure({"cow"},{width = "50mm"}), 
"Caption 2",
context.delayed.externalfigure({"cow"},{width = "50mm"}), 
"Caption 3",
context.delayed.externalfigure({"cow"},{width = "50mm"}), 
"Caption 4"

)
context.stopcombination()
context.stopplacefigure()

(this is why encoding complex documents completely in a scrtipt language 
is non trivial and why for instance these template systems are there 
because these accumulate)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


  1   2   3   4   5   6   7   8   9   10   >