[NTG-context] Hidden sections

2013-08-23 Thread Mikoláš Štrajt
Hello all,

We are writing a magazine with my friends and I am going to typeset it with 
ConTEXt. It works fine but I ran into the problem with heads.

In our magazine articles will be grouped in sections (e.g. poetry, short 
stories, programming). I need to hide section heads in text but to show them
in TOC and page headers. 

So there will be no „Poetry“ head in text but „Poetry“ will be shown in page
header and TOC.

Unfortunately, the trick from http://wiki.contextgarden.net/Titles#Flushing_
section_head_data_without_typesetting_them_in_the_text seems to not work for
me.

Thanks for help.

--

Mikoláš Štrajt
___
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] Hidden sections

2013-08-23 Thread Wolfgang Schuster

Am 23.08.2013 um 08:56 schrieb Mikoláš Štrajt stra...@seznam.cz:

 Hello all,
 
 We are writing a magazine with my friends and I am going to typeset it with 
 ConTEXt. It works fine but I ran into the problem with heads.
 
 In our magazine articles will be grouped in sections (e.g. poetry, short 
 stories, programming). I need to hide section heads in text but to show them 
 in TOC and page headers. 
 
 So there will be no „Poetry“ head in text but „Poetry“ will be shown in page 
 header and TOC.
 
 Unfortunately, the trick from 
 http://wiki.contextgarden.net/Titles#Flushing_section_head_data_without_typesetting_them_in_the_text
  seems to not work for me.
 
 Thanks for help.

\definehead[test][section]

\setuphead
  [test]
  [placehead=empty,
   before=,
   after=]

\setupheadertexts[test]

\starttext \showframe

\placelist[test]

\test{Knuth}

\dorecurse{10}{\input knuth\par}

\test{Tufte}

\dorecurse{10}{\input tufte\par}

\test{Zapf}

\dorecurse{10}{\input zapf\par}

\test{Ward}

\dorecurse{10}{\input ward\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 / 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] MetaPost label direction prefix

2013-08-23 Thread Marco Patzer
Hi,

what is the reason the label direction prefix variables (rt, bot,
llft, etc.) are prefixed with mpfun_ in MkIV (mp-mlib.mpiv)? When
new directional prefixes are being defined it fails when mplib is
used unless the mpfun_ prefix is added. And likewise, code using the
mpfun_ prefix fails on traditional MetaPost.

Is this prefix required? It breaks old code and required a branch in
every new project. And I don't really see a reason for this
incompatibility. Here is an example defining a new direction “foo”:

\starttext
  \startMPcode
label(first, origin);

%% MkIV
%% pair mfun_laboff.foo ; mfun_laboff.foo := (.5,-1) ;
%% mfun_labxf.foo := mfun_labyf.foo := 1 ;

%% MkII
pair laboff.foo ; laboff.foo := (.5,-1) ;
labxf.foo := labyf.foo := 1 ;

label.foo(second, origin);
  \stopMPcode
\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
___

Re: [NTG-context] beta

2013-08-23 Thread Philipp Gesang
···date: 2013-08-22, Thursday···from: Hans Hagen···

 Hi,
 
 Some new magic in the beta ...
 
 \setupbodyfont[pagella]
 
 \starttext
 
 \setupindenting[medium,yes]
 \setupalign[tolerant]
 
 \definefirstline
   [fancy]
   [alternative=line,
color=darkred,
style=\setfontfeature{smallcaps}]
 
 \setfirstline[fancy] \input tufte  \par
 \setfirstline[fancy] \input ward   \par
 \setfirstline[fancy] \input knuth  \par
 \setfirstline[fancy] \input bryson \page
 
 \definefirstline
   [fancy]
   [alternative=word,
color=darkblue,
style=bold,
n=2]
 
 \setfirstline[fancy] \input tufte  \par
 \setfirstline[fancy] \input ward   \par
 \setfirstline[fancy] \input knuth  \par
 \setfirstline[fancy] \input bryson \page
 
 \stoptext
 
 (Actually, it was rather old magic that I found back in an early
 days of mkiv file).
 

