[NTG-context] Use \framedtext to write an algorithm (again)

2018-10-17 Thread Fabrice Couvreur
Hi Wolfgang,
You offered me the following code to write algorithms. It seems that this
does not function very well because the withdrawal of the text no longer
exists.
Thank you
Fabrice

\defineframedtext
   [algorithmframe]
   [width=fit,
background=color,
backgroundcolor=lightgray,
framecolor=darkred,
corner=round]

\definelines
   [algorithm]
   [space=on,
before=\startalgorithmframe,
after=\stopalgorithmframe]

\starttext

\startalgorithm
Variables \math{I} et \math{J} entiers
T tableau d'entiers
Début
Pour \math{I} allant de \math{1} à \math{3}
Pour \math{J} allant de \math{1} à \math{3}
  Si \math{J>I}
 Alors \math{T[I, J]=J-I}
 Sinon \math{T[I, J]=0}
  Fin Si
Fin Pour
Fin
\stopalgorithm

\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] what defines the font size?

2018-10-17 Thread Alan Braslau

On 17/10/2018 11:10, Alan Braslau wrote:

On 17/10/2018 11:05, Hans Hagen wrote:
And compare it to sizing dogs or so ... what do you measure? Its tail 
or its legs.


Of course, horses are measured in "hands"...

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

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

Re: [NTG-context] what defines the font size?

2018-10-17 Thread Alan Braslau

On 17/10/2018 11:05, Hans Hagen wrote:
And compare it to sizing dogs or so ... what do you measure? Its tail or 
its legs.


Or, for Arthur: neck circumference, arm length, shirttail length, 
shoulder width, waist size, ...


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

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

Re: [NTG-context] what defines the font size?

2018-10-17 Thread Hans Hagen

On 10/17/2018 6:14 PM, Pablo Rodriguez wrote:

On 10/17/18 11:02 AM, Arthur Reutenauer wrote:

On Tue, Oct 16, 2018 at 07:48:41PM +0200, Pablo Rodriguez wrote:
[...]
   It’s less clear what you’re trying to do next:

[...]

   What are you trying to demonstrate with this?  If you change the size
of the font, obviously the glyphs have different sizes.  The initial
size at \starttext is 12pt, then \tfxx and \tfd change the sizes, to 8pt
and 20.736pt respectively.  Hence the former looks quite small in the
box, and the latter looks very large.  All that’s perfectly normal, and
since you’re not changing the font, or even the glyph, it’s not a good
illustration of the points raised in your initial email.


I tried to show that the em square is the fixed measure. But the glyphs
may relate in different ways to that square.

I know that \tfxx and \tfd are different sizes. But there would be
nothing against taking each of them to develop a new font (at 12 points)
with their diverse glyph sizes.

Or am I missing something.


I don't understand what you issue is. Each font (size) has its own emwidth.

Why design a \tfxx ? Of course, there are fonts with multiple 
designsizes but if that is the case then shapes differ (just compare 5pt 
7pt 10pt latin modern) but 'develop a new font' is often quite some 
effort (esp now that we have unicode fonts).



The issue with units per em is something I didn’t understand.


   That’s irrelevant for you as a font user.  Don’t worry about it.


A user that asks why different fonts have glyphs with different sizes
given the same point for both, doesn’t remain a font user anymore.


Just explain that it's design side. And compare it to sizing dogs or so 
... what do you measure? Its tail or its legs.



(I only wanted to understand, in order to be able to illustrate other
people.)

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] Questions to font family Pagella

2018-10-17 Thread Hans Hagen

On 10/17/2018 6:17 PM, Pablo Rodriguez wrote:

On 10/17/18 11:48 AM, Arthur Reutenauer wrote:

On Wed, Oct 17, 2018 at 11:31:42AM +0200, Tomas Hala wrote:

Hans, thank you for the explanation, I agree, I did not like that cyrillic, too.

Does somebody know whether TeXGyre team plans some additions of cyrillic to 
their font collection?


   The core team gave up on the idea of doing it themselves over ten
