[NTG-context] heading and a few lines at the end of a page

2012-06-07 Thread Jan Pohanka

Hello,

sometimes I get a heading and a single line (or two lines) at the end of  
the page and it does not look good? Is there any way (TeX or ConTeXt) to  
force pagebreak before heading in this case? Ideally I'd like to be able  
to specify the count of lines when this should occur.


best regards
Jan

--
Tato zpráva byla vytvořena převratnou poštovní aplikací Opery:  
http://www.opera.com/mail/

___
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] Error with EBGaramond-Regular

2012-06-07 Thread luigi scarso
Hi, from fontforge users list

On Thu, Jun 7, 2012 at 12:57 AM, Georg Duffner g.duff...@gmail.com wrote:
 Dear fellow fontforgers,

 in the last few days I’ve been experimenting with decomposition via
 Opentype. I’ve come to some results, but I’m not sure if I’ve done
 everything right because no engine does everything I want them to. So
 I’d please like to know, if I’ve committed some crime against Adobe’s
 laws, if anybody minds to enlighten me.

 Here’s the case, centered around some greek because it’ll probably be
 the most complicated use cases I’ll happen to have (at least I hope so):
 By means of a stylistic set (ss20) I decompose precomposed glyphs as by
 Unicode Normalization Tables like this:
 sub uni1F8F by Alpha uni0345.cap uni0314.grkstack uni0342 ;
 sub uni1F84 by alpha uni0345 uni0313.grk acutecomb.grkstack ;
 sub uni1F4A by Omicron uni0313.grk gravecomb.grkstack ;
 etc.

 Now greek uppercase characters like to have accents appended left to
 them. So, they take more space there, which I solve with a contextual
 kerning rule like this:
 pos Omicron' 157 0 157 0 @grk_tlAcc2;
 where @grk_tlAcc2 contains uni0313.grk, so it will be expanded by 157
 and repositioned by 157 to make place for the accents.

 The third set of rules aims at providing adscript i as alternate letter
 to iota subscriptum via Character variant:
 sub uni0345.cap from [ uni0345.cap1 uni0345.cap2 ];

 This one, of course again needs more space, which I give them like this
 in the contextual kerning:
 pos Alpha' 0 0 200 0 uni0345.cap1;
 pos Alpha' 0 0 340 0 uni0345.cap2;
 pos Omega' 121 0 436 0 uni0345.cap2 @grk_tlAcc2;
 pos Omega' 121 0 461 0 uni0345.sc1 @grk_tlAcc2;
 so there is more space to the right, where the iota adscriptumg fits in.

 I’m asking, because I get four different results from four engines,
 namely XeLaTeX, LuaLaTeX, Firefox 12.0 (on Ubuntu Linux) and Fontforge
 itself (metrics window), where only Fontforge looks right. Now I’d like
 to know if my code is ok before I file bugs to the different groups.

 The testing files are:
 Web:
 http://georgduffner.at/ebgaramond/greektests.html
 PDF:
 http://georgduffner.at/ebgaramond/tests/lltx_greektests.pdf
 http://georgduffner.at/ebgaramond/tests/xltx_greektests.pdf
 Fonts:
 http://georgduffner.at/ebgaramond/EBGaramond-Regular.otf
 http://georgduffner.at/ebgaramond/EBGaramond-Regular.ttf
 Source:
 https://github.com/georgd/EB-Garamond

 Best regards,
 Georg

With the otf version

\usemodule[simplefonts]
\setmainfont[ebgaramond]
\starttext foo \stoptext

I have


fontsotf loading  loading:
/opt/luatex/standalone-bassenge/tex/texmf-project/fonts/EBGaramond-Regular.otf
(hash: ebgaramond-regular)
fontsotf loading  font loaded okay
fontsotf loading  file size: 349756
fontsencoding  loading (extended) adobe glyph list
! LuaTeX error ...enge/tex/texmf-context/tex/context/base/font-otf.lua:1143:
attempt to get length of local 'ti' (a number value)
stack traceback:
...enge/tex/texmf-context/tex/context/base/font-otf.lua:1143: in
function 's_hashed'
...enge/tex/texmf-context/tex/context/base/font-otf.lua:1310: in
function 'enhancer'
...enge/tex/texmf-context/tex/context/base/font-otf.lua:260: in
function 'enhance'
...enge/tex/texmf-context/tex/context/base/font-otf.lua:282: in
function 'apply'
...enge/tex/texmf-context/tex/context/base/font-otf.lua:457: in 
function 'load'
...enge/tex/texmf-context/tex/context/base/font-otf.lua:1938: in
function 'otftotfm'
...enge/tex/texmf-context/tex/context/base/font-otf.lua:1965: in
function ...enge/tex/texmf-context/tex/context/base/font-otf.lua:1964
(tail call): ?
(tail call): ?
(tail call): ?
...enge/tex/texmf-context/tex/context/base/font-def.lua:286: in
function 'loadfont'
...enge/tex/texmf-context/tex/context/base/font-ctx.lua:426: in
function 'loadfont'
...enge/tex/texmf-context/tex/context/base/font-def.lua:400: in 
function 'read'
...enge/tex/texmf-context/tex/context/base/font-ctx.lua:909: in
function 'definefont_two'
main ctx instance:1: in main chunk.

system   tex  error on line 11 in file test.mkiv: LuaTeX error  ...


I'm not  able to install the ttf version
but

\definefont[ebgaramond][EBGaramond-Regular.ttf at 12pt]
\starttext
\ebgaramond
foo
\stoptext

gives


fontsotf loading  loading: EBGaramond-Regular.ttf (hash:
ebgaramond-regular)
fontsotf loading  font loaded okay
fontsotf loading  file size: 631736
fontsencoding  loading (extended) adobe glyph list
! LuaTeX error ...enge/tex/texmf-context/tex/context/base/font-otf.lua:1143:
attempt to get length of local 'ti' (a number value)
stack traceback:
...enge/tex/texmf-context/tex/context/base/font-otf.lua:1143: in
function 's_hashed'
...enge/tex/texmf-context/tex/context/base/font-otf.lua:1310: in

Re: [NTG-context] heading and a few lines at the end of a page