Nice, wikified:

  http://wiki.contextgarden.net/Command/definefirstline

Best,
Philipp


pgpOee6Hf3zPW.pgp
Description: PGP 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-23 Thread Marco Patzer
On 2013–08–20 Henning Hraban Ramm wrote:

 Seems like I didn’t need Russian lyrics since the removal of
 Cyrillic glyphs from TeX Gyre. But now I do. What would you do? Is
 there an illegal complete version around,

Many commercial fonts cover the Cyrillic range. Pick whichever you
like.

 or can you suggest a replacement (and tell me how to setup ConTeXt
 to take that font for all Cyrillic letters)?

You didn't specify your requirements. Do you need a free font or a
free font that ships with ConTeXt? I think DejaVu Serif is fairly
close to Century Schoolbook. You can also try xits.

This should get you started:

\usemodule   [simplefonts]
\setmainfont [schola]
\setmainfontfallback [dejavuserif] [range=cyrillic]

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

Re: [NTG-context] beta

2013-08-23 Thread Otared Kavian
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.

Another curiosity question: is it on purpose that
 \definefirstline
[fancy]
[alternative=line,
color=darkred,
style=\setfontfeature{smallcaps},
n=2]
does not produce two lines of text in smallcaps?

Best regards: OK

On 22 août 2013, at 16:06, Hans Hagen pra...@wxs.nl wrote:

 Hi,
 
 Some new magic in the beta ...
 
 \setupbodyfont[pagella]
 
 \starttext
 
\setupindenting[medium,yes]
\setupalign[tolerant]
 
\definefirstline
  [fancy]
  [alternative=line,
   color=darkred,
   style=\setfontfeature{smallcaps}]
 
\setfirstline[fancy] \input tufte  \par
\setfirstline[fancy] \input ward   \par
\setfirstline[fancy] \input knuth  \par
\setfirstline[fancy] \input bryson \page
 
\definefirstline
  [fancy]
  [alternative=word,
   color=darkblue,
   style=bold,
   n=2]
 
\setfirstline[fancy] \input tufte  \par
\setfirstline[fancy] \input ward   \par
\setfirstline[fancy] \input knuth  \par
\setfirstline[fancy] \input bryson \page
 
 \stoptext
 
 (Actually, it was rather old magic that I found back in an early days of 
 mkiv file).
 
 Hans
 
 -
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] MetaPost label direction prefix

2013-08-23 Thread Hans Hagen

On 8/23/2013 11:42 AM, Marco Patzer wrote:

Hi,

what is the reason the label direction prefix variables (rt, bot,
llft, etc.) are prefixed with mpfun_ in MkIV (mp-mlib.mpiv)? When
new directional prefixes are being defined it fails when mplib is
used unless the mpfun_ prefix is added. And likewise, code using the
mpfun_ prefix fails on traditional MetaPost.


So is anyone using mkiv still using MkII?


Is this prefix required? It breaks old code and required a branch in
every new project. And I don't really see a reason for this
incompatibility. Here is an example defining a new direction “foo”:


The MpIV code has namespace protection. Why run traditional in MkIV?


\starttext
   \startMPcode
 label(first, origin);

 %% MkIV
 %% pair mfun_laboff.foo ; mfun_laboff.foo := (.5,-1) ;
 %% mfun_labxf.foo := mfun_labyf.foo := 1 ;

 %% MkII
 pair laboff.foo ; laboff.foo := (.5,-1) ;
 labxf.foo := labyf.foo := 1 ;

 label.foo(second, origin);
   \stopMPcode
\stoptext


I wasn't aware of users defining extra ones. I'll add this:

\starttext
  \startMPcode
label(first, origin);

if known mfun_laboff :

