Re: [NTG-context] Using lua with the command line for "macros"

2013-10-13 Thread Kumar Appaiah
On Sun, Oct 13, 2013 at 09:31:11PM -0400, Kumar Appaiah wrote:
> On Mon, Oct 14, 2013 at 03:17:28AM +0200, luigi scarso wrote:
> >Have you seen
> >[2]http://www.pragma-ade.com/general/manuals/cld-mkiv.pdf
> 
> No, I haven't seen it. I'll have a close look at it. Thanks for the
> pointer.

Well, upon reading the document you suggested, I just realised that I
could work around my issue by creating A.tex and B.tex as follows:

A.tex:
\startluacode
 -- define A's variables
\stopluacode
\input generic

And a similar b.tex. This is more flexible in terms of my
implementation constraints as well.

Thanks.

Kumar
-- 
Kumar Appaiah
___
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] Using lua with the command line for "macros"

2013-10-13 Thread Kumar Appaiah
On Mon, Oct 14, 2013 at 03:17:28AM +0200, luigi scarso wrote:
>On Mon, Oct 14, 2013 at 3:01 AM, Kumar Appaiah
><[1]a.ku...@alumni.iitm.ac.in> wrote:
> 
>  Hi.
> 
>  At the outset, I understand that this is a slight abuse of LuaTeX and
>  this can be done with plain TeX. Nevertheless, I'd like to see if a
>  solution exists for this approach.
[snip]
> 
>Have you seen
>[2]http://www.pragma-ade.com/general/manuals/cld-mkiv.pdf

No, I haven't seen it. I'll have a close look at it. Thanks for the
pointer.

Kumar
-- 
Kumar Appaiah
___
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] Using lua with the command line for "macros"

2013-10-13 Thread luigi scarso
On Mon, Oct 14, 2013 at 3:01 AM, Kumar Appaiah wrote:

> Hi.
>
> At the outset, I understand that this is a slight abuse of LuaTeX and
> this can be done with plain TeX. Nevertheless, I'd like to see if a
> solution exists for this approach.
>
> I'm trying to use Lua with ConTeXt as a macro preprocessor. To be more
> clear, I have files A.lua, B.lua which define some variables:
>
> A.lua:
> var1 = "something for a"
> var2 = "something else for a"
>
> B.lua:
> var1 = "something for b"
> var2 = "something else for b"
>
> And, in my ConTeXt file, I would write:
> …
> I will get \directlua{tex.print(var1) and \directlua{tex.print(var2)}.
> …
>
> Now, with lualatex, I use the --lua command line option to pass the
> initial lua file name. However, for context, I've not found a way to
> do this. Could someone please advise me?
>

Have you seen
http://www.pragma-ade.com/general/manuals/cld-mkiv.pdf
?
-- 
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Using lua with the command line for "macros"

2013-10-13 Thread Kumar Appaiah
Hi.

At the outset, I understand that this is a slight abuse of LuaTeX and
this can be done with plain TeX. Nevertheless, I'd like to see if a
solution exists for this approach.

I'm trying to use Lua with ConTeXt as a macro preprocessor. To be more
clear, I have files A.lua, B.lua which define some variables:

A.lua:
var1 = "something for a"
var2 = "something else for a"

B.lua:
var1 = "something for b"
var2 = "something else for b"

And, in my ConTeXt file, I would write:
…
I will get \directlua{tex.print(var1) and \directlua{tex.print(var2)}.
…

Now, with lualatex, I use the --lua command line option to pass the
initial lua file name. However, for context, I've not found a way to
do this. Could someone please advise me?

Thanks.

Kumar
-- 
Kumar Appaiah
___
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] Broken nightly (2013.10.04)

2013-10-13 Thread Kip Warner
On Mon, 2013-10-14 at 00:22 +0200, Wolfgang Schuster wrote:
> This was a bug and Hans already fixed it a few days ago.
> 
> http://thread.gmane.org/gmane.comp.tex.context/84607/focus=84616

Thanks Wolfgang (and Hans). Adam's PPA will probably have the fix
packaged the next time the build bots pick up the newer source.

Take care,

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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] Broken nightly (2013.10.04)

2013-10-13 Thread Marco Patzer
On 2013–10–13 Kip Warner wrote:

> I've noticed a problem typesetting my book using ConTeXt nightly version
> 2013.10.04. The following code...

> 
> \placeformula[formula:Limit of Verhulst equation]
> \startformula
> \lim_{t\to\infty} P(t) = K.
> \stopformula
> 
> ...seems to raise the following error...
> 
> ! Undefined control sequence.