2012-06-07 Thread luigi scarso
On Thu, Jun 7, 2012 at 10:02 AM, Jan Pohanka xhpoha...@gmail.com wrote:
 Hello,

 sometimes I get a heading and a single line (or two lines) at the end of the
 page and it does not look good? Is there any way (TeX or ConTeXt) to force
 pagebreak before heading in this case? Ideally I'd like to be able to
 specify the count of lines when this should occur.

 best regards
 Jan
\testpage[n]
(see http://wiki.contextgarden.net/Layout)

-- 
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] expansion and \processaction

2012-06-07 Thread Philipp Gesang
Hi all,

my goal is a macro \definestates[foo][...,...] which takes a comma
list and creates a monadic macro \foo[n]. \foo[n] should return
either the nth item or, if (n  list length), a default. I
thought the right tools were \processcommalist to generate the
mapping n-list item, as well as \processaction to retrieve the
items. But naively I didn’t consider expansion ...

My code so far:

··8
\unprotect

\def\definestates{\dodoubleempty\do_define_states}

\def\do_define_states[#1][#2]{%
  \expandafter\edef\csname#1_states\endcsname{%
\nstates0
%% this is supposed to be expanded so we employ the \raw... variety
\rawprocesscommalist[#2]\add_one_state%
unknown=\dummystate,%
default=\dummystate,%
  }%
  \do_do_define_states{#1}%
}

\let\dummystate\empty

\newcount\nstates
\unexpanded\def\add_one_state#1{%
  \advance\nstates\plusone
  \the\nstates=#1,%
}

\def\do_do_define_states#1{%
  \expandafter\def\csname#1\endcsname
{\expandafter\dosingleempty\csname do_#1\endcsname}%
  \expandafter\def\csname do_#1\endcsname[##1]{%
\iffirstargument
  % [DBG] cmd:#1, state:##1\par
  \edef\currentstates{\csname#1_states\endcsname}%
  %% At this point \currentstates should yield the whole mapping so
  %% we can use it with \processaction. But ...
  % \show\currentstates
  % \currentstates\par
  %% ... here it still contains
  %%\nstates 0 \rawprocesscommalist [foo,bar,baz] ...
  %% and the next directive has an empty result:
  \rawprocessaction[##1][\currentstates]%
\fi
  }%
}

\protect
\starttext

\definestates[mystates][foo,bar,baz]
%% At this point I’d like \mystates_states to contain (literally)
%%   “1=foo,2=bar,3=baz,unknown=,default=,”
%% so the following command
\mystates[1]  % - foo
%% would be equivalent to
%%\processaction[1][1=foo,2=bar,3=baz,unknown=,default=,]
\mystates[2]  % - bar
\mystates[42] % - dummy

\stoptext
··8

My question: How can I use \[raw]processcommalist in an expanded
definition? How can I get \[raw]processcommalist to operate on
the expansion of its second argument? Does this even make sense?
If not, what is the proper way?

I’d be grateful for any advice
Philipp


PS: Yeah, I could use Lua for it but that’s not the question.



pgp5Wf43R83vs.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] expansion and \processaction

2012-06-07 Thread Wolfgang Schuster