vardef installlabel@\# (expr type, x, y, offset) =
numeric mfun_labtype @\# ; mfun_labtype @\# := type ;
pairmfun_laboff  @\# ; mfun_laboff  @\# := offset ;
numeric mfun_labxf   @\# ; mfun_labxf   @\# := x ;
numeric mfun_labyf   @\# ; mfun_labyf   @\# := y ;
enddef ;

else :

vardef installlabel@\# (expr type, x, y, offset) =
numeric labtype @\# ; labtype @\# := type ;
pairlaboff  @\# ; laboff  @\# := offset ;
numeric labxf   @\# ; labxf   @\# := x ;
numeric labyf   @\# ; labyf   @\# := y ;
enddef ;

fi ;

installlabel.foo ( 0, 1, 1, (.5,-1) ) ;

label.foo(second, origin);
  \stopMPcode
\stoptext


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] MetaPost label direction prefix

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

 Is this prefix required? It breaks old code and required a branch in
 every new project. And I don't really see a reason for this
 incompatibility. Here is an example defining a new direction “foo”:
 
 The MpIV code has namespace protection. Why run traditional in MkIV?

 
 \starttext
\startMPcode
  label(first, origin);
 
  %% MkIV
  %% pair mfun_laboff.foo ; mfun_laboff.foo := (.5,-1) ;
  %% mfun_labxf.foo := mfun_labyf.foo := 1 ;
 
  %% MkII
  pair laboff.foo ; laboff.foo := (.5,-1) ;
  labxf.foo := labyf.foo := 1 ;
 
  label.foo(second, origin);
\stopMPcode
 \stoptext
 
 I wasn't aware of users defining extra ones. I'll add this:

Probably not many users will tinker with custom label directions,
but MetaPost package authors do. Some packages like piechartmp¹
internally use laboff.foo and the mpfun_ prefix breaks those
packages. They work in traditional MetaPost, plain TeX, LaTeX and
ConTeXt MkII, but since mplib uses the mpfun_ prefix, those packages
are broken in MkIV.

 […]
 installlabel.foo ( 0, 1, 1, (.5,-1) ) ;

This does not fix the problem since it only *defines* the correct
variant, it doesn't help *using* those values. If the label values
are being changed in the package one still has to branch out to
support both variants. And even if there was an abstraction
assisting to *use* the laboff values, all MetaPost packages
tinkering with laboff would need to be adjusted. I can't imagine
that to happen. Here's what the piechartmp package is doing, for
instance:

  if laboff.@# = (-3,-3): % auto justification

  […]
laboff.auto := ((cosd l),(sind l)) ;
labxf.auto  := ((cosd l) - 1) / -2 ;
labyf.auto  := ((sind l) - 1) / -2 ;

  […]

This code is being executed every time a label is typeset.

Marco

¹ 
http://mirrors.ctan.org/graphics/metapost/contrib/macros/piechartmp/piechartmp.mp


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-23 Thread Henning Hraban Ramm
Am 2013-08-23 um 18:00 schrieb Marco Patzer li...@homerow.info:

 On 2013–08–20 Henning Hraban Ramm wrote:
 
 Seems like I didn’t need Russian lyrics since the removal of
 Cyrillic glyphs from TeX Gyre. But now I do. What would you do? Is
 there an illegal complete version around,
 
 Many commercial fonts cover the Cyrillic range. Pick whichever you
 like.

Of course. I have plenty. The question was meant more like: Is there another 
free version of Century Schoolbook or lookalike that includes Cyrillic.

 or can you suggest a replacement (and tell me how to setup ConTeXt
 to take that font for all Cyrillic letters)?
 
 You didn't specify your requirements. Do you need a free font or a
 free font that ships with ConTeXt? I think DejaVu Serif is fairly
 close to Century Schoolbook. You can also try xits.
 
 This should get you started:
 
 \usemodule   [simplefonts]
 \setmainfont [schola]
 \setmainfontfallback [dejavuserif] [range=cyrillic]


Thank you, that is what I was looking for.
How would I write the last line without the simplefonts module?
(At the moment I’m using a typescript that e.g. also defines hw.)