It has been fixed since 2013.10.08

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] XML export and font switches

2013-10-13 Thread Marco Patzer
On 2013–10–13 Hans Hagen wrote:

> On 10/13/2013 12:42 AM, Marco Patzer wrote:
> >Hi,
> >
> >certain font switches fail when XML export is used. Example:
> >
> >\setupbackend [export=foo.xml]
> >
> >\definehighlight
> >   [emph]
> >   [style=\ita] %% \bfa works
> >
> >\starttext
> >   \ita Foobar%% works
> >   Foo \emph{Bar} %% fails
> >\stoptext
> >
> >LuaTeX error [string "\directlua "]:1: invalid escape sequence near '"'.
> 
> \!!bs\highlightparameter\c!style\!!es

Thanks, that fixed it.

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] Broken nightly (2013.10.04)

2013-10-13 Thread Wolfgang Schuster

Am 14.10.2013 um 00:14 schrieb Kip Warner :

> Hey list,
> 
> I've noticed a problem typesetting my book using ConTeXt nightly version
> 2013.10.04. The following code...
> 
>\placeformula[formula:Limit of Verhulst equation]
>\startformula
>\lim_{t\to\infty} P(t) = K.
>\stopformula
> 
> ...seems to raise the following error...
> 
>! Undefined control sequence.
> \lim_ 
> 
>l.84 \lim_
>{t\to\infty} P(t) = K.

This was a bug and Hans already fixed it a few days ago.

http://thread.gmane.org/gmane.comp.tex.context/84607/focus=84616

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] Broken nightly (2013.10.04)

2013-10-13 Thread Kip Warner
Hey list,

I've noticed a problem typesetting my book using ConTeXt nightly version
2013.10.04. The following code...

\placeformula[formula:Limit of Verhulst equation]
\startformula
\lim_{t\to\infty} P(t) = K.
\stopformula

...seems to raise the following error...

! Undefined control sequence.
 \lim_ 
  
l.84 \lim_
{t\to\infty} P(t) = K.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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] Calling \followtokens from with in metapost

2013-10-13 Thread Marco Patzer
On 2013–10–13 Hans Hagen wrote:

> >inbetween the arcs, that should alsó be drawn). The text should not be
> >stretched but center on the top, flowing evenly distributed on each
> >side. This link will give you an idea:
> >
> >http://www.heilsuefling.is/heilsuefling/upload/images/whp_in_general/determinants_of_health/determinants_of_health.jpg
> >
> >How can this achieved?
> 
> a bit clumsy but workable
> 
> \starttext
> 
> \useMPlibrary[txt]
> 
> \startsetups text-a
> \startuseMPgraphic{followtokens}
> path RotPath ; RotPath := reverse halfcircle xyscaled 5cm ;
> draw RotPath ;
> \stopuseMPgraphic
> \followtokens{some text but not that long{\hskip1em}}
> \stopsetups
> 
> \startsetups text-b
> \startuseMPgraphic{followtokens}
> path RotPath ; RotPath := reverse halfcircle xyscaled 3cm  ;
> draw RotPath ;
> \stopuseMPgraphic
> \followtokens{{\hskip1em}some text{\hskip1em}}
> \stopsetups
> 
> \startMPpage
> draw textext("\setups{text-a}") ;
> draw textext("\setups{text-b}") shifted (0,-.5cm);
> \stopMPpage
> 
> \stoptext

This stretches the text. One has to use \hskip to squeeze the text
back to its normal inter character space, but I assume that's what
you meant by clumsy. I assume the OP wanted a solution which keeps
the natural spacing (whatever that means when text is aligned to a
path).

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] Problem with \overrightarrow over BC and CB

2013-10-13 Thread Hans Hagen

On 10/11/2013 9:53 AM, Mikael P. Sundqvist wrote:

Dear all,

with the latest beta (and older ones), the following file


you can control this with

\setupmathstackers
  [both]
  [hoffset=.5pt]

granularity might improve over time (as arrows are proper extensibles now)

(I have no time now to look into more automated threshold adaption)



%%% start test file
\definefontfamily [mainface] [serif] [DejaVu Serif]
\definefontfamily [mainface] [sans]  [DejaVu Sans]
\definefontfamily [mainface] [mono]  [DejaVu Sans Mono] [feature=none]
\definefontfamily [mainface] [math]  [TeX Gyre Pagella Math][scale=1..12]

\setupbodyfont[mainface]