years ago and they’ve already have bad experiences with one previous
contributor (the one who made the glyphs they decided to remove), so I
suppose the answer to your question is “no” ;-)


Arthur,

do you know if the new Greek glyphs will be extended to support
polytonic Greek?
Given the projects objective and the timeline it's unlikely to happen 
soon. It also doesn't help that greek nor cyrillic users are 
participating in the project.


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] Splitting long floats

2018-10-17 Thread Hans Hagen

On 10/17/2018 5:45 PM, Henri Menke wrote:

Dear list,

motivated by https://tex.stackexchange.com/questions/455484 I was trying
to split a long float across several pages.  It also works but instead
of the caption I see “there is nothing to split” at the end of the
listing.  The source file documentation of \splitfloat suggests that
this is intended for tabular material.  Is is possible to split other
material as well?


A splitter has to talk to the split mechanism ...

% goes into cont-new.mkiv

\unprotect

\def\handlesplittext#1%
  {\setbox\tsplitresult\vbox
 {\vsplit\tsplitcontent to \dimexpr#1-\lineheight\relax}}

\unexpanded\def\startsplittext
  {\begingroup
   \resettsplit
   \let\tsplitminimumfreelines\!!zerocount
   \let\tsplitminimumfreespace\!!zeropoint
   \let\extrasplitfloatlines  \!!plusone
   \let\tsplitdirectsplitter  \handlesplittext
   \setbox\tsplitcontent\vbox\bgroup
   \insidefloattrue}

\unexpanded\def\stopsplittext
  {\egroup
   \handledirecttsplit
   \endgroup}

\protect

\usemodule[scite]

\setupbodyfont[dejavu,8pt]

\starttext

\splitfloat
  {\placefigure{some caption}}
  {\startsplittext
   \typefile[option=TEX,before=,after=]{oeps.tex}
   \stopsplittext}

\stoptext



Cheers, Henri

---

\definefloat[listing]

\starttext

\startplacelisting[title={math.h},location=split]
   \typefile{/usr/include/math.h}
\stopplacelisting

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




--

-
  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] Questions to font family Pagella

2018-10-17 Thread Pablo Rodriguez
On 10/17/18 11:48 AM, Arthur Reutenauer wrote:
> On Wed, Oct 17, 2018 at 11:31:42AM +0200, Tomas Hala wrote:
>> Hans, thank you for the explanation, I agree, I did not like that cyrillic, 
>> too.
>>
>> Does somebody know whether TeXGyre team plans some additions of cyrillic to 
>> their font collection? 
> 
>   The core team gave up on the idea of doing it themselves over ten
> years ago and they’ve already have bad experiences with one previous
> contributor (the one who made the glyphs they decided to remove), so I
> suppose the answer to your question is “no” ;-)

Arthur,

do you know if the new Greek glyphs will be extended to support
polytonic Greek?

Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] what defines the font size?

2018-10-17 Thread Pablo Rodriguez
On 10/17/18 11:13 AM, luigi scarso wrote:
> [...]
> Nice to/must have :
> 
> Fonts & Encodings
> Book by Yannis Haralambous
> 
> https://docs.microsoft.com/en-us/typography/
> and pdf at 
> https://docs.microsoft.com/en-us/typography/opbuildpdf/TOC.pdf?branch=live

Many thanks for the references, Luigi.

Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] what defines the font size?

2018-10-17 Thread Pablo Rodriguez
On 10/17/18 11:02 AM, Arthur Reutenauer wrote:
> On Tue, Oct 16, 2018 at 07:48:41PM +0200, Pablo Rodriguez wrote:
> [...]
>   It’s less clear what you’re trying to do next:
>> [...]
>   What are you trying to demonstrate with this?  If you change the size
> of the font, obviously the glyphs have different sizes.  The initial
> size at \starttext is 12pt, then \tfxx and \tfd change the sizes, to 8pt
> and 20.736pt respectively.  Hence the former looks quite small in the
> box, and the latter looks very large.  All that’s perfectly normal, and
> since you’re not changing the font, or even the glyph, it’s not a good
> illustration of the points raised in your initial email.