Greetlings, Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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] section headings on a grid: less space above?

2013-08-23 Thread Lars Huttar
Hello,

I'm using mkii to typeset a document with grid layout. I'm trying to
configure the formatting of the subsection headings.

I have the following setuphead:
\setuphead[subsection][number=no,style={\switchtobodyfont[SansB,\subheadersize]},grid=top]

This works successfully in that the lines below the heading are aligned
to the grid.

But what I'm trying to change is the fact that 4 grid lines are taken up
by the heading: approximately two blank lines above, and one below. The
requirement is to use 3 grid lines.

I know how to move the heading text down within the space:
grid=3pt
does that.

But I can't figure out how to reduce the number of lines above the
heading text.

The document at http://www.pragma-ade.com/general/manuals/details.pdf
says that the top option (as in grid=top) means add/remove an extra
line to the top. But in my experimenting, the presence or absence of
top seems to make no difference.
I also tried:
grid={broad,low}
grid={fit,low}
grid={line,3pt}
grid=standard
no grid setting at all

but none of these seems to reduce the total amount of vertical space
taken up by the heading.

Can somebody tell me how to do this? E.g. how to make the top option
remove an extra line on top?

Thanks,
Lars

P.S. version:
ConTeXt  ver: 2008.05.21 15:21 MKII  fmt: 2009.1.20
but I'm hoping the oldness of the version isn't a factor here.
___
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] Systems of equations in ConTeXt?

2013-08-23 Thread Xan
thanks. How can I achieve the symbol of system in the right?

