Re: [NTG-context] section headings on a grid: less space above?

2013-08-24 Thread Lars Huttar
Marco wrote,
> On 2013–08–23 Lars Huttar wrote:
>
> >/ \setuphead[subsection][number=no,style=it,grid=top]
> /
> Add
>
>   before={\blank[line]}
>
> Marco

Thank you very much, that worked!
Can you explain how it works?
Does "before=" override the setting of "grid="? Is "before=" at a lower
level?
Yet "before=" must be at a high enough level that the grid-setting code
is able to adjust for it and still preserve the grid alignment...

Regards,
Lars

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Cyrillic replacement for TeX Gyre Schola?

2013-08-24 Thread Wolfgang Schuster

Am 24.08.2013 um 16:18 schrieb Marco Patzer :

> On 2013–08–24 Wolfgang Schuster wrote:
> 
>> I can’t reproduce your problem with the features key.
> 
> I was surprised that your example was running here, and I noticed
> that a space makes all the difference:

\definefontsynonym uses its own parser for the key-val arguments
which doesn’t remove spaces before keys.

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Cyrillic replacement for TeX Gyre Schola?

2013-08-24 Thread Marco Patzer
On 2013–08–24 Wolfgang Schuster wrote:

> I can’t reproduce your problem with the features key.

I was surprised that your example was running here, and I noticed
that a space makes all the difference:

  %% fails
  \definefontsynonym [Serif] [file:texgyrescholaregular] [features=default, 
fallbacks=cyrillic_regular]

  %% works
  \definefontsynonym [Serif] [file:texgyrescholaregular] 
[features=default,fallbacks=cyrillic_regular]
 ^^^

> To set the features for the fallback font I would use \
> definefontsynonym.

Makes more sense, yes.

Marco


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Typesetting Classical Arabic Poetry

2013-08-24 Thread Idris Samawi Hamid ادريس سماوي حامد

Hi JR,

On Fri, 23 Aug 2013 15:12:54 -0600, J. R. Schmid  wrote:


for better or worse, I'm trying to typeset Arabic poetry in ConTeXt


For better :-)

after having become fed up with LaTeX for a variety of reasons. Arabic  
script itself is not a problem and I already love how easy it is to use  
whatever font you like and how clean ConTeXt seems to be in its design.


What is giving me trouble, though, is the face that traditionally,  
poetry needs to be typeset in two columns. Using an English poem for an  
example, it'd look a little bit like this:


 Said Rich Accetta-Evans:

   1 My  poem  delights  me2 My   poem   is   mine
   3 It is like fresh bread4 When I bake it myself
   5 It   is  like  my  son6 The  day  he was born
   [...]

This is to be read in the order of the numbers, so "columns" or  
"simplecolumns" won't work (I think).


I have an experimental/rudimentary module that does this. It needs some
work to get, e.g., better widths for automatic typesetting in the
high-level code (tracking the dynamic \hsize in ConTeXt) but you are
welcome to try it. See the attached module and test file.



The second problem is the way in which Arabic needs to be justified,  
namely not by adjusting the space between words, but instead by  
adjusting the connecting line between letters:


قال أبو الطيب أحمد بن الحسين المتنبّي

   أنـا الـذي نـظر الأعمى إلـى أدبي  وأسمعـت كـلماتــي مـن به صمم
   كم تـطلبون لـنا عيبًـا فــيعجزكم  ويكره المجد ما تأتـون والكرم
   ما أبعـد العيب والنقصان عن شرفي  أنا الثّريا وذان الشيب والهرم
   [...]

I couldn't find any info on either of these two questions through the  
documentation or through Google (although I might have been looking for  
the wrong keywords). Any comments are appreciated! :-)


I'm hoping that this will be implemented in the coming months. Hans and I
have done work on the general case -- involving very advanced
font-features -- but not so much on the simple case -- involving
insertions of tatweel. That may seem counter-intuitive, usually the simple
comes before the complex ;-)

Let me know how things work, and you can write me off-list.

Best wishes
Idris
--
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

arabic-poem.tex
Description: TeX document


hemistiches.tex
Description: TeX document


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Cyrillic replacement for TeX Gyre Schola?

2013-08-24 Thread Wolfgang Schuster

Am 24.08.2013 um 13:38 schrieb Marco Patzer :

