Re: [NTG-context] Double-sided documents with MetaFun's Field[Text][Text]

2022-02-06 Thread śrīrāma via ntg-context
On Monday, February 7, 2022 7:49:27 AM IST śrīrāma wrote:
> […]
> shifted (InnerMarginWidth,BottomHeight+FooterHeight);
> […]
> %%% EOF
> […]
> So, it seems that the margin widths and other distance are updated for each
> odd, even page
> […]

This too seems to be wrong. It should be OuterMarginWidth but it is only 
correctly positioned for InnerMarginWidth, indicating therefore that the 
distances were not updated (?). 

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] Double-sided documents with MetaFun's Field[Text][Text]

2022-02-06 Thread śrīrāma via ntg-context
Dear list,

I have a double-sided document in which I want to draw certain page 
backgrounds on the right (odd) and left (even) pages. Here is an example

%%% SOF
\setuppagenumbering[alternative=doublesided]
\setuplayout
[backspace=4cm,
leftmargin=4cm,
cutspace=2cm,
rightmargin=2cm,
leftmargindistance=0cm,
rightmargindistance=0cm,
header=2cm,
footer=2cm,
topspace=1cm,
bottomspace=1cm,
top=1cm,
bottom=1cm,
width=middle,
height=fit]

\startuseMPgraphic{page}
StartPage;
draw Area[Text][Text] 
shifted (InnerMarginWidth,BottomHeight+FooterHeight);
draw Field[Text][Text] withcolor blue;
StopPage;
\stopuseMPgraphic
\defineoverlay[page][\useMPgraphic{page}]
\setupbackgrounds[page][background=page]

\starttext
\dorecurse{10}{\input knuth \page}
\stoptext
%%% EOF

In the resulting PDF the Field[Text][Text] path is not positioned (/computed?) 
correctly, while the manually positioned Area[Text][Text] path is as expected. 
So, it seems that the margin widths and other distance are updated for each 
odd, even page but Field[Text][Text] is still wrong? The Field[Text][Text] 
path appears on every page as though it is on an odd (right) page.

Have I missed 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] Regular online meet-up

2022-02-06 Thread Henning Hraban Ramm via ntg-context

Hi Alain,
in my current project I need the same. I use floats and move the 
externalfigure with \offset; can show you on Tuesday.


e.g.
\startplacefigure[title={},location=left]% or outer...
\offset[topoffset=-1em,leftoffset=-20mm]{%
% it would be nice to have outeroffset/inneroffset
\externalfigure[Schweinehund][width=50mm]}
\stopplacefigure

Hraban

Am 06.02.22 um 21:45 schrieb Alain Delmotte via ntg-context:

Hi!

I'll try to join and I have a question regarding inserting floats in 
outer margins in double sided document. The outer margins are large and 
the inner small. I want to insert my floats (mainly figures) in the 
outer margins and have them at level where they are called. Furthermore, 
sometimes the float is to large, so it should take part of the text, 
with the text surrounding it.


But this is perhaps answered in context garden, but I didn't find where.

And if there are more fundamental questions, my can wait.

See you on Tuesday.

Regards,

Alain

Le 5/02/2022 à 13:51, Henning Hraban Ramm via ntg-context a écrit :

You’re invited to join next Tuesday, February 8th, 15:00 CET (UTC+1)

at https://lecture.senfcall.de/hen-rbr-rku-oke

ConTeXt users of all levels are welcome!

Hans offered to give a Q session again – please announce subjects 
you’d like to discuss ASAP, so that he can prepare.



Regarding the date:
Denis, who originally suggested Tuesday afternoon, can’t take part due 
to other obligations. I could also offer Wednesday or Thursday.
We could also change the weekday every time, but that might be 
confusing. I would keep the European afternoon time, since that makes 
participation possible for people from America and Asia.

What do you think?
Vote here: https://nuudel.digitalcourage.de/tB1MHH4jx6M5uwPg


(Same blurb as last time:)

[Howto]
* No special software installation required; most modern browsers 
should work (WebRTC required).

* Open the above URL, accept the privacy statement,
* enter your name,
* click "join" (or "start" if you’re the first),
* click "with microphone", allow your browser to access it, check the 
audio.
* Your microphone is muted if you join. Activate microphone and/or 
camera with the buttons at the bottom.
* Minimize the default presentation with the "screen" button, bottom 
right.