Thanks,
Xan.

 On 2013–08–22 Xan wrote:
 
  Simple question: what is the equivalent of:
  
  \begin{equation*}
  \left\{ \begin{aligned}
  2x - 2y = 0\\
  4x - 2y = 2
  \end{aligned} \right.
  \end{equation*}
  
  in ConTeXt?
 
 \starttext
   \startformula
 \startcases
   \NC 2x - 2y = 0 \NR
   \NC 4x - 2y = 2 \NR
 \stopcases
   \stopformula
 \stoptext
 
 See http://dl.contextgarden.net/myway/mathalign.pdf
 
 MarcoOn 2013–08–22 Xan wrote:

 Simple question: what is the equivalent of:
 
 \begin{equation*}
 \left\{ \begin{aligned}
 2x - 2y = 0\\
 4x - 2y = 2
 \end{aligned} \right.
 \end{equation*}
 
 in ConTeXt?

\starttext
  \startformula
\startcases
  \NC 2x - 2y = 0 \NR
  \NC 4x - 2y = 2 \NR
\stopcases
  \stopformula
\stoptext

See http://dl.contextgarden.net/myway/mathalign.pdf

Marco
On Thu, 22 Aug 2013 13:03:26 +0200
Xan dxpubl...@telefonica.net ha escrit:

 Hi,
 
 Simple question: what is the equivalent of:
 
 \begin{equation*}
 \left\{ \begin{aligned}
 2x - 2y = 0\\
 4x - 2y = 2
 \end{aligned} \right.
 \end{equation*}
 
 in ConTeXt?
 
 I know mako aligned module, but I can't achive \left\{ and \right.
 
 thanks in advance,
 Xan.
___
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-23 Thread Marco Patzer
On 2013–08–23 Henning Hraban Ramm wrote:

  This should get you started:
  
  \usemodule   [simplefonts]
  \setmainfont [schola]
  \setmainfontfallback [dejavuserif] [range=cyrillic]
 
 
 Thank you, that is what I was looking for.
 How would I write the last line without the simplefonts module?

You define the fallback using \definefontfallback and then use the
fallback key when defining the font.

\definefontfallback [cyr][name:dejavuserif] [cyrillic]
\definefontsynonym  [Serif-Fallback] [Serif][fallbacks=cyr]
\definefont [mySchola]   [Serif-Fallback]
\setupbodyfont  [schola]

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

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

2013-08-23 Thread Marco Patzer
On 2013–08–23 Marco Patzer wrote:

 On 2013–08–23 Henning Hraban Ramm wrote:
 
   This should get you started:
   
   \usemodule   [simplefonts]
   \setmainfont [schola]
   \setmainfontfallback [dejavuserif] [range=cyrillic]
  
  
  Thank you, that is what I was looking for.
  How would I write the last line without the simplefonts module?
 
 You define the fallback using \definefontfallback and then use the
 fallback key when defining the font.

Maybe it's better to show a complete typescript:

\definefontfallback [cyrillic_regular][name:dejavuserif]   
[cyrillic]
\definefontfallback [cyrillic_bold]   [name:dejavuserifbold]   
[cyrillic]
\definefontfallback [cyrillic_italic] [name:dejavuserifitalic] 
[cyrillic]
\definefontfallback [cyrillic_bolditalic] [name:dejavuserifbolditalic] 
[cyrillic]

\starttypescript [serif] [schola]
  \setups [font:fallback:serif]
  \definefontsynonym [Serif]   [name:texgyreschola-regular]
[fallbacks=cyrillic_regular]
  \definefontsynonym [SerifBold]   [name:texgyreschola-bold]   
[fallbacks=cyrillic_bold]
  \definefontsynonym [SerifItalic] [name:texgyreschola-italic] 
[fallbacks=cyrillic_italic]
  \definefontsynonym [SerifBoldItalic] [name:texgyreschola-bolditalic] 
[fallbacks=cyrillic_bolditalic]
\stoptypescript

\starttypescript [schola]
  \definetypeface [\typescriptone] [rm] [serif] [schola]   [default]
  \definetypeface [\typescriptone] [ss] [sans]  [latin-modern] [default]
  \definetypeface [\typescriptone] [tt] [mono]  [latin-modern] [default]
  \definetypeface [\typescriptone] [mm] [math]  [latin-modern] [default]
\stoptypescript

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] LuajitTeX fails to load font

2013-08-23 Thread Marco Patzer
Hi,

the following example compiles fine with LuaTeX, but LuajitTeX fails
to find the font.

\setupalign[r2l]
\definefont[Sheherazade][name:scheherazade*arabic at 18pt]
\starttext
  \Sheherazade أهلا بالعالم!
\stoptext


fontsdefining  font with asked name 'scheherazade' is not found 
using lookup 'name'
fontsdefining  unknown font 'scheherazade', loading aborted
fontsdefining  unable to define 'scheherazade' as 'Sheherazade--0'

The font is in the font database and regular LuaTeX succeeds.

  mtxrun --script fonts --list -all scheh

  scheherazade scheherazade   
/home/marco/.fonts/scheherazade/ScheherazadeRegOT.ttf
  scheherazadenormal   scheherazade   
/home/marco/.fonts/scheherazade/ScheherazadeRegOT.ttf

This might be related to the thread from a few days ago:

  http://thread.gmane.org/gmane.comp.tex.context/83871/focus=83877

Marco


PS: The font can be found here:

http://scripts.sil.org/cms/scripts/render_download.php?format=filemedia_id=Scheherazade-2.000filename=Scheherazade-2.000.zip


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] LuajitTeX fails to load font

2013-08-23 Thread luigi scarso
On Fri, Aug 23, 2013 at 11:14 PM, Marco Patzer li...@homerow.info wrote:

 Hi,

 the following example compiles fine with LuaTeX, but LuajitTeX fails
 to find the font.

 \setupalign[r2l]
 \definefont[Sheherazade][name:scheherazade*arabic at 18pt]
 \starttext
   \Sheherazade أهلا بالعالم!
 \stoptext


 fontsdefining  font with asked name 'scheherazade' is not
 found using lookup 'name'
 fontsdefining  unknown font 'scheherazade', loading aborted
 fontsdefining  unable to define 'scheherazade' as
 'Sheherazade--0'

 The font is in the font database and regular LuaTeX succeeds.

   mtxrun --script fonts --list -all scheh

   scheherazade scheherazade
 /home/marco/.fonts/scheherazade/ScheherazadeRegOT.ttf
   scheherazadenormal   scheherazade
 /home/marco/.fonts/scheherazade/ScheherazadeRegOT.ttf

 This might be related to the thread from a few days ago:

   http://thread.gmane.org/gmane.comp.tex.context/83871/focus=83877

 Marco


 PS: The font can be found here:

 http://scripts.sil.org/cms/scripts/render_download.php?format=filemedia_id=Scheherazade-2.000filename=Scheherazade-2.000.zip
 fix

thanks for the report. Currently I'm not able to  investigate these issues,
I will take them on the first week of September.
___
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] LuajitTeX fails to load font

