[NTG-context] Font switching for titles and subtitle not working as expected ?

2024-04-30 Thread denis.maier
Hi,
I just jumbled upon this question on tex stackexchange : 
https://tex.stackexchange.com/questions/715799/context-switching-font-for-both-title-and-subject#715804
Using the style key as suggested in the accepted answer works, but I've had a 
look in to this, and I don't understand why the original code does not work.
I've also tried to find a solution using textcommand instead of command, but 
that makes no difference. Only one setting will be accepted. As soon as both, 
titles and subjects, are changed only the first change will be accepted.

Is this a bug, or am I missing something?

Best,
Denis


%
% Original MWE

\define[2]\mytitle{%
  \switchtobodyfont[chorus]%
  #2
}

\define[2]\mysubject{%
  \switchtobodyfont[chorus]%
  #2
}

\setuphead[title][command=\mytitle]
\setuphead[subject][command=\mysubject]

\starttext
\title{In Zapf Chancery}
\subject{Apparently the default font. Why?}

And in the default font, just as expected.
\stoptext
%

%
% Adapted MWE
%

\define[1]\mytitleformat{%
  \switchtobodyfont[chorus]%
  #1
}

%\setuphead[subject,title][textcommand=\mytitleformat]
%\setuphead[title][textcommand=\mytitleformat]
\setuphead[subject][textcommand=\mytitleformat] % this will adapt the format 
for subjects, as long as titles are not changed


\starttext
\title{In Zapf Chancery}
\subject{Apparently the default font. Why?}

And in the default font, just as expected.
\stoptext
%%
___
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: Comments placed in the margin

2024-03-19 Thread Wolfgang Schuster

Jeroen schrieb am 19.03.2024 um 19:34:

This one unbolds the margin text:

\setupmargindata[inouter][style=\tf]

This one works well, it unbolds and reduces the size of the margin text:

\setupmargindata
   [inouter]
   [style={\switchtobodyfont[8pt]}]

This one does not seem to make a change:

\setupmargindata[inmargin][style={\tf}]



It does for me but but unless you want a certain style it is better to 
use a empty argument for the style key.


\starttext

\inmargin{Bold?}\samplefile{lorem}

\setupmargindata[inmargin][style=]

\inmargin{Bold?}\samplefile{lorem}

\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://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: Comments placed in the margin

2024-03-19 Thread Jeroen
This one unbolds the margin text:

\setupmargindata[inouter][style=\tf]

This one works well, it unbolds and reduces the size of the margin text:

\setupmargindata
  [inouter]
  [style={\switchtobodyfont[8pt]}]

This one does not seem to make a change:

\setupmargindata[inmargin][style={\tf}]

Also the inline options seems to unbold the inline text nicely:

\margindata[inouter]{\rm \it example}


Op di 19 mrt 2024 om 16:17 schreef Marco Patzer :

> On Tue, 19 Mar 2024 15:38:16 +0100
> Jeroen  wrote:
>
> > Can this text be placed in the margin in regular text or possibly
> > in slightly smaller font size compared to the regular text in the
> > document?
>
>   \setupmargindata
> [inleft]
> [style=\tfx]
>
> 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
>
> ___
>
___
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: Comments placed in the margin

2024-03-19 Thread Wolfgang Schuster




Jeroen schrieb am 19.03.2024 um 15:38:
For comments that are placed in the margin, the \inleft{}, \inouter{} 
etc will place text in the margin in bold. Can this text be placed in 
the margin in regular text or possibly in slightly smaller font size 
compared to the regular text in the document?


\setupmargindata[inouter][style=]

or

\setupmargindata[inleft][style={\switchtobodyfont[8pt]}]

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: additional font faces

2024-03-08 Thread Henning Hraban Ramm

Am 08.03.24 um 18:02 schrieb Hans Hagen:

On 3/8/2024 5:55 PM, Henning Hraban Ramm wrote:
Hi, if I need an additional pair of upright and italic font faces, 
e.g. a Medium or Light version, would it make sense to define them 
like this:


I'd just define a new typeface / bodyfont, using fo rinstance

\starttypescript [sans] [AlegreyaMedium]

and then use

\switchtobodyfont[AlegreyaMedium]\sl

or

\AlegreyaMedium\sl

which is also more efficient than adding more variants


Ok, thank you – that’s what I was usually doing. So I won’t change it.

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: additional font faces

2024-03-08 Thread Hans Hagen

On 3/8/2024 5:55 PM, Henning Hraban Ramm wrote:
Hi, if I need an additional pair of upright and italic font faces, e.g. 
a Medium or Light version, would it make sense to define them like this:


I'd just define a new typeface / bodyfont, using fo rinstance

\starttypescript [sans] [AlegreyaMedium]

and then use

\switchtobodyfont[AlegreyaMedium]\sl

or

\AlegreyaMedium\sl

which is also more efficient than adding more variants

Hans


% adapted from font-pre.mkxl

\definefontalternative[md]
\definefontalternative[mi]
\definefontalternative[ms]

\definealternativestyle [medium] [\md] []
\definealternativestyle [mediumitalic,italicmedium]  [\mi] []
\definealternativestyle [mediumslanted,slantedmedium][\ms] []

\definealternativestyle [sansmedium]  [\ss\md] []
\definealternativestyle [serifmedium] [\rm\md] []
\definealternativestyle [monomedium]  [\tt\md] []

%\definealternativestyle [mediumface]    [\mediumface]    []

\unexpanded\def\normalmd{\let\fontalternative\md\font_helpers_synchronize_font}
\unexpanded\def\normalmi{\let\fontalternative\mi\font_helpers_synchronize_font}
\unexpanded\def\normalms{\let\fontalternative\ms\font_helpers_synchronize_font}

\let\md\normalmd
\let\mi\normalmi
\let\ms\normalms

\definehighlight[medium   ] [command=no,style=medium]
\definehighlight[mediumitalic ] [command=no,style=mediumitalic]
\definehighlight[mediumslanted] [command=no,style=mediumslanted]


Is that necessary? And is it enough?


\starttypescript [sans] [alegreya]
   \definefontsynonym[AlegreyaSans-Regular][name:AlegreyaSans-Regular]
   \definefontsynonym[AlegreyaSans-Italic][name:AlegreyaSans-Italic]
   \definefontsynonym[AlegreyaSans-Caps][name:AlegreyaSansSC-Regular]
   \definefontsynonym[AlegreyaSans-ItalicCaps][name:AlegreyaSansSC-Italic]
   \definefontsynonym[AlegreyaSans-Medium][name:AlegreyaSans-Medium]

\definefontsynonym[AlegreyaSans-MediumItalic][name:AlegreyaSans-MediumItalic]
   \definefontsynonym[AlegreyaSans-MediumCaps][name:AlegreyaSansSC-Medium]

\definefontsynonym[AlegreyaSans-MediumItalicCaps][name:AlegreyaSansSC-MediumItalic]
   \definefontsynonym[AlegreyaSans-Bold][name:AlegreyaSans-Bold]
   
\definefontsynonym[AlegreyaSans-BoldItalic][name:AlegreyaSans-BoldItalic]

   \definefontsynonym[AlegreyaSans-BoldCaps][name:AlegreyaSansSC-Bold]

\definefontsynonym[AlegreyaSans-BoldItalicCaps][name:AlegreyaSansSC-BoldItalic]
\stoptypescript

\starttypescript [sans] [alegreya] [name]
   \definefontsynonym [Sans]   [AlegreyaSans-Regular] []
   \definefontsynonym [SansItalic] [AlegreyaSans-Italic]  []
   \definefontsynonym [SansSlanted]    [AlegreyaSans-Italic]  []
   \definefontsynonym [SansMedium]   [AlegreyaSans-Medium] []
   \definefontsynonym [SansMediumItalic] [AlegreyaSans-MediumItalic][]
   \definefontsynonym [SansMediumSlanted][AlegreyaSans-MediumItalic][]
   \definefontsynonym [SansBold]   [AlegreyaSans-Bold]    []
   \definefontsynonym [SansBoldItalic] [AlegreyaSans-BoldItalic]  []
   \definefontsynonym [SansBoldSlanted][AlegreyaSans-BoldItalic]  []
   \definefontsynonym [SansCaps]   [AlegreyaSans-Caps] \stoptypescript
___
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
___


--

-
  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://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: Japanese

2024-03-02 Thread Wolfgang Schuster

Emanuel Han schrieb am 01.03.2024 um 16:23:

Dear Wolfgang,

thank you for your valuable remarks. I integrated them, see corrected 
attached example.


Yes, correct layout examples exist. They're all showing vertical 
writing, but the rules and principles are exactly the same for 
horizontal writing.


 *
position of the headers and footers:
https://www.w3.org/TR/jlreq/#fig1_30


See my attached gongitsune.tex example how you can squeeze text in a 
very narrow header/footer.



 *
aligning lines to the text box: https://www.w3.org/TR/jlreq/#fig1_3


You can use the lines key for \setuplayout to let ConTeXt calculate the 
necessary value for the text height.



 *
protrusion of ruby: https://www.w3.org/TR/jlreq/#fig_ad1_6


You're getting this for free because ruby text doesn't take up vertical 
space, in case vertical text is working it would now stick into the 
margins as expected.


\starttext
\ruledhbox{a \ruby{x}{y} b}
\stoptext


In my previous mail, I wrote wrong amounts of lines. They should be 46 
lines on one page, while the actual example doesn't show the 46th line.


It would be important to identify the reason why only 24 characters 
are used to create a line when 25 could be used. Then we can develop a 
method to turn that mechanism off or circumvent it.

Quotation from https://www.w3.org/TR/jlreq:
/In principle, when composing a line with //ideographic (cl-19) 
<https://www.w3.org/TR/jlreq/#cl-19>//, //hiragana (cl-15) 
<https://www.w3.org/TR/jlreq/#cl-15>// and //katakana (cl-16) 
<https://www.w3.org/TR/jlreq/#cl-16>// characters, no extra spacing 
appears between their //character frame 
<https://www.w3.org/TR/jlreq/#term.character-frame>//. This is called 
solid setting (see //Figure 5 <https://www.w3.org/TR/jlreq/#fig1_8>//)./


1. ConTeXt has a mechanism to typeset Japanese texts.

2. There are flaws in the output it produces but this nothing which 
can't be fixed.


3. To fix the problems someone has to be passionate to fix them and 
we're willing to help here.


As you can see in my second example file japanese.tex there is a font 
feature to create half sized parentheses etc. which isn't supported yet 
by ConTeXt's mechanism for japanese and in case your willing to improve 
it this should be taken care of as well.


Wolfgang

\definefontfeature [halt] [halt=yes]

\starttext

\setscript[nihongo]

\begingroup \showmakeup[glyph,fontkern]

% \startfont[file:notosanscjkjpregular*default]「うわアぬすと狐め」と、どなりたてました。\stopfont
% 
% \startfont[file:notosanscjkjpregular*default]「「うわアぬすと狐め」と、「どなりたてました」。\stopfont
% 
% 
\startfont[file:notosanscjkjpregular*default,halt]「うわアぬすと狐め」と、どなりたてました。\stopfont
% 
% 
\startfont[file:notosanscjkjpregular*default,halt]「「うわアぬすと狐め」と、「どなりたてました」。\stopfont

\startfont[name:notosansjpregular*default]「うわアぬすと狐め」と、どなりたてました。\stopfont

\startfont[name:notosansjpregular*default]「「うわアぬすと狐め」と、「どなりたてました」。\stopfont

\startfont[name:notosansjpregular*default,halt]「うわアぬすと狐め」と、どなりたてました。\stopfont

\startfont[name:notosansjpregular*default,halt]「「うわアぬすと狐め」と、「どなりたてました」。\stopfont

\endgroup

\stoptext
% \definefontfeature [fixeddimensions] [dimensions={1,1.8,0}]
% 
% \definefontfamily [noto_japanese] [rm] [Noto Serif CJK JP] 
[features={default,fullprotrusion,fixeddimensions}]
% \definefontfamily [noto_japanese] [ss] [Noto Sans CJK JP]  
[features={default,fullprotrusion,fixeddimensions}]

% \definefontfamily [noto_japanese] [rm] [Noto Serif CJK JP] 
[features={default,fullprotrusion}]
% \definefontfamily [noto_japanese] [ss] [Noto Sans CJK JP]  
[features={default,fullprotrusion}]

\definefontfamily [noto_japanese] [rm] [Noto Serif JP] 
[features={default,fullprotrusion}]
\definefontfamily [noto_japanese] [ss] [Noto Sans JP]  
[features={default,fullprotrusion}]

\setupbodyfont
  [noto_japanese]

\setscript
  [nihongo]

\setupalign
  [hanging]

\setupindenting
  [yes,1em]

\setupinterlinespace
  [line=2\bodyfontsize,
   height=0.9,
   depth=0.1]

\setupruby
  [style={\switchtobodyfont[6pt]}]

\setuppagenumbering
  [alternative=doublesided,
   location=none]

\setuphead
  [title,subject]
  [align=middle]

\startsetups [header:rightpage]

  \startframed [
  frame=off,
  strut=no,
  height=\headerheight,
  offset=none,
  align=low,
  roffset=1em,
  ]

\getmarking[subject]

  \stopframed

\stopsetups

\startsetups [header:leftpage]

  \startframed [
  frame=off,
  strut=no,
  height=\headerheight,
  offset=none,
  align=low,
  loffset=1em,
  ]

\getmarking[title]

  \stopframed

\stopsetups

\startsetups [footer:rightpage]

  \startframed [
  frame=off,
  strut=no,
  height=\headerheight,
  offset=none,
  align=low,
  roffset=1em,
  ]

\prefixedpagenumber

  \stopframed

\stopsetups

\startsetups [footer:leftpage]

  \startframed [
  frame=off,
  strut=no,
  height=\headerheight,
  offset=none,
  align=low,
  loffset=1em,
  ]

\pre

[NTG-context] Suggestions and problems of the manuals

2024-01-17 Thread Gerion Entrup
ollected, 0 deltas, 0 shared partials, 
0 partial entries
mkiv lua stats  > used platform: linux-64, type: unix, binary subtree: 
texmf-linux-64
mkiv lua stats  > used engine: luametatex version: 2.10.11, 
functionality level: 20231231, format id: 698, compiler: gcc
mkiv lua stats  > tex properties: 807097 hash slots used of 2097152, 
50666 control sequences, approximate memory usage: 49 MB
mkiv lua stats  > lua properties: engine: lua 5.4, used memory: 84 MB, 
ctx: 80 MB, max: 80 MB, symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 0.528 seconds, 1 processed pages, 1 shipped 
pages, 1.895 pages/second
mtx-context | purged files: 
math-mkiv-t-b-ce3b35636ef01ee62897a2beb76049e0.log, 
math-mkiv-t-b-ce3b35636ef01ee62897a2beb76049e0.tmp, 
math-mkiv-t-b-ce3b35636ef01ee62897a2beb76049e0.tuc
system  | total runtime: 1.044 seconds of 1.071 seconds

buffers > typeset > no changes in 'demo-4', processing skipped
floatblocks > '3' limited
floatblocks > 3 saved
pages   > flushing realpage 14, userpage 12, subpage 14
floatblocks > 1 moved
floatblocks > 2 moved
floatblocks > 3 moved
pages   > flushing realpage 15, userpage 13, subpage 15
pages   > flushing realpage 16, userpage 14, subpage 16
pages   > flushing realpage 17, userpage 15, subpage 17
pages   > flushing realpage 18, userpage 16, subpage 18
pages   > flushing realpage 19, userpage 17, subpage 19
structure   > sectioning > section @ level 3 : 0.3.1 -> Scripts
tex error   > tex error on line 370 in file 
/home/gerion/src/context/doc/context/sources/general/manuals/math/math-spacing.tex:
 Math error: parameter 'subshiftdown' with id 49 in style 2 is not set

 \math_m_nop
#1->\relax \ifmmode #1\else \normalstartimath 
\usemathstyleparameter \mathematicsparameter \c!mathstyle \expand 
\everyinsidemathematics \relax \begingroup #1\endgroup \normalstopimath
\fi

{\switchtobodyfont [cambria]\math{F_j = \int\nolimits _a^b}
} {Cambria}

360 font can be very detailed in where italic correction is to be 
applied and how
361 advanced stepwise kerns are used, but not many fonts have 
extensive information.
362 Here are some differences in rendering. In \OPENTYPE\ the 
super- and subscript of
363 an integral are moved right and left half of the italic 
correction.
364
    365 \startlinecorrection
366 \startcombination[6*1]
367 {\switchtobodyfont  [modern]\math{F_j = \int\nolimits 
_a^b}} {Latin Modern}
368     {\switchtobodyfont [pagella]\math{F_j = \int\nolimits 
_a^b}} {Pagella}
369     {\switchtobodyfont  [dejavu]\math{F_j = \int\nolimits 
_a^b}} {Dejavu}
370 >>  {\switchtobodyfont [cambria]\math{F_j = \int\nolimits 
_a^b}} {Cambria}
371 {\switchtobodyfont[lucidaot]\math{F_j = \int\nolimits 
_a^b}} {Lucida OT}
372 {\switchtobodyfont[xits]\math{F_j = \int\nolimits 
_a^b}} {Xits}
373 \stopcombination
374 \stoplinecorrection
375
376 \stopsection
377
378 \startsection[title=Bad fonts]
379
380 There might be fonts out there where the italic correction is 
supposed to be
Sorry, but I can't typeset math unless various parameters have been 
set. This is
normally done by loading special math fonts into the math family slots. 
Your font
set is lacking at least the parameter mentioned earlier.
mtx-context | fatal error: return code: 1
- I tried to find a prebuild version and found 
https://mirror.contextgarden.net/general/manuals/math-mkiv.pdf.
  However, this document seems to be from 2021 and has a kind of wobbly
  rendering in Okular/Poppler (I remember the same phenomena with early
  LMTX). See the screenshot attached (math-mkiv-online.png). Is there a
  newer version somewhere? Maybe it is meaningful to delete the old
  version.


Best
Gerion
From 187f2bf0901d414bf55869054d29ee2c4bec1a64 Mon Sep 17 00:00:00 2001
From: Gerion Entrup 
Date: Tue, 16 Jan 2024 23:40:40 +0100
Subject: [PATCH] units-mkiv: improve

- typos
- remove getbuffer without context
- demonstrate usage of pm and to
---
 doc/context/sources/general/manuals/units/units-mkiv.tex | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/doc/context/sources/general/manuals/units/units-mkiv.tex b/doc/context/sources/general/manuals/units/units-mkiv.tex
index d70c7221f..a1631aadb 100644
--- a/doc/context/sources/general/manuals/units/units-mkiv.tex
+++ b/doc/context/sources/general/manu

[NTG-context] Re: issue with fonts in current latest (2024.01.08 11:23)

2024-01-15 Thread Mikael Sundqvist
Hi,

Try this:

On Mon, Jan 15, 2024 at 6:17 PM Pablo Rodriguez via ntg-context
 wrote:
>
> Dear list,
>
> I have the following sample:
>
>   \definefontfamily[mainface][rm][TeX Gyre Pagella]
>   \definefontfamily[coverface][rm][TeX Gyre Termes]

\definebodyfontenvironment[16pt]

>   \setupbodyfont[mainface, 16pt]
>   \starttext
>   \startmakeup[standard][style=\bf]
>   \switchtobodyfont[coverface]
>   This is a cover.
>   \stopmakeup
>
>   This is text.
>   \stoptext
>
> Compiling the sample with current latest (2024.01.08 11:23), LMTX puts
> Latin Modern Roman (no bold) and MkIV puts Termes (no bold).
>
> The results with previous latest (2023.09.26 18:19), cover is in Termes
> bold with LMTX and in Termes regular with MkIV.
>
> I guess there might be an issue here. Could anyone confirm this?
>
> Many thanks for your help,
>
> Pablo

Maybe some check will be added. (On the chat with Hans...)

/Mikael
___
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] issue with fonts in current latest (2024.01.08 11:23)

2024-01-15 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \definefontfamily[mainface][rm][TeX Gyre Pagella]
  \definefontfamily[coverface][rm][TeX Gyre Termes]
  \setupbodyfont[mainface, 16pt]
  \starttext
  \startmakeup[standard][style=\bf]
  \switchtobodyfont[coverface]
  This is a cover.
  \stopmakeup

  This is text.
  \stoptext

Compiling the sample with current latest (2024.01.08 11:23), LMTX puts
Latin Modern Roman (no bold) and MkIV puts Termes (no bold).

The results with previous latest (2023.09.26 18:19), cover is in Termes
bold with LMTX and in Termes regular with MkIV.

I guess there might be an issue here. Could anyone confirm this?

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://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: Problem with the paragraph

2023-12-14 Thread Wolfgang Schuster

Ursula Hermann schrieb am 13.12.2023 um 15:22:


Dear list,

I have this example. I need the whole paragraph in color. But there is 
something wrong.


\definepapersize[MyBook][width=19cm,height=24cm]

\setuppapersize[MyBook][MyBook] % Prints on paper the size of MyBook

%\setuppapersize[MyBook][A4] %Would print MyBook-size pages on A4 paper



This doesn't work to use Times New Roman as main font, you can use

    \setupbodyfont[termes]

to get a times lookalike.


\setupbodyfont[Times New Roman, 12.2pt]

\definemargindata [MyInMargin][inright]

\definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]

\defineenumeration

[theorem]

  [

text=Theorem,

title=yes,

width=fit,

distance=0.2em,

alternative=serried,

  ]

\definetextbackground[paragraph][

location=paragraph,

background=color,

backgroundcolor=lightgray,

leftoffset=.5\bodyfontsize,

rightoffset=.5\bodyfontsize,

topoffset=.5\bodyfontsize,

bottomoffset=.5\bodyfontsize,

before={\switchtobodyfont[global]},

after={},

frame=off,]

\margintext{\blackrule[color=black, height=0.10ex, 
width=1cm]\\}\blackrule[color=black, height=0.10ex, width=13.50cm]


\starttext

\margintext {1.1.1}



What is the purpose of all these starttext/stoptext blocks?


\starttext

\bf{Beispiel 3.2.17 (Vertauschung von All- und Existenzquantor)}.

\stoptext

\starttext

{\it

\par Sei M die Menge aller Männer und F die Menge aller Frauen. Die 
Aus-\par


sage h(m, f) sei ”m ist verliebt in f“. Unter diesen Voraussetzungen

machen Sie sich die Bedeutung der beiden Aussagen klar.

\stoptext

\par

\starttext



1. Use the itemize environment to create numbered blocks.

2. Learn the correct usage of inline math mode, i.e. \m{...}


1. \m\forall m ∈M : ∃f ∈F : h(m, f).\par

2. ∃f ∈F : ∀m ∈M : h(m, f).\par

\stoptext

\blank

\starttext

\startparagraph

\blank

\tf Mitunter ist es aus der Formulierung nur schwer zu erkennen, dass

ein \m ∃\forall∀oder ein \m \forall∀\m∃versteckt ist. Dann ist es 
besonders wichtig, die


Formulierung sehr lange zu prüfen und eventuell auch formalisiert

noch einmal aufzuschreiben.”\blank

Der Wert von y = f(x) ist unabhängig von der Wahl\par

von x“ ist gleichbedeutend mit ∃y : ∀x : f(x) = y \par

(Beutelspacher [10, S.54]).

\blank

\stopparagraph

\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://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] About framedtext

2023-12-13 Thread Fabrice Couvreur
Hi,
Is this a bug or not ?
The key to coloring the background of the text seems to no longer work.
Thanks
Fabrice

\definecolor[MyColorC][s=0.8784]
  \definecolor[MyColorD][m=0.27,y=1]
  \definecolor[ColorA][0.8(white)]
  \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
  \definecolor[MyColorA][.75(MyColorB,white)]

  \defineframed
  [FrameTitle]
  [frame=off,
   foregroundstyle=\bfx\ss,
   foregroundcolor=white,
   background=color,
   backgroundcolor=MyColorD,
   location=depth]

  \defineframedtext
  [FramedText]
  [offset=0.25em,
   style=\ss,
   toffset=\zeropoint,
   background=color,
   backgroundcolor=MyColorA,
   foregroundstyle={\switchtobodyfont[9pt]},
   align={right, broad},
   frame=off,
   corner=00,
   radius=0.5em,
   width=10cm]

  \definedescription
  [Info]
  [before=,
   after=,
   text=Info,
   title=no,
   width=fit,
   distance=0.5em,
   headcommand=\FrameTitle,
   alternative=serried]

\starttext
   \startFramedText[width=5cm]
\startInfo
 \input{ward}
\stopInfo
\stopFramedText
\stoptext
___
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] Problem with the paragraph

2023-12-13 Thread Ursula Hermann
Dear list,

I have this example. I need the whole paragraph in color. But there is 
something wrong.
\definepapersize[MyBook][width=19cm,height=24cm]
\setuppapersize[MyBook][MyBook] % Prints on paper the size of MyBook
%\setuppapersize[MyBook][A4] %Would print MyBook-size pages on A4 paper
\setupbodyfont[Times New Roman, 12.2pt]
\definemargindata  [MyInMargin][inright]
\definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]
\defineenumeration
  [theorem]
  [
text=Theorem,
title=yes,
width=fit,
distance=0.2em,
alternative=serried,
  ]
