Re: [NTG-context] Pull quote between two column - trial

2022-05-28 Thread jbf via ntg-context
That is progress, Garulfo, and real progress! I'm sorry I have not been 
any help to you in achieving this... a bit beyond my skill set. But I 
have long regarded this particular 'feature' to be a quite important 
'missing' feature of ConTeXt, since I occasionally get requests from 
authors as to the possibility of including such pull quotes in 
multi-column presentations, and I have to tell them that to do so I need 
to use another program where that is more easily achieved.


So, I just wanted you to know that someone out there appreciates your 
efforts with this, one of many I am sure.


Julian

On 29/5/22 04:25, Garulfo via ntg-context wrote:

some progress... if it can help.

No more issue with nonsymetrical behavior, and \framed are properly 
aligned with the grid.


Garulfo

___
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] parallel page streams (pag-str.mkxl)

2022-05-28 Thread Pablo Rodriguez via ntg-context
Dear list,

I have this sample:

  \starttext
  \input tufte
  \startoutputstream[es]
   \dorecurse{25}
{\input cervantes-es\par\pushoutputstream}
  \enableoutputstream[en]
   \dorecurse{25}
{\input zapf\par\pushoutputstream}
  \disableoutputstream
  \stopoutputstream
  \synchronizestreams[en,es]
  \page \flushoutputstream[en]
  \page \flushoutputstream[es]
  \stoptext

It is an adaptation from pag-str.mkxl to get parallel texts in facing pages.

What I’m afraid I cannot get is exactly facing pages.

Am I doing something wrong or is this something still to be added?

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 / 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] Pull quote between two column - trial

2022-05-28 Thread Garulfo via ntg-context

some progress... if it can help.

No more issue with nonsymetrical behavior, and \framed are properly 
aligned with the grid.


Garulfo


getshapetext_for_pullquote.pdf
Description: Adobe PDF document
\setuplayout [grid=yes]

\showgrid

\definecolor [transparentred]  [r=1,t=.5,a=1]

\def\numA{18}
\def\numB{4}
\def\numC{8}
\def\numD{14}
\def\mygap{0.001pt}

%===

\startMPinclusions
path pleft ; path pright ;

numeric LA ; LA := (\numA-1)*LineHeight + StrutHeight + StrutDepth + \mygap ;
numeric LB ; LB :=  \numB   *LineHeight - StrutHeight - StrutDepth + \mygap ;
numeric LC ; LC :=  \numC   *LineHeight - StrutHeight - StrutDepth - \mygap ;
numeric LD ; LD :=  \numD   *LineHeight ;
numeric LE ; LE := 2cm ;

pleft := (0cm , 0cm) --
 (LD  , 0cm) --
 (LD  , LA - LC) --
 (LD - LE , LA - LC) --
 (LD - LE , LA - LB) --
 (LD  , LA - LB) --
 (LD  , LA ) --
 (0cm , LA ) --
 cycle  ;

pright := pleft reflectedabout ((LD/2,0cm) , (LD/2,1cm));

\stopMPinclusions

\startuseMPgraphic{mytest1}  % column on the left of the pull quote
lmt_parshape [path = pleft ] ;
fill pleft withcolor \MPcolor{transparentred} ;
\stopuseMPgraphic

\startuseMPgraphic{mytest2}  % column on the right of the pull quote
lmt_parshape [path = pright] ;
fill pright withcolor \MPcolor{transparentred} ;
\stopuseMPgraphic

\defineoverlay[myOL1][\useMPgraphic{mytest1}]
\defineoverlay[myOL2][\useMPgraphic{mytest2}]

%===

\defineframed
  [MyBigFrame]
  [offset=-0.26pt,
   frameoffset=0pt,
   frame=off,
   strut=yes,
   before=,
   location=top,
   height=\dimexpr(\numA\lineheight),
   width=\textwidth,
   align=normal,]

\defineframed
  [MyFrame]
  [MyBigFrame]
  [location=high,
   width=\dimexpr(\numD\lineheight),
   after=\dontleavehmode,]

%===

\starttext

{\bf Before}   %

\startshapetext[mytest1,mytest2]
\strut\samplefile{douglas}
\stopshapetext

\MyBigFrame{%
\MyFrame[background=myOL1]{\getshapetext}%
\hfill%
\MyFrame[background=myOL2]{\getshapetext}}

{\bf Between}  %

\startshapetext[mytest1,mytest2]
\strut\samplefile{knuth}\par\samplefile{knuth}
\stopshapetext

\MyBigFrame{%
\MyFrame[background=myOL1]{\getshapetext}%
\hfill%
\MyFrame[background=myOL2]{\getshapetext}}

{\bf After}%

\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] overfull gone?

2022-05-28 Thread Hans Hagen via ntg-context

On 5/28/2022 12:43 PM, Steffen Wolfrum via ntg-context wrote:

Hi,

in order to easily see overfull lines I used \overfullrule30\points : this gave 
a clear black box in the right margin.

Is this command (\version[temporary]) gone??

Please have a look at the example below: no overfull indicator ...

Steffen

---

\setuppapersize[A6]

\setupexternalfigures[location={default}]
%\version[temporary]
\overfullrule30\points% < BLACK BOX?

\starttext

\startcolumns[n=3]
  % Overfull lines will have slugs in colum margins.
  \input linden

  % Underfull hboxes get no warning
  x
\stopcolumns

\stoptext
i'll check it .. looks like some interference with normalization .. 
actually one can enable more advanced tracers:


% \enabletrackers[builders.hpack.quality]
% \enabletrackers[builders.hpack.overflow]

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] overfull gone?

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

in order to easily see overfull lines I used \overfullrule30\points : this gave 
a clear black box in the right margin.

Is this command (\version[temporary]) gone??

Please have a look at the example below: no overfull indicator ...

Steffen

---

\setuppapersize[A6]

\setupexternalfigures[location={default}]
%\version[temporary]
\overfullrule30\points% < BLACK BOX?

\starttext

\startcolumns[n=3]
 % Overfull lines will have slugs in colum margins.
 \input linden 

 % Underfull hboxes get no warning
 x
\stopcolumns

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