2013-08-23 Thread Aditya Mahajan

On Fri, 23 Aug 2013, Marco Patzer wrote:


Hi,

the following example compiles fine with LuaTeX, but LuajitTeX fails
to find the font.

\setupalign[r2l]
\definefont[Sheherazade][name:scheherazade*arabic at 18pt]
\starttext
 \Sheherazade أهلا بالعالم!
\stoptext


fontsdefining  font with asked name 'scheherazade' is not found 
using lookup 'name'
fontsdefining  unknown font 'scheherazade', loading aborted
fontsdefining  unable to define 'scheherazade' as 'Sheherazade--0'

The font is in the font database and regular LuaTeX succeeds.


I occasionaly have similar troubles with math fonts (font works with 
luatex but not with luatexjit or vice versa), but a


mtxrun --script fonts --reload --force

fixes that.

Aditya___
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-23 Thread Hans Hagen

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:


\setupbodyfont
  [pagella]

\setupalign
  [tolerant,stretch]

\setupfirstline
  [alternative=line,
   color=darkred,
   style=\setfontfeature{smallcaps}]

\setupfirstline
  [fancy]
  [n=3]

\setupfirstline
  [fancier]
  [alternative=word,
   color=darkblue,
   style=bold,
   n=3]

\setupfirstline
  [weirder]
  [alternative=line,
   color=darkgreen,
   style=\setfontfeature{smallcaps},
   n=3]

\setupinitial
  [location=text,
   n=2,
   color=darkred,
   voffset=-.5ex,
   before={\blank[2*big]}]

\starttext

\setfirstline

\input ward \par

\placeinitial

\input ward \par

\setupindenting[medium,yes]

\setinitial % \placeinitial

\input ward \par

\setinitial %  \placeinitial
\setfirstline

\input ward \par

\setfirstline[fancy]

\input ward \par

\setfirstline[fancier]

\input ward \par

\setinitial %  \placeinitial
\setfirstline[weirder]

\input ward \par

\stoptext


Another curiosity question: is it on purpose that
  \definefirstline
[fancy]
[alternative=line,
color=darkred,
style=\setfontfeature{smallcaps},
n=2]
does not produce two lines of text in smallcaps?


I cannot imagine someone using it but it should work now. I must admit 
that I never use dropcaps or even this firstline stuff so it was more a 
challenge than a neccessity.


I have no clue (yet) to what extend it all interferes with other 
trickery but I suppose that such features are only used in controlled 
situations.


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] LuajitTeX fails to load font

2013-08-23 Thread Hans Hagen

On 8/23/2013 11:14 PM, Marco Patzer wrote:

Hi,

the following example compiles fine with LuaTeX, but LuajitTeX fails
to find the font.

\setupalign[r2l]
\definefont[Sheherazade][name:scheherazade*arabic at 18pt]
\starttext
   \Sheherazade أهلا بالعالم!
\stoptext


fontsdefining  font with asked name 'scheherazade' is not found 
using lookup 'name'
fontsdefining  unknown font 'scheherazade', loading aborted
fontsdefining  unable to define 'scheherazade' as 'Sheherazade--0'