\definetextbackground[paragraph][
  location=paragraph,
  background=color,
  backgroundcolor=lightgray,
  leftoffset=.5\bodyfontsize,
  rightoffset=.5\bodyfontsize,
  topoffset=.5\bodyfontsize,
  bottomoffset=.5\bodyfontsize,
  before={\switchtobodyfont[global]},
  after={},
  frame=off,]
  \margintext{\blackrule[color=black, height=0.10ex, 
width=1cm]\\}\blackrule[color=black, height=0.10ex, width=13.50cm]
\starttext
\margintext {1.1.1}
\starttext
\bf{Beispiel 3.2.17 (Vertauschung von All- und Existenzquantor)}.
\stoptext
\starttext
{\it
\par Sei M die Menge aller Männer und F die Menge aller Frauen. Die Aus-\par
sage h(m, f) sei ”m ist verliebt in f“. Unter diesen Voraussetzungen
machen Sie sich die Bedeutung der beiden Aussagen klar.
\stoptext
\par
\starttext
1. \m\forall m ∈ M : ∃f ∈ F : h(m, f).\par
2. ∃f ∈ F : ∀m ∈ M : h(m, f).\par
\stoptext
\blank
\starttext
\startparagraph
\blank
\tf Mitunter ist es aus der Formulierung nur schwer zu erkennen, dass
ein \m ∃\forall∀ oder ein \m \forall∀\m∃ versteckt ist. Dann ist es besonders 
wichtig, die
Formulierung sehr lange zu prüfen und eventuell auch formalisiert
noch einmal aufzuschreiben.”\blank
Der Wert von y = f(x) ist unabhängig von der Wahl\par
von x“ ist gleichbedeutend mit ∃y : ∀x : f(x) = y \par
(Beutelspacher [10, S.54]).
\blank
\stopparagraph
\stoptext

Many thanks
Uschi



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: Adobe Source Typescript With Design Sizes

2023-11-02 Thread Vincent Hennebert
 it be that typescripts are processed in 
some special mode that doesn’t like Lua syntax? As a workaround, I put 
the code in an external file and require it from inside the typescript.


In the goodies file, I use what I believe is the largest possible font 
size that can be used in ConTeXt (16,383pt) to select the Display 
design size. Otherwise, text above that size will fall back to the 
default, regular design size.


Now, since I use the goodies file only when design sizes are enabled, 
I thought I could make it more robust by using AdobeSource4Display as 
a default, that is, for any size above 16.5pt. However, if I mix 
design sizes enabled and disabled in a document, the disabled one 
seems to be using the goodies file even though it’s not mentioned in 
the typescript. Any idea of why? For example:


\usetypescriptfile[adobesource]
\usebodyfont[adobesource]
\setupbodyfont[adobesource-nodesignsize]
\starttext
This text is typeset in Display when Regular should be used.

\switchtobodyfont[adobesource]
This text is typeset in Regular with design sizes enabled.
\stoptext


What’s Next
===

* A harmonious-looking companion math font.
* A harmonious-looking companion math font that uses glyphs from Adobe 
Serif 4 when available.



Thanks,
Vincent

___
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: Adobe Source Typescript With Design Sizes

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

On 10/31/2023 8:18 PM, Vincent Hennebert wrote:

Hello there,

I had mentioned this on a thread some (long) time ago, finally got 
around to finishing a first version of a typescript with the Adobe 
Source font family, in all its weight alternatives and design sizes (the 
latter being available in the Serif style only).


Comments welcome. If it looks good I can upload it to the wiki, on the 
Typescripts_examples page I guess.


I have no tiem now to figure out this (somewhat excessive) amount of 
fonts - hopefully we will not end up in a world where all fonts have 
many weights which makes it easier for designers not to make choices and 
delegate that to users instead. That said,


- attached a different approach

- in your variant you can put the lua in the lfg file (at the top) and 
then add \loadfontgoodies[...] before where the functions are used


I'm not sure if we can talk of design sizes here. It's more about 
'usage' because a display vs subhead vs ... variant is not about mixing 
depending on scale (e.g. using display for 20 pt in a 15 pt setup versus 
using scaled regular for 20pt and then display 20pt for e.g. a title 
page or 50pt on posters).



(I have Questions For the Experts further down...)


maybe a side effect of not defining a math font


About Adobe Source
==

The fonts are available on GitHub [1]. They are the descendants of the 
Source {Serif,Sans,Code} Pro fonts described in the type-imp-source.mkiv 
typescript available in the ConTeXt distribution. Due to major changes, 
Serif Pro was renamed into Serif 4 in, well, its version 4 [2] (that’s 
the version that introduces design sizes, a.k.a. optical sizes), and 
Sans Pro was renamed into Sans 3 [3].


[1] https://github.com/adobe-fonts/
[2] https://github.com/adobe-fonts/source-serif/releases/tag/4.004R
[3] https://github.com/adobe-fonts/source-sans/issues/192


Usage
=

Short version: store the attached typescript and its helper Lua files 
somewhere on your file system where ConTeXt will find them ($HOME/texmf 
for example), then use in your document:


     \setupbodyfont[adobesource]

Long version: The default typescript name is adobesource (also available 
as adobesource-regular) and has design sizes enabled.


Each weight is also available: adobesource-extralight, 
adobesource-light, etc., all the way to adobesource-black. There is also 
a medium weight, that selects the regular versions of Serif and Sans, 
but the medium version of Mono (just slightly bolder than the regular 
one, presumably for better on-screen rendering in terminals).


Design sizes can be disabled by adding -nodesignsize- to the typescript 
name: adobesource-nodesignsize-extralight, etc.


Finally, I thought it would be cool to over-engineer the typescript a 
little bit and provide direct access to the design sizes (in case one 
would want a narrower version for body text, or a bolder and more 
expanded version for titles, etc.). Here they are, again in all their 
weights: adobesource-caption-extralight, adobesource-smtext-light, 
adobesource-subhead, adobesource-display-bold, etc. The ‘regular’ design 
size is accessed by simply using adobesource-nodesignsize.



Questions For the Experts
=

To avoid a gigantic typescript file with a lot of duplication, I 
offloaded the font filename calculation to a Lua function (see attached 
adobesource.lua). I initially wanted to put the Lua code inside the 
typescript, but then I had all sorts of weird Lua compilation errors. 
The very same code works fine when included in a normal document though. 
Could it be that typescripts are processed in some special mode that 
doesn’t like Lua syntax? As a workaround, I put the code in an external 
file and require it from inside the typescript.


In the goodies file, I use what I believe is the largest possible font 
size that can be used in ConTeXt (16,383pt) to select the Display design 
size. Otherwise, text above that size will fall back to the default, 
regular design size.


Now, since I use the goodies file only when design sizes are enabled, I 
thought I could make it more robust by using AdobeSource4Display as a 
default, that is, for any size above 16.5pt. However, if I mix design 
sizes enabled and disabled in a document, the disabled one seems to be 
using the goodies file even though it’s not mentioned in the typescript. 
Any idea of why? For example:


\usetypescriptfile[adobesource]
\usebodyfont[adobesource]
\setupbodyfont[adobesource-nodesignsize]
\starttext
This text is typeset in Display when Regular should be used.

\switchtobodyfont[adobesource]
This text is typeset in Regular with design sizes enabled.
\stoptext


What’s Next
===

* A harmonious-looking companion math font.
* A harmonious-looking companion math font that uses glyphs from Adobe 
Serif 4 when available.



Thanks,
Vincent

___
If your question

[NTG-context] Adobe Source Typescript With Design Sizes

2023-10-31 Thread Vincent Hennebert

Hello there,

I had mentioned this on a thread some (long) time ago, finally got 
around to finishing a first version of a typescript with the Adobe 
Source font family, in all its weight alternatives and design sizes (the 
latter being available in the Serif style only).


Comments welcome. If it looks good I can upload it to the wiki, on the 
Typescripts_examples page I guess.


(I have Questions For the Experts further down...)


About Adobe Source
==

The fonts are available on GitHub [1]. They are the descendants of the 
Source {Serif,Sans,Code} Pro fonts described in the type-imp-source.mkiv 
typescript available in the ConTeXt distribution. Due to major changes, 
Serif Pro was renamed into Serif 4 in, well, its version 4 [2] (that’s 
the version that introduces design sizes, a.k.a. optical sizes), and 
Sans Pro was renamed into Sans 3 [3].


[1] https://github.com/adobe-fonts/
[2] https://github.com/adobe-fonts/source-serif/releases/tag/4.004R
[3] https://github.com/adobe-fonts/source-sans/issues/192


Usage
=

Short version: store the attached typescript and its helper Lua files 
somewhere on your file system where ConTeXt will find them ($HOME/texmf 
for example), then use in your document:


\setupbodyfont[adobesource]

Long version: The default typescript name is adobesource (also available 
as adobesource-regular) and has design sizes enabled.


Each weight is also available: adobesource-extralight, 
adobesource-light, etc., all the way to adobesource-black. There is also 
a medium weight, that selects the regular versions of Serif and Sans, 
but the medium version of Mono (just slightly bolder than the regular 
one, presumably for better on-screen rendering in terminals).


Design sizes can be disabled by adding -nodesignsize- to the typescript 
name: adobesource-nodesignsize-extralight, etc.


Finally, I thought it would be cool to over-engineer the typescript a 
little bit and provide direct access to the design sizes (in case one 
would want a narrower version for body text, or a bolder and more 
expanded version for titles, etc.). Here they are, again in all their 
weights: adobesource-caption-extralight, adobesource-smtext-light, 
adobesource-subhead, adobesource-display-bold, etc. The ‘regular’ design 
size is accessed by simply using adobesource-nodesignsize.



Questions For the Experts
=

To avoid a gigantic typescript file with a lot of duplication, I 
offloaded the font filename calculation to a Lua function (see attached 
adobesource.lua). I initially wanted to put the Lua code inside the 
typescript, but then I had all sorts of weird Lua compilation errors. 
The very same code works fine when included in a normal document though. 
Could it be that typescripts are processed in some special mode that 
doesn’t like Lua syntax? As a workaround, I put the code in an external 
file and require it from inside the typescript.


In the goodies file, I use what I believe is the largest possible font 
size that can be used in ConTeXt (16,383pt) to select the Display design 
size. Otherwise, text above that size will fall back to the default, 
regular design size.


Now, since I use the goodies file only when design sizes are enabled, I 
thought I could make it more robust by using AdobeSource4Display as a 
default, that is, for any size above 16.5pt. However, if I mix design 
sizes enabled and disabled in a document, the disabled one seems to be 
using the goodies file even though it’s not mentioned in the typescript. 
Any idea of why? For example:


\usetypescriptfile[adobesource]
\usebodyfont[adobesource]
\setupbodyfont[adobesource-nodesignsize]
\starttext
This text is typeset in Display when Regular should be used.

\switchtobodyfont[adobesource]
This text is typeset in Regular with design sizes enabled.
\stoptext


What’s Next
===

* A harmonious-looking companion math font.
* A harmonious-looking companion math font that uses glyphs from Adobe 
Serif 4 when available.



Thanks,
Vincent\starttypescriptcollection[adobesource]

  \startluacode
  require("adobesource")
  \stopluacode

  \starttypescript[serif,sans,mono]
[
  adobesource-extralight,
  adobesource-light,
  adobesource,
  adobesource-regular,
  adobesource-medium,
  adobesource-semibold,
  adobesource-bold,
  adobesource-black,
  adobesource-nodesignsize-extralight,
  adobesource-nodesignsize-light,
  adobesource-nodesignsize,
  adobesource-nodesignsize-regular,
  adobesource-nodesignsize-medium,
  adobesource-nodesignsize-semibold,
  adobesource-nodesignsize-bold,
  adobesource-nodesignsize-black,
]
[name]
\setups[font:fallback:\typescriptone]
\definefontsynonym [\typescriptprefix{\typescriptone}]   [\ctxlua{context(userdata.adobesource.getfontname("\typescriptone", "\typescripttwo", false, false))}] [features=default]
\definefontsynonym [\t

[NTG-context] Re: Framed Text with Chapter Numbers as Counter

2023-09-17 Thread Jeroen
That works fine except that the following line does only issue the
sequential number and not the chapter number.

Refer to \in{code fragment}[tit1] bla

MWE:

\startuseMPgraphic{CountFrame}
  picture p; numeric w, h, o;
  p := textext.rt("\wrappedcurrentconstruction");
  w := OverlayWidth;
  h := OverlayHeight;
  o := BodyFontSize;
  p := p shifted (2o,h-ypart center p);
  draw p;
  path b;
  b := boundingbox p enlarged (o/10);
  path a;
  a := (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner b,h);
  drawoptions (withpen pencircle scaled 1pt withcolor black);
  draw a;
  draw b;
  setbounds currentpicture to OverlayBox;
\stopuseMPgraphic

\defineoverlay
  [CountFrame]
  [\useMPgraphic{CountFrame}]

\defineframedtext
  [CountFramedText]
  [frame=off,
   background=CountFrame,
   offset=\bodyfontsize,
   width=\textwidth,
%  style={\switchtobodyfont[11pt,tt]}]
   bodyfont=11pt,
   style={\tt}]

\defineenumeration
  [Code]
  [title=yes,
   alternative=empty,
   before=\startCountFramedText,
   after=\stopCountFramedText,
   left={\somenamedheadnumber{chapter}{current}.}]

\starttext

\startchapter
  [title=first]

\startCode
  [title={The First Title},
   reference={tit1}]
   Some verbatim text
\stopCode

\startCode
  [title={The Second Title},
   reference={tit2}]
   Some verbatim text
\stopCode

Refer to \in{code fragment}[tit1] bla

\stopchapter

\startchapter
  [title=second]

\startCode
  [title={The Third Title},
   reference={tit3}]
   Some verbatim text
\stopCode

\stopchapter

\stoptext

Op zo 17 sep 2023 om 17:31 schreef Bruce Horrocks :

>
>
> > On 16 Sep 2023, at 21:28, Jeroen  wrote:
> >
> > This MWE has a framed text for some verbatim text (code) with as title
> ref. a counter 1, 2, etc.. Is there a way to change this frame text title
> as following with the chapter number and a sequential number and the title.
>
> Amemd the \defineenumeration as follows:
>
> \defineenumeration
>   [Counter]
>   [title=yes,
>alternative=empty,
>before=\startCountFramedText,
>after=\stopCountFramedText,
>left={\somenamedheadnumber{chapter}{current}:}]
>
> —
> 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
>
> ___
___
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] Framed Text with Chapter Numbers as Counter

2023-09-16 Thread Jeroen
This MWE has a framed text for some verbatim text (code) with as title ref.
a counter 1, 2, etc.. Is there a way to change this frame text title as
following with the chapter number and a sequential number and the title.

Code Fragment 1.1 (The First Title)
Code Fragment 1.2 (The Second Title)
Code Fragment 2.1 (The Third Title)

MWE:

\startuseMPgraphic{CountFrame}
  picture p; numeric w, h, o;
  p := textext.rt("\wrappedcurrentconstruction");
  w := OverlayWidth; h := OverlayHeight; o := BodyFontSize;
p := p shifted (2o,h-ypart center p);
draw p;
path b;
b := boundingbox p enlarged (o/10);
drawoptions (withpen pencircle scaled 1pt withcolor black);
draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner b,h);
draw b;
setbounds currentpicture to OverlayBox;
\stopuseMPgraphic

\defineoverlay
  [CountFrame]
  [\useMPgraphic{CountFrame}]

\defineframedtext
  [CountFramedText]
  [frame=off,
   background=CountFrame,
   offset=\bodyfontsize,
   width=\textwidth,
%   style={\switchtobodyfont[11pt,tt]}]
   bodyfont=11pt,
   style={\tt},
   ]

\def\FrameTitle#1%
  {\setMPtext{CountFrame}
  {\hbox spread 1em{\hss\strut#1\hss}}}\setMPtext{CountFrame}
  {}

\defineenumeration
  [Counter]
  [title=yes,
   alternative=empty,
   before=\startCountFramedText,
   after=\stopCountFramedText]

\starttext

\startchapter
  [title=first]

\startCounter
  [title={The First Title},
   reference={tit1}]
   Some verbatim text
\stopCounter

\startCounter
  [title={The Second Title},
   reference={tit2}]
   Some verbatim text
\stopCounter

Refer to \in{code fragment}[tit1] bla

\stopchapter

\startchapter
  [title=second]

\startCounter
  [title={The Third Title},
   reference={tit3}]
   Some verbatim text
\stopCounter

\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] Re: slanted font feature: LMTX vs. MkIV

2023-09-02 Thread Wolfgang Schuster

Hans Hagen schrieb am 02.09.2023 um 11:53:

On 9/2/2023 11:45 AM, Wolfgang Schuster wrote:

Pablo Rodriguez schrieb am 02.09.2023 um 10:25:

Dear list,

I have the following sample (using current latest from 2023.08.27 
13:48):


   \setupinteractionscreen[option=max]
   \definefontfamily[maf][rm][DejaVu Sans]
 [sl={style:tf, features:{default,slanted}}]
   \setupbodyfont[maf, 8pt]
   \setupfittingpage[offset=1ex]
   \starttext
   \startTEXpage
   a {\em b}
   \stopTEXpage
   \startTEXpage[foregroundstyle={\setupbodyfont[100pt]}]
   a {\em b}
   \stopTEXpage
   \stoptext

Using LMTX higher font size gives less slanted text (or not at all).

Using MkIV text is slanted fine, independent from font size.

Could anyone confirm the issue?


I can confirm the slant decreases at larger font sizes.

\starttext

\dostepwiserecurse{10}{100}{1}
{{\switchtobodyfont[#1pt]#1pt:\definedfont[Serif*slanted]\vrule\relax 
S\vrule\relax lanted}\par}


\stoptext

in lpdf-lmt.lmt you can try:

l 593

tmsy = tmsy * sc

l 610

tmsy = tmsy * f_y_scale


I get now with LMTX the same output as I get with MkIV, the slant stays 
the same for all sizes.


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: slanted font feature: LMTX vs. MkIV

2023-09-02 Thread Hans Hagen

On 9/2/2023 11:45 AM, Wolfgang Schuster wrote:

Pablo Rodriguez schrieb am 02.09.2023 um 10:25:

Dear list,

I have the following sample (using current latest from 2023.08.27 13:48):

   \setupinteractionscreen[option=max]
   \definefontfamily[maf][rm][DejaVu Sans]
 [sl={style:tf, features:{default,slanted}}]
   \setupbodyfont[maf, 8pt]
   \setupfittingpage[offset=1ex]
   \starttext
   \startTEXpage
   a {\em b}
   \stopTEXpage
   \startTEXpage[foregroundstyle={\setupbodyfont[100pt]}]
   a {\em b}
   \stopTEXpage
   \stoptext

Using LMTX higher font size gives less slanted text (or not at all).

Using MkIV text is slanted fine, independent from font size.

Could anyone confirm the issue?


I can confirm the slant decreases at larger font sizes.

\starttext

\dostepwiserecurse{10}{100}{1}
   {{\switchtobodyfont[#1pt]#1pt:\definedfont[Serif*slanted]\vrule\relax 
S\vrule\relax lanted}\par}


\stoptext

in lpdf-lmt.lmt you can try:

l 593

tmsy = tmsy * sc

l 610

tmsy = tmsy * f_y_scale

-
  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: slanted font feature: LMTX vs. MkIV

2023-09-02 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 02.09.2023 um 10:25:

Dear list,

I have the following sample (using current latest from 2023.08.27 13:48):

   \setupinteractionscreen[option=max]
   \definefontfamily[maf][rm][DejaVu Sans]
 [sl={style:tf, features:{default,slanted}}]
   \setupbodyfont[maf, 8pt]
   \setupfittingpage[offset=1ex]
   \starttext
   \startTEXpage
   a {\em b}
   \stopTEXpage
   \startTEXpage[foregroundstyle={\setupbodyfont[100pt]}]
   a {\em b}
   \stopTEXpage
   \stoptext

Using LMTX higher font size gives less slanted text (or not at all).

Using MkIV text is slanted fine, independent from font size.

Could anyone confirm the issue?


I can confirm the slant decreases at larger font sizes.

\starttext

\dostepwiserecurse{10}{100}{1}
  {{\switchtobodyfont[#1pt]#1pt:\definedfont[Serif*slanted]\vrule\relax 
S\vrule\relax lanted}\par}


\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / 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] Font switching, default features, and a request

2023-08-13 Thread Hamid,Idris
Dear gang,

Consider the following example:

==

\setupdirections[bidi=global,method=one]

\startTEXpage[offset=1em,width=14in]
\definedfont[almfixed*arabic]
\switchtobodyfont[almfixed*arabic]
\switchtobodyfont[almfixed]

% \addff{arabic}

\startbuffer[]
\startlines
الثَّعْلَبُ الْأَسْمَرُ السَّرِيعُ يَقْفِزُ فَوْقَ الْكَلْبِ الْكَسُولِ!
The quick brown fox jumps over the lazy dog!
\stoplines
\stopbuffer

{\tfxx \type{\tfxx} \getbuffer}

{\tfx \type{\tfx} \getbuffer}

\type{\tf} \getbuffer

{\tfa \type{\tfa} \getbuffer}

{\tfb \type{\tfb} \getbuffer}

{\tfc \type{\tfc} \getbuffer}

{\tfd \type{\tfd} \getbuffer}
\stopTEXpage
==

There are three font switches to choose from:

==
\definedfont[almfixed*arabic]
\switchtobodyfont[almfixed*arabic]
\switchtobodyfont[almfixed]
==

Let's toggle one at a time:

1) \definedfont[almfixed*arabic]

a) gives us the correct bidi output, but only for the \tf size
b) is ignored for every other size switch.

a) and b) are expected behavior.

2) \switchtobodyfont[almfixed]

a) gives us Arabic-script bidi output,
b) exhibits no Arabic-script features
c) gives the same result for each size switch

This means that the fontfeature "arabic" -- already predefined in ConTeXt 
(font-pre.mkiv) -- is not explicitly applied.

Curiously, invoking

\addff{arabic}

does not affect the output. Why is it that \addff{arabic} does not work here?

3) \switchtobodyfont[almfixed*arabic]

suppresses the font entirely and we're back to Latin Modern for all sizes. 
Assuming that this is expected behavior, it appears to follow that fontfeatures 
cannot be invoked for \switchtobodyfont and the like, only from within the 
typescript read by \switchtobodyfont etc.
===

REQUEST:

Since ALMFixed is already distributed with ConTeXt, could Hans make the 
fontfeature "arabic" default for this font? That is

\switchtobodyfont[almfixed]

should automatically

a) give us Arabic-script bidi output (already there),
b) exhibit Arabic-script features (missing)
c) gives the same result for each size switch (already there)

(Indeed, it would be useful to have *arabic-predefined typescripts/bodyfonts 
for a few other commonly available/used Arabic fonts as well. Would be willing 
to make a list at some point, test, etc.)

Thank you in advance for considering this request.

Best wishes
Idris

--
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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] Scaling characters without font switching in CLD

2023-08-12 Thread Hamid,Idris
Dear gang,

I. In Context, as is well known, scaling a character is not independent of 
switching the font:

===
\startTEXpage[offset=1em]
\definefont[Times][times @ 14pt]
\Times Test \tfx Test
\setupinterlinespace

\Times Test \switchtobodyfont[x]Test

\Times Test \high{Test}
\stopTEXpage
===

\tfx causes a switch to computer modern.

Of course, with the right typescripts and \setupbodyfont, one can maintain 
stylistic consistency when switching fonts.

But what if we want to scale independently of font switching?

II. One approach might be to use symbols:

\startTEXpage
\definesymbol[Tee][\getglyph{times}{T}]
\symbol[Tee]est \tfx \symbol[Tee]est \tfa \symbol[Tee]est
\stopTEXpage

In this example, \tfa does scale the symbol Tee. But \tfx does not scale the 
symbol!

Why does \tfa (or higher such as \tfb etc.) work, but not \tfx (or lower)?

III. The best approach would be to do it in CLD (Context Lua Code). That is 
mostly beyond my skill to write from scratch without a template, but there are 
some experiments in the system file font-imp-effects.lua. There we will find, 
e.g.,

local specification = {
name= "extend",
description = "scale glyphs horizontally",
initializers = {
base = initializeextend,
node = initializeextend,
}
}

local specification = {
name= "squeeze",
description = "scale glyphs vertically",
initializers = {
base = initializesqueeze,
node = initializesqueeze,
}
}

This seems hopeful:

\definecolor [transparentgreen]  [g=1,t=.7,a=1]
\definecolor [transparentred][r=1,t=.7,a=1]
\definecolor [transparentyellow] [y=1,t=.7,a=1]

\startTEXpage[offset=1em]
\definefontfeature[scale][default][extend=yes,squeeze=yes]
\hbox{\rlap{\definedfont[times @ 14pt]\transparentgreen Test}%
\definedfont[times*scale @ 14pt]\transparentred Test}
\stopTEXpage

But there is no scaling of the character, extend=yes shifts the glyphs to the 
left, and squeeze=yes appears to do nothing at all.

Here is a file collecting these experiments:

https://www.dropbox.com/scl/fi/dggj3ypgjjeia1bo4eelb/test-scaling.tex?rlkey=hcky6ol594mw8u0j2j1z22heh=0
https://www.dropbox.com/scl/fi/o2u1tsq515ycyoeup43qg/test-scaling.pdf?rlkey=h7gof1vyq3r0bh72qynh71apc=0

IV. Objective:

I need to be able to define a couple of characters in CLD -- glottal stops --, 
and add commands to scale and/or rotate a character without triggering a font 
switch. Again, writing this from scratch is beyond my current skill set - 
although I've recently started to study CLD. Something like this -- some of the 
semantics is almost certainly wrong and/or clumsy -)

==
-- ʿ ringhalfleft
local function ringhalfleft (characters,target,base,accent)
--if not characters[target] then
local data1 = characters[base]
local data2 = characters[accent]
if data1 and data2 then
characters[target] = { -- "ʿ"
height   = data1.height,
depth= (data1.depth or 0) + 0.5*(data2.height or 0),
width= data1.width,
unicode  = target,
commands = {
{ "slot", 0, 0 },
{ "left", -0.5*(data2.width  or 0) + 0.5*(data2.width  or 
0)},
-- { "down", 0.2*(data2.height or 0) +   (data2.height or 
0) },
{ "up", 0.0*(data2.height or 0) +(data2.height or 
0) },
{ "slot", 0, 0x063, },
{ "squeeze", 0.75*(data2.height or 0) },
{ "extend",  0.75*(data2.width or 0) },
},
}
end
--end
end