\starttext
$
\overrightarrow{AB}
\overrightarrow{BA}
\overrightarrow{AC}
\overrightarrow{CA}
\overrightarrow{AD}
\overrightarrow{DA}
\overrightarrow{BC}
\overrightarrow{CB}
\overrightarrow{BD}
\overrightarrow{DB}
\overrightarrow{CD}
\overrightarrow{DC}
$
\stoptext
%%% end test file

gives a shorter arrow than expected above BC and CB (but over the other
ones it is OK).

Is this a bug in the Pagella math font (it looks OK if one comments out
the \setupbodyfont[mainface] above)?

Can it be fixed?

Best regards, Mikael


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




--

-
  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] XML export and font switches

2013-10-13 Thread Hans Hagen

On 10/13/2013 12:42 AM, Marco Patzer wrote:

Hi,

certain font switches fail when XML export is used. Example:

\setupbackend [export=foo.xml]

\definehighlight
   [emph]
   [style=\ita] %% \bfa works

\starttext
   \ita Foobar%% works
   Foo \emph{Bar} %% fails
\stoptext

LuaTeX error [string "\directlua "]:1: invalid escape sequence near '"'.


\!!bs\highlightparameter\c!style\!!es

I bet you know where to do that

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] Calling \followtokens from with in metapost

2013-10-13 Thread Hans Hagen

On 10/13/2013 9:59 AM, Magnus J wrote:

Hello list,

How can I call the \followtokens macro (or a similar solution) from
within metapost?  Specifically, I want to integrate text between the
semi-circle arcs in a rainbow-like structure (with the text placed
inbetween the arcs, that should alsó be drawn). The text should not be
stretched but center on the top, flowing evenly distributed on each
side. This link will give you an idea:

http://www.heilsuefling.is/heilsuefling/upload/images/whp_in_general/determinants_of_health/determinants_of_health.jpg

How can this achieved?


a bit clumsy but workable

\starttext

\useMPlibrary[txt]

\startsetups text-a
\startuseMPgraphic{followtokens}
path RotPath ; RotPath := reverse halfcircle xyscaled 5cm ;
draw RotPath ;
\stopuseMPgraphic
\followtokens{some text but not that long{\hskip1em}}
\stopsetups

\startsetups text-b
\startuseMPgraphic{followtokens}
path RotPath ; RotPath := reverse halfcircle xyscaled 3cm  ;
draw RotPath ;
\stopuseMPgraphic
\followtokens{{\hskip1em}some text{\hskip1em}}
\stopsetups

\startMPpage
draw textext("\setups{text-a}") ;
draw textext("\setups{text-b}") shifted (0,-.5cm);
\stopMPpage

\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] broken Czech dates

2013-10-13 Thread Hans Hagen

On 10/13/2013 5:05 PM, Ondřej Hošek wrote:

Hello,

the current ConTeXt Standalone contains a bug when attempting to output
Czech dates.



As far as I can tell, the definitions of Slovak (sk) and Turkmen (tk)
appear to be suffering from the same problem.


indeed, thanks for noticing

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] bug or needs warning documentation

2013-10-13 Thread Hans Hagen

On 10/13/2013 11:26 PM, Marco Patzer wrote:


How about switching paired boxes to \assumelongusagecs as well and
getting rid of \dogotopar? Paired boxes are the only mechanism which
uses \dogotopar.


ok

-
  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] bug or needs warning documentation

2013-10-13 Thread Marco Patzer
On 2013–10–13 Hans Hagen wrote:

> On 10/13/2013 2:48 AM, Marco Patzer wrote:
> 
> >\unprotect
> >
> >\def\pack_combinations_pickup
> >   {\dostarttagged\t!combinationpair\empty
> >\dostarttagged\t!combinationcontent\empty
> >\dogotopar\pack_combinations_pickup_content_indeed}
> 
> .. ok, patched ... but with a bit more efficient variant for \dogotopar

How about switching paired boxes to \assumelongusagecs as well and
getting rid of \dogotopar? Paired boxes are the only mechanism which
uses \dogotopar.

\def\pack_pairedboxes_place_indeed
  {\pairedboxparameter\c!before
   \bgroup
   \edef\p_location{\pairedboxparameter\c!location}%
   \edef\p_n   {\pairedboxparameter\c!n}%
   %
   \let\startcontent\pack_common_content_start
   \let\stopcontent \pack_common_content_stop
   \let\startcaption\pack_common_caption_start
   \let\stopcaption \pack_common_caption_stop
   %
   \global\setsystemmode{pairedbox}%
   \pack_pairedboxes_before
   \assumelongusagecs\pack_pairedboxes_first_pickup}