The font is in the font database and regular LuaTeX succeeds.

   mtxrun --script fonts --list -all scheh

   scheherazade scheherazade   
/home/marco/.fonts/scheherazade/ScheherazadeRegOT.ttf
   scheherazadenormal   scheherazade   
/home/marco/.fonts/scheherazade/ScheherazadeRegOT.ttf


Hard to say what is the issue but it is not a luajittex issue. We don't 
do anything special, for instance jit is turned off because there is no 
gain at all (actually with jit enabled, the run is slower). So we only 
use the luajit virtual machine (in mkiv).


There is however one difference and that is the compiled lua code: lua 
and luajit have incompatible formats (apart from the fact that luatex is 
5.2 and luajittex is 5.1++). Normally compilation happens automatically 
i.e. when a font is loaded by luatex, context will generate the relevant 
compiled file when luajittex is used.


One possibility is that there is some mismatch in version numbers that 
gets unnoticed. In such case, as Aditya suggests, wiping the cache is an 
option.


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://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-23 Thread Lars Huttar
On 8/23/2013 11:26 AM, Lars Huttar wrote:
 Hello,

 I'm using mkii to typeset a document with grid layout. I'm trying to
 configure the formatting of the subsection headings.


Here is a small, self-contained example showing what I'm talking about:

\definecolumnset [twocol] [n=2,balancing=yes]


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


\starttext


\startcolumnset[twocol]

\dorecurse {5}{

\subsection{Subsection Heading}

\input knuth

}

\stopcolumnset


\stoptext


When I run this in mkiv, each subsection heading takes up 4 grid lines
of space.
How can I make it take up 3 lines?


(I would also like to lower the placement of the heading text within
that space; grid=3pt or grid={line,3pt} did that in mkii, but doesn't
seem to work in mkiv.)


Thanks,
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] beta

2013-08-23 Thread Marco Patzer
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  ...

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] LuajitTeX fails to load font

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

 Hard to say what is the issue but it is not a luajittex issue. We
 don't do anything special, for instance jit is turned off because
 there is no gain at all (actually with jit enabled, the run is
 slower).

I can confirm that. I did not find a real-world document which
compiled faster with jit. Using the virtual machine provides between
8% and 25% speed gain here.

 There is however one difference and that is the compiled lua code:
 lua and luajit have incompatible formats (apart from the fact that
 luatex is 5.2 and luajittex is 5.1++). Normally compilation happens
 automatically i.e. when a font is loaded by luatex, context will
 generate the relevant compiled file when luajittex is used.
 
 One possibility is that there is some mismatch in version numbers
 that gets unnoticed.

Let me know if I can provide any additional info.

 In such case, as Aditya suggests, wiping the cache is an option.

That helped, indeed.

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-23 Thread Hans Hagen

On 8/23/2013 3:14 PM, Marco Patzer wrote:

On 2013–08–23 Hans Hagen wrote:


Is this prefix required? It breaks old code and required a branch in
every new project. And I don't really see a reason for this
incompatibility. Here is an example defining a new direction “foo”:


The MpIV code has namespace protection. Why run traditional in MkIV?



\starttext
   \startMPcode
 label(first, origin);

 %% MkIV
 %% pair mfun_laboff.foo ; mfun_laboff.foo := (.5,-1) ;
 %% mfun_labxf.foo := mfun_labyf.foo := 1 ;

 %% MkII
 pair laboff.foo ; laboff.foo := (.5,-1) ;
 labxf.foo := labyf.foo := 1 ;

 label.foo(second, origin);
   \stopMPcode
\stoptext


I wasn't aware of users defining extra ones. I'll add this:


Probably not many users will tinker with custom label directions,
but MetaPost package authors do. Some packages like piechartmp¹
internally use laboff.foo and the mpfun_ prefix breaks those
packages. They work in traditional MetaPost, plain TeX, LaTeX and
ConTeXt MkII, but since mplib uses the mpfun_ prefix, those packages
are broken in MkIV.


that kind of tinkering can also result in overloading context 'extensions'