-- ʾ ringhalfright
local function ringhalfright (characters,target,base,accent)
--if not characters[target] then
local data1 = characters[base]
local data2 = characters[accent]
if data1 and data2 then
characters[target] = { -- "ʾ"
height   = data1.height,
depth= (data1.depth or 0) + 0.5*(data2.height or 0),
width= data1.width,
unicode  = target,
commands = {
{ "slot", 0, 0 },
{ "left", -0.35*(data2.width  or 0) + 0.5*(data2.width  or 
0)},
{ "down", 0.0*(data2.height or 0) +   (data2.height or 
0) },
-- { "up", 0.0*(data2.height or 0) +   (data2.height or 0) 
},
{ "slot", 0, 0x063, },
{ "squeeze", 0.75*(data2.height or 0) },
{ "extend",  0.75*(data2.width or 0) },
},
}
end
--end
end

local function initialize(tfmdata,value)
if value then
-- Hdotbelow(tfmdata.characters

[NTG-context] Re: upload

2023-08-10 Thread Thangalin
Did arguments regress in 2023.08.10 02:59?

$ cat u.tex
\starttext
Feisty arguments
\stoptext
$ context u.tex
$  ls -la *.pdf
-rw-r--r-- 1 username username 6279 Aug 10 18:28 u.pdf
$ context --arguments=x=y u.tex | grep error
tex error   > tex error on line 13 in file : Use of \getrawparameters
doesn't match its definition
mtx-context | fatal error: return code: 1

This was working with the previous release.

On Wed, Aug 9, 2023 at 8:43 AM Hans Hagen  wrote:

> Hi,
>
> I uploaded a new lmtx. There are some new features that wil be revealed
> in the future (likely after the meeting) but here is one:
>
> \starttext
>
>  \defineoverlay
>[test]
>[\color
>   [blue]
>   {TEST
>\inframed
>  [foregroundcolor=red]
>  {xxx}
>TEST}]
>
>  \framed
>[background=test,
> foregroundstyle=\switchtobodyfont[small]]
>{test}
>
> \stoptext
>
>  From now on many commands accept (properly) nested [] inside commands
> that use [] as fences (like the setup commands) where it makes sense. It
> is up to the user to decide to use {} (as before) or not but it is less
> error prone.
>
> It is now also possible to nest setups as in
>
> \starttext
>
> \startsetups one
>  \startsetups [three]
>  HERE
>  \stopsetups
> \stopsetups
>
> \startsetups two
>  \startsetups [three]
>  THERE
>  \stopsetups
> \stopsetups
>
> \setups[one] \setups[three]
>
> \setups[two] \setups[three]
>
> \stoptext
>
> As part of the ongoing improvements on math rendering we added some
> classic lm/cm kerns (between upperacse and periods / commas) in the
> goodie files.
>
> Some lowlevel manuals have been extended, explaining experimental 'named
> cross macro nesting parameter referencing' and 'constrained cq. retained
> assignments', but that is only relevant for those interested in
> overcoming some limitations in the traditional engines.
>
> 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] upload

2023-08-09 Thread Hans Hagen

Hi,

I uploaded a new lmtx. There are some new features that wil be revealed 
in the future (likely after the meeting) but here is one:


\starttext

\defineoverlay
  [test]
  [\color
 [blue]
 {TEST
  \inframed
[foregroundcolor=red]
{xxx}
  TEST}]

\framed
  [background=test,
   foregroundstyle=\switchtobodyfont[small]]
  {test}

\stoptext

From now on many commands accept (properly) nested [] inside commands 
that use [] as fences (like the setup commands) where it makes sense. It 
is up to the user to decide to use {} (as before) or not but it is less 
error prone.


It is now also possible to nest setups as in

\starttext

\startsetups one
\startsetups [three]
HERE
\stopsetups
\stopsetups

\startsetups two
\startsetups [three]
THERE
\stopsetups
\stopsetups

\setups[one] \setups[three]

\setups[two] \setups[three]

\stoptext

As part of the ongoing improvements on math rendering we added some 
classic lm/cm kerns (between upperacse and periods / commas) in the 
goodie files.


Some lowlevel manuals have been extended, explaining experimental 'named 
cross macro nesting parameter referencing' and 'constrained cq. retained 
assignments', but that is only relevant for those interested in 
overcoming some limitations in the traditional engines.


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] Probably simple: using a variable for \switchtobodyfont size

2023-05-19 Thread Hans van der Meer via ntg-context
\def\relationsFontSize{8pt}\starttextHello World!\crlf\switchtobodyfont[\relationsFontSize]Hello, world!\stoptext

Untitled.pdf
Description: Adobe PDF document
dr. Hans van der MeerOn 19 May 2023, at 11:43, Gerben Wierda via ntg-context  wrote:I want to use a variable for a font size so I can set it based on language (as some translated texts have widely different sizes)This fails:%===\newdimen\relationsFontSize\relationsFontSize=8pt\starttext\switchtobodyfont[\relationsFontSize]Hello, world!\stoptext%===How can I use a variable to steer \switchtobodyfont size?
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__
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] Probably simple: using a variable for \switchtobodyfont size

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

Gerben Wierda via ntg-context schrieb am 19.05.2023 um 11:43:
I want to use a variable for a font size so I can set it based on 
language (as some translated texts have widely different sizes)


This fails:

%===
\newdimen\relationsFontSize
\relationsFontSize=8pt
\starttext
\switchtobodyfont[\relationsFontSize]
Hello, world!
\stoptext
%===

How can I use a variable to steer \switchtobodyfont size?


You need \the\, i.e.

\switchtobodyfont[\the\relationsFontSize]

but I would use the measure command, e.g.

\definemeasure[relationsFontSize][8pt]
\starttext
\switchtobodyfont[\measure{relationsFontSize}]
Hello, world!
\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] Probably simple: using a variable for \switchtobodyfont size

2023-05-19 Thread Gerben Wierda via ntg-context
I want to use a variable for a font size so I can set it based on language (as 
some translated texts have widely different sizes)

This fails:

%===
\newdimen\relationsFontSize
\relationsFontSize=8pt
\starttext
\switchtobodyfont[\relationsFontSize]
Hello, world!
\stoptext
%===

How can I use a variable to steer \switchtobodyfont size?

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 / 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] Non-standard font alternatives

2023-04-20 Thread Pawel Urbanski via ntg-context

I've found the following Github repository with the typscripts definitions:

https://github.com/r3n4ud/roboto-context


When I use this type-imp-roboto.mkiv file fonts are used and embedded 
when using Roboto in thes \setupbodyfont[].



When I use ebgaramond as the body font but use:

\switchtobodyfont[roboto,20pt] in the \setuphead[] call the font is not 
embedded and seems to be not used.



I am more optimistic but still confused what can be wrong.



___
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] Non-standard font alternatives

2023-04-19 Thread Pawel Urbanski via ntg-context

Dear Hraban,

No, it does not. I am attaching hte type file and the short test document.


Here are the links where one can download the fonts:

https://github.com/googlefonts/roboto/releases

https://fonts.google.com/specimen/Roboto+Slab

 I am wondering if 'hinted' or 'unhinted' release of Roboto found at 
Github matters.



Trust me, that your time ahd help if very much appriciated. I know how 
much time it may take to debug such issue - just for rewriting the files 
with small changes.




\usetypescriptfile[ebgaramond]
\usetypescriptfile[roboto]
\usebodyfont[roboto]
\setupbodyfont[roboto]

\setuphead[chapter]
[style={\switchtobodyfont[roboto,20pt]\ss}]

\starttext

     \startchapter[title=Whatever is the best title]
         \input tufte
     \stopchapter
\startchapter[title={Just a second title}]

Some random text.

\stopchapter

\stoptext
\definefontfeature[robotofeatures][
  mode=node,
  ccmp=yes, % character composition
  liga=yes, tlig=yes, % ligatures
  pnum=yes,
  cpsp=yes, % capital spacing
  kern=yes,
  language=dflt,
  protrusion=quality,
  expansion=quality,
]

\definefontfeature[smallcaps][ % use with \addff
  smcp=yes, % smallcaps
  % c2sc=yes, % caps to smallcaps
]

\starttypescript[sans][roboto,robotosans]
  \definefontsynonym[Roboto-Regular][name:robotoregular]
  \definefontsynonym[Roboto-Black][name:robotoblack]
  \definefontsynonym[Roboto-BlackItalic][name:robotoblackitalic]
  \definefontsynonym[Roboto-Bold][name:robotobold]
  \definefontsynonym[Roboto-BoldItalic][name:robotobolditalic]
  \definefontsynonym[Roboto-Italic][name:robotoitalic]
  \definefontsynonym[Roboto-Light][name:robotolight]
  \definefontsynonym[Roboto-LightItalic][name:robotolightitalic]
  \definefontsynonym[Roboto-Medium][name:robotomedium]
  \definefontsynonym[Roboto-MediumItalic][name:robotomediumitalic]
  \definefontsynonym[Roboto-Italic][name:robotoitalic]
%  \definefontsynonym[Roboto-Regular][name:robotoregular]
  \definefontsynonym[Roboto-Thin][name:robotothin]
  \definefontsynonym[Roboto-ThinItalic][name:robotothinitalic]
\stoptypescript

\starttypescript[sans][roboto,robotosans][name]
  \definefontsynonym [SansThin]         [Roboto-Thin]        
[features=robotofeatures]
  \definefontsynonym [SansThinItalic]   [Roboto-ThinItalic]  
[features=robotofeatures]
  \definefontsynonym [SansThinSlanted]  [Roboto-ThinItalic]  
[features=robotofeatures]
  \definefontsynonym [SansLight]        [Roboto-Light]       
[features=robotofeatures]
  \definefontsynonym [SansLightItalic]  [Roboto-LightItalic] 
[features=robotofeatures]
  \definefontsynonym [SansLightSlanted] [Roboto-LightItalic] 
[features=robotofeatures]
  \definefontsynonym [Sans]             [Roboto-Regular]     
[features=robotofeatures]
  \definefontsynonym [SansItalic]       [Roboto-Italic]      
[features=robotofeatures]
  \definefontsynonym [SansSlanted]      [Roboto-Italic]      
[features=robotofeatures]
  \definefontsynonym [SansCaps]         [Roboto-Regular]     
[features={robotofeatures,smallcaps}]
  \definefontsynonym [SansMedium]       [Roboto-Medium]      
[features=robotofeatures]
  \definefontsynonym [SansMediumItalic] 
[Roboto-MediumItalic][features=robotofeatures]
  \definefontsynonym 
[SansMediumSlanted][Roboto-MediumItalic][features=robotofeatures]
  \definefontsynonym [SansBold]         [Roboto-Bold]        
[features=robotofeatures]
  \definefontsynonym [SansBoldItalic]   [Roboto-BoldItalic]  
[features=robotofeatures]
  \definefontsynonym [SansBoldSlanted]  [Roboto-BoldItalic]  
[features=robotofeatures]
  \definefontsynonym [SansBlack]        [Roboto-Black]       
[features=robotofeatures]
  \definefontsynonym [SansBlackItalic]  [Roboto-BlackItalic] 
[features=robotofeatures]
  \definefontsynonym [SansBlackSlanted] [Roboto-BlackItalic] 
[features=robotofeatures]
\stoptypescript

\starttypescript[sans][roboto-light][name]
  \definefontsynonym [Sans]             [Roboto-Light]         
[features=robotofeatures]
  \definefontsynonym [SansItalic]       [Roboto-LightItalic]   
[features=robotofeatures]
  \definefontsynonym [SansSlanted]      [Roboto-LightItalic]   
[features=robotofeatures]
  \definefontsynonym [SansCaps]         [Roboto-Light]         
[features={robotofeatures,smallcaps}]
  \definefontsynonym [SansBold]         [Roboto-Medium]        
[features=robotofeatures]
  \definefontsynonym [SansBoldItalic]   [Roboto-MediumItalic]  
[features=robotofeatures]
  \definefontsynonym [SansBoldSlanted]  [Roboto-MediumItalic]  
[features=robotofeatures]
\stoptypescript

\starttypescript[sans][roboto-medium][name]
  \definefontsynonym [Sans]             [Roboto-Medium]     
[features=robotofeatures]
  \definefontsynonym [SansItalic]       [Roboto-MediumItalic]      
[features=robotofeatures]
  \definefontsynonym [SansSlanted]      [Roboto-MediumItalic]      
[features=robotofeatures]
  \definefontsynonym [SansCaps]         [Roboto-Medium]     
[features={robotofeatures,smallcaps}]
  \definefontsynonym [SansBold]         [Roboto-Black

Re: [NTG-context] Non-standard font alternatives

2023-04-19 Thread Henning Hraban Ramm via ntg-context

Am 19.04.23 um 16:53 schrieb Pawel Urbanski via ntg-context:

Dear Matthew,
I wrote you off the list in connection to the other thread where Hans 
helped me with using Roboto Flex.
I used your typescript definitions but the font is not embedded in the 
document.


** I've copied all the ttf font files to the recommended directory 
structure under: texmf-local/fonts/truetype.
** I've created a type-imp-roboto.mkiv file and saved it in the 
recommended location under: texmf-local/tex/.../mkiv/.
Using: \usetypescript or \usetypescriptfile or \usebodyfont [roboto] 
with setuphead does not work.


I use the following simplest setup command:
\setuphead[chapter][style={\switchtobodyfont[roboto,20pt]\ss}]


\switchtobodyfont[roboto,ss,20pt] is better than what you have; don’t 
know if it makes a difference.


Does \setupbodyfont[roboto] work for the main (i.e. body) font?

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] Non-standard font alternatives

2023-04-19 Thread Pawel Urbanski via ntg-context
>
> Dear Matthew,
I wrote you off the list in connection to the other thread where Hans
helped me with using Roboto Flex.
I used your typescript definitions but the font is not embedded in the
document.

** I've copied all the ttf font files to the recommended directory
structure under: texmf-local/fonts/truetype.
** I've created a type-imp-roboto.mkiv file and saved it in the recommended
location under: texmf-local/tex/.../mkiv/.
Using: \usetypescript or \usetypescriptfile or \usebodyfont [roboto] with
setuphead does not work.

I use the following simplest setup command:
\setuphead[chapter][style={\switchtobodyfont[roboto,20pt]\ss}]

I will be glad to join forces and create the typescript file but maybe
missing something obvious. While I could use an inline definition suggested
by Hans in the other thread, Roboto is a great font and I or other people
would like to use it as a shared resource.

All the best and thanks for help and feedback,
Pawel
___
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] Google's Roboto Flex font typescript and goodies definition.

2023-04-18 Thread Hans Hagen via ntg-context

On 4/18/2023 3:52 PM, Pawel Urbanski via ntg-context wrote:

Hi Hans,
I will write what I want to acomplish. While it is definitely thrivial, 
I'm either missing something obvious or more experienced users suffer 
from the curse of knowledge.


I want ot use Roboto Flex for my chapter and section heads with Garamond 
Premier for the body contents.


I followed the Context wiki example and consistant examples from the web.

Here is my code:
\usemodule[fonts-variable]
\definefontfamily[roboto-flex][ss][rotoboflex]
% robotoflex.ttf is the recognized font file name.
\setuphead[chapter]
[style={\switchtobodyfont[roboto-flex,20pt]\ss}]

While the Garamond is embedded and text is styled, the chapter tible is 
typeset with Garamond not Roboto.


Any hints or feed back will be very appriciated.

\usetypescriptfile[ebgaramond]

\starttypescript [sans] [robotoflex]
\setups[font:fallback:sans]
\definefontsynonym [Sans]  [name:robotoflexregular]
\definefontsynonym [SansItalic][name:robotoflexregularitalic]
\definefontsynonym [SansBold]  [name:robotoflexregularbold]
\definefontsynonym [SansBoldItalic][name:robotoflexregularbolditalic]
\stoptypescript

\starttypescript[robocop]
\definetypeface [\typescriptone] [rm] [serif] [ebgaramond] 
[default]
\definetypeface [\typescriptone] [ss] [sans]  [robotoflex] 
[default]
\definetypeface [\typescriptone] [tt] [mono]  [dejavu] 
[default] [rscale=0.8]

\definetypeface [\typescriptone] [mm] [math]  [ebgaramond] [default]
\stoptypescript

\setupbodyfont[robocop]

\setuphead[chapter][style=\ssbfd]

\starttext

\startchapter[title=Whatever]
\input tufte
\stopchapter

\page

\usemodule[fonts-variable]

\showfontvariations[font=file:robotoflex.ttf]

\stoptext


-
  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] Google's Roboto Flex font typescript and goodies definition.

2023-04-18 Thread Pawel Urbanski via ntg-context
>
> Hi Hans,
> I will write what I want to acomplish. While it is definitely thrivial,
> I'm either missing something obvious or more experienced users suffer from
> the curse of knowledge.
>
> I want ot use Roboto Flex for my chapter and section heads with Garamond
> Premier for the body contents.
>
> I followed the Context wiki example and consistant examples from the web.
>
> Here is my code:
> \usemodule[fonts-variable]
> \definefontfamily[roboto-flex][ss][rotoboflex]
> % robotoflex.ttf is the recognized font file name.
> \setuphead[chapter]
> [style={\switchtobodyfont[roboto-flex,20pt]\ss}]
>
> While the Garamond is embedded and text is styled, the chapter tible is
> typeset with Garamond not Roboto.
>
> Any hints or feed back will be very appriciated.
>
> Thank you,
> Pawel
>
___
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] Google's Roboto Flex font typescript and goodies definition.

2023-04-18 Thread Pawel Urbanski via ntg-context
Hi Hans,
I will write what I want to acomplish. While it is definitely thrivial, I'm
either missing something obvious or more experienced users suffer from the
curse of knowledge.

I want ot use Roboto Flex for my chapter and section heads with Garamond
Premier for the body contents.

I followed the Context wiki example and consistant examples from the web.

Here is my code:
\usemodule[fonts-variable]
\definefontfamily[roboto-flex][ss][rotoboflex]
% robotoflex.ttf is the recognized font file name.
\setuphead[chapter]
[style={\switchtobodyfont[roboto-flex,20pt]\ss}]

While the Garamond is embedded and text is styled, the chapter tible is
typeset with Garamond not Roboto.

Any hints or feed back will be very appriciated.

Thank you,
Pawel

>
___
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] Userdata environment

2023-04-03 Thread Fabrice Couvreur via ntg-context
Hi,
I have already created a thread on the subject and Wolgang, Marco and Taco
have replied but the userdata environment is not yet clear to me. I would
like, if possible, to write a definition, a property or a theorem on the
left and illustrate it in the right margin with an example. In the code
below, the second example is on the second page and not next to the second
definition.
Thanks.
Fabrice


\
useMPlibrary[dum]

\setuppapersize[A4]

\mainlanguage
  [fr]

\setuppagenumbering
 [alternative=doublesided]

\setuplayout
  [width=12cm,
   rightmargin=60mm]


\setupenumerations
  [before={\blank},
   after={\blank},
   alternative=serried,
   distance=0.5em,
   title=yes,
   titleleft=,
   titleright=,
   titlestyle=normal,
   headcommand=\groupedcommand{}{.},
   numbercommand=\groupedcommand{}{},
   titlecommand=\groupedcommand{(}{)},
   width=fit]

\defineenumeration
   [definition]
   [text=Définition,
number=no,
style=italic]

\defineenumeration
   [exemple]
   [text=Exemple,
number=no,
style=normal]

\definemargindata[marginfigure][inright]
\setupmargindata [marginfigure][command=\vbox,align=middle,stack=yes]

\defineuserdata [margintext] [alternative=margintext]

\defineuserdataalternative [margintext] [renderingsetup=userdata:margintext]

\startsetups [userdata:margintext]
  \margindata
[inright]
[
 style={\switchtobodyfont[10pt]},
 width=\rightmarginwidth,
 align={flushleft,broad}
]
{\startexemple
 \getinlineuserdata
 \stopexemple}
  \stopsetups

\showframe
\starttext
\startchapter[title={First Chapter},ownnumber=1]
\startdefinition
 \input ward
\stopdefinition
\startuserdata [margintext]
  \input ward
\stopuserdata
\startdefinition
  \input ward
\stopdefinition
\startuserdata [margintext]
  \input knuth
\stopuserdata
\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
___


Re: [NTG-context] update

2023-02-24 Thread Otared Kavian via ntg-context
Hi Hans,

Thank you very much for the new update.

Everything seem to work like a charm. In particular I played with the 
\underbrace and \overbrace when adding something under the \underbrace, or 
above the \overbrace, like in 

\startformula
\overbrace{1+x^2+a}^{= -1} +
\underbrace{ax^2 + bx + c}_{=2} = 1
\stopformula

and it works great !

Best regards : Otared

> On 23 Feb 2023, at 22:07, Hans Hagen via ntg-context  
> wrote:
> 
> Hi,
> 
> I uploaded a new version. We further improved Antykwa support,
> 
> \switchtobodyfont[antykwa]
> 
> \startTEXpage[offset=1dk]
>\im{
>f' = f'' = f''' = f =
>a + b + \ldots + c +
>\overbar{x} + \overbar{S} + \bar{x} + \widebar{x}
>}
> 
>\im{
>\fenced[doublebar]{x} =
>\fenced[doublebar][size=1]{x_1} =
>\fenced[doublebar][size=2]{x_2} =
>\fenced[doublebar][size=3]{x_3} =
>\fenced[doublebar][size=4]{x_4} =
>\fenced[doublebar]{\blackrule[width=1cm,height=1cm]}
>}
> 
>\im{
>\fenced[bar]{x} =
>\fenced[bar][size=1]{x_1} =
>\fenced[bar][size=2]{x_2} =
>\fenced[bar][size=3]{x_3} =
>\fenced[bar][size=4]{x_4} =
>\fenced[bar]{\blackrule[width=1cm,height=1cm]}
>}
> 
>\im{
>\fenced[brace]{x} =
>\fenced[brace][size=1]{x_1} =
>\fenced[brace][size=2]{x_2} =
>\fenced[brace][size=3]{x_3} =
>\fenced[brace][size=4]{x_4} =
>\fenced[brace]{\blackrule[width=1cm,height=1cm]}
>}
> 
>\im{
>\root[4]{1+x^2+a} +
>\frac{1}{1+x^2+a} +
>\overparent{1+x^2+a} +
>\overbrace{1+x^2+a} +
>\overparent{x} +
>\overbrace{x} +
>\overbrace{i}
>}
> 
> \stopTEXpage
> 
> 
> This time with fancy radical bars, fraction bars, vertical bars, over and 
> underbars etc.
> 
> 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
___


[NTG-context] update

2023-02-23 Thread Hans Hagen via ntg-context

Hi,

I uploaded a new version. We further improved Antykwa support,

\switchtobodyfont[antykwa]

\startTEXpage[offset=1dk]
\im{
f' = f'' = f''' = f =
a + b + \ldots + c +
\overbar{x} + \overbar{S} + \bar{x} + \widebar{x}
}

\im{
\fenced[doublebar]{x} =
\fenced[doublebar][size=1]{x_1} =
\fenced[doublebar][size=2]{x_2} =
\fenced[doublebar][size=3]{x_3} =
\fenced[doublebar][size=4]{x_4} =
\fenced[doublebar]{\blackrule[width=1cm,height=1cm]}
}

\im{
\fenced[bar]{x} =
\fenced[bar][size=1]{x_1} =
\fenced[bar][size=2]{x_2} =
\fenced[bar][size=3]{x_3} =
\fenced[bar][size=4]{x_4} =
\fenced[bar]{\blackrule[width=1cm,height=1cm]}
}

\im{
\fenced[brace]{x} =
\fenced[brace][size=1]{x_1} =
\fenced[brace][size=2]{x_2} =
\fenced[brace][size=3]{x_3} =
\fenced[brace][size=4]{x_4} =
\fenced[brace]{\blackrule[width=1cm,height=1cm]}
}

\im{
\root[4]{1+x^2+a} +
\frac{1}{1+x^2+a} +
\overparent{1+x^2+a} +
\overbrace{1+x^2+a} +
\overparent{x} +
\overbrace{x} +
\overbrace{i}
}

\stopTEXpage


This time with fancy radical bars, fraction bars, vertical bars, over 
and underbars etc.


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] Lettrine module not working?!

2023-02-20 Thread Pablo Rodriguez via ntg-context
On 2/20/23 15:30, G.C.H.M. Verhaag via ntg-context wrote:
> Hi,
> 
> Yes Hraban that worked! Thanks!
> 
> My next issue is adapting the font-family, because a want to use the
> *Antykwa-Poltawskiego* font|| as my initial. I tried the following:
> 
> *\definefont[InitialCapFont][name:antpoltcondregular*default sa 4]*
> *\setupinitial[color=MyColor,distance=6pt,n=3,font=InitialCapFont]*
> 
> Has anybody any idea why this doesn't work?

Hi Geert,

this works for me:

  \definefont[InitialCapFont][name:antpoltcondregular*default sa 4]
  %\setupinitial[style={\switchtobodyfont[helvetica]}]
  \setupinitial[color=red,distance=6pt,n=3, style=\InitialCapFont]

  \starttext
  \setinitial\input zapf
  \stoptext

BTW, I think there is an issue (that might be a bug), when either style
or font are in use, size is not automatically adapted.

Could anyone confirm with the commented line?

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
___


Re: [NTG-context] Best way to access casul fonts

2023-01-30 Thread Mattias Märka via ntg-context
Hi

Will do.

\definefontstyle is still bugging me. I gather from previous threads that it 
should be possible to define a new font style for casual and use that via a 
font switch, but I cannot get this to work. I'm not sure this is still possible.
The threads I'm referring to:
https://www.mail-archive.com/ntg-context@ntg.nl/msg00039.html
https://www.mail-archive.com/ntg-context@ntg.nl/msg39849.html
https://www.mail-archive.com/ntg-context@ntg.nl/msg84188.html
I might start a separate thread and ask whether \definefontstyle still works.

I also experimented with defining my own typescripts for Lucida so that casual 
and fax (and all the other various Lucida fonts, really) are easily accessible.

Something like:

\starttypescript[serif][lucbr]
  \definefontsynonym[Serif][name:LucidaBright]
  \definefontsynonym[SerifItalic][name:LucidaBright-Italic]
  \definefontsynonym[SerifBold][name:LucidaBright-Demi]
  \definefontsynonym[SerifBoldItalic][name:LucidaBright-DemiItalic]
  \definefontsynonym[SerifSlanted][name:LucidaBright-Slanted]
  \definefontsynonym[SerifCaps][name:LucidaBrightSmallcaps]
  \definefontsynonym[SerifBoldCaps][name:LucidaBrightSmallCaps-Demi]
\stoptypescript

\starttypescript[serif][lucfax]
  \definefontsynonym[Serif][name:LucidaFax]
  \definefontsynonym[SerifItalic][name:LucidaFax-Italic]
  \definefontsynonym[SerifBold][name:LucidaFax-Demi]
  \definefontsynonym[SerifBoldItalic][name:LucidaFax-DemiItalic]
\stoptypescript

\starttypescript[sans][lucss]
  \definefontsynonym[Sans][name:LucidaSans]
  \definefontsynonym[SansItalic][name:LucidaSans-Italic]
  \definefontsynonym[SansBold][name:LucidaSans-Demi]
  \definefontsynonym[SansBoldItalic][name:LucidaSans-DemiItalic]
\stoptypescript

\starttypescript[mono][lucbr,luctt]
  \definefontsynonym[Mono][name:LucidaTypewriter]
  \definefontsynonym[MonoItalic][name:LucidaTypweriterOblique]
  \definefontsynonym[MonoBold][name:LucidaTypewriterBold]
  \definefontsynonym[MonoBoldItalic][name:LucidaTypweriterBoldOblique]
\stoptypescript

\starttypescript[mono][lucss,lucsstt]
  \definefontsynonym[Mono][name:LucidaSansTypewriter]
  \definefontsynonym[MonoItalic][name:LucidaSansTypweriterOblique]
  \definefontsynonym[MonoBold][name:LucidaSansTypewriterBold]
  \definefontsynonym[MonoBoldItalic][name:LucidaSansTypweriterBoldOblique]
\stoptypescript

\starttypescript[calligraphy][lucbr,luccg]
  \definefontsynonym[Calligraphy][name:LucidaCalligraphy-Italic]
\stoptypescript

\starttypescript[handwriting][lucbr,luchw]
  \definefontsynonym[Handwriting][name:LucidaHandwriting-Italic]
\stoptypescript

\starttypescript[serif][lucbl]
  \definefontsynonym[Serif][name:LucidaBlackletter]
\stoptypescript

\starttypescript[serif][luccas]
  \definefontsynonym[Serif][name:LucidaCasual]
  \definefontsynonym[SerifItalic][name:LucidaCasual-Italic]
\stoptypescript

\starttypescript[lucbr]
  \definetypeface[lucbr][rm][serif][lucbr][default][features=default]
  \definetypeface[lucbr][mm][math][lucida][default]
  \definetypeface[lucbr][tt][mono][lucbr][default][features=default]
  \definetypeface[lucbr][cg][calligrpahy][default][features=default]
  \definetypeface[lucbr][hw][handwriting][default][features=default]
\stoptypescript

\starttypescript[lucfax]
  \definetypeface[lucfax][rm][serif][lucfax][default][features=default]
\stoptypescript

\starttypescript[lucss]
  \definetypeface[lucss][ss][sans][lucss][default][features=default]
  \definetypeface[lucss][tt][mono][lucss][default][features=default]
\stoptypescript

\starttypescript[luctt]
  \definetypeface[luctt][tt][mono][luctt][default][features=default]
\stoptypescript

\starttypescript[lucsstt]
  \definetypeface[lucsstt][tt][mono][lucsstt][default][features=default]
\stoptypescript

\starttypescript[luccg]
  \definetypeface[luccg][cg][calligraphy][luccg][default][features=default]
\stoptypescript

\starttypescript[luchw]
  \definetypeface[luchw][hw][handwriting][luchw][default][features=default]
\stoptypescript

\starttypescript[lucbl]
  \definetypeface[lucbl][rm][serif][lucbl][default][features=default]
\stoptypescript

\starttypescript[luccas]
  \definetypeface[luccas][rm][serif][luccas][default][features=default]
\stoptypescript

\starttypescript[luc]
  \definetypeface[luc][rm][serif][lucbr][default][features=default]
  \definetypeface[luc][mm][math][lucida][default]
  \definetypeface[luc][ss][sans][lucss][default][features=default]
  \definetypeface[luc][tt][mono][lucbr][default][features=default]
  \definetypeface[luc][cg][calligraphy][lucbr][default][features=default]
  \definetypeface[luc][hw][handwriting][lucbr][default][features=default]
\stoptypescript

\def\lucbr{\switchtobodyfont[lucbr]}
\def\lucfax{\switchtobodyfont[lucfax]}
\def\lucss{\switchtobodyfont[lucss]}
\def\luctt{\switchtobodyfont[luctt]}
\def\lucsstt{\switchtobodyfont[lucsstt]}
\def\luccg{\switchtobodyfont[luccg]}
\def\luchw{\switchtobodyfont[luchw]}
\def\lucbl{\switchtobodyfont[lucbl]}
\def\luccas{\switchtobodyfont[luccas]}

Would it make sense adding

[NTG-context] Best way to access casul fonts

2023-01-23 Thread Mattias Märka via ntg-context
Hi,

I'm trying to access Lucida Casual. I see in type-imp-lucida-typeone.mkiv that 
there is, indeed, a typescript for it, but I can't figure out how to switch to 
it. That is, I want to make some text be Lucida Casual.

I gather from a previous thread that I should be using \definefontstyle, but I 
don't know how to go about this.

Currently I'm just defining a new typescript and making Lucida Casual a synonym 
for Serif and then using \switchtobodyfont --- but this feel silly.

I searched the wiki and skimmed the reference manual, but to no avail. Perhaps 
I don't know what I should be looking for.

Any help would be appreciated. What's the easiest way to access a casual font? 
What's the cleanest way?

Thanks,
Mattias Märka
___
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] Non-standard font alternatives