I tried to show that the em square is the fixed measure. But the glyphs
may relate in different ways to that square.

I know that \tfxx and \tfd are different sizes. But there would be
nothing against taking each of them to develop a new font (at 12 points)
with their diverse glyph sizes.

Or am I missing something.

>> The issue with units per em is something I didn’t understand.
> 
>   That’s irrelevant for you as a font user.  Don’t worry about it.

A user that asks why different fonts have glyphs with different sizes
given the same point for both, doesn’t remain a font user anymore.

(I only wanted to understand, in order to be able to illustrate other
people.)

Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] what defines the font size?

2018-10-17 Thread Pablo Rodriguez
On 10/17/18 12:59 AM, Hans Hagen wrote:
> On 10/16/2018 7:48 PM, Pablo Rodriguez wrote:
> 
>> I tried to experiment (modifying TeX Gyre Pagella from 1000 to 
>> UPM), but for some reason, I wasn’t able to load the font.
> Messing with such value is asking for problems and you can be sure that 
> I won't waste time on looking issues resulting from it.

I didn’t intend that. I only included two commands (not a complete
sample), because I thought I might be not invoking them right.

Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Splitting long floats

2018-10-17 Thread Henri Menke
Dear list,

motivated by https://tex.stackexchange.com/questions/455484 I was trying
to split a long float across several pages.  It also works but instead
of the caption I see “there is nothing to split” at the end of the
listing.  The source file documentation of \splitfloat suggests that
this is intended for tabular material.  Is is possible to split other
material as well?

Cheers, Henri

---

\definefloat[listing]

\starttext

\startplacelisting[title={math.h},location=split]
  \typefile{/usr/include/math.h}
\stopplacelisting

\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] Questions to font family Pagella

2018-10-17 Thread Arthur Reutenauer
On Wed, Oct 17, 2018 at 11:31:42AM +0200, Tomas Hala wrote:
> Hans, thank you for the explanation, I agree, I did not like that cyrillic, 
> too.
> 
> Does somebody know whether TeXGyre team plans some additions of cyrillic to 
> their font collection? 

  The core team gave up on the idea of doing it themselves over ten
years ago and they’ve already have bad experiences with one previous
contributor (the one who made the glyphs they decided to remove), so I
suppose the answer to your question is “no” ;-)

Best,

Arthur
___
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] Questions to font family Pagella

2018-10-17 Thread Tomas Hala
Hans, thank you for the explanation, I agree, I did not like that cyrillic, too.

Does somebody know whether TeXGyre team plans some additions of cyrillic to 
their font collection? 

Tomáš

Fri, Oct 12, 2018 ve 07:27:50PM +0200 Hans Hagen napsal(a):
# On 10/12/2018 5:05 PM, Tomas Hala wrote:
# 
# >On my disk I have got also one older version (1.011) of pagella (I do not 
where I took it from)
# >which contains more(!) characters than the current one (2.004) where eg. the 
subset of cyrillic characters is missing...
# >Why the newer version contains less?
# 
# (1) cyrillic was bad and no one cared to check it so it was removed
# (2) the latest version should have many symbols added (post texlive)
# 
# 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
# -

 Tomáš Hála

Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky
Zemědělská 1, CZ-613 00 Brno,  tel. +420 545 13 22 28

http://akela.mendelu.cz/~thala
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] what defines the font size?

2018-10-17 Thread luigi scarso
On Tue, Oct 16, 2018 at 7:51 PM Pablo Rodriguez  wrote:

> On 10/15/18 10:59 PM, Hans Hagen wrote:
> >>> [...]
> >>> If two fonts have the same size, I think there may be a dimension which
> >>> has the same length in both. Which one is this?
> >>
> >> None. The font decides about its size.
> > actually, the designer ... anyway, one can compare 10pt dejavu with 10pt
> > latin modern and 10pt lucida and you'll see that there is no real
> > standard in size
>
> Many thanks for your reply, Hans.
>
> I thought that I was missing something. For sure, but it was the
> explanation why there is no standarization in size.
>