\def\pack_pairedboxes_first
  {\pack_pairedboxes_between
   \assumelongusagecs\pack_pairedboxes_second_pickup}

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] bug or needs warning documentation

2013-10-13 Thread Hans Hagen

On 10/13/2013 2:48 AM, Marco Patzer wrote:


\unprotect

\def\pack_combinations_pickup
   {\dostarttagged\t!combinationpair\empty
\dostarttagged\t!combinationcontent\empty
\dogotopar\pack_combinations_pickup_content_indeed}


.. ok, patched ... but with a bit more efficient variant for \dogotopar

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
___


[NTG-context] Fwd: broken Czech dates

2013-10-13 Thread Ondřej Hošek
Hello,

it appears Tomáš Hála's faculty's e-mail server has been blacklisted by
Spamhaus; he asked me to forward this to ntg-context.

Cheers,
~~ Ondra


-- Forwarded message --
From: Tomas Hala 
Date: Sun, Oct 13, 2013 at 10:32 PM
Subject: Re: [NTG-context] broken Czech dates
To: Ondřej Hošek 




Hello,

you are right, there is really a mistake, that is probably my fault
when I was preparing Slovak settings and checking Czech ones.

Moreover, the dot is missing there; for both, cs and sk, we have to use
this:

   \c!date={\v!day,{.\fourperemspace},\v!month,\space,\v!year},


Cheers,

Tomas





Sun, Oct 13, 2013 ve 05:05:26PM +0200 Ondřej Hošek napsal(a):
#Hello,
#
#the current ConTeXt Standalone contains a bug when attempting to output
#Czech dates.
#
#Minimal example:
#\mainlanguage[cs]
#\starttext
#\currentdate
#\stoptext
#
#Expected output:
#13. řijna 2013
#
#Received output:
#day, ,month, ,year
#
#The culprit appears to be a missing comma in the language definition in
#lang-def.mkiv:
#
#\installlanguage
#  [\s!cs]
#  [ % ...
#   \c!rightquotation=\upperrightdoublesixquote,
#   \c!date={\v!day,\fourperemspace,\v!month,\space,\v!year}
#   \s!lefthyphenmin=2,
#   % ...
#]
#
#Add a comma at the end of the line defining the date format; this
appears
#to fix the problem.
#
#As far as I can tell, the definitions of Slovak (sk) and Turkmen (tk)
#appear to be suffering from the same problem.
#
#Cheers,
#~~ Ondra Hošek
# /usr/bin/xdg-open: řádek 402: htmlview: příkaz nenalezen
# /usr/bin/xdg-open: řádek 402: firefox: příkaz nenalezen
# /usr/bin/xdg-open: řádek 402: mozilla: příkaz nenalezen
# /usr/bin/xdg-open: řádek 402: netscape: příkaz nenalezen

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


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

[NTG-context] broken Czech dates

2013-10-13 Thread Ondřej Hošek
Hello,

the current ConTeXt Standalone contains a bug when attempting to output
Czech dates.

Minimal example:
\mainlanguage[cs]
\starttext
\currentdate
\stoptext

Expected output:
13. řijna 2013

Received output:
day, ,month, ,year

The culprit appears to be a missing comma in the language definition in
lang-def.mkiv:

\installlanguage
  [\s!cs]
  [ % ...
   \c!rightquotation=\upperrightdoublesixquote,
   \c!date={\v!day,\fourperemspace,\v!month,\space,\v!year}
   \s!lefthyphenmin=2,
   % ...
]

Add a comma at the end of the line defining the date format; this appears
to fix the problem.

As far as I can tell, the definitions of Slovak (sk) and Turkmen (tk)
appear to be suffering from the same problem.

Cheers,
~~ Ondra Hošek
___
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] list of useful typescripts.

2013-10-13 Thread john Culleton
I am seeking to create (or download) a list of useful typescripts.
I define useful as those which call upon fonts/typefaces that are
actually distributed with texlive. Perhaps this list exists somewhere.
If so I would appreciate a pointer. 

A list of typescripts that is limited to those calling on fonts in
the context distribution would be useful if the list described above is
not available.

Ultimately I wish to winnow down the list to those fonts containing
serif typefaces suitable for use in the text of a novel. The font
should have at a minimum roman, italic, bold, bold-italic and small
caps typefaces. 

I can if necessary develop this list myself. But I have learned that is
better to ask than to reinvent the wheel. 