Am 07.06.2012 um 14:05 schrieb Philipp Gesang:

 Hi all,
 
 my goal is a macro \definestates[foo][...,...] which takes a comma
 list and creates a monadic macro \foo[n]. \foo[n] should return
 either the nth item or, if (n  list length), a default. I
 thought the right tools were \processcommalist to generate the
 mapping n-list item, as well as \processaction to retrieve the
 items. But naively I didn’t consider expansion ...
 
 My code so far:
 
 ··8
 \unprotect
 
 \def\definestates{\dodoubleempty\do_define_states}
 
 \def\do_define_states[#1][#2]{%
  \expandafter\edef\csname#1_states\endcsname{%
\nstates0
%% this is supposed to be expanded so we employ the \raw... variety
\rawprocesscommalist[#2]\add_one_state%
unknown=\dummystate,%
default=\dummystate,%
  }%
  \do_do_define_states{#1}%
 }
 
 \let\dummystate\empty
 
 \newcount\nstates
 \unexpanded\def\add_one_state#1{%
  \advance\nstates\plusone
  \the\nstates=#1,%
 }
 
 \def\do_do_define_states#1{%
  \expandafter\def\csname#1\endcsname
{\expandafter\dosingleempty\csname do_#1\endcsname}%
  \expandafter\def\csname do_#1\endcsname[##1]{%
\iffirstargument
  % [DBG] cmd:#1, state:##1\par
  \edef\currentstates{\csname#1_states\endcsname}%
  %% At this point \currentstates should yield the whole mapping so
  %% we can use it with \processaction. But ...
  % \show\currentstates
  % \currentstates\par
  %% ... here it still contains
  %%\nstates 0 \rawprocesscommalist [foo,bar,baz] ...
  %% and the next directive has an empty result:
  \rawprocessaction[##1][\currentstates]%
\fi
  }%
 }
 
 \protect
 \starttext
 
 \definestates[mystates][foo,bar,baz]
 %% At this point I’d like \mystates_states to contain (literally)
 %%   “1=foo,2=bar,3=baz,unknown=,default=,”
 %% so the following command
 \mystates[1]  % - foo
 %% would be equivalent to
 %%\processaction[1][1=foo,2=bar,3=baz,unknown=,default=,]
 \mystates[2]  % - bar
 \mystates[42] % - dummy
 
 \stoptext
 ··8
 
 My question: How can I use \[raw]processcommalist in an expanded
 definition? How can I get \[raw]processcommalist to operate on
 the expansion of its second argument? Does this even make sense?
 If not, what is the proper way?

\unprotect

\unexpanded\def\definestates
  {\dodoubleargument\definestates_indeed}

\def\definestates_indeed[#1][#2]%
  {\setuevalue{#1}{\states_entry[#2]}}

\unexpanded\def\states_entry
  {\dodoubleargument\states_entry_indeed}

\def\states_entry_indeed[#1][#2]%
  {\getcommalistsize[#1]%
   \ifnum#2\commalistsize
 {\tttf NO ENTRY!}%
   \else
 \getfromcommalist[#1][#2]\commalistelement
   \fi}

\protect

\starttext

\definestates[mystates][foo,bar,baz]

\starttabulate
\NC  2 \EQ \mystates [2] \NC\NR
\NC 42 \EQ \mystates[42] \NC\NR
\stoptabulate

\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] back-up.lua; mtx-epub.lua

2012-06-07 Thread Henning Hraban Ramm

Am 2012-06-07 um 00:00 schrieb Andy Thomas:


Hello all,
I do not know, how many people are using the epub export, but here  
are two more changes in order to achieve a valid epub file with  
information from the context source:


Since I need ePub for my current project (even if th eprint version is  
much more important), I’m very grateful for your enhancements! I hope  
they end up in the distro ASAP.



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
___


Re: [NTG-context] multi-page floats

2012-06-07 Thread Henning Hraban Ramm

Am 2012-06-06 um 11:52 schrieb luigi scarso:


And maybe this is what you want

errata/corrige


Thank you for your effort, I’ll test it this weekend, but I resolved  
to Wolfgang’s solution using \offset instead of backgrounds, since  
that’s much easier and enough for my needs.



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] new layer for letter

2012-06-07 Thread Peter Münster
Hello,

How can I create a new layer with the letter module?

I've tried this, but it does not work:

--8---cut here---start-8---
\usemodule[letter]
\defineletterlayer[test]
\defineletterelement[layer][test][default]{NEW LAYER}
\setupletterlayer[test][alternative=default, x=3cm, y=3cm, state=start]
\startletter
Where is the \quote{NEW LAYER}?
\stopletter
--8---cut here---end---8---

TIA for any hints!

-- 
   Peter
___
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] new layer for letter

2012-06-07 Thread Wolfgang Schuster

Am 07.06.2012 um 14:58 schrieb Peter Münster:

 Hello,
 
 How can I create a new layer with the letter module?
 
 I've tried this, but it does not work:
 
 --8---cut here---start-8---
 \usemodule[letter]
 \defineletterlayer[test]
 \defineletterelement[layer][test][default]{NEW LAYER}
 \setupletterlayer[test][alternative=default, x=3cm, y=3cm, state=start]
 \startletter
 Where is the \quote{NEW LAYER}?
 \stopletter
 --8---cut here---end---8---

Add this to your document

\setupletterelements
  [layer]
  [lettermain,
   letternext,
   head,
   nexthead,
   lefthead,
   righthead,
   foot,
   nextfoot,
   topmark,
   botmark,
   cutmark,
   endmark,
   usermark,
   backaddress,
   address,
   reference,
   location]

and add your layer “test” to the list.

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] letter: errors with foot=gbrief

2012-06-07 Thread Peter Münster
Hello,

This file generates some errors:

--8---cut here---start-8---
\usemodule[letter]
\setupletterlayer[foot][alternative=gbrief]
\startletter[phone=123]
test
\stopletter
--8---cut here---end---8---

Workaround:

--8---cut here---start-8---
\setuplettertext[en][address=Address]
\setinterfaceconstant {street}{street}
\setinterfaceconstant {city}  {city}
\setinterfaceconstant {phone} {phone}
\setinterfaceconstant {email} {email}
\setinterfaceconstant {bankname}  {bankname}
\setinterfaceconstant {banknumber}{banknumber}
\setinterfaceconstant {accountnumber} {accountnumber}
--8---cut here---end---8---

-- 
   Peter
___
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] back-up.lua; mtx-epub.lua

2012-06-07 Thread Hans Hagen

On 7-6-2012 14:48, Henning Hraban Ramm wrote:

Am 2012-06-07 um 00:00 schrieb Andy Thomas:


Hello all,
I do not know, how many people are using the epub export, but here are
two more changes in order to achieve a valid epub file with
information from the context source:


Since I need ePub for my current project (even if th eprint version is
much more important), I’m very grateful for your enhancements! I hope
they end up in the distro ASAP.


I wonder if Luigi already tested the patches (as he's sort of in charge 
of the epub device/viewer testing) ..


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] back-up.lua; mtx-epub.lua

2012-06-07 Thread luigi scarso
On Thu, Jun 7, 2012 at 3:53 PM, Hans Hagen pra...@wxs.nl wrote:
 On 7-6-2012 14:48, Henning Hraban Ramm wrote:

 Am 2012-06-07 um 00:00 schrieb Andy Thomas:

 Hello all,
 I do not know, how many people are using the epub export, but here are
 two more changes in order to achieve a valid epub file with
 information from the context source:


 Since I need ePub for my current project (even if th eprint version is
 much more important), I’m very grateful for your enhancements! I hope
 they end up in the distro ASAP.


 I wonder if Luigi already tested the patches (as he's sort of in charge of
 the epub device/viewer testing) ..
no, still in my todo queue -- busy in other stuffs

-- 
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] expansion and \processaction

2012-06-07 Thread Philipp Gesang
Hi Wolfgang!