* If you’d like to share your screen or upload a file, you can make 
yourself the presenter: Click on your user name, change the setting, 
then you’ll see the "screen sharing" button beside the camera button; 
also there’s now "manage presentations" behind the "plus" button. 
Beware there is only one presenter, so don’t kill someone else’s 
presentation.


[Technical hints]
* Sound is usually better if you use a headset (less noise for everyone).

* Connection problems are mostly due to low bandwidth or high latency 
on your side, e.g. with mobile connections.

* If audio/video doesn’t work for you, you can still use the text chat.
* Screen sharing needs a lot of bandwidth.

* You can also join with a regular telephone (audio only, of course), 
call +49-6151-86275-22 (German landline); then you must enter a PIN 
that changes every time – if you need it, ask me for it via email. 
Mute/unmute your microphone with "0".


[Netiquette]
* Please use a name that we recognize from here. Some feel 
uncomfortable with anonymous lurkers.

* Mute your microphone while you’re not talking.
* It’s nice to show your face at least when you join.
* If there are connection problems, stop camera sharing.
* The room is set to “everyone’s a moderator“, I trust you...

See you, 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
___


___
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] Regular online meet-up

2022-02-06 Thread Alain Delmotte via ntg-context

  
  
Hi!
I'll try to join and I have a question
regarding inserting floats in outer margins in double sided
document. The outer margins are large and the inner small. I
want to insert my floats (mainly figures) in the outer margins
and have them at level where they are called. Furthermore,
sometimes the float is to large, so it should take part of the
text, with the text surrounding it.
But this is perhaps answered in
context garden, but I didn't find where.
And if there are more fundamental
questions, my can wait.
See you on Tuesday.
Regards,
Alain

Le 5/02/2022 à 13:51, Henning Hraban
  Ramm via ntg-context a écrit :

You’re
  invited to join next Tuesday, February 8th, 15:00 CET (UTC+1)
  
  
  at https://lecture.senfcall.de/hen-rbr-rku-oke
  
  
  ConTeXt users of all levels are welcome!
  
  
  Hans offered to give a Q session again – please announce
  subjects you’d like to discuss ASAP, so that he can prepare.
  
  
  
  Regarding the date:
  
  Denis, who originally suggested Tuesday afternoon, can’t take part
  due to other obligations. I could also offer Wednesday or
  Thursday.
  
  We could also change the weekday every time, but that might be
  confusing. I would keep the European afternoon time, since that
  makes participation possible for people from America and Asia.
  
  What do you think?
  
  Vote here: https://nuudel.digitalcourage.de/tB1MHH4jx6M5uwPg
  
  
  
  (Same blurb as last time:)
  
  
  [Howto]
  
  * No special software installation required; most modern browsers
  should work (WebRTC required).
  
  * Open the above URL, accept the privacy statement,
  
  * enter your name,
  
  * click "join" (or "start" if you’re the first),
  
  * click "with microphone", allow your browser to access it, check
  the audio.
  
  * Your microphone is muted if you join. Activate microphone and/or
  camera with the buttons at the bottom.
  
  * Minimize the default presentation with the "screen" button,
  bottom right.
  
  
  * If you’d like to share your screen or upload a file, you can
  make yourself the presenter: Click on your user name, change the
  setting, then you’ll see the "screen sharing" button beside the
  camera button; also there’s now "manage presentations" behind the
  "plus" button. Beware there is only one presenter, so don’t kill
  someone else’s presentation.
  
  
  [Technical hints]
  
  * Sound is usually better if you use a headset (less noise for
  everyone).
  
  
  * Connection problems are mostly due to low bandwidth or high
  latency on your side, e.g. with mobile connections.
  
  * If audio/video doesn’t work for you, you can still use the text
  chat.
  
  * Screen sharing needs a lot of bandwidth.
  
  
  * You can also join with a regular telephone (audio only, of
  course), call +49-6151-86275-22 (German landline); then you must
  enter a PIN that changes every time – if you need it, ask me for
  it via email. Mute/unmute your microphone with "0".
  
  
  [Netiquette]
  
  * Please use a name that we recognize from here. Some feel
  uncomfortable with anonymous lurkers.
  
  * Mute your microphone while you’re not talking.
  
  * It’s nice to show your face at least when you join.
  
  * If there are connection problems, stop camera sharing.
  
  * The room is set to “everyone’s a moderator“, I trust you...
  
  
  See you, 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 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
___