All replies appreciated. I will be using MKIV. 



-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
PDF e-book: "Create Book Covers with Scribus"
available at http://www.booklocker.com/books/4055.html
___
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] Possibly bug in ConTexT with TikZ

2013-10-13 Thread Keith J. Schultz
Using version 2013.10.10 it works for me as stated in my last post.

regards
Keith

Am 11.10.2013 um 09:55 schrieb Xan :

> With version 2013-09-07 (sh ./first-setup.sh --context=2013-09-07 
> --modules=all --engine=luatex) it works
> With version 2013.10.09 it does not
> 
> So there is a bug.
> 
> Can anyone fix it?
> 
> Thanks,
> 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] Bug: Reloading Font

2013-10-13 Thread luigi scarso
On Sun, Oct 13, 2013 at 10:15 AM, Khaled Hosny wrote:

> An external module is fine by me, I’m not concerned about LuaTeX itself
> since even the current loader is not integrated, I’m rather concerned
> about the ability to use the new loader and shaper with ConTeXt.
>

A minimal luatex wrapper for harfbuzz for Linux x86_64 is quite straight



Build configuration:

Unicode callbacks (you want at least one):
Glib:true
ICU:false
UCDN:false

Font callbacks (the more the better):
FreeType:true

Tools used for command-line utilities:
Cairo:true

Additional shapers (the more the better):
Graphite2:false

Platform shapers (not normally needed):
CoreText:false
Uniscribe:false

Other features:
Documentation:false
GObject bindings:false
Introspection:false


core.i
%module core
%{
#include "harfbuzz/hb-ot.h"
#include "harfbuzz/hb-ft.h"
#include "harfbuzz/hb-glib.h"
#include 
#include FT_FREETYPE_H
%}
%include "harfbuzz/hb-common.h"
%include "harfbuzz/hb-blob.h"
%include "harfbuzz/hb-buffer.h"
%include "harfbuzz/hb-deprecated.h"
%include "harfbuzz/hb-face.h"
%include "harfbuzz/hb-font.h"
%include "harfbuzz/hb-set.h"
%include "harfbuzz/hb-shape.h"
%include "harfbuzz/hb-shape-plan.h"
%include "harfbuzz/hb-unicode.h"
%include "harfbuzz/hb-version.h"
%include "harfbuzz/hb.h";
%include "harfbuzz/hb-ft.h";
%include "harfbuzz/hb-glib.h";
%include "harfbuzz/hb-ot.h";
%include "harfbuzz/hb-ot-layout.h";
%include "harfbuzz/hb-ot-tag.h";
%include "harfbuzz/hb-shape.h";

##
## build-gcc.sh
##
. ./vars.sh
swig  -cpperraswarn  -c++  -lua core.i

rm -vf core_wrap.o
g++   -O2 -fPIC -I./harfbuzz -I/usr/include/freetype2
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I$LUAINC52 -c core_wrap.cxx
-o core_wrap.o

rm -vf core.so
g++ -Wall -shared -O2 -Wl,-rpath,'$ORIGIN/.' $CFLAGS \
core_wrap.o  \
-llua5.2  $LIBS \
-o core.so


##
##t vars.sh
##
SWIGPATH=/home/luigisvn/projects/swiglib/swig-2.0.9/linux_x86_64
LUAINC52=/usr/include/lua5.2

CFLAGS="-I./harfbuzz -I/usr/include/freetype2 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g
-O2 -Wall -L./swiglib/harfbuzz"
LIBS="-lharfbuzz"
export PATH=$SWIGPATH/bin:$LLVMPATH/bin:${PATH}


--
-- test.lua
--
local f,error=package.loadlib("./swiglib/harfbuzz/core.so","luaopen_core");
if not(f) then print(error) return end;
local helpers=f(); for k,v in pairs(helpers) do print(k,v) end

$>luatex test.lua

An idea for freetype is
https://github.com/luigiScarso/ftlua

As Hams wrote
""
In principle one can plug in anything if it behaves nicely, but of course
one cannot expect existing mechanisms (we have additional features and
such) to be dropped in favor of something else without pretty good reason.
Btw, for me (that is personal) i think that it's not bad to have an
alternative shaper like we have in context if only because a standard (like
opentype) is no standard if there is only one (to be used) implementation.
""
It's also  important to have a shaper that behaves in the same way in
windows/linux/mac without depends on too many external libs
-- at the ctx meeting in brejlov 2010   there was a talk by a dutch company
about this.

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