···date: 2012-06-07, Thursday···from: Wolfgang Schuster···

 
 Am 07.06.2012 um 14:05 schrieb Philipp Gesang:
 
  Hi all,
  
  my goal is a macro \definestates[foo][...,...] which takes a comma
  list and creates a monadic macro \foo[n]. \foo[n] should return
  either the nth item or, if (n  list length), a default. I
  thought the right tools were \processcommalist to generate the
  mapping n-list item, as well as \processaction to retrieve the
  items. But naively I didn’t consider expansion ...
  
  My code so far:
  
  ··8
  \unprotect
  
  \def\definestates{\dodoubleempty\do_define_states}
  
  \def\do_define_states[#1][#2]{%
   \expandafter\edef\csname#1_states\endcsname{%
 \nstates0
 %% this is supposed to be expanded so we employ the \raw... variety
 \rawprocesscommalist[#2]\add_one_state%
 unknown=\dummystate,%
 default=\dummystate,%
   }%
   \do_do_define_states{#1}%
  }
  
  \let\dummystate\empty
  
  \newcount\nstates
  \unexpanded\def\add_one_state#1{%
   \advance\nstates\plusone
   \the\nstates=#1,%
  }
  
  \def\do_do_define_states#1{%
   \expandafter\def\csname#1\endcsname
 {\expandafter\dosingleempty\csname do_#1\endcsname}%
   \expandafter\def\csname do_#1\endcsname[##1]{%
 \iffirstargument
   % [DBG] cmd:#1, state:##1\par
   \edef\currentstates{\csname#1_states\endcsname}%
   %% At this point \currentstates should yield the whole mapping so
   %% we can use it with \processaction. But ...
   % \show\currentstates
   % \currentstates\par
   %% ... here it still contains
   %%\nstates 0 \rawprocesscommalist [foo,bar,baz] ...
   %% and the next directive has an empty result:
   \rawprocessaction[##1][\currentstates]%
 \fi
   }%
  }
  
  \protect
  \starttext
  
  \definestates[mystates][foo,bar,baz]
  %% At this point I’d like \mystates_states to contain (literally)
  %%   “1=foo,2=bar,3=baz,unknown=,default=,”
  %% so the following command
  \mystates[1]  % - foo
  %% would be equivalent to
  %%\processaction[1][1=foo,2=bar,3=baz,unknown=,default=,]
  \mystates[2]  % - bar
  \mystates[42] % - dummy
  
  \stoptext
  ··8
  
  My question: How can I use \[raw]processcommalist in an expanded
  definition? How can I get \[raw]processcommalist to operate on
  the expansion of its second argument? Does this even make sense?
  If not, what is the proper way?
 
 \unprotect
 
 \unexpanded\def\definestates
   {\dodoubleargument\definestates_indeed}
 
 \def\definestates_indeed[#1][#2]%
   {\setuevalue{#1}{\states_entry[#2]}}
 
 \unexpanded\def\states_entry
   {\dodoubleargument\states_entry_indeed}
 
 \def\states_entry_indeed[#1][#2]%
   {\getcommalistsize[#1]%
\ifnum#2\commalistsize
  {\tttf NO ENTRY!}%
\else
  \getfromcommalist[#1][#2]\commalistelement
\fi}

Thanks very much. This solves my problem. Very convenient that I
can rewrite it to use commacommand.

Philipp

 
 \protect
 
 \starttext
 
 \definestates[mystates][foo,bar,baz]
 
 \starttabulate
 \NC  2 \EQ \mystates [2] \NC\NR
 \NC 42 \EQ \mystates[42] \NC\NR
 \stoptabulate
 
 \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
 ___

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgpv4vLMzYz07.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] expansion and \processaction

2012-06-07 Thread Wolfgang Schuster

Am 07.06.2012 um 17:34 schrieb Philipp Gesang:

 Hi Wolfgang!
 
 ···date: 2012-06-07, Thursday···from: Wolfgang Schuster···
 
 
 Am 07.06.2012 um 14:05 schrieb Philipp Gesang:
 
 Hi all,
 
 my goal is a macro \definestates[foo][...,...] which takes a comma
 list and creates a monadic macro \foo[n]. \foo[n] should return
 either the nth item or, if (n  list length), a default. I
 thought the right tools were \processcommalist to generate the
 mapping n-list item, as well as \processaction to retrieve the
 items. But naively I didn’t consider expansion ...
 
 My code so far:
 
 ··8
 \unprotect
 
 \def\definestates{\dodoubleempty\do_define_states}
 
 \def\do_define_states[#1][#2]{%
 \expandafter\edef\csname#1_states\endcsname{%
   \nstates0
   %% this is supposed to be expanded so we employ the \raw... variety
   \rawprocesscommalist[#2]\add_one_state%
   unknown=\dummystate,%
   default=\dummystate,%
 }%
 \do_do_define_states{#1}%
 }
 
 \let\dummystate\empty
 
 \newcount\nstates
 \unexpanded\def\add_one_state#1{%
 \advance\nstates\plusone
 \the\nstates=#1,%
 }
 
 \def\do_do_define_states#1{%
 \expandafter\def\csname#1\endcsname
   {\expandafter\dosingleempty\csname do_#1\endcsname}%
 \expandafter\def\csname do_#1\endcsname[##1]{%
   \iffirstargument
 % [DBG] cmd:#1, state:##1\par
 \edef\currentstates{\csname#1_states\endcsname}%
 %% At this point \currentstates should yield the whole mapping so
 %% we can use it with \processaction. But ...
 % \show\currentstates
 % \currentstates\par
 %% ... here it still contains
 %%\nstates 0 \rawprocesscommalist [foo,bar,baz] ...
 %% and the next directive has an empty result:
 \rawprocessaction[##1][\currentstates]%
   \fi
 }%
 }
 
 \protect
 \starttext
 
 \definestates[mystates][foo,bar,baz]
 %% At this point I’d like \mystates_states to contain (literally)
 %%   “1=foo,2=bar,3=baz,unknown=,default=,”
 %% so the following command
 \mystates[1]  % - foo
 %% would be equivalent to
 %%\processaction[1][1=foo,2=bar,3=baz,unknown=,default=,]
 \mystates[2]  % - bar
 \mystates[42] % - dummy
 
 \stoptext
 ··8
 
 My question: How can I use \[raw]processcommalist in an expanded
 definition? How can I get \[raw]processcommalist to operate on
 the expansion of its second argument? Does this even make sense?
 If not, what is the proper way?
 
 \unprotect
 
 \unexpanded\def\definestates
  {\dodoubleargument\definestates_indeed}
 
 \def\definestates_indeed[#1][#2]%
  {\setuevalue{#1}{\states_entry[#2]}}
 
 \unexpanded\def\states_entry
  {\dodoubleargument\states_entry_indeed}
 
 \def\states_entry_indeed[#1][#2]%
  {\getcommalistsize[#1]%
   \ifnum#2\commalistsize
 {\tttf NO ENTRY!}%
   \else
 \getfromcommalist[#1][#2]\commalistelement
   \fi}
 
 Thanks very much. This solves my problem. Very convenient that I
 can rewrite it to use comma command.

You can also try to use a Lua variant.

\def\states_entry_indeed[#1][#2]%
 {\startlua
  local entries = utilities.parsers.settings_to_array(#1)
  local entry   = entries[#2]
  if entry then
context(entry)
  else
context(\\tttf NO ENTRY!)
  end
  \stoplua}

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] Error with EBGaramond-Regular

2012-06-07 Thread Hans Hagen

On 7-6-2012 10:03, luigi scarso wrote:

Hi, from fontforge users list

On Thu, Jun 7, 2012 at 12:57 AM, Georg Duffnerg.duff...@gmail.com  wrote:

Dear fellow fontforgers,

in the last few days I’ve been experimenting with decomposition via
Opentype. I’ve come to some results, but I’m not sure if I’ve done
everything right because no engine does everything I want them to. So
I’d please like to know, if I’ve committed some crime against Adobe’s
laws, if anybody minds to enlighten me.

Here’s the case, centered around some greek because it’ll probably be
the most complicated use cases I’ll happen to have (at least I hope so):
By means of a stylistic set (ss20) I decompose precomposed glyphs as by
Unicode Normalization Tables like this:
 sub uni1F8F by Alpha uni0345.cap uni0314.grkstack uni0342 ;
 sub uni1F84 by alpha uni0345 uni0313.grk acutecomb.grkstack ;
 sub uni1F4A by Omicron uni0313.grk gravecomb.grkstack ;
etc.

Now greek uppercase characters like to have accents appended left to
them. So, they take more space there, which I solve with a contextual
kerning rule like this:
 pos Omicron'157 0 157 0  @grk_tlAcc2;
where @grk_tlAcc2 contains uni0313.grk, so it will be expanded by 157
and repositioned by 157 to make place for the accents.

The third set of rules aims at providing adscript i as alternate letter
to iota subscriptum via Character variant:
 sub uni0345.cap from [ uni0345.cap1 uni0345.cap2 ];

This one, of course again needs more space, which I give them like this
in the contextual kerning:
 pos Alpha'0 0 200 0  uni0345.cap1;
 pos Alpha'0 0 340 0  uni0345.cap2;
 pos Omega'121 0 436 0  uni0345.cap2 @grk_tlAcc2;
 pos Omega'121 0 461 0  uni0345.sc1 @grk_tlAcc2;
so there is more space to the right, where the iota adscriptumg fits in.

I’m asking, because I get four different results from four engines,
namely XeLaTeX, LuaLaTeX, Firefox 12.0 (on Ubuntu Linux) and Fontforge
itself (metrics window), where only Fontforge looks right. Now I’d like
to know if my code is ok before I file bugs to the different groups.

The testing files are:
Web:
http://georgduffner.at/ebgaramond/greektests.html
PDF:
http://georgduffner.at/ebgaramond/tests/lltx_greektests.pdf
http://georgduffner.at/ebgaramond/tests/xltx_greektests.pdf
Fonts:
http://georgduffner.at/ebgaramond/EBGaramond-Regular.otf
http://georgduffner.at/ebgaramond/EBGaramond-Regular.ttf
Source:
https://github.com/georgd/EB-Garamond

Best regards,
Georg


With the otf version

\usemodule[simplefonts]
\setmainfont[ebgaramond]
\starttext foo \stoptext

I have


I'm not  able to install the ttf version
but

\definefont[ebgaramond][EBGaramond-Regular.ttf at 12pt]
\starttext
\ebgaramond
foo
\stoptext

gives


fonts  otf loading  loading: EBGaramond-Regular.ttf (hash:



system  tex  error on line 3 in file test.mkiv: LuaTeX error  ...


can you test with


local function s_uncover(splitter,cache,cover)
if cover ==  then
return nil
else
local uncovered = cache[cover]
if not uncovered then
uncovered = lpegmatch(splitter,cover)
cache[cover] = uncovered
end
return { uncovered }
end
end

btw, what are features like cv80 and cv81 supposed to represent?

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] expansion and \processaction

2012-06-07 Thread Hans Hagen

On 7-6-2012 18:02, Wolfgang Schuster wrote:


You can also try to use a Lua variant.

\def\states_entry_indeed[#1][#2]%
  {\startlua
   local entries = utilities.parsers.settings_to_array(#1)
   local entry   = entries[#2]
   if entry then
 context(entry)
   else
 context(\\tttf NO ENTRY!)


shouldn't that be grouped?


   end
   \stoplua}


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] Tabulate and \EQ

2012-06-07 Thread Wolfgang Schuster
Hi,

in MkIV there is no space in front of the \EQ symbol in the second row while in 
MkII there is a space.

\starttext

\starttabulate
\NC A\EQ B \NC\NR
\NC Left \EQ Right \NC\NR
\stoptabulate

\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] back-up.lua; mtx-epub.lua

2012-06-07 Thread Hans Hagen

On 7-6-2012 00:00, Andy Thomas wrote:

Hello all,

I do not know, how many people are using the epub export, but here are two more 
changes in order to achieve a valid epub file with information from the context 
source:

On Jun 5, 2012, at 9:09 PM, Andy Thomas wrote:


Hi all,

in my attempts to validate epub export from my context source, I made the 
following changes to back-up.lua and mtx-epub.lua

1) the actual context language is put in the epub
2) changed the OPS directory to OEBPS. The 2.0.1 Standard does not actually say 
that is has to have that name, but I only found examples using that one, 
including the sample documents in the 2.0.1 white paper.
3) changed opf:scheme to UUID, since that is used and not a ISBN number
4) added the encoding info in the opf file
5) changed the single in double-quotes in the opf file manifest. I do not know 
if it is necessary, but this seams to be more consistent

6) the title is taken from \setupinteraction
7) the author is taken from \setupinteraction

Andy


The diff against the actual standalone is


Best send me a patched mtx-epub so that I can do a visible diff (handier 
than decyphering the mail).


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] expansion and \processaction

2012-06-07 Thread Wolfgang Schuster

Am 07.06.2012 um 18:16 schrieb Hans Hagen:

 On 7-6-2012 18:02, Wolfgang Schuster wrote:
 
 You can also try to use a Lua variant.
 
 \def\states_entry_indeed[#1][#2]%
  {\startlua
   local entries = utilities.parsers.settings_to_array(#1)
   local entry   = entries[#2]
   if entry then
 context(entry)
   else
 context(\\tttf NO ENTRY!)
 
 shouldn't that be grouped?

Yes, of course.

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] \externalfigure and factor=max

2012-06-07 Thread Rogers, Michael K
On Jun 6, 2012, at 2:45 PM, Marco wrote:
 Hi,

 according to the wiki the \externalfigure key “factor” has the
 options:

 max: aspect ratio is kept, the image is scaled to
 the bigger (oversized) variant

 fit: aspect ratio is kept, the image is scaled to
 the smaller (fitted) variant

 In the following example I expect the third image to have a width of
 4cm and a height of 4cm. However, both values are 3cm. The aspect
 ratio is kept, but “max” and “fit” behave the same.

 \startbuffer [img]
  \useMPlibrary [dum]
  \startTEXpage
\externalfigure [dummy] [width=5cm,height=5cm]
  \stopTEXpage
 \stopbuffer
 \ctxcommand{runbuffer(img, img, true)}

 \starttext

 \externalfigure [\jobname-img]
  [width=3cm, height=4cm]

 \blank
 \externalfigure [\jobname-img]
  [factor=fit, width=3cm, height=4cm]

 \blank
 \externalfigure [\jobname-img]
  [factor=max, width=3cm, height=4cm]

 \stoptext

 Is this a bug or am I misunderstanding the wiki? Anyhow, is there a
 clean solution to keep the aspect ratio and scale the image to
 whichever value is larger?


 Marco


I played with your example a little and rooted around in grph-trf.mkiv.  It 
seems max selects how to scale based on which dimension in the original 
figure is greater.  Oddly, the dimensions of the MP figure are 142.26682pt by 
142.2377pt.  So I suspect that max is selecting the width as the dimension to 
scale to the specified width=3cm in your case.  (Change the height of the MP 
figure to 5.01cm and you'll see a change.)  Whether that's a bug or intended is 
a question for others.  If not, then max is for this problem:

Q. How to scale an image so that the largest dimension is 4cm?
A.  \externalfigure [\jobname-img] [factor=max, width=4cm, height=4cm]

If this is correct, I'd be glad to try to clarify the wiki. (I've not done much 
wiki-ing.)

I suppose you could fix your problem with something like

\ifdim\desiredwidth\desiredheight
\externalfigure [\jobname-img][width=\desiredwidth]
\else
\externalfigure [\jobname-img][height=\desiredheight]
\fi





This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Error with EBGaramond-Regular

2012-06-07 Thread luigi scarso
On Thu, Jun 7, 2012 at 6:14 PM, Hans Hagen pra...@wxs.nl wrote:
 can you test with


 local function s_uncover(splitter,cache,cover)
    if cover ==  then
        return nil
    else
        local uncovered = cache[cover]
        if not uncovered then
            uncovered = lpegmatch(splitter,cover)
            cache[cover] = uncovered
        end
        return { uncovered }
    end
 end
It's ok.


 btw, what are features like cv80 and cv81 supposed to represent?
I've asked to the author (and invite him to join this ml)
I'm doing  other tests for the greek glyphs .
-- 
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] Confused again :-)

2012-06-07 Thread Bill Meahan
I'm getting a handle on page layout and headings but there are some 
things I haven't figured out.


  1) How does one specify they want the outer margin to be a 
different size than the inner margin? Outer, of course, is the right 
margin on a right-hand (odd) page and the left margin on a left-hand 
(even) page.


  2) How does one put a frame around a margin? Layers? Overlay? 
\framedtext?


  3) Am I correct I can use the COMMAND parameters in \setuplayout to 
specify there is some text to use as a marginal in the (chapter | 
section) header (using \margintext, I presume)?


I am working on a couple of novels I want to typeset using ConTeXt since 
I think it will allow me to produce what I want for typographic style 
much easier than using LaTeX.  I'm pretty adept at using LaTeX but brand 
new to ConTeXt. One of _my_ problems is so many examples on the wiki 
seem oriented towards people setting math which could not be farther 
from my intended usages. (Not that I'm unfamiliar with math, I have a 
degree in Physics and would have had a double degree in math except for 
a choice to take a different course (helpful in physics) instead of one 
mandatory for the math degree).


Thanks!

--
Bill Meahan K8QN

The pessimist complains about the wind;
 the optimist expects it to change;
 the realist adjusts the sails.

-- William Arthur Ward

This message is digitally signed with an X.509 certificate
to prove it is from me and has not been altered since it was sent.




smime.p7s
Description: S/MIME Cryptographic 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] Confused again :-)

2012-06-07 Thread Wolfgang Schuster

Am 07.06.2012 um 21:15 schrieb Bill Meahan:

 I'm getting a handle on page layout and headings but there are some things I 
 haven't figured out.
 
  1) How does one specify they want the outer margin to be a different size 
 than the inner margin? Outer, of course, is the right margin on a 
 right-hand (odd) page and the left margin on a left-hand (even) page. 

Change the layout with \setuplayout and enable doublesided with 
\setuppagenumbering.

 2) How does one put a frame around a margin? Layers? Overlay? \framedtext? 

You can use \setupbackgrounds.

 3) Am I correct I can use the COMMAND parameters in \setuplayout to specify 
 there is some text to use as a marginal in the (chapter | section) header 
 (using \margintext, I presume)?

Can you be more concrete.

 I am working on a couple of novels I want to typeset using ConTeXt since I 
 think it will allow me to produce what I want for typographic style much 
 easier than using LaTeX.  I'm pretty adept at using LaTeX but brand new to 
 ConTeXt. One of _my_ problems is so many examples on the wiki seem oriented 
 towards people setting math which could not be farther from my intended 
 usages. (Not that I'm unfamiliar with math, I have a degree in Physics and 
 would have had a double degree in math except for a choice to take a 
 different course (helpful in physics) instead of one mandatory for the math 
 degree).


Many people use ConTeXt for documents without any math and when you read older 
messages in the list archive you can find messages from user asking whether 
ConTeXt can be used to typeset math.

\setuplayout
  [backspace=0.1\paperwidth,
   width=0.7\paperwidth,
  footer=0pt,
topspace=0.1\paperheight,
  height=0.7\paperheight]

\setuppagenumbering[alternative=doublesided]

\setupbackgrounds[text][rightmargin][frame=on]

\starttext %\showframe
\dorecurse{10}{\input knuth\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
___


Re: [NTG-context] Confused again :-)

2012-06-07 Thread Rogers, Michael K

On Jun 7, 2012, at 3:15 PM, Bill Meahan wrote:

 I'm getting a handle on page layout and headings but there are some things I 
 haven't figured out.

  1) How does one specify they want the outer margin to be a different size 
 than the inner margin? Outer, of course, is the right margin on a 
 right-hand (odd) page and the left margin on a left-hand (even) page.

  2) How does one put a frame around a margin? Layers? Overlay? \framedtext?

  3) Am I correct I can use the COMMAND parameters in \setuplayout to 
 specify there is some text to use as a marginal in the (chapter | section) 
 header (using \margintext, I presume)?

 I am working on a couple of novels I want to typeset using ConTeXt since I 
 think it will allow me to produce what I want for typographic style much 
 easier than using LaTeX.  I'm pretty adept at using LaTeX but brand new to 
 ConTeXt. One of _my_ problems is so many examples on the wiki seem oriented 
 towards people setting math which could not be farther from my intended 
 usages. (Not that I'm unfamiliar with math, I have a degree in Physics and 
 would have had a double degree in math except for a choice to take a 
 different course (helpful in physics) instead of one mandatory for the math 
 degree).

 Thanks!

 --
 Bill Meahan K8QN