2022-12-14 Thread Matthew McCabe via ntg-context
> On 13 Dec 2022, at 7:53 pm, Hans Hagen via ntg-context  
> wrote:
> 
> On 12/13/2022 9:15 AM, Matthew McCabe via ntg-context wrote:
>> Hi list,
>> I'm looking to import a font with medium and light weights (in this case 
>> Roboto) and define font alternatives so one can quickly switch to light text 
>> just as one would switch to bold text. There is a stackexchange answer from 
>> Wolfgang 
>> (https://tex.stackexchange.com/questions/303648/context-font-weights 
>> <https://tex.stackexchange.com/questions/303648/context-font-weights>) which 
>> details a solution to this problem for ConTeXt MkIV but despite my best 
>> efforts I haven't been able to get things to work for me. There is the 
>> Roboto typescript example on ConTeXt garden but it isn't exactly what I'm 
>> looking for as for the document I'm making I would prefer to be able to 
>> treat the font weights as alternatives rather than separate families since I 
>> will be switching often.
> take a look at type-imp-plex.mkiv (just remove the \s! in your case)
> 
> basically you define two typefaces: normal and light and then just switch 
> between these, as in:
> 
> at the top of your document you say
> 
> \usebodyfont[plex]   % preloads
> \usebodyfont[plex-light] % preloads
> 
> \setupbodyfont[plex] % enables main font
> 
> and after that
> 
> {\switchtobodyfont[plex-light]  }
> 
> will do a consistent switch
> 
> 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
> ___

Thanks for the reply and your help Hans, ok so if I understand correctly the 
canonical way to integrate light weight font is to define two typefaces. I 
wrote up a typescript for (Sans) Roboto based on the example typescript from 
ConTeXt garden using only the Sans variants and it’s working well.

For anyone else looking to do something similar, since the typescript is just a 
tex file it seems if one places it in one’s local directory it will be 
accessible when ConTeXt generates the pdf. I saved it as type-imp-roboto.tex in 
my local directory and used ‘\usebodyfont[roboto]’ and 
‘\usebodyfont[roboto-light]’ to preload the fonts as recommended 
(\usetypescriptfile didn’t seem to be required).

Here is my typescript, for the Sans Roboto font, pretty much picked out of the 
context garden example typescript for Roboto:

\definefontfeature[robotofeatures][
  mode=node,
  ccmp=yes, % character composition
  liga=yes, tlig=yes, % ligatures
  pnum=yes,
  cpsp=yes, % capital spacing
  kern=yes,
  language=dflt,
  protrusion=quality,
  expansion=quality,
]

\definefontfeature[smallcaps][ % use with \addff
  smcp=yes, % smallcaps
  % c2sc=yes, % caps to smallcaps
]

\starttypescript[sans][roboto,robotosans]
  \definefontsynonym[Roboto-Regular][name:robotoregular]
  \definefontsynonym[Roboto-Black][name:robotoblack]
  \definefontsynonym[Roboto-BlackItalic][name:robotoblackitalic]
  \definefontsynonym[Roboto-Bold][name:robotobold]
  \definefontsynonym[Roboto-BoldItalic][name:robotobolditalic]
  \definefontsynonym[Roboto-Italic][name:robotoitalic]
  \definefontsynonym[Roboto-Light][name:robotolight]
  \definefontsynonym[Roboto-LightItalic][name:robotolightitalic]
  \definefontsynonym[Roboto-Medium][name:robotomedium]
  \definefontsynonym[Roboto-MediumItalic][name:robotomediumitalic]
  \definefontsynonym[Roboto-Italic][name:robotoitalic]
  \definefontsynonym[Roboto-Regular][name:robotoregular]
  \definefontsynonym[Roboto-Thin][name:robotothin]
  \definefontsynonym[Roboto-ThinItalic][name:robotothinitalic]
\stoptypescript

\starttypescript[sans][roboto,robotosans][name]
  \definefontsynonym [SansThin] [Roboto-Thin]
[features=robotofeatures]
  \definefontsynonym [SansThinItalic]   [Roboto-ThinItalic]  
[features=robotofeatures]
  \definefontsynonym [SansThinSlanted]  [Roboto-ThinItalic]  
[features=robotofeatures]
  \definefontsynonym [SansLight][Roboto-Light]   
[features=robotofeatures]
  \definefontsynonym [SansLightItalic]  [Roboto-LightIt

Re: [NTG-context] Non-standard font alternatives

2022-12-13 Thread Hans Hagen via ntg-context

On 12/13/2022 9:15 AM, Matthew McCabe via ntg-context wrote:

Hi list,

I'm looking to import a font with medium and light weights (in this case 
Roboto) and define font alternatives so one can quickly switch to light 
text just as one would switch to bold text. There is a stackexchange 
answer from Wolfgang 
(https://tex.stackexchange.com/questions/303648/context-font-weights 
<https://tex.stackexchange.com/questions/303648/context-font-weights>) 
which details a solution to this problem for ConTeXt MkIV but despite my 
best efforts I haven't been able to get things to work for me. There is 
the Roboto typescript example on ConTeXt garden but it isn't exactly 
what I'm looking for as for the document I'm making I would prefer to be 
able to treat the font weights as alternatives rather than separate 
families since I will be switching often.

take a look at type-imp-plex.mkiv (just remove the \s! in your case)

basically you define two typefaces: normal and light and then just 
switch between these, as in:


at the top of your document you say

\usebodyfont[plex]   % preloads
\usebodyfont[plex-light] % preloads

\setupbodyfont[plex] % enables main font

and after that

{\switchtobodyfont[plex-light]  }

will do a consistent switch

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] accessing ital axis in variable font

2022-12-02 Thread Hans Hagen via ntg-context

On 12/2/2022 6:20 PM, Pablo Rodriguez via ntg-context wrote:

On 12/1/22 21:44, Hans Hagen via ntg-context wrote:

On 12/1/2022 7:54 PM, Pablo Rodriguez via ntg-context wrote:

[...]
As explained before, they don’t work for me. How can I access to the
italic and the optical size axes?


there is no axis defined for italic (it's a design axis so that's
probably why you have two fonts one with italic in the name)

so, just forget about it


Many thanks for your reply, Hans.

It seems that Literata has what they call an upright italic
(https://raw.githubusercontent.com/googlefonts/literata/main/Documentation/DS_Literata3.pdf#search=upright).

But I’m afraid I cannot use weight (when invoked as 'wght'). Optical
sizes don’t seem to work.

The following code shows the issue I’m experiencing:

   \definefontfeature[myaxis][axis={wght=100, opsz=1.0}]
   \definefontfamily[mainface][rm][Literata]
 [features={default, myaxis}, designsize=auto]
   \setupbodyfont[mainface]
   \starttext
   \scale[width=\textwidth]
 {\switchtobodyfont[7pt]\tf Regular, \it Italic}
   \scale[width=\textwidth]
 {\switchtobodyfont[12pt]\tf Regular, \it Italic}
   \scale[width=\textwidth]
 {\switchtobodyfont[36pt]\tf Regular, \it Italic}
   \scale[width=\textwidth]
 {\switchtobodyfont[72pt]\tf Regular, \it Italic}
   \stoptext

What am I missing here?

\definefontfeature[myaxisa][axis={weight=200,optical size=12}]
\definefontfeature[myaxisb][axis={weight=200,optical size=42}]
\definefontfeature[myaxisc][axis={weight=200,optical size=72}]

\usemodule[fonts-variable]

\starttext
\definedfont[file:literata.ttf*default,myaxisa] Some Text\par
\definedfont[file:literata.ttf*default,myaxisb] Some Text\par
\definedfont[file:literata.ttf*default,myaxisc] Some Text\par
\stoptext

optical size looks rather useless

btw, we don't check for optical size in relation to the asked size anyway

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] accessing ital axis in variable font

2022-12-02 Thread Pablo Rodriguez via ntg-context
On 12/1/22 21:44, Hans Hagen via ntg-context wrote:
> On 12/1/2022 7:54 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> As explained before, they don’t work for me. How can I access to the
>> italic and the optical size axes?
>
> there is no axis defined for italic (it's a design axis so that's 
> probably why you have two fonts one with italic in the name)
> 
> so, just forget about it

Many thanks for your reply, Hans.

It seems that Literata has what they call an upright italic
(https://raw.githubusercontent.com/googlefonts/literata/main/Documentation/DS_Literata3.pdf#search=upright).

But I’m afraid I cannot use weight (when invoked as 'wght'). Optical
sizes don’t seem to work.

The following code shows the issue I’m experiencing:

  \definefontfeature[myaxis][axis={wght=100, opsz=1.0}]
  \definefontfamily[mainface][rm][Literata]
[features={default, myaxis}, designsize=auto]
  \setupbodyfont[mainface]
  \starttext
  \scale[width=\textwidth]
{\switchtobodyfont[7pt]\tf Regular, \it Italic}
  \scale[width=\textwidth]
{\switchtobodyfont[12pt]\tf Regular, \it Italic}
  \scale[width=\textwidth]
{\switchtobodyfont[36pt]\tf Regular, \it Italic}
  \scale[width=\textwidth]
{\switchtobodyfont[72pt]\tf Regular, \it Italic}
  \stoptext

What am I missing here?

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
___


Re: [NTG-context] Page break with placement of a figure at the bottom of the page

2022-11-12 Thread Fabrice Couvreur via ntg-context
Hi Pablo and Bruce,
Please try to figure out what is not working.
I'm sorry but I forgot in my previous post files.
Fabrice

Le sam. 12 nov. 2022 à 12:28, Pablo Rodriguez via ntg-context <
ntg-context@ntg.nl> a écrit :

> On 11/11/22 21:58, Bruce Horrocks via ntg-context wrote:
> >> On 10 Nov 2022, at 17:06, Fabrice Couvreur via ntg-context wrote:
> >>
> >> Hi,
> >> Sorry to come back to you, but it seems to me that there is enough
> space here.
> >> Fabrice
> >
> > For some reason your PNG images came through in extremely low
> > resolution. Without having the ConTeXt source it's hard to say for sure
> > what's happening - for example, I would have expected the text on the
> > second page to be at the bottom of the first even if there wasn't room
> > for the image - because that was what was happening in your first
> example.
>
> Hi Fabrice and Bruce,
>
> I agree that the source would be helpful to say what may be hard for
> ConTeXt.
>
> In any case, ConTeXt has a hard time with pagebreaks when you combine
> elements that need both horizontal and vertical calculation, such as in:
>
>   \starttext
>   \dorecurse{64}
>   {\input knuth\footnote{\input zapf}
>
>   \startitemize[a, columns, eight, packed]
>   \dorecurse{64}{\item\currentitemnumber}
>   \stopitemize}
>   \stoptext
>
> There is a similar issue with paragraph notes.
>
> 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
>
> ___
>

\startenvironment[premiere-modules]

  \usesymbols[mvs] 
  \usecolors[xwi]
  \usemodule[tikz]
  \usemodule[pgfplots]
  \usepgfplotslibrary[fillbetween]
  \pgfplotsset{compat=newest}
  \usetikzlibrary[arrows]
  \usetikzlibrary[automata]
  \usetikzlibrary[calc]
  \usetikzlibrary[backgrounds]
  \usetikzlibrary[intersections]
  \usetikzlibrary[patterns]
  \usetikzlibrary[bending]
  \usetikzlibrary[arrows.meta]
  \usetikzlibrary[shapes.geometric]
  \usetikzlibrary[plotmarks]
  \usetikzlibrary[shapes]
  \usetikzlibrary[trees]
  \usetikzlibrary[animations]
  \usetikzlibrary[quotes]
  \usetikzlibrary[mindmap]
  \usetikzlibrary[matrix,decorations.pathreplacing,fit,positioning]

\stopenvironment\startenvironment[premiere-macros]

  \unexpanded\def\R{\math{\mathbb{R}}\autoinsertnextspace}

  \protected\def\N{\doifnextcharelse{*}\MyNstarred\MyNnormal}

  \def\MyNstarred*{\m{\mathbb{N}^*}\autoinsertnextspace}
  \def\MyNnormal  {\m{\mathbb{N}  }\autoinsertnextspace}

  \define[1]\cscript
 {\start\switchtobodyfont[stixtwo]\m{{\mathscript{#1}}}\stop} 


  %\protected\def\card#1{\m{\mfunction{Card}\thinspace(#1)}}

  \define[1]\card
 {\m{\mathtexttf{Card}\thinspace(#1)}\autoinsertnextspace}

  \define[1]\norm
{\math{\left\Vert#1\right\Vert}}

  \define\esp{\math{\mathcal{E}}\autoinsertnextspace}

  \define\espv{\math{\vec{\mathcal{E}}}\autoinsertnextspace}

  \define\repere
 {\m{\left(O\,;\vec{i}, \vec{j}\right)}\autoinsertnextspace}

  \define\base
 {\m{\left(\vec{i}, \vec{j}, \vec{k}\right)}\autoinsertnextspace}

 \protected\def\vector#1{%
   \starttikzpicture[baseline=(arg.base),>=stealth,thick]
   \node[inner xsep=0pt] (arg) {\m{#1}};
   \draw[->,shorten >=-2pt] (arg.north west) -- (arg.north east);
   \stoptikzpicture%
  }

  
  \definemathmatrix [pmatrix][matrix:parentheses][simplecommand=MATRIX]

  \unexpanded\def\intervalff#1#2{\math{\left[#1\nonscript\,;#2\right]}}
  
  \unexpanded\def\intervaloo#1#2{\math{\left]#1\nonscript\,;#2\right[}}
  
  \unexpanded\def\intervalfo#1#2{\math{\left[#1\nonscript\,;#2\right[}}
  
  \unexpanded\def\intervalof#1#2{\math{\left]#1\nonscript\,;#2\right]}}

  \define[1]\vabs{\math{\left\vert#1\right\vert}}

  \define\u{\math{\left(u_n\right)}\autoinsertnextspace}

  \define\v{\math{\left(v_n\right)}\autoinsertnextspace}

  \define\w{\math{\left(w_n\right)}\autoinsertnextspace}

  \unexpanded\def\euros#1{#1\,\symbol[europe][EUR]}

  \protected\def\point#1#2#3{\math{#1\left(#2\,;#3\right)}}

  \protected\def\coord#1#2{\math{\left(#1\,;#2\right)}}

  \define[2]\prod{\m{\vector{#1}\cdot\vector{#2}}}

   \protected\def\e#1{\math{{\rm e}^{#1}}\autoinsertnextspace}
  
\stopenvironment\startenvironment[tikz-style]

  \pgfplotsset{
/pgfplots/layers/Bowpark/.define layer set={
axis background,axis grid,main,axis ticks,axis lines,axis tick labels,
axis descriptions,axis fore

Re: [NTG-context] About macro numberstriped ()

2022-10-02 Thread Fabrice Couvreur via ntg-context
Hi,
Initially, there was a bug with maro numberstriped() and Hans suggested
another sensible approach to me, but you don't get the same shape of the
hatches depending on the dimensions of the squares.
Your solution works perfectly but I'm trying to understand the action of
the parameters:
the first ?
the second represents the angle in degrees that the segments make
the third represents the gap between two segments
Thanks
Fabrice

Le sam. 1 oct. 2022 à 21:46, Mikael Sundqvist via ntg-context <
ntg-context@ntg.nl> a écrit :

> Hi,
>
> Is this what you are looking for?
>
> On Sat, Oct 1, 2022 at 7:43 PM Fabrice Couvreur via ntg-context
>  wrote:
> >
> > Hi Hans,
> > When the rectangles are not identical, how to have the same type of
> hatching in both ?
> > Thanks.
> > Fabrice
> >
> >
> > \starttext
> >  \startlinecorrection[blank]
> >   \startmidaligned
> > \switchtobodyfont[9pt]
> > \startMPcode
> >   path p, q, r, b ;
> >   p  := unitsquare xyscaled (4cm,4cm) ;
> >   z[0] = (2cm,0cm) ;
> >   z[1] = (2cm,4cm) ;
> >   z[2] = (0cm,2cm) ;
> >   q := llcorner p--z[0]--z[1]--z[2]--cycle ;
> >   r := unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ;
> >   b := unitsquare xyscaled (3cm,3cm) shifted(1cm,0) ;
> >
>
> draw r anglestriped (1,45,2) withcolor cyan;
> draw b anglestriped (1,45,2) withcolor cyan;
>
> >
> >draw p;
> >draw b;
> >draw r;
> >
> >  label.llft("D", p) ;
> >  label.lrt("C", p) ;
> >  label.ulft("A", p) ;
> >  label.urt("B", p) ;
> >  label.urt("P", lrcorner r) ;
> >  label.lft("Q", llcorner r) ;
> > label.top("M", urcorner r) ;
> >
> >   \stopMPcode
> >   \stopmidaligned
> > \stoplinecorrection
> > \stoptext
> >
> >
>
> /Mikael
>
> ___
> 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] About macro numberstriped ()

2022-10-01 Thread Mikael Sundqvist via ntg-context
Hi,

Is this what you are looking for?

On Sat, Oct 1, 2022 at 7:43 PM Fabrice Couvreur via ntg-context
 wrote:
>
> Hi Hans,
> When the rectangles are not identical, how to have the same type of hatching 
> in both ?
> Thanks.
> Fabrice
>
>
> \starttext
>  \startlinecorrection[blank]
>   \startmidaligned
> \switchtobodyfont[9pt]
> \startMPcode
>   path p, q, r, b ;
>   p  := unitsquare xyscaled (4cm,4cm) ;
>   z[0] = (2cm,0cm) ;
>   z[1] = (2cm,4cm) ;
>   z[2] = (0cm,2cm) ;
>   q := llcorner p--z[0]--z[1]--z[2]--cycle ;
>   r := unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ;
>   b := unitsquare xyscaled (3cm,3cm) shifted(1cm,0) ;
>

draw r anglestriped (1,45,2) withcolor cyan;
draw b anglestriped (1,45,2) withcolor cyan;

>
>draw p;
>draw b;
>draw r;
>
>  label.llft("D", p) ;
>  label.lrt("C", p) ;
>  label.ulft("A", p) ;
>  label.urt("B", p) ;
>  label.urt("P", lrcorner r) ;
>  label.lft("Q", llcorner r) ;
> label.top("M", urcorner r) ;
>
>   \stopMPcode
>   \stopmidaligned
> \stoplinecorrection
> \stoptext
>
>

/Mikael
___
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] About macro numberstriped ()

2022-10-01 Thread Fabrice Couvreur via ntg-context
Hi Hans,
When the rectangles are not identical, how to have the same type of
hatching in both ?
Thanks.
Fabrice


\starttext
 \startlinecorrection[blank]
  \startmidaligned
\switchtobodyfont[9pt]
\startMPcode
  path p, q, r, b ;
  p  := unitsquare xyscaled (4cm,4cm) ;
  z[0] = (2cm,0cm) ;
  z[1] = (2cm,4cm) ;
  z[2] = (0cm,2cm) ;
  q := llcorner p--z[0]--z[1]--z[2]--cycle ;
  r := unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ;
  b := unitsquare xyscaled (3cm,3cm) shifted(1cm,0) ;

  draw r
 withpattern image (
 draw (llcorner unitsquare -- urcorner unitsquare) scaled 5mm ;
 % how to get the corner dots
   )
   withpatternscale 1/8
   withpen pencircle scaled 1pt
   withcolor cyan;
   ;
 draw b
   withpattern image (
 draw (llcorner unitsquare -- urcorner unitsquare) scaled 5mm ;
 % how to get the corner dots
   )
   withpatternscale 1/16
   withpen pencircle scaled 1pt
   withcolor cyan;
   ;

   draw p;
   draw b;
   draw r;

 label.llft("D", p) ;
 label.lrt("C", p) ;
 label.ulft("A", p) ;
 label.urt("B", p) ;
 label.urt("P", lrcorner r) ;
 label.lft("Q", llcorner r) ;
label.top("M", urcorner r) ;

  \stopMPcode
  \stopmidaligned
\stoplinecorrection
\stoptext



Le mer. 28 sept. 2022 à 21:05, Henning Hraban Ramm via ntg-context <
ntg-context@ntg.nl> a écrit :

> Am 28.09.22 um 15:29 schrieb Hans Hagen via ntg-context:
> > On 9/28/2022 3:11 PM, Fabrice Couvreur via ntg-context wrote:
> >> PS : What is the exact meaning of the word "blobs" because my English
> >> is average ?
> > in order to get 'lines' you need to fill the two opposing corners with
> > "blobs of ink"
>
> Otherwise, a BLOB is a “binary large object”, e.g. if you save image
> data to a database.
>
> 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
>
> ___
>
___
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] About macro numberstriped ()

2022-09-28 Thread Fabrice Couvreur via ntg-context
Hi Hans,
Thank you for this solution which is an approach that I did not know.
Fabrice

PS : What is the exact meaning of the word "blobs" because my English is
average ?

Le mar. 27 sept. 2022 à 22:04, Hans Hagen via ntg-context <
ntg-context@ntg.nl> a écrit :

> On 9/27/2022 7:49 PM, Fabrice Couvreur via ntg-context wrote:
> > Hello,
> > I notice a strange behavior of the macro numberstriped ( ).
> > Thanks.
> > Fabrice
> >
> > \starttext
> >   \switchtobodyfont[9pt]
> >   \startMPcode
> >
> >path p, q, r, b ;
> >p  := unitsquare xyscaled (4cm,4cm) ;
> >z[0] = (2cm,0cm) ;
> >z[1] = (2cm,4cm) ;
> >z[2] = (0cm,2cm) ;
> >q := llcorner p--z[0]--z[1]--z[2]--cycle ;
> >r := unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ;
> >b := unitsquare xyscaled (3cm,3cm) shifted(1cm,0) ;
> >draw p ;
> >draw r withcolor red;
> >draw r numberstriped (.25,20,5) withcolor magenta ;
> >draw b numberstriped (.25,20,5) withcolor magenta ;
> >label.llft("D", p) ;
> >label.lrt("C", p) ;
> >label.ulft("A", p) ;
> >label.urt("B", p) ;
> >label.urt("P", lrcorner r) ;
> >label.lft("Q", llcorner r) ;
> >label.top("M", urcorner r) ;
> >
> >\stopMPcode
> > \stoptext
> you need to find a volunteer to make the pattern have the two corner  blobs
>
> \starttext
>
> \startMPcode
>  path p, q, r, b ;
>  path p ; p  := unitsquare xyscaled (4cm,4cm) ;
>  draw p ;
>  draw p
>  withpattern image (
>  draw (llcorner unitsquare -- urcorner unitsquare) scaled 5mm ;
>  % how to get the corner dots
>  )
>  withpatternscale 1/16
>  withpen pencircle scaled 1mm
>  ;
> \stopMPcode
>
> \stoptext
>
>
> -
>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] About macro numberstriped ()

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

On 9/27/2022 7:49 PM, Fabrice Couvreur via ntg-context wrote:

Hello,
I notice a strange behavior of the macro numberstriped ( ).
Thanks.
Fabrice

\starttext
  \switchtobodyfont[9pt]
  \startMPcode

   path p, q, r, b ;
   p  := unitsquare xyscaled (4cm,4cm) ;
   z[0] = (2cm,0cm) ;
   z[1] = (2cm,4cm) ;
   z[2] = (0cm,2cm) ;
   q := llcorner p--z[0]--z[1]--z[2]--cycle ;
   r := unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ;
   b := unitsquare xyscaled (3cm,3cm) shifted(1cm,0) ;
   draw p ;
   draw r withcolor red;
   draw r numberstriped (.25,20,5) withcolor magenta ;
   draw b numberstriped (.25,20,5) withcolor magenta ;
   label.llft("D", p) ;
   label.lrt("C", p) ;
   label.ulft("A", p) ;
   label.urt("B", p) ;
   label.urt("P", lrcorner r) ;
   label.lft("Q", llcorner r) ;
   label.top("M", urcorner r) ;

   \stopMPcode
\stoptext

you need to find a volunteer to make the pattern have the two corner  blobs

\starttext

\startMPcode
path p, q, r, b ;
path p ; p  := unitsquare xyscaled (4cm,4cm) ;
draw p ;
draw p
withpattern image (
draw (llcorner unitsquare -- urcorner unitsquare) scaled 5mm ;
% how to get the corner dots
)
withpatternscale 1/16
withpen pencircle scaled 1mm
;
\stopMPcode

\stoptext


-
  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] About macro numberstriped ()

2022-09-27 Thread Fabrice Couvreur via ntg-context
Hello,
I notice a strange behavior of the macro numberstriped ( ).
Thanks.
Fabrice

\starttext
 \switchtobodyfont[9pt]
 \startMPcode

  path p, q, r, b ;
  p  := unitsquare xyscaled (4cm,4cm) ;
  z[0] = (2cm,0cm) ;
  z[1] = (2cm,4cm) ;
  z[2] = (0cm,2cm) ;
  q := llcorner p--z[0]--z[1]--z[2]--cycle ;
  r := unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ;
  b := unitsquare xyscaled (3cm,3cm) shifted(1cm,0) ;
  draw p ;
  draw r withcolor red;
  draw r numberstriped (.25,20,5) withcolor magenta ;
  draw b numberstriped (.25,20,5) withcolor magenta ;
  label.llft("D", p) ;
  label.lrt("C", p) ;
  label.ulft("A", p) ;
  label.urt("B", p) ;
  label.urt("P", lrcorner r) ;
  label.lft("Q", llcorner r) ;
  label.top("M", urcorner r) ;

  \stopMPcode
\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] Hebrew punctuation with SBL Hebrew

2022-08-31 Thread Joey McCollum via ntg-context
In your "broken" example, the patah below the het is being moved to the
right rather than staying under the middle of the het? But the shift to the
right is the correct behavior for furtive patah and should be expected.

On Wed, Aug 31, 2022 at 8:06 PM Denis Maier via ntg-context <
ntg-context@ntg.nl> wrote:

> Hi,
>
>
>
> I’m running into something weird with Hebrew punctuation. Consider the
> example below. SBL Hebrew gives me incorrect results when there’s a vaw
> with a holam = וֹ  just before a chet with a patach = חַ => the patach
> below the chet ist misplaced.
>
> If I remove the holam from the vaw, everything looks ok. Oddly, in Linux
> Libertine I get the correct results in both cases. Does anyone know what
> the problem is here? User error? A bug in SBL Hebrew (which would be very
> odd since that font should be designed specifically for that kind of
> stuff). A missing seeting?
>
>
>
> Best,
>
> Denis
>
>
>
> \definefontfamily[notok][rm][SBL Hebrew][features=hebrew]
>
> \definefontfamily[ok][rm][Linux Libertine O][features=hebrew]
>
>
>
> \setupdirections[bidi=global,method=unicode]
>
>
>
>
>
> \starttext
>
>
>
> Ok:
>
> {\switchtobodyfont[notok]
>
> חִיוּחוחַ
>
> }
>
>
>
> Broken:
>
> {\switchtobodyfont[notok]
>
> חִיוּחוֹחַ
>
> }
>
>
>
> Linux Libertine works in both cases:
>
>
>
> Ok:
>
> {\switchtobodyfont[ok]
>
> חִיוּחוחַ
>
> }
>
>
>
> Ok:
>
> {\switchtobodyfont[ok]
>
> חִיוּחוֹחַ
>
> }
>
>
>
>
>
> \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
>
> ___
>
___
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] Hebrew punctuation with SBL Hebrew

2022-08-31 Thread Denis Maier via ntg-context
Hi,

I’m running into something weird with Hebrew punctuation. Consider the example 
below. SBL Hebrew gives me incorrect results when there’s a vaw with a holam = 
וֹ  just before a chet with a patach = חַ => the patach below the chet ist 
misplaced.
If I remove the holam from the vaw, everything looks ok. Oddly, in Linux 
Libertine I get the correct results in both cases. Does anyone know what the 
problem is here? User error? A bug in SBL Hebrew (which would be very odd since 
that font should be designed specifically for that kind of stuff). A missing 
seeting?

Best,
Denis

\definefontfamily[notok][rm][SBL Hebrew][features=hebrew]
\definefontfamily[ok][rm][Linux Libertine O][features=hebrew]

\setupdirections[bidi=global,method=unicode]


\starttext

Ok:
{\switchtobodyfont[notok]
חִיוּחוחַ
}

Broken:
{\switchtobodyfont[notok]
חִיוּחוֹחַ
}

Linux Libertine works in both cases:

Ok:
{\switchtobodyfont[ok]
חִיוּחוחַ
}

Ok:
{\switchtobodyfont[ok]
חִיוּחוֹחַ
}


\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] How to do code listings & sections from XML (AsciiDoc)

2022-08-13 Thread Mojca Miklavec via ntg-context
On Fri, 12 Aug 2022 at 23:20, Aditya Mahajan wrote:
> On Fri, 12 Aug 2022, Mojca Miklavec via ntg-context wrote:
>
> > (a) I don't know how to turn program listing (verbatim code) from xml
> > to (perhaps, vim-based) syntax highlighting (but most importantly, to
> > make sure that line breaks work properly)
>
> Does something like this work:
>
> https://wiki.contextgarden.net/Verbatim_XML

Yes, awesome, this does exactly what I want, thank you very much.

I used the following code:

\usemodule[vim]
% this breaks if directory doesn't exist before
\setupvimtyping[directory=output/]
% it would be potentially useful to have some predefined vimtyping
already present in the module
\definevimtyping
[programlisting]
[syntax=]

\startluacode
function xml.functions.processprogramlisting(t)
buffers.assign("listing","\\startprogramlisting[syntax=cpp]\n"
.. tostring(xml.text(t)) .. "\n\\stopprogramlisting")
context.getbuffer { "listing" }
end
\stopluacode

\startxmlsetups xml:programlisting
\pushcatcodetable
\setcatcodetable\ctxcatcodes
\xmlfunction{#1}{processprogramlisting}
\popcatcodetable
\stopxmlsetups


Now I need to get the "cpp" and "unnumbered" part processed
automatically, so that it will work for any language:

// test.cpp:
int main()
{
return 0;
}

which would then be transformed into

\startprogramlisting[syntax=cpp,numbering=no]
int main()
{
return 0;
}
\stopprogramlisting

For some reason the syntax highlighting doesn't work on the full
document, but it works inside the minimal example, so I still need to
investigate what's going on with the full document.



On an unrelated note:

I cannot make \startnarrow[middle=1cm] (or left=... for that matter)
produce any offset on the left. I was playing with the following
code, but the frame refuses to be shifted to the right

\setupvimtyping
[before={
\startnarrow[left=1cm,before={\blank[10pt]}]
\switchtobodyfont[8pt]
\startframed
[align=flushleft,
 background=color,
 backgroundcolor=gray,
 frame=off,
 leftframe=on,
 rulethickness=2pt,
 framecolor=darkgray,
 width=local,
 offset=1ex]},
  after={\stopframed\stopnarrow}]

Hello
\startprogramlisting[syntax=cpp,numbering=yes]
int main()
{
return 0;
}
\stopprogramlisting


Mojca
___
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 do code listings & sections from XML (AsciiDoc)

2022-08-13 Thread Mojca Miklavec via ntg-context
On Fri, 12 Aug 2022 at 23:20, Aditya Mahajan wrote:
> On Fri, 12 Aug 2022, Mojca Miklavec via ntg-context wrote:
>
> > Hi,
> >
> > Hans helped me out with some asciidoc processing a while ago.
> >
> > I played a bit further, but I'm currently facing two minor issues:
> >
> > (a) I don't know how to turn program listing (verbatim code) from xml
> > to (perhaps, vim-based) syntax highlighting (but most importantly, to
> > make sure that line breaks work properly)
>
> Does something like this work:
>
> https://wiki.contextgarden.net/Verbatim_XML

Yes, awesome, this does exactly what I want, thank you very much.

I used the following code:

\usemodule[vim]
% this breaks if directory doesn't exist before
\setupvimtyping[directory=output/]
% it would be potentially useful to have some predefined vimtyping
already present in the module
\definevimtyping
[programlisting]
[syntax=]

\startluacode
function xml.functions.processprogramlisting(t)
buffers.assign("listing","\\startprogramlisting[syntax=cpp]\n"
.. tostring(xml.text(t)) .. "\n\\stopprogramlisting")
context.getbuffer { "listing" }
end
\stopluacode

\startxmlsetups xml:programlisting
\pushcatcodetable
\setcatcodetable\ctxcatcodes
\xmlfunction{#1}{processprogramlisting}
\popcatcodetable
\stopxmlsetups


Now I need to get the "cpp" and "unnumbered" part processed
automatically, so that it will work for any language:

// test.cpp:
int main()
{
return 0;
}

which would then be transformed into

\startprogramlisting[syntax=cpp,numbering=no]
int main()
{
return 0;
}
\stopprogramlisting

For some reason the syntax highlighting doesn't work on the full
document, but it works inside the minimal example, so I still need to
investigate what's going on with the full document.



On an unrelated note:

I cannot make \startnarrow[middle=1cm] (or left=... for that matter)
produce any offset on the left. I was playing with the following
example, but the frame refuses to be shifted to the right

\setupvimtyping
[before={
\startnarrow[left=1cm,before={\blank[10pt]}]
\switchtobodyfont[8pt]
\startframed
[align=flushleft,
 background=color,
 backgroundcolor=gray,
 frame=off,
 leftframe=on,
 rulethickness=2pt,
 framecolor=darkgray,
 width=local,
 offset=1ex]},
  after={\stopframed\stopnarrow}]

Hello
\startprogramlisting[syntax=cpp,numbering=yes]
int main()
{
return 0;
}
\stopprogramlisting


Mojca
___
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] Using alegreya typescript

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


\usetypescriptfile[alegreya]

\usebodyfont[alegreya-light]
\usebodyfont[alegreya-medium]

\setupbodyfont[alegreya]

\setuplayout[tight]

\starttext
\switchtobodyfont[alegreya-light]\input tufte \par
\switchtobodyfont[alegreya]  \input tufte \par
\switchtobodyfont[alegreya-medium]   \input tufte \par
\switchtobodyfont[alegreya-light,sans]   \input tufte \par
\switchtobodyfont[alegreya,sans] \input tufte \par
\switchtobodyfont[alegreya-medium,sans]  \input tufte \par
\stoptext


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-%D \module
%D   [   file=type-imp-dejavu,
%Dversion=2010.06.21,
%D  title=\CONTEXT\ Typescript Macros,
%D   subtitle=Alegreya fonts,
%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 This is cleaned up ersion of thwe one on the wiki. The font can be fetched 
from:
%D
%D \type {https://www.huertatipografica.com/en/fonts/alegreya-ht-pro}

% \usetypescriptfile[alegreya]
%
% \usebodyfont[alegreya-light]
% \usebodyfont[alegreya-medium]
%
% \setupbodyfont[alegreya]
%
% \setuplayout[tight]
%
% \starttext
%     \switchtobodyfont[alegreya-light]\input tufte \par
%     \switchtobodyfont[alegreya]  \input tufte \par
%     \switchtobodyfont[alegreya-medium]   \input tufte \par
%     \switchtobodyfont[alegreya-light,sans]   \input tufte \par
%     \switchtobodyfont[alegreya,sans] \input tufte \par
%     \switchtobodyfont[alegreya-medium,sans]  \input tufte \par
% \stoptext

\starttypescriptcollection[alegreya]

\usetypescriptfile
  [imp-gentium]

\definefontfallback
  [alegreyagentium-fallback]
  [name:gentium]
  [greekandcoptic,greekextended]

\starttypescript [serif] 
[alegreya-serif,alegreya-light-serif,alegreya-medium-serif] [name]
\setups[font:fallback:serif]
\definefontsynonym[Serif]   [name:alegreyaregular]
[features=default,fallbacks=alegreya-gentium-fallback]
\definefontsynonym[SerifItalic] [name:alegreyaitalic] 
[features=default,fallbacks=alegreya-gentium-fallback]
\definefontsynonym[SerifBold]   [name:alegreyabold]   
[features=default,fallbacks=alegreya-gentium-fallback]
\definefontsynonym[SerifBoldItalic] [name:alegreyabolditalic] 
[features=default,fallbacks=alegreya-gentium-fallback]
\stoptypescript

\starttypescript [sans] [alegreya-sans] [name]
\setups[font:fallback:sans]
\definefontsynonym [Sans]   [name:alegreyasansregular]
[features=default]
\definefontsynonym [SansItalic] [name:alegreyasansitalic] 
[features=default]
\definefontsynonym [SansBold]   [name:alegreyasansbold]   
[features=default]
\definefontsynonym [SansBoldItalic] [name:alegreyasansbolditalic] 
[features=default]
\stoptypescript

\starttypescript [sans] [alegreya-light-sans] [name]
\setups[font:fallback:sans]
\definefontsynonym [Sans]   [name:alegreyasanslight]
[features=default]
\definefontsynonym [SansItalic] [name:alegreyasanslightitalic]  
[features=default]
\definefontsynonym [SansBold]   [name:alegreyasansmedium]   
[features=default]
\definefontsynonym [SansBoldItalic] [name:alegreyasansmediumitalic] 
[features=default]
\stoptypescript

\starttypescript [sans] [alegreya-medium-sans] [name]
\setups[font:fallback:sans]
\definefontsynonym [Sans]   [name:alegreyasansmedium]  
[features=default]
\definefontsynonym [SansItalic] [name:alegreyasansmediumitalic]
[features=default]
\definefontsynonym [SansBold]   [name:alegreyasansextrabold]   
[features=default]
\definefontsynonym [SansBoldItalic] [name:alegreyasansextrabolditalic] 
[features=default]
\stoptypescript

\starttypescript [alegreya,alegreya-light,alegreya-medium]

\definefallbackfamily[alegreya][serif][gentium][range={greekandcoptic,greekextended}]
\definetypeface [\typescriptone] [rm] [serif] [\typescriptone-serif] 
[default]
\definetypeface [\typescriptone] [ss] [sans]  [\typescriptone-sans]  
[default]
\definetypeface [\typescriptone] [tt] [mono]  [modern]   
[default]
\definetypeface [\typescriptone] [mm] [math]  [default]  
[default]
\stoptypescript

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

Re: [NTG-context] MetaPost label font size

2022-07-06 Thread fv leung via ntg-context
I've used something like the following before.


\starttext

\startMPcode

  label("normal label", (0, 0));

  label("{\switchtobodyfont[3pt] tiny label}", (0, 18));

  label("{\switchtobodyfont[72pt] giant label}", (0, -72));

\stopMPcode

\stoptext

Henning Hraban Ramm via ntg-context  於 2022年7月6日 週三
晚上7:36寫道:

> Am 06.07.22 um 12:45 schrieb Hans Hagen via ntg-context:
> > On 7/6/2022 12:19 PM, fv leung via ntg-context wrote:
> >> My stupid way to get labels of different sizes:
> >>
> >> \starttext
> >>
> >> \startMPcode
> >>
> >>label("normal label", (0, 0));
> >>
> >>label("\setsmallbodyfont small label", (0, 18));
> >>
> >>label("\setbigbodyfont big label", (0, -18));
> >>
> >> \stopMPcode
> >>
> >> \stoptext
> > nothing stupid about that ... it's how i would do it
>
> Okay. So there’s really no possibility to adapt whatever defines the
> label font size except defaultfontsize inbetween? Strange.
>
> My solution so far was to split the picture and re-combine it afterwards.
>
> 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
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Odd behaviour with Plex typescript

2022-06-30 Thread Max Chernoff via ntg-context

just preload it, as in:

\usebodyfont[modern]

\setupbodyfont[plex]

\setuphead
   [section]
   [style={\switchtobodyfont[modern]}]

\starttext
 \section{A}
 A
\stoptext


That seems to have fixed it. Thanks!

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

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


Re: [NTG-context] Odd behaviour with Plex typescript

2022-06-30 Thread Hans Hagen via ntg-context

On 6/30/2022 10:36 AM, Max Chernoff via ntg-context wrote:

If you load the Plex typescript, a spurious space is added on the first
switch to another font, messing up any alignment. This doesn't happen
with any other fonts; only with Plex.

MWE:

     \setuphead[section][style={\switchtobodyfont[modern]}]
     \setupbodyfont[plex]

     \starttext
     \section{A}
     A
     \stoptext

I was able to fix this by removing the space immediately before the "%"
on line 136 of "type-imp-plex.mkiv", changing it from this (original):

 
\definefontfeature[plexwideneddefault][default][extend=\luaexpr{1/0.85}] 
% An odd floating point number to correct monospace.


to this (fixed):

 
\definefontfeature[plexwideneddefault][default][extend=\luaexpr{1/0.85}]% An 
odd floating point number to correct monospace.


I'm pretty sure that TeX is ignoring spaces at this point, so I have no
idea why this issue exists or why the fix works.
when you trigger modern it will also process a typescript and that can 
itself have spaces introduced


just preload it, as in:

\usebodyfont[modern]

\setupbodyfont[plex]

\setuphead
  [section]
  [style={\switchtobodyfont[modern]}]

\starttext
\section{A}
A
\stoptext



-
  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] Odd behaviour with Plex typescript

2022-06-30 Thread Max Chernoff via ntg-context

If you load the Plex typescript, a spurious space is added on the first
switch to another font, messing up any alignment. This doesn't happen
with any other fonts; only with Plex.

MWE:

\setuphead[section][style={\switchtobodyfont[modern]}]
\setupbodyfont[plex]

\starttext
\section{A}
A
\stoptext

I was able to fix this by removing the space immediately before the "%"
on line 136 of "type-imp-plex.mkiv", changing it from this (original):


\definefontfeature[plexwideneddefault][default][extend=\luaexpr{1/0.85}] % An 
odd floating point number to correct monospace.

to this (fixed):


\definefontfeature[plexwideneddefault][default][extend=\luaexpr{1/0.85}]% An 
odd floating point number to correct monospace.

I'm pretty sure that TeX is ignoring spaces at this point, so I have no
idea why this issue exists or why the fix works.

-- Max
___
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] Typesetting modern Greek (UTF8) with ConTeXt

2022-06-06 Thread Pablo Rodriguez via ntg-context
On 6/6/22 02:19, Gerben Wierda via ntg-context wrote:
> For Russian I have:
> 
> \setuplanguage[ru][patterns={ru}]\mainlanguage[ru]
> \definefallbackfamily
>   [archimate]
>   [ss]
>   [Helvetica]
>   [preset=range:cyrillic,
>    tf=style:light,
>    it=style:lightoblique,
>    bf=style:regular,
>    bi=style:oblique,
>    force=yes,
>  rscale=1.0]
> \definefontfamily [archimate] [ss] [Optima]
> \setupbodyfont[archimate]
> 
> I can’t find out from ConTeXtgarden what code I must use for modern
> Greek (‘el’?) and what range I must use for Greek characters (I guess
> ‘greekandcoptic’ which I’ve seen mentioned somewhere).
> 
> Correct?

Hi Gerben,

\language[gr], but beware since it uses patterns for ancient Greek.

preset=range:greek is what you intend.

Another approach would be to use \setuplanguage[gr] and configure the
font in setups.

Here you have a minimal sample with both approaches:

\mainlanguage[en]
\definefallbackfamily
  [archimate]
  [ss]
  [MgOpenCosmetica]
  [preset=range:greek,
   force=yes]
\definefontfamily [archimate] [ss] [Optima]
\setupbodyfont[archimate]

\definefontfamily
  [mgopencosm]
  [ss]
  [MgOpenCosmetica]
  [preset=range:greek,
   force=yes]
\startsetups[greek-typeface]
\switchtobodyfont[mgopencosm]
\stopsetups

\setuplanguage[agr][setups={greek-typeface}]

\startbuffer
Ο κόσμος θα ήταν απίστευτα φτωχός αν δεν υπήρχαν οι
Έλληνες. Μάλιστα, αν θέλουμε να είμαστε ειλικρινείς, δεν θα
υπήρχε καθόλου κόσμος, χωρίς τις επιστήμες, τη δημοκρατία,
τις πόλεις, τα φωνήεντα, τη φέτα, το φραπέ, το ούζο και το
χταποδάκι στα κάρβουνα.
\stopbuffer

\starttext
\gr \getbuffer\par
\agr \getbuffer
\stoptext

MgOpenCosmetica can be downloaded from
https://web.archive.org/web/20090309063533/www.ellak.gr/fonts/mgopen/index.en.html
(direct link:
https://web.archive.org/web/20090309063533/www.ellak.gr/fonts/mgopen/files/MgOpenCosmetica.tar.gz).

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 / 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] ugly bug

2022-06-01 Thread Steffen Wolfrum via ntg-context
Hi,

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

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

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

How can this be solved?


Best wishes, Steffen

===

\setupbodyfont[palatino,9.5pt]\setupinterlinespace[13pt]

\setuppagenumbering [alternative=doublesided,location=]
\setupheader[strut=yes]
\setupheadertexts[text][][\blackrule]


\definepapersize[stw][width=17cm,height=24cm]
\setuppapersize[stw][stw]

\setuplayout
[width=122mm,
backspace=18mm,topspace=10mm,
header=7mm,headerdistance=5.969mm,
footer=5mm,footerdistance=5mm,height=214.031mm, 
location=middle]


\definedelimitedtext
[narrowtext]
[leftmargin=6mm,rightmargin=0mm]%,

\starttext

%%Test 1:
\dorecurse{6}{\input linden}

%%Test 2:
%\dorecurse{5}{\input tufte}


\start
\startdelimitedtext[narrowtext]
\switchtobodyfont[8pt]\setuplocalinterlinespace[line=11pt]
\input linden\par
\stopdelimitedtext
\stop

\stoptext

___
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] Changing font and font size inside textex

2022-05-31 Thread Stefan Nedeljkovic via ntg-context
Thank you, I'll try that later.

On Tue, May 31, 2022 at 9:42 AM Max Chernoff  wrote:

> > Thanks Max that works perfectly! But It would still be useful if I could
> > change families inside a MPpage.
>
> Sure, but you'll need to store the x-heights first:
>
>  \starttexdefinition storexheight [#1]
>  % Placing the first use of \switchtobodyfont inside a group messes
>  % with the definitions, so we need to reset the font family
> manually.
>  \edef\oldfontclass{\fontclass}
>
>  \switchtobodyfont[#1]
>  \expandafter\newcount\csname #1_xheight\endcsname
>  \global\csname #1_xheight\endcsname=\numexpr 100 *
> \number\dimexpr1em\relax / \number\dimexpr1ex\relax \relax
>
>  \switchtobodyfont[\oldfontclass]
>  \stoptexdefinition
>
>  \starttexdefinition setxheight [#1][#2]
>  % Combining these two lines into one sometimes fails. No idea why.
>  \switchtobodyfont[#1]
>  \switchtobodyfont[\the\dimexpr#2 * \csname #1_xheight\endcsname /
> 100 \relax]
>  \stoptexdefinition
>
>  \storexheight[adventor]
>  \storexheight[pagella]
>  \storexheight[heros]
>
>  \starttext
>  \startMPpage
>  draw textext.origin("\setxheight[adventor][1cm]Hello!");
>
>  draw (0, 1cm) -- (6cm, 1cm);
>  \stopMPpage
>
>  \startMPpage
>  draw textext.origin("\setxheight[pagella][1cm]Hello!");
>
>  draw (0, 1cm) -- (6cm, 1cm);
>  \stopMPpage
>
>  \startMPpage
>  draw textext.origin("\setxheight[heros][6pt]Hello!");
>  draw textext.origin("\setxheight[heros][24pt]Hello!");
>
>  draw (0, 6pt) -- (6cm, 6pt);
>  draw (0, 24pt) -- (6cm, 24pt);
>  \stopMPpage
>  \stoptext
>
> It's pretty ugly code, but it seems to work alright.
>
> -- Max
>
>
___
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] Changing font and font size inside textex

2022-05-31 Thread Max Chernoff via ntg-context
Thanks Max that works perfectly! But It would still be useful if I could 
change families inside a MPpage.


Sure, but you'll need to store the x-heights first:

\starttexdefinition storexheight [#1]
% Placing the first use of \switchtobodyfont inside a group messes
% with the definitions, so we need to reset the font family manually.
\edef\oldfontclass{\fontclass}

\switchtobodyfont[#1]
\expandafter\newcount\csname #1_xheight\endcsname
\global\csname #1_xheight\endcsname=\numexpr 100 * 
\number\dimexpr1em\relax / \number\dimexpr1ex\relax \relax

\switchtobodyfont[\oldfontclass]
\stoptexdefinition

\starttexdefinition setxheight [#1][#2]
% Combining these two lines into one sometimes fails. No idea why.
\switchtobodyfont[#1]
\switchtobodyfont[\the\dimexpr#2 * \csname #1_xheight\endcsname / 100 
\relax]
\stoptexdefinition

\storexheight[adventor]
\storexheight[pagella]
\storexheight[heros]

\starttext
\startMPpage
draw textext.origin("\setxheight[adventor][1cm]Hello!");

draw (0, 1cm) -- (6cm, 1cm);
\stopMPpage

\startMPpage
draw textext.origin("\setxheight[pagella][1cm]Hello!");

draw (0, 1cm) -- (6cm, 1cm);
\stopMPpage

\startMPpage
draw textext.origin("\setxheight[heros][6pt]Hello!");
draw textext.origin("\setxheight[heros][24pt]Hello!");

draw (0, 6pt) -- (6cm, 6pt);
draw (0, 24pt) -- (6cm, 24pt);
\stopMPpage
\stoptext

It's pretty ugly code, but it seems to work alright.

-- Max

___
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] Changing font and font size inside textex

2022-05-30 Thread Stefan Nedeljkovic via ntg-context
Thanks Max that works perfectly! But It would still be useful if I could
change families inside a MPpage.

On Tue, May 31, 2022 at 1:31 AM Max Chernoff  wrote:

> > I'm using the following macro to set the font size via h-height:
> >
> > \starttexdefinition setxheight [#1][#2]
> > \switchtobodyfont[#1, 12pt]
> > \scratchdimen=\dimexpr#2\relax
> > \switchtobodyfont[#1, \cldcontext{tex.dimen.scratchdimen /
> tex.sp"1ex"
> > * tex.sp"1em" .. "sp"}]
> > \stoptexdefinition
> >
> > But I can't figure out how to use that in MPpage.
>
> So it looks like the "\cldcontext" command doesn't work quite right
> inside "textext", and it also looks like "\switchtobodyfont" doesn't
> take effect until text is actually typeset when we're inside "textext".
>
> This seems to work:
>
>  \starttexdefinition setxheight [#1]
>  \switchtobodyfont[\the\dimexpr #1 * \number\dimexpr1em\relax /
> \number\dimexpr1ex\relax \relax]
>  \stoptexdefinition
>
>
>  \starttext
>  \switchtobodyfont[adventor]
>      \startMPpage
>  draw textext.origin("\setxheight[1cm]Hello!");
>
>  draw (0, 1cm) -- (6cm, 1cm);
>  \stopMPpage
>
>  \switchtobodyfont[pagella]
>  \startMPpage
>  draw textext.origin("\setxheight[1cm]Hello!");
>
>  draw (0, 1cm) -- (6cm, 1cm);
>  \stopMPpage
>
>  \switchtobodyfont[heros]
>  \startMPpage
>  draw textext.origin("\setxheight[6pt]Hello!");
>  draw textext.origin("\setxheight[24pt]Hello!");
>
>  draw (0, 6pt) -- (6cm, 6pt);
>  draw (0, 24pt) -- (6cm, 24pt);
>  \stopMPpage
>  \stoptext
>
> The catch here is that you need to set the font family *before* you
> start the MPpage.
>
> -- Max
>
___
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] Changing font and font size inside textex

2022-05-30 Thread Max Chernoff via ntg-context

I'm using the following macro to set the font size via h-height:

\starttexdefinition setxheight [#1][#2]
\switchtobodyfont[#1, 12pt]
\scratchdimen=\dimexpr#2\relax
\switchtobodyfont[#1, \cldcontext{tex.dimen.scratchdimen / tex.sp"1ex"
* tex.sp"1em" .. "sp"}]
\stoptexdefinition

But I can't figure out how to use that in MPpage.


So it looks like the "\cldcontext" command doesn't work quite right
inside "textext", and it also looks like "\switchtobodyfont" doesn't
take effect until text is actually typeset when we're inside "textext".

This seems to work:

\starttexdefinition setxheight [#1]
\switchtobodyfont[\the\dimexpr #1 * \number\dimexpr1em\relax / 
\number\dimexpr1ex\relax \relax]
\stoptexdefinition


\starttext
\switchtobodyfont[adventor]
\startMPpage
draw textext.origin("\setxheight[1cm]Hello!");

    draw (0, 1cm) -- (6cm, 1cm);
\stopMPpage

\switchtobodyfont[pagella]
\startMPpage
draw textext.origin("\setxheight[1cm]Hello!");

draw (0, 1cm) -- (6cm, 1cm);
\stopMPpage

\switchtobodyfont[heros]
\startMPpage
draw textext.origin("\setxheight[6pt]Hello!");
draw textext.origin("\setxheight[24pt]Hello!");

draw (0, 6pt) -- (6cm, 6pt);
draw (0, 24pt) -- (6cm, 24pt);
\stopMPpage
\stoptext

The catch here is that you need to set the font family *before* you
start the MPpage.

-- Max
___
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] Changing font and font size inside textex

2022-05-30 Thread Stefan Nedeljkovic via ntg-context
Dear list,

I want to be able to change the font and the font size inside a MPpage. But
if I try to prepend \switchtobodyfont to the text inside textext it doesn't
work. I'm using the following macro to set the font size via h-height:

\starttexdefinition setxheight [#1][#2]
\switchtobodyfont[#1, 12pt]
\scratchdimen=\dimexpr#2\relax
\switchtobodyfont[#1, \cldcontext{tex.dimen.scratchdimen / tex.sp"1ex"
* tex.sp"1em" .. "sp"}]
\stoptexdefinition

But I can't figure out how to use that in MPpage.
Any help would be appreciated.

Sincerely,
Stefan
___
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] Specifying font size as x-height

2022-05-28 Thread Stefan Nedeljkovic via ntg-context
Perfect, thank you very much Max!

On Sat, May 28, 2022 at 10:40 AM Max Chernoff  wrote:

> On 2022-05-28 2:27 a.m., Stefan Nedeljkovic wrote:
> > One slight problem is when I use 2\measured{xheight} as the font size I
> > get an error. \measure works fine though.
>
> The old version expected direct input, not a \dimen. Try this:
>
>  \starttexdefinition setxheight [#1][#2]
>  \switchtobodyfont[#1, 12pt]
>  \scratchdimen=\dimexpr#2\relax
>  \switchtobodyfont[#1, \cldcontext{tex.dimen.scratchdimen /
> tex.sp"1ex" * tex.sp"1em" .. "sp"}]
>  \stoptexdefinition
>
>  \definemeasure[xheight][2.5pt]
>
>  \starttext
>  \setxheight[adventor][10\measured{xheight}] Hello!
>  \stoptext
>
>
> -- Max
>
___
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] Specifying font size as x-height

2022-05-28 Thread Max Chernoff via ntg-context

On 2022-05-28 2:27 a.m., Stefan Nedeljkovic wrote:
One slight problem is when I use 2\measured{xheight} as the font size I 
get an error. \measure works fine though.


The old version expected direct input, not a \dimen. Try this:

\starttexdefinition setxheight [#1][#2]
\switchtobodyfont[#1, 12pt]
\scratchdimen=\dimexpr#2\relax
\switchtobodyfont[#1, \cldcontext{tex.dimen.scratchdimen / tex.sp"1ex" * 
tex.sp"1em" .. "sp"}]
\stoptexdefinition

\definemeasure[xheight][2.5pt]

\starttext
\setxheight[adventor][10\measured{xheight}] Hello!
\stoptext


-- Max
___
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] Specifying font size as x-height

2022-05-28 Thread Stefan Nedeljkovic via ntg-context
One slight problem is when I use 2\measured{xheight} as the font size I get
an error. \measure works fine though.

On Sat, May 28, 2022 at 9:34 AM Stefan Nedeljkovic 
wrote:

> Awesome, thank you very much Max!
>
> On Sat, May 28, 2022 at 8:49 AM Max Chernoff  wrote:
>
>> > How would one specify the font size in LMTX, but via x-height?
>>
>> You could try this:
>>
>>  \starttexdefinition setxheight [#1][#2]
>>  \switchtobodyfont[#1, 12pt]
>>  \switchtobodyfont[#1, \cldcontext{tex.sp"#2" / tex.sp"1ex" *
>> tex.sp"1em" .. "sp"}]
>>  \stoptexdefinition
>>
>> Demo:
>>
>>  \starttexdefinition setxheight [#1][#2]
>>  \switchtobodyfont[#1, 12pt]
>>  \switchtobodyfont[#1, \cldcontext{tex.sp"#2" / tex.sp"1ex" *
>> tex.sp"1em" .. "sp"}]
>>  \stoptexdefinition
>>
>>  \define[1]\sample{%
>>  \setxheight[#1][10pt] Hello%
>>  }
>>
>>  \setuppapersize[letter, landscape]
>>
>>  \starttext
>>  \dontleavehmode\rlap{\vrule width\textwidth height 10.5pt depth
>> -10pt}%
>>  \processcommalist[modern, pagella, termes, heros, bonum,
>> scholas, adventor, cursor, chorus, dejavu]\sample
>>  \stoptext
>>
>> This is kind of a hacky solution though. It works reasonably well,
>> although there's likely a better (perhaps builtin?) way to do this.
>>
>> -- Max
>>
>
___
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] Specifying font size as x-height

2022-05-28 Thread Stefan Nedeljkovic via ntg-context
Awesome, thank you very much Max!

On Sat, May 28, 2022 at 8:49 AM Max Chernoff  wrote:

> > How would one specify the font size in LMTX, but via x-height?
>
> You could try this:
>
>  \starttexdefinition setxheight [#1][#2]
>  \switchtobodyfont[#1, 12pt]
>      \switchtobodyfont[#1, \cldcontext{tex.sp"#2" / tex.sp"1ex" *
> tex.sp"1em" .. "sp"}]
>  \stoptexdefinition
>
> Demo:
>
>  \starttexdefinition setxheight [#1][#2]
>  \switchtobodyfont[#1, 12pt]
>  \switchtobodyfont[#1, \cldcontext{tex.sp"#2" / tex.sp"1ex" *
> tex.sp"1em" .. "sp"}]
>  \stoptexdefinition
>
>  \define[1]\sample{%
>  \setxheight[#1][10pt] Hello%
>  }
>
>  \setuppapersize[letter, landscape]
>
>  \starttext
>  \dontleavehmode\rlap{\vrule width\textwidth height 10.5pt depth
> -10pt}%
>  \processcommalist[modern, pagella, termes, heros, bonum, scholas,
> adventor, cursor, chorus, dejavu]\sample
>  \stoptext
>
> This is kind of a hacky solution though. It works reasonably well,
> although there's likely a better (perhaps builtin?) way to do this.
>
> -- Max
>
___
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] Specifying font size as x-height

2022-05-28 Thread Max Chernoff via ntg-context
How would one specify the font size in LMTX, but via x-height? 


You could try this:

\starttexdefinition setxheight [#1][#2]
\switchtobodyfont[#1, 12pt]
\switchtobodyfont[#1, \cldcontext{tex.sp"#2" / tex.sp"1ex" * tex.sp"1em" .. 
"sp"}]
\stoptexdefinition

Demo:

\starttexdefinition setxheight [#1][#2]
    \switchtobodyfont[#1, 12pt]
\switchtobodyfont[#1, \cldcontext{tex.sp"#2" / tex.sp"1ex" * tex.sp"1em" .. 
"sp"}]
\stoptexdefinition

\define[1]\sample{%

\setxheight[#1][10pt] Hello%
}

\setuppapersize[letter, landscape]

\starttext

\dontleavehmode\rlap{\vrule width\textwidth height 10.5pt depth -10pt}%
\processcommalist[modern, pagella, termes, heros, bonum, scholas, 
adventor, cursor, chorus, dejavu]\sample
\stoptext

This is kind of a hacky solution though. It works reasonably well,
although there's likely a better (perhaps builtin?) way to do this.

-- Max
___
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] spooky jumping headerline

2022-05-25 Thread Steffen Wolfrum via ntg-context
Hi,

the \blackrule (in my real project this is the running title) on page 1 is 
about 1mm higher than on page 2.

Why?

Best, Steffen



\setupbodyfont[palatino,9.5pt]\setupinterlinespace[13pt]

\setuppagenumbering [alternative=doublesided,location=]
\setupheader[strut=yes]
\setupheadertexts[text][][\blackrule]


\definepapersize[stw][width=17cm,height=24cm]
\setuppapersize[stw][stw]

\setuplayout
[width=122mm,
backspace=18mm,topspace=10mm,
header=7mm,headerdistance=5.969mm,
footer=5mm,footerdistance=5mm,height=214.031mm, 
location=middle]


\definedelimitedtext
 [narrowtext]
 [leftmargin=6mm,rightmargin=0mm]%,

\starttext

%%Test 1:
\dorecurse{6}{\input linden}

%%Test 2:
%\dorecurse{5}{\input tufte}


\start
\startdelimitedtext[narrowtext]
\switchtobodyfont[8pt]\setuplocalinterlinespace[line=11pt]
\input linden\par
\stopdelimitedtext
\stop

\stoptext

___
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] can't accent/fake characters in euler font

2022-05-19 Thread a badin via ntg-context
Hello all,

typesetting accented characters in eulernova font does not seem
possible to me. Is it really impossible? The other math fonts
(stix/xits) do it. I'm using Context LMTX 2022.01.21 20:13

\starttext
\switchtobodyfont[eulernova]
\startlines
euler:
1 - č
2 - \ccaron
3 - \v{c}
\stoplines

\switchtobodyfont[stixtwo]
\startlines
stix:
1 - č
2 - \ccaron
3 - \v{c}
\stoplines

\stoptext

In the end I'd like to be able to make more custom characters, e.g. Ĺ, ô, ä, ...
therefore I wanted to read about how those could be made, but the wiki
points to missing files:
http://source.contextgarden.net/enco-acc.tex
http://source.contextgarden.net/tex/context/base/enco-def.tex

Any help appreciated,
Andrej Badin
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] split TABLE cells

2022-05-19 Thread Steffen Wolfrum via ntg-context


> Am 19.05.2022 um 08:14 schrieb Hans Hagen via ntg-context 
> :
> 
> On 5/18/2022 8:07 PM, Steffen Wolfrum via ntg-context wrote:
>> Hi,
>> I just found an old mail from 30 May 2008:
>> How do I split not only TABLE but cells? It was not possible then.
>> \starttext
>> \bTABLE[split=yes,option=stretch]
>> \bTR
>> \bTD
>> \input tufte \input knuth Hello world ...
>> \eTD
>> \bTD
>> \input tufte
>> \eTD
>> \bTD
>> \input knuth
>> \eTD
>> \eTR
>> \bTR
>> \bTD
>> Test
>> \eTD
>> \bTD
>> Test
>> \eTD
>> \bTD
>> Test
>> \eTD
>> \eTR
>> \eTABLE
>> \stoptext
> not possible, use tabulate instead


do you have a MWE? 

the example from https://wiki.contextgarden.net/Tabulate gives an empty page:



\setuppapersize[A10, landscape][A8, landscape]
\setuppaper[nx=2,ny=2]
\setuparranging[XY]

\switchtobodyfont[5pt]
\setuppagenumbering[location={header,inright}]
\showframe[edge]

\setuptabulate
 [split=yes,
  header=text,
  title={\color[red] Fenchurch St. Paul},
  frame=on]

\starttabulate[|p(1.2cm)|p(1.2cm)|]
\dorecurse{6}{
\NC  Bells:  \NC  Tin tan din dan bim bam bom bo \NC\NR
\HL
\NC  Name:  \NC  Tailor Paul \NC \NR
  
\HL
}
\stoptabulate
)



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

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


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

2022-05-14 Thread śrīrāma via ntg-context
On 5/13/22 12:30 PM Stefan Nedeljkovic via ntg-context wrote:
> Dear list I need your help with a table that seems to completely screw up
> the page when it spans across multiple pages. I'm attaching all the
> necessary files.
> 
> Kind regards,
> Stefan

This seems to be a known issue for quite a while, see here:
  https://www.mail-archive.com/ntg-context@ntg.nl/msg69827.html

As Wolfgang suggested there, you can use framed instead of TABLE in your 
header. I have modified your example file (see attached). With that you get the 
attached PDF.

By the way, your example was missing a \bTABLEhead. Moreover, I believe cells 
in TABLE head entries should be enclosed by \bTH \eTH instead of \(b|e)TD. I 
have made these changes as well.

[Also, I hope you are aware that you can use style=\tt, style=\bf per row/
column/cell with \setupTABLE; that will significantly reduce markup in your 
file]

Best,
  Sreeram% kate: hl ctx

\input fonts

\usetypescript[ibmplex][uc]
\setupbodyfont[ibmplex,rm,9pt]

\setuppapersize[A4]
\setuplayout[
leftedge=\dimexpr0cm,
rightedge=\dimexpr0cm,
leftedgedistance=\dimexpr0cm,
rightedgedistance=\dimexpr0cm,
leftmargin=\dimexpr0cm,
rightmargin=\dimexpr0cm,
leftmargindistance=\dimexpr0cm,
rightmargindistance=\dimexpr0cm,
width=middle,
cutspace=\dimexpr1.5cm,
backspace=\dimexpr1.5cm,
topspace=\dimexpr1.5cm,
header=\dimexpr4cm,
height=middle,
bottomspace=\dimexpr0cm,
footer=\dimexpr0.5cm]

\setupheadertexts[\directsetup{fheader}]

\definehspace[tnumber][0.5em]

\startsetups [fheader]
\startframed[width=max,frame=off]
\startoverlay
{\leftaligned{\framedtext[location=top,frame=off,width=fit,offset=0ex]{„ДОЛИНА” Д.О.О. Београд\\
  ПЈ за прераду меса\\
  ПИБ: СР 100029284\\
  МБ: 06434517\\
  Текући рачун: 205-157956-65\\
  Email: dolin...@gmail.com}}}
{\rightaligned{\framedtext[location=top,frame=off,width=fit,offset=0ex]{%
  Булевар Краља Александра 334, 11000 Београд\\
  011\hspace[tnumber]3806\hspace[tnumber]007\\
  011\hspace[tnumber]3820\hspace[tnumber]457\\
  011\hspace[tnumber]2419\hspace[tnumber]078\\
  \vskip 2em
  Жике Поповића бб, 12220, Велико Градиште\\
  012\hspace[tnumber]662\hspace[tnumber]016}}}
\stopoverlay
\stopframed
\stopsetups

\startsetups [headertable]
\setupTABLE[frame=off]
\setupTABLE[column][1][align=flushleft]
\setupTABLE[column][2][align=flushright]
\stopsetups

\startsetups headertext
\start
\bTABLE[setups=headertable,option=stretch]
\bTR
\bTD
„ДОЛИНА” Д.О.О. Београд\\
ПЈ за прераду меса\\
ПИБ: СР 100029284\\
МБ: 06434517\\
Текући рачун: 205-157956-65\\
Email: dolin...@gmail.com
\eTD
\bTD
Булевар Краља Александра 334, 11000 Београд\\
011\hspace[tnumber]3806\hspace[tnumber]007\\
011\hspace[tnumber]3820\hspace[tnumber]457\\
011\hspace[tnumber]2419\hspace[tnumber]078\\
\vskip 2em
Жике Поповића бб, 12220, Велико Градиште\\
012\hspace[tnumber]662\hspace[tnumber]016\\
\eTD
\eTR
\eTABLE
\stop
\stopsetups

\setuppagenumbering[location=]
\setupfootertexts[][\midaligned{\userpagenumber/\lastuserpage}]
\starttext
\switchtobodyfont[18pt]
\definehspace[hspacing][0.15em]
О\hspace[hspacing]Т\hspace[hspacing]П\hspace[hspacing]Р\hspace[hspacing]Е\hspace[hspacing]М\hspace[hspacing]Н\hspace[hspacing]И\hspace[hspacing]Ц\hspace[hspacing] А\\
\switchtobodyfont[9pt]
{\bf РАЧУН БРОЈ 3180/09}\\
\vskip 3em
Купац: ХЛАДНИ ИЗВОР\\
Место: РИПАЊ, Авалска бр. 261\\
ПИБ: 103358290\\
МБ: 17556711\\
\vskip 3em
Место издавања рачуна: Велико Градиште\\
Датум издавања рачуна: 04.06.2020. 11:13:03\\
Датум промета: 05.06.2020\\
Датум плаћања: 05.06.2020\\
\vskip 3em\start
\startsetups[maintable]
\setupTABLE[frame=off]
\setupTABLE[row][*][height=7.25mm]
\setupTABLE[column][1][align=flushleft]
\setupTABLE[column][2][align=flushleft]
\setupTABLE[column][3][align=flushleft]
\setupTABLE[column][4][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][5][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][6][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][7][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][8][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][9][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][10][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][11][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][12][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\stopsetups
\switchtobodyfont[6pt]
\startalignment[middle]
\bTABLE[setups=maintable,option=stretch,split=repeat]
\bTABLEhead
\bTR[bottomframe=on, rulethickness=2pt,offset=0.25pt]
\bTH\bf Рб \eTH
\bTH\bf Шифра артикла \eTH
\bTH\bf Назив артикла \eTH
\bTH\bf Јединица мере \eTH
\bTH\bf Количина \eTH
\bTH\bf Цена \eTH
\bTH\bf Износ \eTH
\bTH\bf Попуст \eTH
\bTH\bf Основа за ПДВ \eTH
\bTH\bf Порез \eTH
\bTH\bf Износ пореза \eTH
\bTH\bf О

[NTG-context] Table breaks incorrectly between pages

2022-05-14 Thread Stefan Nedeljkovic via ntg-context
Dear list I need your help with a table that seems to completely screw up
the page when it spans across multiple pages. I'm attaching all the
necessary files.

Kind regards,
Stefan
\input fonts

\usetypescript[ibmplex][uc]
\setupbodyfont[ibmplex,rm,9pt]

\setuppapersize[A4]
\setuplayout[
leftedge=\dimexpr0cm,
rightedge=\dimexpr0cm,
leftedgedistance=\dimexpr0cm,
rightedgedistance=\dimexpr0cm,
leftmargin=\dimexpr0cm,
rightmargin=\dimexpr0cm,
leftmargindistance=\dimexpr0cm,
rightmargindistance=\dimexpr0cm,
width=middle,
cutspace=\dimexpr1.5cm,
backspace=\dimexpr1.5cm,
topspace=\dimexpr1.5cm,
header=\dimexpr4cm,
height=middle,
bottomspace=\dimexpr0cm,
footer=\dimexpr0.5cm]


\setupheadertexts[\setups{headertext}]

\definehspace[tnumber][0.5em]

\startsetups [headertable]
\setupTABLE[frame=off]
\setupTABLE[column][1][align=flushleft]
\setupTABLE[column][2][align=flushright]
\stopsetups

\startsetups headertext
\start
\bTABLE[setups=headertable,option=stretch]
\bTR
\bTD
„ДОЛИНА” Д.О.О. Београд\\
ПЈ за прераду меса\\
ПИБ: СР 100029284\\
МБ: 06434517\\
Текући рачун: 205-157956-65\\
Email: dolin...@gmail.com
\eTD
\bTD
Булевар Краља Александра 334, 11000 Београд\\
011\hspace[tnumber]3806\hspace[tnumber]007\\
011\hspace[tnumber]3820\hspace[tnumber]457\\
011\hspace[tnumber]2419\hspace[tnumber]078\\
\vskip 2em
Жике Поповића бб, 12220, Велико Градиште\\
012\hspace[tnumber]662\hspace[tnumber]016\\
\eTD
\eTR
\eTABLE
\stop
\stopsetups

\setuppagenumbering[location=]
\setupfootertexts[][\midaligned{\userpagenumber/\lastuserpage}]
\starttext
\switchtobodyfont[18pt]
\definehspace[hspacing][0.15em]
О\hspace[hspacing]Т\hspace[hspacing]П\hspace[hspacing]Р\hspace[hspacing]Е\hspace[hspacing]М\hspace[hspacing]Н\hspace[hspacing]И\hspace[hspacing]Ц\hspace[hspacing] А\\
\switchtobodyfont[9pt]
{\bf РАЧУН БРОЈ 3180/09}\\
\vskip 3em
Купац: ХЛАДНИ ИЗВОР\\
Место: РИПАЊ, Авалска бр. 261\\
ПИБ: 103358290\\
МБ: 17556711\\
\vskip 3em
Место издавања рачуна: Велико Градиште\\
Датум издавања рачуна: 04.06.2020. 11:13:03\\
Датум промета: 05.06.2020\\
Датум плаћања: 05.06.2020\\
\vskip 3em\start
\startsetups[maintable]
\setupTABLE[frame=off]
\setupTABLE[row][*][height=7.25mm]
\setupTABLE[column][1][align=flushleft]
\setupTABLE[column][2][align=flushleft]
\setupTABLE[column][3][align=flushleft]
\setupTABLE[column][4][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][5][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][6][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][7][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][8][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][9][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][10][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][11][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][12][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\stopsetups
\switchtobodyfont[6pt]
\startalignment[middle]
\bTABLE[setups=maintable,option=stretch,split=yes,header=repeat]
\bTR[bottomframe=on, rulethickness=2pt,offset=0.25pt]
\bTD\bf Рб \eTD
\bTD\bf Шифра артикла \eTD
\bTD\bf Назив артикла \eTD
\bTD\bf Јединица мере \eTD
\bTD\bf Количина \eTD
\bTD\bf Цена \eTD
\bTD\bf Износ \eTD
\bTD\bf Попуст \eTD
\bTD\bf Основа за ПДВ \eTD
\bTD\bf Порез \eTD
\bTD\bf Износ пореза \eTD
\bTD\bf Основа за ПДВ + ПДВ \eTD
\eTR
\eTABLEhead
\bTABLEbody
\bTR[bottomframe=on,rulethickness=.25pt,offset=2pt]
\bTD\tt 1 \eTD
\bTD\tt 011 \eTD
\bTD ПЕЧЕНИЦА \eTD
\bTD kg \eTD
\bTD\tt 4.22 \eTD
\bTD\tt 1,000.00 \eTD
\bTD\tt 4,220.00 \eTD
\bTD\tt 0.15 \eTD
\bTD\tt 3,587.00 \eTD
\bTD\tt 0.2 \eTD
\bTD\tt 717.40 \eTD
\bTD\tt 4,304.40 \eTD
\eTR\bTR[bottomframe=on,rulethickness=.25pt,offset=2pt]
\bTD\tt 2 \eTD
\bTD\tt 013 \eTD
\bTD ВРАТ \eTD
\bTD kg \eTD
\bTD\tt 1.77 \eTD
\bTD\tt 900.00 \eTD
\bTD\tt 1,593.00 \eTD
\bTD\tt 0.15 \eTD
\bTD\tt 1,354.05 \eTD
\bTD\tt 0.2 \eTD
\bTD\tt 270.81 \eTD
\bTD\tt 1,624.86 \eTD
\eTR\bTR[bottomframe=on,rulethickness=.25pt,offset=2pt]
\bTD\tt 3 \eTD
\bTD\tt 016 \eTD
\bTD ШПИЦ РЕБРА \eTD
\bTD kg \eTD
\bTD\tt 10.45 \eTD
\bTD\tt 490.00 \eTD
\bTD\tt 5,120.50 \eTD
\bTD\tt 0.10 \eTD
\bTD\tt 4,608.45 \eTD
\bTD\tt 0.2 \eTD
\bTD\tt 921.69 \eTD
\bTD\tt 5,530.14 \eTD
\eTR\bTR[bottomframe=on,rulethickness=.25pt,offset=2pt]
\bTD\tt 4 \eTD
\bTD\tt 021 \eTD
\bTD ПИКАНТ СЛАНИНА \eTD
\bTD kg \eTD
\bTD\tt 2.57 \eTD
\bTD\tt 767.00 \eTD
\bTD\tt 1,971.19 \eTD
\bTD\tt 0.15 \eTD
\bTD\tt 1,675.51 \eTD
\bTD\tt 0.2 \eTD
\bTD\tt 335.10 \eTD
\bTD\tt 2,010.61 \eTD
\eTR\bTR[bottomframe=on,rulethickness=.25pt,offset=2pt]
\bTD\tt 5 \eTD
\bTD\tt 042 \eTD
\bTD ДОМАЋА КОБАСИЦА \eTD
\bTD kg \eTD
\bTD\tt 5 \eTD
\bTD\tt 350.00 \eTD
\bTD\tt 1,750.00 \eTD
\bTD\tt 0.20 \eTD
\bTD\tt 1,400.00 \eTD
\bTD\tt 0.2 \eTD
\bTD\tt 280.00 \eTD
\bTD\tt 1,680.00 \eTD
\eTR\bTR[bottomframe

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

2022-03-21 Thread Bruce Horrocks via ntg-context
Thank-you all - the textcommand= was the necessary magic incantation. 

I will certainly use the linknote suggestion, not least because I'll still need 
regular footnotes as well.

And if I can pluck up courage to "move" the \setupnote Wiki page over to the 
new style (I don't know how to do an "undo" if it all goes wrong!) I will 
document the parameters discovered so far.


> On 21 Mar 2022, at 18:25, Pablo Rodriguez via ntg-context 
>  wrote:
> 
> On 3/20/22 22:18, Rik Kabel via ntg-context wrote:
>> On 2022-03-20 17:07, Wolfgang Schuster via ntg-context wrote:
>>> [...]
>>> \setupnote[footnote][textcommand=]
>>> [...]
>> You might want to define a separate set of notes, for example,
>> linknotes, defined as Wolfgang suggests, so
>> [...]
>> You can define multiple streams of footnotes and endnotes.
> Hi Bruce,
> 
> following the conversation, this might be a sample of what I think you
> intend to achieve:
> 
> \definenote[linknote]
> \setupnote[linknote]
> [textcommand={\ }, textstyle=, location=text]
> \setupnotation[linknote]
> [alternative=serried, numberstyle={\switchtobodyfont[12pt]},
>  style={\switchtobodyfont[12pt]}, numbercommand=]
> \starttext
> 
> \dorecurse{25}
> {First\footnote{Footnote one}.
>  See my video at link\linknote{yewtu.be/my-great-video.}. }
> 
> \title{Links}
> \placenotes[linknote]
> 
> \stoptext
> 
> I hope it may help,
> 
> Pablo

—
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] Make footnote/endnote number not superscript?

2022-03-21 Thread Pablo Rodriguez via ntg-context
On 3/20/22 22:18, Rik Kabel via ntg-context wrote:
> On 2022-03-20 17:07, Wolfgang Schuster via ntg-context wrote:
>> [...]
>> \setupnote[footnote][textcommand=]
>> [...]
> You might want to define a separate set of notes, for example,
> linknotes, defined as Wolfgang suggests, so
> [...]
> You can define multiple streams of footnotes and endnotes.
Hi Bruce,

following the conversation, this might be a sample of what I think you
intend to achieve:

  \definenote[linknote]
  \setupnote[linknote]
  [textcommand={\ }, textstyle=, location=text]
  \setupnotation[linknote]
  [alternative=serried, numberstyle={\switchtobodyfont[12pt]},
   style={\switchtobodyfont[12pt]}, numbercommand=]
  \starttext

  \dorecurse{25}
  {First\footnote{Footnote one}.
   See my video at link\linknote{yewtu.be/my-great-video.}. }

  \title{Links}
  \placenotes[linknote]

  \stoptext

I hope it may help,

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

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


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

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

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

Hoi Wolfgang,

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


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


2. Is you installation up-to-date?

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


Wolfgang

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

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

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

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

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

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

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

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

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

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

\showframe

\starttext

\startfrontmatter

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

\stopfrontmatter

\startbodymatter

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

\stopbodymatter

\stoptext























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

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

\starttext

\startfrontmatter

\title{Table of content}

\placecontent

\stopfrontmatter

\startbodymatter

\chapter{Knuth}

\input knuth

\chapter{Zapf}

\input zapf

\stopbodymatter

\stoptext





\starttext

a\texttilde b\lettertilde c\textasciitilde d

\stoptext




\definepageinjectionalternative
  [chapter:image]
  [renderingsetup=pageinjection:chapter:image]

\startsetups [pageinjection:chapter:image]
  \centerbox{\externalfigure[\dummyparameter{name}]}
\stopsetups

\definepageinjection
  [chapter:start]
  [empty]
  [page=left]

\definepageinjection
  [chapter:insert]
  [previouspage]
  [alternative=chapter:image,
   offset=1cm,
   pagestate=stop]

\setuphead
  [chapter]
  [beforesection={\pageinjection[chapter:start]},
   
insidesection={\pageinjection[chapter:insert][name={chapter-\namedheadnumber{chapter}}]}]

\setuppagenumbering
  [alternative=doublesided]

\setupexternalfigures
  [location=default]

\useexternalfigure [chapter-1] [mill]   [factor=max]
\useexternalfigure [chapter-2] [hacker] [orientation=90,scale=2000]
\useexternalfigure [chapter-3] [cow][orientation=90,height=\framedwidth]

\starttext

\startchapter [title={Mill}]
\dorecurse{7}{\samplefile{lorem}}
\stopchapter

\startchapter [title={Hacker}]
\dorecurse{11}{\samplefile{lorem}}
\stopchapter

\startchapter [title={cow}]
\dorecurse{7}{\samplefile{lorem}}
\stopchapter

\stoptext




\setupbodyfont[termes]

\starttext

plays \m{\frac{2}{3} A}, \m{\frac{1}{3} D}.

\stoptext






\definefallbackfamily[story][serif][notoserif][range={greekandcoptic,greekextended},force=yes]
\definefontfamily[story][serif][TeX Gyre Schola]

\definefontfamily [story] [sans] [Latin Modern Sans]
\definefontfamily [story] [mono] [Latin Modern Mono] [features=none]

\definetypeface [story] [ss] [sans] [modern] [default]
\definetypeface [story] [ss] [mono] [modern] [default]

\definetypeface [story] [ss] [sans] [modern-designsize] [default]
\definetypeface [story] [ss] [mono] [modern-designsize] [default]

\definefontfamily[story][mm][TeX Gyre Pagella Math]

\definetypeface [story] [mm] [math] [pagella] [default]

\setupbodyfont[story,11pt]

\usebodyfont[termes]

\showframe

\startsetups [blockquote:style]
\switchtobodyfont[termes]

Re: [NTG-context] Odd Font Behavior in startstop Group

2022-02-06 Thread śrīrāma via ntg-context
On Sunday, February 6, 2022 3:50:21 PM IST Wolfgang Schuster via ntg-context 
wrote:
> The following two font settings are wrong, you're passing the name of a
> typescript for the third argument while \definefontfamily expects the
> family name of a font.
> […]
> ConTeXt already provides a blockquote-environment which can be
> configured to have the same style as your custom environment.

Hi Wolfgang,

I have a related question:
I noticed that the font settings were wrong in the original MWE of Michael. I 
am also aware that ConTeXt has a blockquote env (having used it before). In 
fact, I first tested the following example before responding to Michael's 
question:

%%% SOF
\usebodyfont[termes]
\setupbodyfont[schola]
\setupdelimitedtext
[blockquote]
[style={\switchtobodyfont[termes]}]

\starttext
main body font here
\startblockquote
\input knuth
\stopblockquote
{\bf test}\par
{\it test}
\startblockquote
{\bf test}
{\it test}
\stopblockquote
\stoptext
%%% EOF

In the above, if the first line '\usebodyfont[termes]' is removed, the second 
blockquote env renders in schola not termes. Moreover, on removing the first 
blockquote env with '\input knuth' the second one appears correctly in termes. 
Thus, regardless of other things, '\usebodyfont[termes]' seems to be necessary 
here. Is this correct or am I missing something?

Thanks,
śrīrāma (Sreeram)


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

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


Re: [NTG-context] Odd Font Behavior in startstop Group

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

Michael Urban via ntg-context schrieb am 05.02.2022 um 20:28:

I am experiencing an odd behavior switching text styles in a defined startstop group 
("blockquote").   I get different behavior depending on whether the 
switchtobodyfont in the startstop definition includes the dummy {\it } and {\bf } text.   
If they are not there, the italic and boldface switches in the second blockquote revert 
to the gyreschola body font of the main text; but this only happens if there is an 
earlier blockquote with no style changes.  This is with:

[...]

Do I need a newer version of ConTeXt, or am I doing something wrong?
Fonts in ConTeXt are always perilous, alas.  For me, anyway.


\definefallbackfamily[story][serif][notoserif][range={greekandcoptic,greekextended},force=yes]
\definefontfamily[story][serif][TeX Gyre Schola]


The following two font settings are wrong, you're passing the name of a 
typescript for the third argument while \definefontfamily expects the 
family name of a font.


Even though the usage of the command is wrong you didn't notice it 
because as a fallback \definefontfamily uses the Latin Modern version of 
the requested style when no font was found.



\definefontfamily[story][sans][modern]
\definefontfamily[story][mono][modern]


The correct settings for both settings are

    \definefontfamily [story] [sans] [Latin Modern Sans]
    \definefontfamily [story] [mono] [Latin Modern Mono] [features=none]

with the "features=none" for the mono font to ensure no ligatures are 
formed.


An alternative for \definefontfamily is to use \definetypeface and 
choose a predefined typescript for the Latin Modern family. You can 
either use


    \definetypeface [story] [ss] [sans] [modern] [default]
    \definetypeface [story] [ss] [mono] [modern] [default]

which uses the 10pt optical size even for smaller and bigger sizes or 
you enable optical sizes with the following typescript


    \definetypeface [story] [ss] [sans] [modern-designsize] [default]
    \definetypeface [story] [ss] [mono] [modern-designsize] [default]



\definefontfamily[story][mm][TeX Gyre Pagella Math]


I recommend to load the math font with the provided typescript because 
they ensure existing patches (e.g. spacing corrections) for the selected 
font are applied.


    \definetypeface [story] [mm] [math] [pagella] [default]


\setupbodyfont[story,11pt]

\definestartstop[blockquote]
  [
   before={ \blank \startnarrower \setupwhitespace[2pt] \setupindenting[none]
    \switchtobodyfont[termes]{\it }{\bf }% This is so weird.  Put a 
comment marker after [termes] for a different result
   },
   after={ \stopnarrower \blank \indenting[next]},
  ]%


ConTeXt already provides a blockquote-environment which can be 
configured to have the same style as your custom environment.


\startsetups [blockquote:style]
    \switchtobodyfont[termes]
    \setupwhitespace[2pt]
\stopsetups

\setupdelimitedtext
  [blockquote]
  [spacebefore=big,
 style=\directsetup{blockquote:style},
 indenting=none,
    indentnext=yes]

Wolfgang

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

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


Re: [NTG-context] Odd Font Behavior in startstop Group

2022-02-05 Thread śrīrāma via ntg-context
On Sunday, February 6, 2022 12:58:06 AM IST Michael Urban via ntg-context 
wrote:
> Do I need a newer version of ConTeXt, or am I doing something wrong?
> Fonts in ConTeXt are always perilous, alas.  For me, anyway.

(pre)loading the typescripts 'fixes' the issue.
\usebodyfont[termes]

See below a modified version of your MWE:

\definefallbackfamily[story][serif][notoserif]
[range={greekandcoptic,greekextended},force=yes]
\definefontfamily[story][serif][TeX Gyre Schola]
\definefontfamily[story][sans][modern]
\definefontfamily[story][mono][modern]
\definefontfamily[story][mm][TeX Gyre Pagella Math]
\setupbodyfont[story,11pt]
\usebodyfont[termes]

\definestartstop
[blockquote]
[before={\blank\startnarrower\setupwhitespace[2pt]\setupindenting[none]},
 style={\switchtobodyfont[termes]},
 after={\stopnarrower\blank\indenting[next]}]

\starttext
\input knuth

\startblockquote
\input knuth
\stopblockquote

this is normal text
\par
{\bf this is bold}
\par
{\it this is italics}

\startblockquote
this is normal text
\par
{\bf this is bold}
\par
{\it this is italics}
\stopblockquote
\stoptext

Best,
Sreeram


___
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] Odd Font Behavior in startstop Group

2022-02-05 Thread Michael Urban via ntg-context
I am experiencing an odd behavior switching text styles in a defined startstop 
group ("blockquote").   I get different behavior depending on whether the 
switchtobodyfont in the startstop definition includes the dummy {\it } and {\bf 
} text.   If they are not there, the italic and boldface switches in the second 
blockquote revert to the gyreschola body font of the main text; but this only 
happens if there is an earlier blockquote with no style changes.  This is with:

$  context --version
mtx-context | ConTeXt Process Management 1.03
mtx-context |
mtx-context | main context file: 
/usr/local/texlive/texmf-local/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2020.03.10 14:44
mtx-context | main context file: 
/usr/local/texlive/texmf-local/tex/context/base/mkiv/context.mkxl
mtx-context | current version: 2020.03.10 14:44

Do I need a newer version of ConTeXt, or am I doing something wrong?
Fonts in ConTeXt are always perilous, alas.  For me, anyway.





\definefallbackfamily[story][serif][notoserif][range={greekandcoptic,greekextended},force=yes]
\definefontfamily[story][serif][TeX Gyre Schola]
\definefontfamily[story][sans][modern]
\definefontfamily[story][mono][modern]
\definefontfamily[story][mm][TeX Gyre Pagella Math]
\setupbodyfont[story,11pt]

\definestartstop[blockquote]
 [
  before={ \blank \startnarrower \setupwhitespace[2pt] \setupindenting[none]
   \switchtobodyfont[termes]{\it }{\bf }% This is so weird.  Put a 
comment marker after [termes] for a different result
  },
  after={ \stopnarrower \blank \indenting[next]},
 ]%
\starttext
\chapter{Testing}
\input ward

\startblockquote
\input knuth

\stopblockquote

\input zapf

{\it This is what Italic letters look like.} {\bf And these are bold.}


\startblockquote
This is what it said, in {\it Italic} and {\bf bold} letters:

\bgroup
\it\noindent This is what Italic letters look like here.
\egroup

\bgroup
\bf\noindent This is what Bold letters look like here.
\egroup
\stopblockquote
\stoptext

___
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] Changed behavior from \convertnumber{arabicdecimals}{..} as a textcommand for note

2022-01-16 Thread musa furber via ntg-context
Dear Hans,

Thank you for your reply.

Here is the missing MWE. (I will also try to attach it.)

% mwe
% document is an English translation of Arabic text; all annotations are in
English.
%
% concerning footnotes to Arabic text:
%   numbers in body should use Mashriki numbers (e.g. ٠١٢٣٤٥٦٧٨٩), and
appear between parenthesis
%   numbers in footer should use Arabic numbers (e.g. 0123456789), and
without parenthesis
%
% MWE uses dejavu for English and Amiri for and Arabic. Amiri is availble
at https://www.amirifont.org/

\mainlanguage[en-gb]

\setupdirections[bidi=global,method=one]

\starttypescriptcollection [amiri]

\starttypescript [serif] [amiri]
\definefontsynonym [Serif] [file:Amiri-Regular.ttf]
[features=arabic]
\stoptypescript

\starttypescript [amiri]
   \definetypeface [amiri] [rm] [serif] [amiri] [default]
[fallbacks=latin-fallback]
\stoptypescript

\stoptypescriptcollection

\define\setarabic{
  \setupalign[r2l] \righttoleft \switchtobodyfont[amiri]
}

\define\setlatin{
  \setupalign[l2r] \lefttoright \switchtobodyfont[dejavu]
}


\setupnotes[footnote][]
\setupnotes[arfootnote][]

\definenote[arfootnote][footnote]
\setupnotation
[arfootnote]
[before=\setlatin,
 alternative=text,
]

\setupnote
[arfootnote]
[headstyle={\switchtobodyfont[amiri]},
 textcommand=\footnotenotenumbercommand,
 alternative=text,
 ]

\protected\def\footnotenotenumbercommand#1{{\high{({\convertnumber{arabicdecimals}{#1}})}}}
% unexpected results
%
\protected\def\footnotenotenumbercommand#1{{\high{({\convertnumber{abjadnumerals}{#1}})}}}
%
\protected\def\footnotenotenumbercommand#1{{\high{({\convertnumber{default}{#1}})}}}
%
% `\detokenize' variations, for comparison...
%
%
\protected\def\footnotenotenumbercommand#1{{\high{(\detokenize{\convertnumber{arabicdecimals}{#1}})}}}
%
\protected\def\footnotenotenumbercommand#1{{\high{(\detokenize{\convertnumber{abjadnumerals}{#1}})}}}
%
\protected\def\footnotenotenumbercommand#1{{\high{(\detokenize{\convertnumber{default}{#1}})}}}

\setupbodyfont[dejavu,11pt]

\starttext
\setarabic

مرحبًا\arfootnote{Annotation text.} % expected footnote `(١)`, got `1arabic`

مرحبًا\arfootnote{Annotation text.} % expected footnote `(٢)`, got `2arabic`


\stoptext

%%% end of mwe

Thanks,
Musa
___
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] SimpleSlides and Visual counters

2022-01-16 Thread Otared Kavian via ntg-context
Hi Thomas,

Thanks for your attention. Indeed I could have asked you, but since Aditya 
answered my previous message I continued asking him…

Anyway, you are correct: replacing PageNumber with RealPageNumber everywhere, 
the visual counter is shown correctly…

For the sake of the mail archives, in case someone else encounters the issue, I 
add the example below.

Many thanks for help !
Best regards: Otared 

% begin interactive-visual-counter.tex
%% to use with the simpleslides module
\setupinteraction[state=start]
\usemodule[simpleslides]
[style=swoosh]

\startuseMPgraphic{simpleslides:MP:counter}
save b, s, t, p, circcenter, theta, pic ;
path p[] ;
pair t[] ;
pair s[] ;
pair circcenter ; 
circcenter = urcorner Page shifted (-1cm,-1cm) ; % the counter is shown 
in the upper right corner
%   circcenter = lrcorner Page shifted (-1cm,1cm) ; % the counter is shown 
in the lower right corner
pair zt, zr, zb, zl ;
picture pic ;
b = 1.5cm ;
if RealPageNumber > 1 : % the page after which the visual counter is 
shown
theta = (RealPageNumber - 1)/(NOfPages - 1) ;
p[4] = fullcircle scaled b rotated 90 ;
p[4] := p[4] shifted circcenter ;
fill p[4] withcolor \MPcolor{simpleslides:altcontrastcolor} ;
t[0] = center p[4] ;
t[1] = point 1 along p[4] ;
t[2] = point -theta along p[4] ;
t[3] = point -theta/2 along p[4] ;
p[5] = t[0] -- t[1] .. t[3] .. t[2] -- cycle ;
fill p[5] withcolor \MPcolor{simpleslides:contrastcolor} ;
for i = 1 upto NOfPages :
s[i] = point i/(NOfPages -1) along p[4] ;
pickup pencircle scaled 1pt ;
draw s[i] -- t[0] 
withcolor 
\MPcolor{simpleslides:backgroundcolor} ;
endfor ;
zt = t[0] shifted (0, b * 0.2) ;
zr = t[0] shifted (b * 0.2, 0) ;
zb = t[0] shifted (0, -b * 0.2) ;
zl = t[0] shifted (-b * 0.2, 0) ;
p[3] = zt .. zr .. zb .. zl .. cycle ;
fill p[3] withcolor  \MPcolor{simpleslides:contrastcolor} ;
draw p[3] withcolor \MPcolor{simpleslides:backgroundcolor} ;
label(textext("\start\switchtobodyfont[10pt]%

\setupinteraction[color=simpleslides:backgroundcolor,style=normal]%
\startcolor[simpleslides:backgroundcolor]
\goto{\pagenumber}[PreviousJump]
\stopcolor\stop"),center p[3]) ;
fi ;
\stopuseMPgraphic

\starttext

\setupTitle
[title={Somewhere university},
author={Someone Else},
date={Somewhere, Someday 2021}]
\placeTitle

\page
\SlideTitle{Knuth} 

\input knuth.tex

\SlideTitle{Ward} 

\input ward.tex

\SlideTitle{Lorem} 

\input lorem.tex

\SlideTitle{Thuan} 

\input thuan.tex

\stoptext
% end interactive-visual-counter.tex



> On 16 Jan 2022, at 16:14, Thomas A. Schmitz via ntg-context 
>  wrote:
> 
> 
> On 16.01.22 15:56, Otared Kavian via ntg-context wrote:
>> Hi Aditya,
>> Some time ago I reported an issue with LMTX regarding your visual counter 
>> (at least the version used in the simpleslides module).
>> Now I think I have found where the issue comes from: it is due to the fact 
>> that somehow the conditional
>>  if PageNumber > 2 :
>>  
>>  [some code]
>>  fi ;
> 
> Hi Otared,
> 
> I'm not Aditya, but I've encountered the same problem within simpleslides. 
> Can you replace PageNumber with RealPageNumber and see whether this solves 
> your problem?
> 
> 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
___


Re: [NTG-context] Changed behavior from \convertnumber{arabicdecimals}{..} as a textcommand for note

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

On 1/15/2022 3:03 AM, musa furber via ntg-context wrote:
This week I updated ConTeXt minimals. Before then, I used the following 
code so that footnotes to Arabic passages would have parenthesis around 
them and use the digits used in Arabic texts in the Middle East (e.g. 
٠١٢٣٤٥٦٧٨٩).


\setupnote [arfootnote] [
   headstyle={\switchtobodyfont[kitab]},
   textcommand=\footnotenotenumbercommand,
   alternative=text,
   ]
\define[1]\footnotenotenumbercommand{{\high{(\convertnumber{arabicdecimals}{#1})}}}

Since the update, for the 123rd footnote, I now get `(123arabic)` 
instead of `(١٢٣)`.


Elsewhere, I do get the expected output (i.e. `١٢٣٢`) when calling
\convertnumber{arabicdecimals}{1232}

I'm still relatively new to ConTeXt, so I'm unsure if what used really 
is correct, or if it was wrong and I now need to find the right way to 
do it.


Any help would be greatly appreciated.

Next time give a complete MWE with useable fonts

  \setupnotation
[arfootnote]
 [numberconversion=arabicdecimals]

as in:

\setupbodyfont[dejavu]

\definenote
  [arfootnote]

\setupnotation
  [arfootnote]
  [numberconversion=arabicdecimals]

\setupnote
  [arfootnote]
  [headstyle={\switchtobodyfont[kitab]},
   textcommand=\footnotenotenumbercommand,
   alternative=text]

\protected\def\footnotenotenumbercommand#1{\high{(#1)}}

\starttext
x\arfootnote{x}
\stoptext

The #1 passed can be anything that renderes the note so the converters 
sees rubish. You can see details with you add


\detokenize{#1}

in your macro.

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] Changed behavior from \convertnumber{arabicdecimals}{..} as a textcommand for note

2022-01-14 Thread musa furber via ntg-context
This week I updated ConTeXt minimals. Before then, I used the following
code so that footnotes to Arabic passages would have parenthesis around
them and use the digits used in Arabic texts in the Middle East (e.g.
٠١٢٣٤٥٦٧٨٩).

\setupnote [arfootnote] [
  headstyle={\switchtobodyfont[kitab]},
  textcommand=\footnotenotenumbercommand,
  alternative=text,
  ]
\define[1]\footnotenotenumbercommand{{\high{(\convertnumber{arabicdecimals}{#1})}}}

Since the update, for the 123rd footnote, I now get `(123arabic)` instead
of `(١٢٣)`.

Elsewhere, I do get the expected output (i.e. `١٢٣٢`) when calling
\convertnumber{arabicdecimals}{1232}

I'm still relatively new to ConTeXt, so I'm unsure if what used really is
correct, or if it was wrong and I now need to find the right way to do it.

Any help would be greatly appreciated.

—Musa
___
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] Fallback fails for Linux Libertine O to Junicode over private area, debugging?

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

On 1/7/2022 4:18 PM, J. P. Ascher via ntg-context wrote:

Hi, all,

I'm a long time lurker (on gmane), first time poster. First, thank you
all, very much, for your excellent work and superb community.
ConTeXt has become a critical part of my academic writing and integral
to my research.  I'm not exaggerating when I say it changed how
I thought about texts and became a major source for my dissertation
work.  Thank you!

I'm trying to get a typescript for setting a text in Libertine with
Junicode fallbacks for characters in MUFI, in the private use area.
For some reason Libertine roman will not fallback no matter what
I do. However Libertine italic will.  I can also work around it by using
Junicode as a base and forcing fallback to Libertine.

My question is: why?  What's wrong with Libertine roman?  Or my approach?

My hypothesis is that there's something about `LinLibertine_R.otf`
that's not quite right.  I looked in FontForge, but couldn't
spot anything.

Does anyone have a suggestion as to another place to look?  Or something
I'm overlooking?

Minimal example (attached too, if it comes through):

```
\definefontfeature[default][default][script=latn]


% Libertine with a Junicode fallback, lib-fb-jun

\definefontfallback[junicodefallback][name:Junicode][privateusearea][check=yes,force=no]

\starttypescript [serif] [lib-fb-jun]
   \definefontsynonym [Libertine-Roman] [file:linlibertiner]
   \definefontsynonym [Libertine-Slanted]  [file:linlibertineri]  % works fine
\stoptypescript
  
\starttypescript [serif] [lib-fb-jun] [name]

   \definefontsynonym [Serif][Libertine-Roman]   
[features=default,fallbacks=junicodefallback]
   \definefontsynonym [SerifSlanted] [Libertine-Slanted] 
[features=default,fallbacks=junicodefallback]
\stoptypescript
  
\starttypescript [lib-fb-jun]

   \definetypeface [lib-fb-jun] [rm] [serif] [lib-fb-jun] [default]
\stoptypescript


% Junicode with Libertine as a fallback, preferring Libertine, jun-pr-lib
% this hack does what I want the above to do

\definefontfallback[preferlibertine][name:linlibertineo][0-F][check=yes,force=yes]

\starttypescript[serif] [jun-pr-lib]
\definefontsynonym [JunicodeRoman] [name:Junicode]
\stoptypescript

\starttypescript[serif] [jun-pr-lib] [name]
\definefontsynonym [Serif] [JunicodeRoman] [fallbacks=preferlibertine]
\stoptypescript

\starttypescript [jun-pr-lib]
   \definetypeface [jun-pr-lib] [rm] [serif] [jun-pr-lib] [default]
\stoptypescript


% some tracking stuff

\enabletrackers[fonts.missing=replace]
\enabledirectives[logs.errors]


% text, we use lib-fb-jun first, then jun-pr-lib

\starttext
\setupbodyfont[lib-fb-jun]

{\em emph. lib-fb-jun: \Uchar61125 \char64259 \utfchar{"eec5} (three glyphs)}

lib-fb-jun: \Uchar61125 \char64259 \utfchar{"eec5} (three glyphs)  % <- 
fallback fails here

\switchtobodyfont[jun-pr-lib]

jun-pr-lib: \Uchar61125 \char64259 \utfchar{"eec5} (three glyphs) % <- works

\stoptext
```

Any ideas?
when you use a complex font (in this case with lots of ligatures) doing 
a fallback can interfere with these features especially when they have 
been put in the private areas which are basically 'undefined'


you're accessing an st ligature directly but normally you will do that 
by enabling a font feature


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] Fallback fails for Linux Libertine O to Junicode over private area, debugging?

2022-01-07 Thread J .  P . Ascher via ntg-context
Thanks for asking!

It's just my example.  I maintain JunicodeRX (...with Restoration
Typographical Extensions) which includes yet more non-standard code
points and which I continue to add to.  In my actual work, I also add in
Symbola for additional fallbacks.

Some fonts have better language coverage (Libertine) and others have
some custom glyphs I want (JunicodeRX and Symbola).  If I had a bit more
time, I suspect maintaining a stand-alone
Libertine+JunicodeRX+Symbola.otf would be the best approach, but that's
a bit beyond me these days.

On Fri, Jan 07 2022, 13:52:05 -03 Youssef Cherem  wrote:

> Is it just your example, or do you really just want those ligatures? 
>
> fre. 7. jan. 2022 kl. 12:33 skrev J. P. Ascher via ntg-context 
> :
>
>  Hi, all,
>
>  I'm a long time lurker (on gmane), first time poster. First, thank you
>  all, very much, for your excellent work and superb community.
>  ConTeXt has become a critical part of my academic writing and integral
>  to my research.  I'm not exaggerating when I say it changed how
>  I thought about texts and became a major source for my dissertation
>  work.  Thank you!
>
>  I'm trying to get a typescript for setting a text in Libertine with
>  Junicode fallbacks for characters in MUFI, in the private use area.
>  For some reason Libertine roman will not fallback no matter what
>  I do. However Libertine italic will.  I can also work around it by using
>  Junicode as a base and forcing fallback to Libertine.
>
>  My question is: why?  What's wrong with Libertine roman?  Or my approach?
>
>  My hypothesis is that there's something about `LinLibertine_R.otf`
>  that's not quite right.  I looked in FontForge, but couldn't
>  spot anything.
>
>  Does anyone have a suggestion as to another place to look?  Or something
>  I'm overlooking?
>
>  Minimal example (attached too, if it comes through):
>
>  ```
>  \definefontfeature[default][default][script=latn]
>
>  % Libertine with a Junicode fallback, lib-fb-jun
>
>  
> \definefontfallback[junicodefallback][name:Junicode][privateusearea][check=yes,force=no]
>
>  \starttypescript [serif] [lib-fb-jun]
>\definefontsynonym [Libertine-Roman] [file:linlibertiner]
>\definefontsynonym [Libertine-Slanted]  [file:linlibertineri]  % works fine
>  \stoptypescript
>
>  \starttypescript [serif] [lib-fb-jun] [name]
>\definefontsynonym [Serif][Libertine-Roman]   
> [features=default,fallbacks=junicodefallback]
>\definefontsynonym [SerifSlanted] [Libertine-Slanted] 
> [features=default,fallbacks=junicodefallback]
>  \stoptypescript
>
>  \starttypescript [lib-fb-jun]
>\definetypeface [lib-fb-jun] [rm] [serif] [lib-fb-jun] [default]
>  \stoptypescript
>
>  % Junicode with Libertine as a fallback, preferring Libertine, jun-pr-lib
>  % this hack does what I want the above to do
>
>  
> \definefontfallback[preferlibertine][name:linlibertineo][0-F][check=yes,force=yes]
>
>  \starttypescript[serif] [jun-pr-lib]
> \definefontsynonym [JunicodeRoman] [name:Junicode]
>  \stoptypescript
>
>  \starttypescript[serif] [jun-pr-lib] [name]
> \definefontsynonym [Serif] [JunicodeRoman] [fallbacks=preferlibertine]
>  \stoptypescript
>
>  \starttypescript [jun-pr-lib]
>\definetypeface [jun-pr-lib] [rm] [serif] [jun-pr-lib] [default]
>  \stoptypescript
>
>  % some tracking stuff
>
>  \enabletrackers[fonts.missing=replace]
>  \enabledirectives[logs.errors]
>
>  % text, we use lib-fb-jun first, then jun-pr-lib
>
>  \starttext
>  \setupbodyfont[lib-fb-jun]
>
>  {\em emph. lib-fb-jun: \Uchar61125 \char64259 \utfchar{"eec5} (three glyphs)}
>
>  lib-fb-jun: \Uchar61125 \char64259 \utfchar{"eec5} (three glyphs)  % <- 
> fallback fails here
>
>  \switchtobodyfont[jun-pr-lib]
>
>  jun-pr-lib: \Uchar61125 \char64259 \utfchar{"eec5} (three glyphs) % <- works
>
>  \stoptext
>  ```
>
>  Any ideas?
>
>  Most warmly,
>  -jp
>
>  -- 
>  J. P. Ascher
>  Preceding: https://doi.org/10.18130/jqpe-zc65
>  Current: http://www.bibsoc.org.uk/content/2020-2021-0
>
>  
> ___
>  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] Fallback fails for Linux Libertine O to Junicode over private area, debugging?

2022-01-07 Thread Youssef Cherem via ntg-context
Is it just your example, or do you really just want those ligatures?

fre. 7. jan. 2022 kl. 12:33 skrev J. P. Ascher via ntg-context <
ntg-context@ntg.nl>:

> Hi, all,
>
> I'm a long time lurker (on gmane), first time poster. First, thank you
> all, very much, for your excellent work and superb community.
> ConTeXt has become a critical part of my academic writing and integral
> to my research.  I'm not exaggerating when I say it changed how
> I thought about texts and became a major source for my dissertation
> work.  Thank you!
>
> I'm trying to get a typescript for setting a text in Libertine with
> Junicode fallbacks for characters in MUFI, in the private use area.
> For some reason Libertine roman will not fallback no matter what
> I do. However Libertine italic will.  I can also work around it by using
> Junicode as a base and forcing fallback to Libertine.
>
> My question is: why?  What's wrong with Libertine roman?  Or my approach?
>
> My hypothesis is that there's something about `LinLibertine_R.otf`
> that's not quite right.  I looked in FontForge, but couldn't
> spot anything.
>
> Does anyone have a suggestion as to another place to look?  Or something
> I'm overlooking?
>
> Minimal example (attached too, if it comes through):
>
> ```
> \definefontfeature[default][default][script=latn]
>
>
> % Libertine with a Junicode fallback, lib-fb-jun
>
>
> \definefontfallback[junicodefallback][name:Junicode][privateusearea][check=yes,force=no]
>
> \starttypescript [serif] [lib-fb-jun]
>   \definefontsynonym [Libertine-Roman] [file:linlibertiner]
>   \definefontsynonym [Libertine-Slanted]  [file:linlibertineri]  % works
> fine
> \stoptypescript
>
> \starttypescript [serif] [lib-fb-jun] [name]
>   \definefontsynonym [Serif][Libertine-Roman]
>  [features=default,fallbacks=junicodefallback]
>   \definefontsynonym [SerifSlanted] [Libertine-Slanted]
> [features=default,fallbacks=junicodefallback]
> \stoptypescript
>
> \starttypescript [lib-fb-jun]
>   \definetypeface [lib-fb-jun] [rm] [serif] [lib-fb-jun] [default]
> \stoptypescript
>
>
> % Junicode with Libertine as a fallback, preferring Libertine, jun-pr-lib
> % this hack does what I want the above to do
>
>
> \definefontfallback[preferlibertine][name:linlibertineo][0-F][check=yes,force=yes]
>
> \starttypescript[serif] [jun-pr-lib]
>\definefontsynonym [JunicodeRoman] [name:Junicode]
> \stoptypescript
>
> \starttypescript[serif] [jun-pr-lib] [name]
>\definefontsynonym [Serif] [JunicodeRoman] [fallbacks=preferlibertine]
> \stoptypescript
>
> \starttypescript [jun-pr-lib]
>   \definetypeface [jun-pr-lib] [rm] [serif] [jun-pr-lib] [default]
> \stoptypescript
>
>
> % some tracking stuff
>
> \enabletrackers[fonts.missing=replace]
> \enabledirectives[logs.errors]
>
>
> % text, we use lib-fb-jun first, then jun-pr-lib
>
> \starttext
> \setupbodyfont[lib-fb-jun]
>
> {\em emph. lib-fb-jun: \Uchar61125 \char64259 \utfchar{"eec5} (three
> glyphs)}
>
> lib-fb-jun: \Uchar61125 \char64259 \utfchar{"eec5} (three glyphs)  % <-
> fallback fails here
>
> \switchtobodyfont[jun-pr-lib]
>
> jun-pr-lib: \Uchar61125 \char64259 \utfchar{"eec5} (three glyphs) % <-
> works
>
> \stoptext
> ```
>
> Any ideas?
>
> Most warmly,
> -jp
>
> --
> J. P. Ascher
> Preceding: https://doi.org/10.18130/jqpe-zc65
> Current: http://www.bibsoc.org.uk/content/2020-2021-0
>
>
> ___
> 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] Fallback fails for Linux Libertine O to Junicode over private area, debugging?

2022-01-07 Thread J .  P . Ascher via ntg-context
Hi, all,

I'm a long time lurker (on gmane), first time poster. First, thank you
all, very much, for your excellent work and superb community.
ConTeXt has become a critical part of my academic writing and integral
to my research.  I'm not exaggerating when I say it changed how
I thought about texts and became a major source for my dissertation
work.  Thank you!

I'm trying to get a typescript for setting a text in Libertine with
Junicode fallbacks for characters in MUFI, in the private use area.
For some reason Libertine roman will not fallback no matter what
I do. However Libertine italic will.  I can also work around it by using
Junicode as a base and forcing fallback to Libertine.

My question is: why?  What's wrong with Libertine roman?  Or my approach?

My hypothesis is that there's something about `LinLibertine_R.otf`
that's not quite right.  I looked in FontForge, but couldn't
spot anything.

Does anyone have a suggestion as to another place to look?  Or something
I'm overlooking?

Minimal example (attached too, if it comes through):

```
\definefontfeature[default][default][script=latn]


% Libertine with a Junicode fallback, lib-fb-jun

\definefontfallback[junicodefallback][name:Junicode][privateusearea][check=yes,force=no]

\starttypescript [serif] [lib-fb-jun]
  \definefontsynonym [Libertine-Roman] [file:linlibertiner]
  \definefontsynonym [Libertine-Slanted]  [file:linlibertineri]  % works fine
\stoptypescript
 
\starttypescript [serif] [lib-fb-jun] [name]
  \definefontsynonym [Serif][Libertine-Roman]   
[features=default,fallbacks=junicodefallback]
  \definefontsynonym [SerifSlanted] [Libertine-Slanted] 
[features=default,fallbacks=junicodefallback]
\stoptypescript
 
\starttypescript [lib-fb-jun]
  \definetypeface [lib-fb-jun] [rm] [serif] [lib-fb-jun] [default]
\stoptypescript


% Junicode with Libertine as a fallback, preferring Libertine, jun-pr-lib
% this hack does what I want the above to do

\definefontfallback[preferlibertine][name:linlibertineo][0-F][check=yes,force=yes]

\starttypescript[serif] [jun-pr-lib]
   \definefontsynonym [JunicodeRoman] [name:Junicode]
\stoptypescript

\starttypescript[serif] [jun-pr-lib] [name]
   \definefontsynonym [Serif] [JunicodeRoman] [fallbacks=preferlibertine]
\stoptypescript

\starttypescript [jun-pr-lib]
  \definetypeface [jun-pr-lib] [rm] [serif] [jun-pr-lib] [default]
\stoptypescript


% some tracking stuff

\enabletrackers[fonts.missing=replace]
\enabledirectives[logs.errors]


% text, we use lib-fb-jun first, then jun-pr-lib

\starttext
\setupbodyfont[lib-fb-jun]

{\em emph. lib-fb-jun: \Uchar61125 \char64259 \utfchar{"eec5} (three glyphs)}

lib-fb-jun: \Uchar61125 \char64259 \utfchar{"eec5} (three glyphs)  % <- 
fallback fails here

\switchtobodyfont[jun-pr-lib]

jun-pr-lib: \Uchar61125 \char64259 \utfchar{"eec5} (three glyphs) % <- works

\stoptext
```

Any ideas?

Most warmly,
-jp

-- 
J. P. Ascher
Preceding: https://doi.org/10.18130/jqpe-zc65
Current: http://www.bibsoc.org.uk/content/2020-2021-0



min.log
Description: Binary data


min.pdf
Description: Adobe PDF document


min.tex
Description: TeX document
___
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] Laundry symbols (now: altered picture)

2022-01-02 Thread Alfredo Catalina via ntg-context
Great! Thanks Hans, now it works. I replaced the "draw externalfigure"
commands by

draw externalfigure "./skysprite.png" xsized 4u ysized 5u shifted (0u,-0u);
draw externalfigure "./sandsprite.png" xsized 4u ysized 5u shifted (0u,-5u);

Best regards

On Sun, Jan 2, 2022 at 3:36 PM Hans Hagen  wrote:

> On 1/2/2022 3:12 PM, Alfredo Catalina via ntg-context wrote:
> > I'm trying to use ConTeXt with Metafun to produce a map of a videogame I
> > am working on. In fact I did it 9 years ago but it seems that now it
> > doesn't work.
> >
> > I have two 32 pixels wide by 40 pixels high sprites. They are saved in
> > the skysprite.png and sandsprite.png files. Since 32 = 4 x 8 and 40 = 5
> > x 8, the width/height ratio is 4/5.
> >
> > This should produce a page with a sky sprite and a sand sprite, one
> > below the other. It worked in the past. Each sprite should be 4 x 0.095
> > cm = 0,38 cm wide and 5 x 0.095 cm = 0.475 cm high:
> >
> > \starttext
> > \setupMPinstance[metafun][textstyle={\switchtobodyfont[termes,8pt]}]
> > \startuseMPgraphic{mapa}
> > u:=.095cm;
> > draw externalfigure "./skysprite.png" xscaled 4u yscaled 5u shifted
> > (0u,-0u);
> > draw externalfigure "./sandsprite.png" xscaled 4u yscaled 5u shifted
> > (0u,-5u);
> > \stopuseMPgraphic
> > \useMPgraphic{mapa}
> > \stoptext
> >
> > But instead I got two huge sprites of 2.8 cm x 4.4 cm.
> >
> > Am I forgetting something?
> Originally that worked because the image was always 'included' at 1 bp
> and then scaled but that was (1) inaccurate and (2) a bit depending on
> the image and (3) could overflow metapost.
>
> Use xsized and ysized instead (absolute measures instead of scaling the
> unknown)
>
> 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] Laundry symbols (now: altered picture)

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

On 1/2/2022 3:12 PM, Alfredo Catalina via ntg-context wrote:
I'm trying to use ConTeXt with Metafun to produce a map of a videogame I 
am working on. In fact I did it 9 years ago but it seems that now it 
doesn't work.


I have two 32 pixels wide by 40 pixels high sprites. They are saved in 
the skysprite.png and sandsprite.png files. Since 32 = 4 x 8 and 40 = 5 
x 8, the width/height ratio is 4/5.


This should produce a page with a sky sprite and a sand sprite, one 
below the other. It worked in the past. Each sprite should be 4 x 0.095 
cm = 0,38 cm wide and 5 x 0.095 cm = 0.475 cm high:


\starttext
\setupMPinstance[metafun][textstyle={\switchtobodyfont[termes,8pt]}]
\startuseMPgraphic{mapa}
u:=.095cm;
draw externalfigure "./skysprite.png" xscaled 4u yscaled 5u shifted 
(0u,-0u);
draw externalfigure "./sandsprite.png" xscaled 4u yscaled 5u shifted 
(0u,-5u);

\stopuseMPgraphic
\useMPgraphic{mapa}
\stoptext

But instead I got two huge sprites of 2.8 cm x 4.4 cm.

Am I forgetting something?
Originally that worked because the image was always 'included' at 1 bp 
and then scaled but that was (1) inaccurate and (2) a bit depending on 
the image and (3) could overflow metapost.


Use xsized and ysized instead (absolute measures instead of scaling the 
unknown)


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] Laundry symbols (now: altered picture)

2022-01-02 Thread Alfredo Catalina via ntg-context
I'm trying to use ConTeXt with Metafun to produce a map of a videogame I
am working on. In fact I did it 9 years ago but it seems that now it
doesn't work.

I have two 32 pixels wide by 40 pixels high sprites. They are saved in the
skysprite.png and sandsprite.png files. Since 32 = 4 x 8 and 40 = 5 x 8,
the width/height ratio is 4/5.

This should produce a page with a sky sprite and a sand sprite, one
below the other. It worked in the past. Each sprite should be 4 x 0.095 cm
= 0,38 cm wide and 5 x 0.095 cm = 0.475 cm high:

\starttext
\setupMPinstance[metafun][textstyle={\switchtobodyfont[termes,8pt]}]
\startuseMPgraphic{mapa}
u:=.095cm;
draw externalfigure "./skysprite.png" xscaled 4u yscaled 5u shifted
(0u,-0u);
draw externalfigure "./sandsprite.png" xscaled 4u yscaled 5u shifted
(0u,-5u);
\stopuseMPgraphic
\useMPgraphic{mapa}
\stoptext

But instead I got two huge sprites of 2.8 cm x 4.4 cm.

Am I forgetting something?

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

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


Re: [NTG-context] Using a system font

2021-12-27 Thread Marco Patzer via ntg-context
On Sun, 26 Dec 2021 21:21:10 +4000
jdh via ntg-context  wrote:

> \starttext
>I want to use the Mathjax_Fraktur font, which the font-manager on
> Ubuntu reports that it has. 
>{\switchtobodyfont[Mathjax_Fraktur] .. but, this text doesn't show
> up in Mathjax_Fraktur.}
> 
> \stoptext

Try:

export OSFONTDIR=/usr/share/fonts
mtxrun --script fonts --reload

\definefontfamily [mainface] [serif] [Mathjax_Fraktur]
\setupbodyfont [mainface]

\starttext
  \samplefile{knuth}
\stoptext

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
___


[NTG-context] Using a system font

2021-12-26 Thread jdh via ntg-context


Minimum working example:


\starttext
   I want to use the Mathjax_Fraktur font, which the font-manager on Ubuntu 
reports that it has.
   
   {\switchtobodyfont[Mathjax_Fraktur] .. but, this text doesn't show up in 
Mathjax_Fraktur.}

\stoptext

___
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] definedfont vs switchtobodyfont (was "shrink inter-line space")

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

On 12/20/2021 12:06 PM, mf via ntg-context wrote:

Il 18/12/21 13:00, Wolfgang Schuster ha scritto:

\definefontfeature [tightlines] [dimensions={*,0,0}]

\starttext

\samplefile{ward}\par

\blank

\start
 \setupinterlinespace[line=5pt]
 \definedfont[Normal*default,tightlines]
 \samplefile{ward}\par
\stop

\stoptext



Thanks Wolfgang.

I tried this:

\definefontfeature [tightlines] [dimensions={*,0,0}]

\starttext

\samplefile{ward}\par

\blank

\start
     \setupinterlinespace[line=5pt]
     \feature[+][tightlines]
     \samplefile{ward}\par
\stop

\stoptext

but it doesn't add the feature to the current font.
I understand I need a font switch.
Usually I use \switchtobodyfont. How is \definedfont different?
it's a 'permanent' one ... so when the font is loaded the dimensions are 
adapted so you need a new font definition


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] definedfont vs switchtobodyfont (was "shrink inter-line space")

2021-12-20 Thread mf via ntg-context

Il 18/12/21 13:00, Wolfgang Schuster ha scritto:

\definefontfeature [tightlines] [dimensions={*,0,0}]

\starttext

\samplefile{ward}\par

\blank

\start
     \setupinterlinespace[line=5pt]
     \definedfont[Normal*default,tightlines]
     \samplefile{ward}\par
\stop

\stoptext



Thanks Wolfgang.

I tried this:

\definefontfeature [tightlines] [dimensions={*,0,0}]

\starttext

\samplefile{ward}\par

\blank

\start
\setupinterlinespace[line=5pt]
\feature[+][tightlines]
\samplefile{ward}\par
\stop

\stoptext

but it doesn't add the feature to the current font.
I understand I need a font switch.
Usually I use \switchtobodyfont. How is \definedfont different?

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