Re: [NTG-context] Simplefonts

2013-10-13 Thread Wolfgang Schuster

Am 13.10.2013 um 11:56 schrieb Zhichu Chen :

> Thanks for the descriptions. I have made a small test and turns out the 
> "regularfont" has to be assigned to something or the other "xxxfont"s won't 
> have any effects.
> 
> Here's my code:
> =
> \definefallbackfamily [mainface] [serif] [adobesongstd]
>   [range={0x00400-0x2FA1F}%
>   ,regularfont=name:adobesongstdlight%
>   ,italicfont=name:adobefangsongstdregular%
>   ,boldfont=name:adobeheitistdregular%
>   ,bolditalicfont=name:adobekaitistdregular%
>   ,force=yes%
>   ,features=song%
>   ]
> =
> and if I remove the "regularfont=..." line, the boldface Chinese characters 
> will use the Adobe Song Std font as well. Same thing happened when I used the 
> "preset=xxx" option which I don't know if it is intended to behave like that, 
> by the way. 

I can fit this, it’s a side effect for font families with a single font, e.g. 
Adobe Song Std which has only the Light font but no files for regular, bold etc.

> Oh, and off the topic, can I use "effect" to assign the fonts? Like if I have 
> defined
> =
> \defineeffect[mybold][alternative=both,rulethickness=\dimexpr\bodyfontsize/10\relax]
> =
> I would like to use this effect to apply to my bold fonts, maybe:
> =
> \setupfontfamily [serif] [DejaVu Serif] [boldfont=effect:mybold]
> =
> I know this has nothing to do with this module. I just thought this might be 
> interesting.

That’s not possible but you can the slant and extend options from 
\definefontfeature.

http://wiki.contextgarden.net/Simplefonts#Faking_italics_and_bold_fonts

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] bug or needs warning documentation

2013-10-13 Thread Hans Hagen

On 10/12/2013 2:15 PM, d.henman wrote:



I found what I consider a bug in startcombination processing.


it's actually a side effect of a tex property:

\hbox

{x}

is the problem here. Makes me wonder if we should also ignore par tokens 
there (we already have an always \long variant in the engine anyway)


The same is true for alignments and display math.

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] Simplefonts

2013-10-13 Thread Zhichu Chen

On 10/13/2013 01:39 AM, Wolfgang Schuster wrote:


Am 12.10.2013 um 15:04 schrieb Zhichu Chen >:



Hi Wolfgang,

Good to know that, but I might have some questions.


On Fri, Oct 11, 2013 at 2:02 AM, Wolfgang Schuster 
mailto:wolfgang.schus...@gmail.com>> wrote:


Hi all,

\definefallbackfamily [mainface] [serif] [DejaVu Serif]
[range=cyrillic,force=yes]

What if I want to use the CJK font? The code in "font-sel.mkvi" hints 
I could use range=chinese but it didn't work. I have to use interval 
{0x00400-0x2FA1F} explicitly.


When you take a look into char-def.lua you can see names certain 
character ranges and “range=cyrillic”

used such a name.

For a chinese font you need 
“range={cjkunifiedideographs,cjkunifiedideographsextensiona,…}".
Because the list with names is very long you do this setup only once 
with the \definefontfamilypreset

command, e.g.

\definefontfamilypreset[chinese][range={cjkunifiedideographs,cjkunifiedideographsextensiona,…}]