1)  You might want to look through Ch. 3 in the manual.  The dimension called 
backspace is sometimes described as the space between the spine and the text, 
and sometimes as the space to the left.  But the manual shows various ways to 
set up ConTeXt for books.  It should help you.  One place to get it is 
http://www.tug.org/texlive/Contents/live/texmf-dist/doc/context/manuals/reference/en/contextref.pdf

2, 3) I'll let experts tell you.

Strangely, my intended products are math, and I find ConTeXt has too many 
examples aimed at general printing problems (books, brochures, ...) that I'm 
not interested in producing.  Maybe LaTeX is the same way.  I learned Plain TeX 
before there was LaTeX

Best,

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Confused again :-)

2012-06-07 Thread Bill Meahan

On 06/07/2012 15:29, Wolfgang Schuster wrote:

Can you be more concrete.


First page of a chapter should have the chapter name in a fancy font at 
the top of the main text area. Perhaps with rules above and/or below. In 
the framed margin would be the word Chapter (in smallcaps at a 
_slightly_ larger size than the body text) horizontally centered in the 
frame with the chapter number beneath it. The chapter number (using 
oldstyle numbers) would be at 2-3x the body font size and horizontally 
centered in the frame. The word Chapter would ideally be vertically 
aligned with the chapter name.


Other pages would have the chapter name in body font size standard roman 
in the framed margin of the left-hand page, about 20-25% of the 
textheight down from the top and the subject (unnumbered section) name 
displayed in an identical manner on right-hand pages.