Nice to/must have :

Fonts & Encodings
Book by Yannis Haralambous

https://docs.microsoft.com/en-us/typography/
and pdf at
https://docs.microsoft.com/en-us/typography/opbuildpdf/TOC.pdf?branch=live


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

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

Re: [NTG-context] what defines the font size?

2018-10-17 Thread Arthur Reutenauer
On Tue, Oct 16, 2018 at 07:48:41PM +0200, Pablo Rodriguez wrote:
> I cannot claim that I understand his explanation, but it seems that
> there is something about the em quad

  The em quad has the same width as the font size, that’s correct.  But
it still doesn’t mean that any part of any glyph in the font has that
length.  It’s really a tautology, actually: if you take a font at size,
say, 12pt, then the em space is 12pt wide.  That’s the definition (at
least in the TeX world).

  It’s less clear what you’re trying to do next:

> \setupframed
> [offset=none,
>  framecolor=red,
>  rulethickness=0.01pt,
>  width=12pt,
>  height=12pt]
> 
> \starttext
> \startTEXpage[offset=1em]
> \framed{M}
> \framed{\tfxx M}
> \framed{\tfd M}
> \stopTEXpage
> \stoptext

  What are you trying to demonstrate with this?  If you change the size
of the font, obviously the glyphs have different sizes.  The initial
size at \starttext is 12pt, then \tfxx and \tfd change the sizes, to 8pt
and 20.736pt respectively.  Hence the former looks quite small in the
box, and the latter looks very large.  All that’s perfectly normal, and
since you’re not changing the font, or even the glyph, it’s not a good
illustration of the points raised in your initial email.

> The issue with units per em is something I didn’t understand.

  That’s irrelevant for you as a font user.  Don’t worry about it.

Best,

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

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

Re: [NTG-context] what defines the font size?

2018-10-17 Thread Ulrike Fischer
Am Tue, 16 Oct 2018 09:07:38 +0200 schrieb Arthur Reutenauer:

> I quite liked the idea of the font itself deciding on its size, of its
> own free will ;-)

;-) That's an application of Gödel's incompleteness theorems: with
some level of complexity and lookups strange loops und true but
unproveable statements about the font appear and then it clearly has
its how free will. Or shorter: you no longer can really understand
what it is doing ... 

-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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/even page test

2018-10-17 Thread Procházka Lukáš Ing .

Hello Pablo,

that's it, thank you!

Lukas


On Tue, 16 Oct 2018 17:58:04 +0200, Pablo Rodriguez  wrote:


On 10/16/18 4:25 PM, Procházka Lukáš Ing. wrote:

Hello,

I need to check whether even or odd page is to be printed. I'm starting with 
the following simple code:


\def\T{\ifodd\pagenumber ODD\else EVEN\fi}

\starttext
   \dorecurse{2}{\T\page}
   \startTEXpage[width=50mm,height=150mm]\stopTEXpage
   \dorecurse{2}{\T\page}
\stoptext



Hi Lukáš,

both makeups and fitting pages aren’t numbered by default.

Either you add this to the preamble:

  \setupfittingpage[TEXpage][pagestate=start]

or you add the option "pagestate=start" to \startTEXpage.

I hope it helps,

Pablo



Why "user defined page" #3 is skipped in page numbering, so headers shown are:
1 - 2 - (nothing) - 3 - 4 and "ODD"/"EVEN" and text is "ODD" - "EVEN" - (nothing) - 
"ODD" - "EVEN"
instead of:
1 - 2 - (nothing) - 4 - 5 and "ODD"/"EVEN" and text be "ODD" - "EVEN" - (nothing) - 
"EVEN" - "ODD"?

TIA.

Best regards,

Lukas



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

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