and load this setup when you set the font with 
\definefontfamilyfallback, e.g.


  \definefontfamilyfallback[][

Re: [NTG-context] Bug: Reloading Font

2013-10-13 Thread Hans Hagen

On 10/13/2013 10:15 AM, Khaled Hosny wrote:

> On 10/12/2013 12:19 PM, Khaled Hosny wrote:
>
>> The problem is that OpenType is hard, you already know that. ConTeXt
>> will never be able to dedicate enough resources to catch up with
>> development, so it makes much sense to reuse the efforts of other free
>> software projects. HarfBuzz is used by much more software projects than
>> what XeTeX was using before (Android, Mozilla, Chrome, LibreOffice,
>> Pango, EFL, to name few), so it is here to stay. That being said, the
>
> I bet that previous libs and whatever also have that impression ..

> I don’t think so, ICU Layout Engine was only used by Java, OpenOffice
> and XeTeX (as far as free software is concerned), and even for XeTeX
> it was not adequate and had to be patched. This is different from
> HarfBuzz, which is a mature piece of code that have been developed
> and used over a long time and is seeing a wide adoption, my
> impression is that HarfBuzz is here to stay, just like FreeType; so
> many people are investing in it.

seen next remark


well, in the end I think that open type will fade away too into
something else as its design is sort of a compromise. The dev cycles
get smaller each year, the claims for 'being the final solution' get
more, who can predict ...


I doubt that OpenType is going anywhere, not matter how bad it is, the
industry has invested so much into it and switching to any completely
new solution will be prohibitively expensive.


I'm around long enough to know that this is a dream. What makes us think 
that solutions (and the political entities that harbour them) we cook up 
today are the best and stay forever? I'm pretty sure that many though 
that about paper books. Just look at what came up the last few hundred 
years ago and faded away. Look at empires. We can only hope that content 
can be transferred to new 'standards'.


It helps to watch the movie about the linotype machinery: a big 
invention at that time, claimed to have transformed the world due to 
more info carried around, but all hardware trashed within a few years. 
So, what will happen when quantum computing combined with some AI shows 
up? All our claimed perfect and persistent technologies will disappear 
within a moment. So ... 'anywhere' == "today + a few years".



switch in XeTeX did not affect user documents that much (apart from
fixing bugs and supporting more OpenType feature, but so does ConTeXt
all the time). However, I’m not proposing that LuaTeX be dependant on
HarfBuzz or FreeType, but have an optional font loader and shaper that
need not even be managed by LuaTeX team.


once we have a more or less standardized lib loader (the swiglib
project) one can use such libraries, i.e. there is no need to have
something more in the luatex core; after all, it all boils down to
passing info around; anything hard plugged into to core (even
options) will be hard to fight if one wants something else


An external module is fine by me, I’m not concerned about LuaTeX itself
since even the current loader is not integrated, I’m rather concerned
about the ability to use the new loader and shaper with ConTeXt.


In principle one can plug in anything if it behaves nicely, but of 
course one cannot expect existing mechanisms (we have additional 
features and such) to be dropped in favor of something else without 
pretty good reason.


Btw, for me (that is personal) i think that it's not bad to have an 
alternative shaper like we have in context if only because a standard 
(like opentype) is no standard if there is only one (to be used) 
implementation.


Also, keep in mind that one can have similar arguments for all 
components of luatex:


- use javascript instead of lua (if we'd started 15 years ago it would 
have via perl and python and ruby so if would mean yet another change)

- use ghostscript as backend
- use graphicmagic for loading graphics
- use some html renderer (which one to choose) for rendering math and 
tables


and eventually:

move on to english only so that we can also drop complex scripts and 
stick to ascii latin (thinking of it: scripts and such, including math, 
 are the main reason that tex has survived and that only happened 
because we could mess with fonts independent from already faded out 
other approaches and programs ... ok, in special ways, but still the 
messing around meant survival)



at that point i can look into for instance freetype and see if a
better loader can be made, who knows ... for me loading and shaping
are different things


Fonts change, font formats evolve, Knuth-style stability is not really
achievable, unless one freezes the source code and the fonts forever,
and you can do this with external libraries, too; TeX Live is
self-contained, just take a snapshot and freeze it forever, and it
should be buildable as long as there are C(++) compilers.


well, practice ... one also needs to freeze the operating system then

but I'm not claiming that long term stability; there

Re: [NTG-context] open quotation not working

2013-10-13 Thread Wolfgang Schuster

Am 13.10.2013 um 06:09 schrieb Ciro A. Soto :

> sorry, I just saw an old chain of messages about this question... I fixed it 
> with the translation module.
> \usemodule[translate]
> \translateinput[``][“]
> \enableinputtranslation

Better use real quotation marks “ and ” or \quotation{…}.

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] open quotation not working

2013-10-13 Thread Wolfgang Schuster

Am 13.10.2013 um 05:07 schrieb Ciro A. Soto :

> When I use `` to open a quotation,  I don't get the character for open 
> quotation, instead, I get the two single quotation character. (The closing 
> quotation works fine) 
> Is there any command to fix this? (the problem occurs in english or spanish)
> thank you

Read the answers for this thread: 
http://www.ntg.nl/pipermail/ntg-context/2013/074213.html

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] Bug: Reloading Font

2013-10-13 Thread Khaled Hosny
On Sun, Oct 13, 2013 at 12:39:32AM +0200, Hans Hagen wrote:
> On 10/12/2013 12:19 PM, Khaled Hosny wrote:
> 
> >The problem is that OpenType is hard, you already know that. ConTeXt
> >will never be able to dedicate enough resources to catch up with
> >development, so it makes much sense to reuse the efforts of other free
> >software projects. HarfBuzz is used by much more software projects than
> >what XeTeX was using before (Android, Mozilla, Chrome, LibreOffice,
> >Pango, EFL, to name few), so it is here to stay. That being said, the
> 
> I bet that previous libs and whatever also have that impression ..