The page number will be in italic style at the bottom of the framed 
margin, horizontally centered in the frame and at a smaller size than 
the body font.


The width of the text area will be typefitted to the body font size 
using the table in Bringhurst's The Elements of Typographic Style. 
Indeed, this page design takes its inspiration from that book.


Hope that's not _too_ concrete. :-)




Bill Meahan K8QN

The pessimist complains about the wind;
 the optimist expects it to change;
 the realist adjusts the sails.

-- William Arthur Ward




___
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] Confused again :-)

2012-06-07 Thread Bill Meahan

On 06/07/2012 15:34, Rogers, Michael K wrote:


1)  You might want to look through Ch. 3 in the manual.  The dimension called 
backspace is sometimes described as the space between the spine and the text, 
and sometimes as the space to the left.  But the manual shows various ways to set up 
ConTeXt for books.  It should help you.  One place to get it is 
http://www.tug.org/texlive/Contents/live/texmf-dist/doc/context/manuals/reference/en/contextref.pdf



Yahoo! I've only seen the individual chapters for fonts, typography and 
page design on the wiki. I never realize one could get the whole manual 
from TUG. Sometimes I overlook the obvious. Silly me.



Bill Meahan K8QN

The pessimist complains about the wind;
 the optimist expects it to change;
 the realist adjusts the sails.