[…]
 installlabel.foo ( 0, 1, 1, (.5,-1) ) ;


This does not fix the problem since it only *defines* the correct
variant, it doesn't help *using* those values. If the label values
are being changed in the package one still has to branch out to
support both variants. And even if there was an abstraction
assisting to *use* the laboff values, all MetaPost packages
tinkering with laboff would need to be adjusted. I can't imagine
that to happen. Here's what the piechartmp package is doing, for
instance:


I'll provide:

\starttext
  \startMPcode

startplaincompatibity ;

label(first, origin);

pair laboff.foo ; laboff.foo := (.5,-1) ;
labxf.foo := labyf.foo := 1 ;

label.foo(second, origin);

stopplaincompatibity ;

  \stopMPcode
\stoptext

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


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] LuajitTeX fails to load font

2013-08-23 Thread Hans Hagen

On 8/24/2013 2:25 AM, Marco Patzer wrote:

On 2013–08–24 Hans Hagen wrote:


Hard to say what is the issue but it is not a luajittex issue. We
don't do anything special, for instance jit is turned off because
there is no gain at all (actually with jit enabled, the run is
slower).


I can confirm that. I did not find a real-world document which
compiled faster with jit. Using the virtual machine provides between
8% and 25% speed gain here.


there is a bit more to gain otherwise (luigi and i will talk about speed 
related issues at the context meeting)



There is however one difference and that is the compiled lua code:
lua and luajit have incompatible formats (apart from the fact that
luatex is 5.2 and luajittex is 5.1++). Normally compilation happens
automatically i.e. when a font is loaded by luatex, context will
generate the relevant compiled file when luajittex is used.

One possibility is that there is some mismatch in version numbers
that gets unnoticed.


Let me know if I can provide any additional info.


ok, but currently i have no clue

(it might be that there has been a fix without jumping the internal otf 
handler version number, in which case a mismatch can go unnoticed and no 
recompile happens in the jit variant)


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] beta

2013-08-23 Thread Hans Hagen

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 set)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://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-23 Thread Wolfgang Schuster

Am 23.08.2013 um 16:54 schrieb Henning Hraban Ramm te...@fiee.net:

 (At the moment I’m using a typescript that e.g. also defines hw.)

You can set a font for \hw with the \sethandwritingfont command.

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-23 Thread Wolfgang Schuster

Am 23.08.2013 um 18:44 schrieb Marco Patzer li...@homerow.info:

 Maybe it's better to show a complete typescript:
 
 \definefontfallback [cyrillic_regular][name:dejavuserif]   
 [cyrillic]
 \definefontfallback [cyrillic_bold]   [name:dejavuserifbold]   
 [cyrillic]
 \definefontfallback [cyrillic_italic] [name:dejavuserifitalic] 
 [cyrillic]
 \definefontfallback [cyrillic_bolditalic] [name:dejavuserifbolditalic] 
 [cyrillic]
 
 \starttypescript [serif] [schola]
  \setups [font:fallback:serif]
  \definefontsynonym [Serif]   [name:texgyreschola-regular]
 [fallbacks=cyrillic_regular]
  \definefontsynonym [SerifBold]   [name:texgyreschola-bold]   
 [fallbacks=cyrillic_bold]
  \definefontsynonym [SerifItalic] [name:texgyreschola-italic] 
 [fallbacks=cyrillic_italic]
  \definefontsynonym [SerifBoldItalic] [name:texgyreschola-bolditalic] 
 [fallbacks=cyrillic_bolditalic]
 \stoptypescript
 
 \starttypescript [schola]
  \definetypeface [\typescriptone] [rm] [serif] [schola]   [default]
  \definetypeface [\typescriptone] [ss] [sans]  [latin-modern] [default]
  \definetypeface [\typescriptone] [tt] [mono]  [latin-modern] [default]
  \definetypeface [\typescriptone] [mm] [math]  [latin-modern] [default]
 \stoptypescript

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

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
___