I don’t think so, ICU Layout Engine was only used by Java, OpenOffice
and XeTeX (as far as free software is concerned), and even for XeTeX it
was not adequate and had to be patched. This is different from HarfBuzz,
which is a mature piece of code that have been developed and used over a
long time and is seeing a wide adoption, my impression is that HarfBuzz
is here to stay, just like FreeType; so many people are investing in it.

> well, in the end I think that open type will fade away too into
> something else as its design is sort of a compromise. The dev cycles
> get smaller each year, the claims for 'being the final solution' get
> more, who can predict ...

I doubt that OpenType is going anywhere, not matter how bad it is, the
industry has invested so much into it and switching to any completely
new solution will be prohibitively expensive.

> >switch in XeTeX did not affect user documents that much (apart from
> >fixing bugs and supporting more OpenType feature, but so does ConTeXt
> >all the time). However, I’m not proposing that LuaTeX be dependant on
> >HarfBuzz or FreeType, but have an optional font loader and shaper that
> >need not even be managed by LuaTeX team.
> 
> once we have a more or less standardized lib loader (the swiglib
> project) one can use such libraries, i.e. there is no need to have
> something more in the luatex core; after all, it all boils down to
> passing info around; anything hard plugged into to core (even
> options) will be hard to fight if one wants something else

An external module is fine by me, I’m not concerned about LuaTeX itself
since even the current loader is not integrated, I’m rather concerned
about the ability to use the new loader and shaper with ConTeXt.

> at that point i can look into for instance freetype and see if a
> better loader can be made, who knows ... for me loading and shaping
> are different things
> 
> >Fonts change, font formats evolve, Knuth-style stability is not really
> >achievable, unless one freezes the source code and the fonts forever,
> >and you can do this with external libraries, too; TeX Live is
> >self-contained, just take a snapshot and freeze it forever, and it
> >should be buildable as long as there are C(++) compilers.
> 
> well, practice ... one also needs to freeze the operating system then
> 
> but I'm not claiming that long term stability; there was a time that
> tex was a big system, but nowadays the tds tree is relatively small;
> unless something magic happens, i think that at some point the
> complexity of all these big things will explode (one can according
> to the evangelists get a ruby on rails app up and running in minutes
> ... but try to update one a few years later) ... with respect to
> tex: the source tree/build is not trivial (how many folks know all
> ins-and-outs?) and it makes me already feel quite dependent .. it's
> the instability of the whole eco system that bothers me
> 
> well, the formats don't evolve that much, at least not with respect
> to what we need in tex ... most features are rather generic, but tex
> user demands evolve and those will always influence matters; also,
> in the (context) machinery at some point i want to play with other
> approaches and then the only thing that matters is having data
> available (we already have some par optimizing code in place for
> instance)
> 
> (i'm more worried about inconsistencies and a mess in fonts than in
> the opentype standard ... many characters / scripts / languages have
> well properties, so in fact designers could do with predefined sets
> of features and rules ... sort of the reverse of making shapes and
> then the features: instead of for each font reinventing the wheel,
> choose a set of logic, make shapes etc ... positioning is probably
> most of the issue then; but that's another disucssion)
> 
> >There are already few parts of OpenType that I’m not able to use in my
> >fonts for years because they break the fonts with LuaTeX horribly. I
> >understand the priorities of the team, that is why I think that
> >offloading font support is beneficial to everyone.
> 
> break in what sense? what features (just curious) ... anyway,

The mark filtering sets we discussed few years ago, for instance; I had
to redo the whole font in a much more complex way with few more
thousands of glyphs to avoid using them so the font remains usable with
Con

[NTG-context] Calling \followtokens from with in metapost

2013-10-13 Thread Magnus J
Hello list,

How can I call the \followtokens macro (or a similar solution) from within
metapost?  Specifically, I want to integrate text between the semi-circle
arcs in a rainbow-like structure (with the text placed inbetween the arcs,
that should alsó be drawn). The text should not be stretched but center on
the top, flowing evenly distributed on each side. This link will give you
an idea:

http://www.heilsuefling.is/heilsuefling/upload/images/whp_in_general/determinants_of_health/determinants_of_health.jpg

How can this achieved?

Regards,

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