-- William Arthur Ward


___
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] Confused again :-)

2012-06-07 Thread Wolfgang Schuster

Am 07.06.2012 um 21:55 schrieb Bill Meahan:

 On 06/07/2012 15:29, Wolfgang Schuster wrote:
 Can you be more concrete.
 
 First page of a chapter should have the chapter name in a fancy font at the 
 top of the main text area. Perhaps with rules above and/or below. In the 
 framed margin would be the word Chapter (in smallcaps at a _slightly_ 
 larger size than the body text) horizontally centered in the frame with the 
 chapter number beneath it. The chapter number (using oldstyle numbers) would 
 be at 2-3x the body font size and horizontally centered in the frame. The 
 word Chapter would ideally be vertically aligned with the chapter name.
 
 Other pages would have the chapter name in body font size standard roman in 
 the framed margin of the left-hand page, about 20-25% of the textheight down 
 from the top and the subject (unnumbered section) name displayed in an 
 identical manner on right-hand pages.
 
 The page number will be in italic style at the bottom of the framed margin, 
 horizontally centered in the frame and at a smaller size than the body font.
 
 The width of the text area will be typefitted to the body font size using the 
 table in Bringhurst's The Elements of Typographic Style. Indeed, this page 
 design takes its inspiration from that book.
 
 Hope that's not _too_ concrete. :-)


Just a short example:

\setuplayout
  [  backspace=0.10\paperwidth,
 width=0.60\paperwidth,
   rightmargin=0.25\paperwidth,
footer=0pt,
  topspace=0.10\paperheight,
height=0.70\paperheight]

\setuppagenumbering[alternative=doublesided]

\setuplabeltext[en][chapter=Chapter ]