> On 2013–08–24 Wolfgang Schuster wrote:
> 
>> You missed in the typescript the features setting for the main and also the 
>> fallback font.
> 
> I did, indeed. However, I'm unsure how to do it (I never needed to
> typeset Cyrillic and I can't even tell if it typesets correctly).
> The default features should be applied to the regular font and a
> special feature set to the fallback font. If I add the
> features=default in the font synonym definition, the fallback
> breaks. It works, if the star syntax is being used.
> 
> I don't quite understand why.
> 
> %% not sure which features are required for Cyrillic
> \definefontfeature  [cyr-default]  [mode=node, script=cyrl]
> \definefontfallback [cyrillic_regular] [name:dejavuserif*cyr-default] 
> [cyrillic]
> 
> \starttypescript [serif] [schola]
>  %% works
>  %% \definefontsynonym [Serif] [name:texgyreschola-regular*default] 
> [fallbacks=cyrillic_regular]
> 
>  %% fallback does not work
>  \definefontsynonym [Serif] [name:texgyreschola-regular] [features=default, 
> fallbacks=cyrillic_regular]
> \stoptypescript
> 
> \starttypescript [schola]
>  \definetypeface [\typescriptone] [rm] [serif] [schola] [default]
> \stoptypescript
> 
> \setupbodyfont [schola]
> 
> \starttext
>  \input knuth
> 
>  Традиционная систематика лишайников оказывается во многом условна и
> \stoptext


I can’t reproduce your problem with the features key. To set the features for 
the fallback font
I would use \ definefontsynonym.

\definefontfeature [cyr-default] [mode=node, script=cyrl]
\definefontsynonym [CyrillicRegular] [file:dejavuserif] [features=cyr-default]
\definefontfallback [cyrillic_regular] [CyrillicRegular] [cyrillic]

\starttypescript [serif] [schola]
 \definefontsynonym [Serif] [file:texgyrescholaregular] 
[features=default,fallbacks=cyrillic_regular]
\stoptypescript

\starttypescript [schola]
 \definetypeface [\typescriptone] [rm] [serif] [schola] [default]
\stoptypescript

\setupbodyfont [schola]

\starttext

\input knuth

Традиционная систематика лишайников оказывается во многом условна и

\stoptext

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] section headings on a grid: less space above?

2013-08-24 Thread Marco Patzer
On 2013–08–23 Lars Huttar wrote:

> \setuphead[subsection][number=no,style=it,grid=top]

Add

  before={\blank[line]}

Marco


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] MetaPost label direction prefix

2013-08-24 Thread Marco Patzer
On 2013–08–24 Hans Hagen wrote:

> startplaincompatibity ;
> 
> label("first", origin);
> 
> pair laboff.foo ; laboff.foo := (.5,-1) ;
> labxf.foo := labyf.foo := 1 ;
> 
> label.foo("second", origin);
> 
> stopplaincompatibity ;

Brilliant! Thanks a lot. A few things:

1) Can you replace

  def useplainlabels =
let label= plain_label ;
let thelabel = plain_thelabel ;
  enddef ;

with

  def useplainlabels =
def label= plain_labelenddef ;
def thelabel = plain_thelabel enddef ;
  enddef ;

The minimal example works with your version, but the old MetaPost
code does not. The def variant works fine with both.

2) Replace

  startplaincompatibity  →  startplaincompatibility
   stopplaincompatibity  →  stopplaincompatibility

3) This one is truly optional and just a suggestion for a better
interface. Although it's nice to have the grouping in
start-stopplaincompatibility, it's not required here, since the
entire MetaPost instance runs in plain compatibility mode. It would
be nice to either have a non-grouped command:

  def plaincompatibility =
scantokens plain_compatibity_data ;
  enddef ;

Or maybe even a higher-level switch:

  \defineMPinstance
[fun-with-old-MP]
[metafun]
[compatibility=plain] %% default* | plain

> As I wouldn't be surprised if there were more differences we need
> to handle.

We will find out if things break.

Marco


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Cyrillic replacement for TeX Gyre Schola?

2013-08-24 Thread Marco Patzer
On 2013–08–24 Wolfgang Schuster wrote:

> You missed in the typescript the features setting for the main and also the 
> fallback font.

I did, indeed. However, I'm unsure how to do it (I never needed to
typeset Cyrillic and I can't even tell if it typesets correctly).
The default features should be applied to the regular font and a
special feature set to the fallback font. If I add the
features=default in the font synonym definition, the fallback
breaks. It works, if the star syntax is being used.

I don't quite understand why.

%% not sure which features are required for Cyrillic
\definefontfeature  [cyr-default]  [mode=node, script=cyrl]
\definefontfallback [cyrillic_regular] [name:dejavuserif*cyr-default] [cyrillic]

\starttypescript [serif] [schola]
  %% works
  %% \definefontsynonym [Serif] [name:texgyreschola-regular*default] 
[fallbacks=cyrillic_regular]

  %% fallback does not work
  \definefontsynonym [Serif] [name:texgyreschola-regular] [features=default, 
fallbacks=cyrillic_regular]
\stoptypescript

\starttypescript [schola]
  \definetypeface [\typescriptone] [rm] [serif] [schola] [default]
\stoptypescript

\setupbodyfont [schola]

\starttext
  \input knuth

  Традиционная систематика лишайников оказывается во многом условна и
\stoptext

Marco


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Typesetting Classical Arabic Poetry

2013-08-24 Thread J. R. Schmid

Dear list,

for better or worse, I'm trying to typeset Arabic poetry in ConTeXt 
after having become fed up with LaTeX for a variety of reasons. Arabic 
script itself is not a problem and I already love how easy it is to use 
whatever font you like and how clean ConTeXt seems to be in its design.


What is giving me trouble, though, is the face that traditionally, 
poetry needs to be typeset in two columns. Using an English poem for an 
example, it'd look a little bit like this:


Said Rich Accetta-Evans:

  1 My  poem  delights  me2 My   poem   is   mine
  3 It is like fresh bread4 When I bake it myself
  5 It   is  like  my  son6 The  day  he was born
  [...]

This is to be read in the order of the numbers, so "columns" or 
"simplecolumns" won't work (I think).


The second problem is the way in which Arabic needs to be justified, 
namely not by adjusting the space between words, but instead by 
adjusting the connecting line between letters:


   قال أبو الطيب أحمد بن الحسين المتنبّي

  أنـا الـذي نـظر الأعمى إلـى أدبي  وأسمعـت كـلماتــي مـن به صمم
  كم تـطلبون لـنا عيبًـا فــيعجزكم  ويكره المجد ما تأتـون والكرم
  ما أبعـد العيب والنقصان عن شرفي  أنا الثّريا وذان الشيب والهرم
  [...]

I couldn't find any info on either of these two questions through the 
documentation or through Google (although I might have been looking for 
the wrong keywords). Any comments are appreciated! :-)


With best regards,
  J. R. Schmid
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] beta

2013-08-24 Thread Marco Patzer
On 2013–08–24 Hans Hagen wrote:

> On 8/24/2013 2:08 AM, Marco Patzer wrote:
> >On 2013–08–24 Hans Hagen wrote:
> >
> >>On 8/23/2013 2:41 PM, Otared Kavian wrote:
> >>>Hi Hans,
> >>>
> >>>This is a very nice feature indeed.
> >>>Out of curiosity, I wondered whether it is possible to to have 
> >>>\placeinitial to work with \definefirstline, or a variant of it: that is 
> >>>not only have the first character of the first sentence as a dropped 
> >>>capital, but also the first line (or first few words) for instance in 
> >>>smallcaps.
> >>
> >>I played with that before uploading but it was somewhat tricky.
> >>Anyway, I redid some code so now you can do this:
> >
> >Did you forget to add a file?
> >
> >loading > ConTeXt Typesetting Macros / First Lines
> >! LuaTeX error 
> >...o/ctx/te/tex/texmf-context/tex/context/base/typo-fln.lua:44: attempt to 
> >index field 'pool' (a nil value)
> >stack traceback:
> > ...o/ctx/te/tex/texmf-context/tex/context/base/typo-fln.lua:44: in 
> > function 'code'
> > ...o/ctx/te/tex/texmf-context/tex/context/base/util-lua.lua:84: in 
> > function 'loadedluacode'
> > ...o/ctx/te/tex/texmf-context/tex/context/base/luat-env.lua:104: in 
> > function 'luafilechunk'
> > ...o/ctx/te/tex/texmf-context/tex/context/base/luat-cod.lua:45: in 
> > function 'registercode'
> > [string "\directlua "]:1: in main chunk.
> >
> >system  > tex > error on line 53 in file 
> >/home/marco/ctx/te/tex/texmf-context/tex/context/base/typo-fln.mkiv: LuaTeX 
> >error  ...
> 
> hm, just some missing code in one of the files (i have two sets, a
> fast set and a traditional set, and i normally work with the fast

There still seems to be something missing in the new upload.
Making the format still fails:

loading > ConTeXt Typesetting Macros / First Lines
! LuaTeX error ...o/ctx/te/tex/texmf-context/tex/context/base/typo-fln.lua:44: 
attempt to index field 'nodes' (a nil value)
stack traceback:
...o/ctx/te/tex/texmf-context/tex/context/base/typo-fln.lua:44: in 
function 'code'
...o/ctx/te/tex/texmf-context/tex/context/base/util-lua.lua:84: in 
function 'loadedluacode'
...o/ctx/te/tex/texmf-context/tex/context/base/luat-env.lua:104: in 
function 'luafilechunk'
...o/ctx/te/tex/texmf-context/tex/context/base/luat-cod.lua:45: in 
function 'registercode'
[string "\directlua "]:1: in main chunk.

system  > tex > error on line 53 in file 
/home/marco/ctx/te/tex/texmf-context/tex/context/base/typo-fln.mkiv: LuaTeX 
error  ...

Marco


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___