\define[2]\ChapterCommand
  {\inright[][align=middle]{#1}%
   \midaligned{#2}}

\setuphead
  [chapter]
  [command=\ChapterCommand,
   header=empty,
   textstyle=\cgd,
   numberstyle=\scb]

\definefontfeature[smallcaps][smallcaps][onum=yes]

\definetypeface[mainface][rm][serif]  [pagella] [default]
\definetypeface[mainface][ss][sans]   [modern]  [default]
\definetypeface[mainface][cg][calligraphy][chorus]  [default]
\definetypeface[mainface][mm][math]   [palatino][default]

\setupbodyfont[mainface]

\starttext %\showframe

\startchapter[title=Knuth]
\dorecurse{10}{\input knuth\par}
\stopchapter

\startchapter[title=Zapf]
\dorecurse{10}{\input zapf\par}
\stopchapter

\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] Confused again :-)

2012-06-07 Thread Bill Meahan


On 06/07/2012 16:32, Wolfgang Schuster wrote:


snip

The width of the text area will be typefitted to the body font size using the table in 
Bringhurst's The Elements of Typographic Style. Indeed, this page design 
takes its inspiration from that book.

Hope that's not _too_ concrete. :-)

Just a short example:

\setuplayout
   [  backspace=0.10\paperwidth,
  width=0.60\paperwidth,
rightmargin=0.25\paperwidth,
 footer=0pt,
   topspace=0.10\paperheight,
 height=0.70\paperheight]

\setuppagenumbering[alternative=doublesided]

\setuplabeltext[en][chapter=Chapter ]

\define[2]\ChapterCommand
   {\inright[][align=middle]{#1}%
\midaligned{#2}}

\setuphead
   [chapter]
   [command=\ChapterCommand,
header=empty,
textstyle=\cgd,
numberstyle=\scb]

\definefontfeature[smallcaps][smallcaps][onum=yes]

\definetypeface[mainface][rm][serif]  [pagella] [default]
\definetypeface[mainface][ss][sans]   [modern]  [default]
\definetypeface[mainface][cg][calligraphy][chorus]  [default]
\definetypeface[mainface][mm][math]   [palatino][default]

\setupbodyfont[mainface]

\starttext %\showframe

\startchapter[title=Knuth]
\dorecurse{10}{\input knuth\par}
\stopchapter

\startchapter[title=Zapf]
\dorecurse{10}{\input zapf\par}
\stopchapter

\stoptext

Wolfgang

Thanks, Wolfgang! I'll give it a shot and study your example so I can 
learn from it!



Gosh this list is nice! Reminds me of the good old days when we used 
UUCP, bang-paths and C-News to communicate (or the early ARPANET days): 
polite, expert, very willing to share knowledge c. An endangered 
species on today's crass, commercial Internet.


Bill Meahan K8QN

The pessimist complains about the wind;
 the optimist expects it to change;
 the realist adjusts the sails.

-- William Arthur Ward




___
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] Confused again :-)

2012-06-07 Thread Pontus Lurcock
On Thu 07 Jun 2012, Bill Meahan wrote:

 Gosh this list is nice! Reminds me of the good old days when we
 used UUCP, bang-paths and C-News to communicate (or the early
 ARPANET days): polite, expert, very willing to share knowledge c.

Wolfgang is ConTeXt's natural language interface.

In fact, with careful use of the filter module and a couple of mail
programs, it should be possible to create something like:

--8--

\usemodule[filter]

\defineexternalfilter
[wolfgang]
[filtercommand={ ... code to send email and fetch reply ... },
 cache=yes]

\startwolfgang
Hello list,

I wonder if anyone could tell me how to implement the following in
ConTeXt.

... description goes here ...
\stopwolfgang

--8--

It's important to include the cache=yes, so Wolfgang only has to reply
once.

Pont
___
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] frame and numbering of code snippets using vim-module

2012-06-07 Thread Aditya Mahajan

On Wed, 6 Jun 2012, Aditya Mahajan wrote:


On Thu, 7 Jun 2012, Xenia wrote:


Hi context folks,

using the vim module for including MATLAB-code, I noticed some annoying
behavior:

The frame, that I produced with your help using `\definetextbackground`,
is not wide enough for the text inside, or rather the line wraps are
done too late (see the attached examples!).


For the time being, use this version of t-syntax-highlighting.mkiv (add it to 
your project directory)


https://github.com/adityam/filter/blob/75d95dc587f5246d336bd2dc3efe840b0fcb3f3c/t-syntax-highlight.mkiv

I'll check later why the new version is failing.


I uploaded a new version which should behave better with respect to 
linebreaks.



Besides there should not be a new line number after a line break.


This is still unresolved.

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] frame and numbering of code snippets using vim-module

2012-06-07 Thread Aditya Mahajan

On Thu, 7 Jun 2012, Aditya Mahajan wrote:

Besides there should not be a new line number after a line break.


This is still unresolved.


The github branch should fix this. (See tests/vim/19-linenumber-break.tex).

Can you test it with your document?

To test the latest version, save t-syntaxhighlight.mkiv and 2context.vim 
from github in the current directory, and compile using


context --mode=vim-dev filename

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] Error with EBGaramond-Regular

2012-06-07 Thread Khaled Hosny
On Thu, Jun 07, 2012 at 06:14:10PM +0200, Hans Hagen wrote:
 btw, what are features like cv80 and cv81 supposed to represent?

A relatively new OpenType addition.
http://www.microsoft.com/typography/otspec/features_ae.htm#cv01-cv99

Regards,
 Khaled
___
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] epub

2012-06-07 Thread Khaled Hosny
On Thu, Jun 07, 2012 at 06:04:39PM +0200, Hans Hagen wrote:
 Hi,
 
 I couldn't resist ... firefox has a nice 3d view of a page and this
 is how the context garden looks like. A nice tests for epubs.

Now, we want that in ConTeXt ;)

Regards,
 Khaled
___
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] problem with \characteralignmentmode=2

2012-06-07 Thread Peter Münster
Hi,

How can I get rid of the space on the right side of the numbers please?

--8---cut here---start-8---
\starttext
\bTABLE
\chardef\characteralignmentmode=2
\setupTABLE[c][1][align=flushright, offset=0em,
  alignmentcharacter=., aligncharacter=yes]
\setupTABLE[c][2][align=flushleft, offset=0em]
\bTR \bTD 123   \eTD \bTD € \eTD \eTR
\bTR \bTD 123.4 \eTD \bTD € \eTD \eTR
\eTABLE
\stoptext
--8---cut here---end---8---

TIA for any help!

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