Re: [NTG-context] Problems with SciTE 3.31 and context package

2013-05-17 Thread Hans Hagen

On 5/17/2013 7:41 PM, Bill Meahan wrote:

Having a bit of a problem. I installed SciTE, scintillua and Hans'
customizations yesterday and things are not working. SciTE crashes as
soon as my context files are loaded.

SciTE is version 3.31 (latest)
scintillua is version 3.3.0-1 (latest precompiled which has 64-bit .so
file included)

context add-ons are from a recent beta and have file dates as late as
28-April-2013

system is Linux LadyGeraldine 3.2.0-43-generic #68-Ubuntu SMP Wed May 15
03:33:33 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux



wwm@LadyGeraldine$ SciTE
Lua Error: /usr/share/scite/lexers/scite-context-lexer.lua:508: attempt
to compare number with nil.
Lua Error: Table of folds expected from 'lexer.fold'.
Lua Error: /usr/share/scite/lexers/scite-context-lexer.lua:508: attempt


at least you see a message -) on windows they go into the void which 
makes debugging painful



to compare number with nil.
*** glibc detected *** SciTE: realloc(): invalid pointer: 0x09d9e5c0 ***


that one normaly points to a c bug


Backtrace not included

I'll try compiling from source if you think it will help.

Ideas appreciated. Thanks


you can try to comment

lexer.fold= context.fold

in scite-context-lexer

it looks like there has been quite some changes (i might as well wait 
till a next version before i look into it)


i replace some lua code that ships with the lexer lib; when i started 
with making the lexers i had so many crashes on big files that i made my 
own fold routine - which of course interfaces to some low lever data 
structures - to get it working; it also was much faster (the same for 
some more patched code)


then, a few versions back the low level folder (c code) changed an di 
adapted to that (as we lack access to scite properties i cannot check 
versions) and now i need to check again


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] Grid typesetting: aligning section to top of textarea

2013-05-14 Thread Wolfgang Schuster

Am 14.05.2013 um 02:51 schrieb Sietse Brouwer sbbrou...@gmail.com:

 Dear list,
 
 I am making a foray into grid typesetting, and would like to align the
 top of my (possibly multi-line) section titles with the top of the
 textarea. I thought I could do that with
 \setuphead[subject][grid={broad,high}], but this is not working. I
 have tried nearly every other combination of grid keywords, and then
 tried them again with the subject wrapped in a framed.


1. Use the command key to apply the frame to the heading and not textcommand.

2. Apply the style for the title with \setuphead.

3. The location key for \framed doesn’t accept lists (e.g. 
location={top,hanging}),
   only single arguments are possible.

\define[2]\SubjectCommand
  {\startframed[align=flushleft,location=top]%
   #2
   \stopframed}

\setuphead[subject]
  [header=high,
   page=yes,
   style=AntykwaChapter,
   grid=low,
   alternative=command,
   command=\SubjectCommand]

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] MkIV problem+fix with \framed[location=depth / height / hanging]

2013-05-14 Thread Sietse Brouwer
Hi Hans,

I believe that in MkIV some \framed[location=...] keys are not
working, namely `depth`, `height`, and `hanging`. In MkIV these all
place the bottom of the frame flush with the baseline, like
[location=].  In MkII they behave more sensibly, as follows:

* depth: place bottom of frame flush with bottom of the line (i.e.
\strutdepth below baseline)
* height: place top of frame flush with top of line
* hanging: place top of frame flush with baseline

Test code below, mkii and mkiv output attached.

I have produced a fix for the code in pack-rul.mkiv [1], placed at the
very bottom of this e-mail. It works; but it is a pure-bred example of
cargo cult programming, i.e. lots of 'making it look right' and very
little understanding, so you will probably want to check it.

[1] http://repo.or.cz/w/context.git/blob/HEAD:/tex/context/base/pack-rul.mkiv

All the best,
Sietse

\setupcolors[state=start]
\setupblackrules[depth=\strutdepth,height=\strutheight,width=1mm,color=red]

\starttext
\ruledhbox
  {A
   \framed[width=2cm,align=middle,location=]
{location\\equals\\(nothing)}%
   \blackrule
   \framed[width=2cm,align=middle,location=depth]
{location\\equals\\depth}%
   \blackrule
   \framed[width=2cm,align=middle,location=height]
{location\\equals\\height}%
   \blackrule
   
\framed[width=2cm,align=middle,location=hanging]{location\\equals\\hanging}
   B}
\vskip2cm
\ruledhbox
  {A
   \framed[width=2cm,align=middle,location=low]{location\\equals\\low}
   \framed[width=2cm,align=middle,location=line]   {location\\equals\\line}
   \framed[width=2cm,align=middle,location=high]   {location\\equals\\high}
   B}
\vskip2cm
\ruledhbox
 {A
  \framed[width=2cm,align=middle,location=bottom] {location\\equals\\bottom}
  \framed[width=2cm,align=middle,location=lohi]   {location\\equals\\lohi}
  \framed[width=2cm,align=middle,location=middle] {location\\equals\\middle}
  \framed[width=2cm,align=middle,location=top]{location\\equals\\top}
  B}
\stoptext

--- This is the fixed code 

\installframedlocator \v!hanging % best with strut=no
  {}
- {\dp\b_framed_normal\scratchdimen
+ {\scratchdimen\ht\b_framed_normal
+  \setbox\b_framed_normal\hbox{\lower\scratchdimen\box\b_framed_normal}%
+  \dp\b_framed_normal\scratchdimen
   \ht\b_framed_normal\zeropoint
   \hbox{\box\b_framed_normal}}

\installframedlocator \v!depth
  {}
-  \ht\b_framed_normal\dimexpr\ht\b_framed_normal-\strutdp\relax
+ {\setbox\b_framed_normal\hbox{\lower\strutdp\box\b_framed_normal}%
+  \ht\b_framed_normal\dimexpr\ht\b_framed_normal-\strutdp\relax
   \dp\b_framed_normal\strutdp
   \hbox{\box\b_framed_normal}}

\installframedlocator \v!height
  {}
- {\dp\b_framed_normal\dimexpr\ht\b_framed_normal-\strutht\relax
+ {\scratchdimen\dimexpr \ht\b_framed_normal - \strutht \relax
+  \setbox\b_framed_normal\hbox{\lower\scratchdimen\box\b_framed_normal}%
+  \dp\b_framed_normal\dimexpr\ht\b_framed_normal-\strutht\relax
   \ht\b_framed_normal\strutht
   \hbox{\box\b_framed_normal}}


mwe-framed-mkii.pdf
Description: Adobe PDF document


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

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

Re: [NTG-context] authoring for web and print - suggestions

2013-05-11 Thread Hans Hagen

On 5/11/2013 2:47 PM, Grant Rettke wrote:

http://www.leverkruid.eu/context/index.html

Looks really interesting.


Don't go that route ... it's mkii based and overloads low level context 
commands (which even for that approach is not needed). It's far more 
convenient to use mkiv's tree based xml handler with expressions.


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] authoring for web and print - suggestions

2013-05-11 Thread Grant Rettke
On Sat, May 11, 2013 at 7:54 AM, Hans Hagen pra...@wxs.nl wrote:

 On 5/11/2013 2:47 PM, Grant Rettke wrote:

 http://www.leverkruid.eu/**context/index.htmlhttp://www.leverkruid.eu/context/index.html

 Looks really interesting.


 Don't go that route ... it's mkii based and overloads low level context
 commands (which even for that approach is not needed). It's far more
 convenient to use mkiv's tree based xml handler with expressions.


Understood. Thanks!
___
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] Arabic typesetting, one more

2013-05-08 Thread Hans Hagen

On 5/8/2013 7:35 AM, H. Özoguz wrote:

\usemodule[fnt-20,art-01]

\starttext

\def\sample{اللهِ\quad اللَّـهِ}

\setvariables
[otftracker]
[font=name:traditionalarabicnormal,
 size=24pt,
 features=arabic,
 direction=-1,
 title=Feature Check,
 sample=\sample]

\page

\setvariables
[otftracker]
[font=arabtype,
 size=24pt,
 features=arabic,
 direction=-1,
 title=Feature Check,
 sample=\sample]

\stoptext


Yes, again, kassra is set too low, in both fonts. But with
traditionalarabic it is worse than with arabtype. What could be a way to
fix this?


fix the font

-
  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] Arabic typesetting, one more

2013-05-07 Thread H. Özoguz
If this behavior of context setting the kassra (slash) too low, do 
anyone knows a font, where this not happens with the symbol allah and 
kassra in context? I thought in this mailer were some arabic typers... ?


Huseyin
___
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] Arabic typesetting, one more

2013-05-07 Thread H. Özoguz

mistyping in last one, corrected:

If this behavior of context setting the kassra (slash) too low is not easily 
understandable or fixable, do
anyone knows a font, where this not happens with the symbol allah and
kassra in context? I thought in this mailer were some arabic typers... ?

Huseyin

___
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] Arabic typesetting, one more

2013-05-07 Thread Hans Hagen

On 5/7/2013 1:32 PM, H. Özoguz wrote:

mistyping in last one, corrected:

If this behavior of context setting the kassra (slash) too low is not
easily understandable or fixable, do
anyone knows a font, where this not happens with the symbol allah and
kassra in context? I thought in this mailer were some arabic typers... ?


i only followed this topic on a distance so first we need an example 
that clearly shows a problem


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] Arabic typesetting, one more

2013-05-07 Thread H. Özoguz

i only followed this topic on a distance so first we need an example
that clearly shows a problem
I described an example here: 
http://www.ntg.nl/pipermail/ntg-context/2013/073025.html


as a code, and with a pdf in attachment. Maybe it is not clear what I 
mean?: The slash is set too low, and this only in ConTeXt. Is the 
example good enough?



Huseyin
___
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] Arabic typesetting, one more

2013-05-07 Thread Hans Hagen

On 5/7/2013 8:10 PM, H. Özoguz wrote:

i only followed this topic on a distance so first we need an example
that clearly shows a problem

I described an example here:
http://www.ntg.nl/pipermail/ntg-context/2013/073025.html

as a code, and with a pdf in attachment. Maybe it is not clear what I
mean?: The slash is set too low, and this only in ConTeXt. Is the
example good enough?


my guess is that the bottom mark is not dealt with in the font (as 
arabtype also has it too low i.e. there is no mark applied) .. is this 
valid arabic input?


\usemodule[fnt-20,art-01]

\starttext

\def\sample{اللهِ\quad اللَّـهِ}

\setvariables
  [otftracker]
  [font=name:traditionalarabicnormal,
   size=24pt,
   features=arabic,
   direction=-1,
   title=Feature Check,
   sample=\sample]

\page

\setvariables
  [otftracker]
  [font=arabtype,
   size=24pt,
   features=arabic,
   direction=-1,
   title=Feature Check,
   sample=\sample]

\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] Arabic typesetting, one more

2013-05-07 Thread H. Özoguz

\usemodule[fnt-20,art-01]

\starttext

\def\sample{اللهِ\quad اللَّـهِ}

\setvariables
[otftracker]
[font=name:traditionalarabicnormal,
 size=24pt,
 features=arabic,
 direction=-1,
 title=Feature Check,
 sample=\sample]

\page

\setvariables
[otftracker]
[font=arabtype,
 size=24pt,
 features=arabic,
 direction=-1,
 title=Feature Check,
 sample=\sample]

\stoptext


Yes, again, kassra is set too low, in both fonts. But with 
traditionalarabic it is worse than with arabtype. What could be a way to 
fix this?


Huseyin

___
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] Again: LuaTeX error: invalid escape sequence near '\i'

2013-04-19 Thread Jan Heinen

The following two commands seem to do the same:
\defineexpandable\...
\def\...

And this two also do the same:
\define\...
\unexpanded\def\...


\def is a low-level-command and shouldn't be used. Right?

Regards
Janis

___
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] ConTeXt mkiv with SciTE on MacOSX

2013-04-18 Thread Hans Hagen

On 4/18/2013 11:50 AM, Pierre Bovet wrote:


Le 18 avr. 2013 à 11:19, Mojca Miklavec mojca.miklavec.li...@gmail.com a 
écrit :


On Thu, Apr 18, 2013 at 7:37 AM, Pierre Bovet wrote:

Hi all,
I recently purchased Scite-Mac OSX to use with ConTeXt, but I don't find an
issue for the integration of the *.properties and lexers files which are
located in the ConTeXt minimal distribution.
Did anyone encounter the same problem and who could help me?


It might be that you are the first ConTeXt user who has bought Scite
for Mac OS X. (I know that Hans played with it in past, but I'm not
sure if that was the version that is now being sold.)


Thank you for your answer,
I use daily Textmate. But I like test various text editor, such Textshop (very 
stable), Texworks, Sublime, etc. That makes more varied and richer life.


the scite lexers that ship with context are interesting in the sense 
that they support the tex/mp/lua mix, know about primitives, low level 
support macros and user commands, mix nicely with real time time spell 
checking etc


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] the difference between \def and \define

2013-04-16 Thread Marco Patzer
On 2013–04–16 Thomas A. Schmitz wrote:

 I'm not lobbying for define to have something similar, I just want
 to point out that it would be in the spirit of convergence between
 ConTeXt and Lua. It certainly isn't an urgent need, but having
 
 \define[one,two,three]
 
 wouldn't be absurd, now would it?

Sorry, misunderstanding on my part. That one looks fine. I thought
we're talking about translating the number to words, which wouldn't
make any sense:

  \define[3]\foo{#one, #two, #three}

I still don't think it's necessary to use named parameters with
\define. For modules most likely \def, \setvalue or texdefinition
are being used and \define for in-document markup, wherefore
numbered parameters are perfectly fine. The only thing that could be
improved is a definition which doesn't interfere with \asciimode,
but that's low priority and can easily be worked around.

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] the difference between \def and \define

2013-04-16 Thread Hans Hagen

On 4/16/2013 12:11 PM, Marco Patzer wrote:

On 2013–04–16 Thomas A. Schmitz wrote:


I'm not lobbying for define to have something similar, I just want
to point out that it would be in the spirit of convergence between
ConTeXt and Lua. It certainly isn't an urgent need, but having

\define[one,two,three]

wouldn't be absurd, now would it?


Sorry, misunderstanding on my part. That one looks fine. I thought
we're talking about translating the number to words, which wouldn't
make any sense:

   \define[3]\foo{#one, #two, #three}

I still don't think it's necessary to use named parameters with
\define. For modules most likely \def, \setvalue or texdefinition
are being used and \define for in-document markup, wherefore
numbered parameters are perfectly fine. The only thing that could be
improved is a definition which doesn't interfere with \asciimode,
but that's low priority and can easily be worked around.


It's also messy (in parsing):

\define[#one,#two]\test{#one#two}

there we have to collect and move the test backwards. Also, names 
defeats the use of the one number becoming multiple #'s so it then close to


\define\test[#one,#two]{#one#two}

which is nearly

\def\test[#one,#two]{#one#two}

apart from the checking, so i decided to provide this:

\checked\def \whatevera#alpha#beta{#alpha + #beta}
\checked\edef\whatevera#alpha#beta{#beta + #alpha}

\unique \def \whateverb#alpha#beta{#alpha + #beta}
\unique \edef\whateverb#alpha#beta{#beta + #alpha}

\whatevera{1}{2}\par
\whateverb{1}{2}\par

(can be used with \def \edef \xdef \gdef \udef \uedef \uxdef and \ugdef)

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] Is the lastest beta broken?

2013-04-14 Thread Hans Hagen

On 4/14/2013 7:05 AM, Tim Li wrote:

Today, I updated my ConTeXt standalone but after that, if I ran
`context' it would give these message:

d:\context
context
mtxrun  | forcing cache reload
resolvers   | resolving | looking for 'texmfcnf.lua' on given path
'C:/Users/peng/texmf/web2c' from specification 'home:texmf/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on weird path
'D:/context/tex/texmf-mswin/bin/' from specification 'selfautoloc:'
resolvers   | resolving | looking for 'texmfcnf.lua' on weird path
'D:/context/tex/texmf-mswin/bin/share/texmf-local/web2c' from
specification 'selfautoloc:/share/texmf-local/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on weird path
'D:/context/tex/texmf-mswin/bin/share/texmf-dist/web2c' from
specification 'selfautoloc:/share/texmf-dist/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on weird path
'D:/context/tex/texmf-mswin/bin/texmf-local/web2c' from specification
'selfautoloc:/texmf-local/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on weird path
'D:/context/tex/texmf-mswin/bin/texmf-dist/web2c' from specification
'selfautoloc:/texmf-dist/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on weird path
'D:/context/tex/texmf-mswin/' from specification 'selfautodir:'
resolvers   | resolving | looking for 'texmfcnf.lua' on weird path
'D:/context/tex/texmf-mswin/share/texmf-local/web2c' from specification
'selfautodir:/share/texmf-local/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on weird path
'D:/context/tex/texmf-mswin/share/texmf-dist/web2c' from specification
'selfautodir:/share/texmf-dist/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on weird path
'D:/context/tex/texmf-mswin/texmf-local/web2c' from specification
'selfautodir:/texmf-local/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on weird path
'D:/context/tex/texmf-mswin/texmf-dist/web2c' from specification
'selfautodir:/texmf-dist/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on given path
'D:/context/tex/../texmf-local/web2c' from specification
'selfautoparent:/../texmf-local/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on weird path
'D:/context/tex/' from specification 'selfautoparent:'
resolvers   | resolving | looking for 'texmfcnf.lua' on given path
'D:/context/tex/share/texmf-local/web2c' from specification
'selfautoparent:/share/texmf-local/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on given path
'D:/context/tex/share/texmf-dist/web2c' from specification
'selfautoparent:/share/texmf-dist/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on given path
'D:/context/tex/texmf-local/web2c' from specification
'selfautoparent:/texmf-local/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on given path
'D:/context/tex/texmf-dist/web2c' from specification
'selfautoparent:/texmf-dist/web2c'
resolvers   | resolving |
resolvers   | resolving | warning: no lua configuration files found
resolvers   | resolving | no texmf paths are defined (using TEXMF)
resolvers   | resolving |
mtxrun  | the resolver databases are not present or outdated
resolvers   | resolving | using suffix based filetype 'lua'
resolvers   | resolving | remembering file 'mtx-context.lua'
resolvers   | resolving | using suffix based filetype 'lua'
resolvers   | resolving | remembering file 'mtx-contexts.lua'
resolvers   | resolving | remembered file 'mtx-context.lua'
resolvers   | resolving | using suffix based filetype 'lua'
resolvers   | resolving | remembering file 'mtx-t-context.lua'
resolvers   | resolving | using suffix based filetype 'lua'
resolvers   | resolving | remembering file 'mtx-t-contexts.lua'
resolvers   | resolving | remembered file 'mtx-t-context.lua'
resolvers   | resolving | using suffix based filetype 'lua'
resolvers   | resolving | remembering file 'context.lua'
mtxrun  | unknown script 'context.lua' or 'mtx-context.lua'
d:\

Is this suggesting that the new beta is broken? If not, how can I solve
this problem? I like ConTeXt very much!


you have to make sure you have the latest ... there has been a change in 
texlive: no texmf but texmf-dist and the engines have the paths 
mentioned above hardcoded (just ignore the weird paths) .. now, as the 
garden but also existing installations use texmf this breaks virtually 
all installations: the hardcoded paths in the engines have no 'texmf'


however, the good news is that mojca made sure that texmf is back in the 
low leven hard coded engine spec but it may take a day or so for 
binaries that were made without it to get updated


(in context we could use a different more compact spec but then users 
who have used the weird paths in the past will have the problem that 
their adapted cnf files are not found)


Hans

Re: [NTG-context] Different fonts for titles

2013-04-14 Thread Wolfgang Schuster

Am 14.04.2013 um 14:34 schrieb H. Özoguz h.oezo...@mmnetz.de:

 Hoping for some hints  :)

What you’re looking for is the \definefont command, in one way a low level 
method to access a font
but also a usefull command to create styles for headings etc.


Let me start with the following example:

  \definefont[Test][texgyrepagellaregular at 12pt]

  \starttext
  \Test VA ffl
  \stoptext

What I do here is to create the new command \Test which loads the file 
“texgrepagellaregular”
at a size 12pt. With the optional prefix on front of the font name you can 
specify the search method,
context provides the three different methods a) file b) name and c) spec.

  a) \definefont[Test][file:texgyrepagellaregular]
  b) \definefont[Test][name:texgyrepagellaregular]
  c) \definefont[Test][spec:texgyrepagella-normal-normal]


Instead of a fixed size for the font you can also use a relative size which 
depends on the bodyfont.

  \definefont[Test][texgyrepagellaregular sa 1]

  \starttext
  \Test VA ffl \switchtobodyfont[20pt]\Test VA ffl
  \stoptext

When you use “sa XX” as argument for the size your font scales also when you 
change the bodyfont
in the middle of the document.


One problem of the definitions above is that kerning, ligatures etc. aren’t 
activated for the font
because no feature isn’t applied. To apply a feature set you have to use a 
different method than
the one which is used in a typescript because \definefont has no feature-key. 
What you have to
do to apply the set is to append it after the name name and separate both with 
a asterisks.

  \definefont[Test][texgyrepagellaregular*default sa 1]

  \starttext
  \Test VA ffl
  \stoptext


Instead of the real name of a file you can also use a symbolic name from a 
typescript.

  \definefont[Test][SansBold sa 1]

  \starttext
  \Test VA ffl
  \stoptext

In this example I used the bold version of the sans style for my \Test font, in 
this case
you don’t have to add the name of a feature because it has been already set in 
the typescript.


A complete example in a document could be look like this:

\definetypeface[mainface][rm][specserif][Antykwa Poltawskiego]
\definetypeface[mainface][ss][specsans] [Iwona]

\definefont[ChapterStyle][SansBold sa 3]

\setuphead[chapter][style=ChapterStyle]

\setupbodyfont[mainface]

\starttext

\chapter{Knuth}

\input knuth

\stoptext


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

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


Re: [NTG-context] Different fonts for titles

2013-04-14 Thread Tim Li
maybe you can use another method that I usually use
 
\definefontsynonym[PalatinoRoman][name:palatinolinotypebold][features=default]\definefont[TitleFont][PalatinoRoman
 sa 1]... From: schuster.wolfg...@gmail.com
 Date: Sun, 14 Apr 2013 23:42:16 +0200
 To: ntg-context@ntg.nl
 Subject: Re: [NTG-context] Different fonts for titles
 
 
 Am 14.04.2013 um 14:34 schrieb H. Özoguz h.oezo...@mmnetz.de:
 
  Hoping for some hints  :)
 
 What you’re looking for is the \definefont command, in one way a low level 
 method to access a font
 but also a usefull command to create styles for headings etc.
 
 
 Let me start with the following example:
 
   \definefont[Test][texgyrepagellaregular at 12pt]
 
   \starttext
   \Test VA ffl
   \stoptext
 
 What I do here is to create the new command \Test which loads the file 
 “texgrepagellaregular”
 at a size 12pt. With the optional prefix on front of the font name you can 
 specify the search method,
 context provides the three different methods a) file b) name and c) spec.
 
   a) \definefont[Test][file:texgyrepagellaregular]
   b) \definefont[Test][name:texgyrepagellaregular]
   c) \definefont[Test][spec:texgyrepagella-normal-normal]
 
 
 Instead of a fixed size for the font you can also use a relative size which 
 depends on the bodyfont.
 
   \definefont[Test][texgyrepagellaregular sa 1]
 
   \starttext
   \Test VA ffl \switchtobodyfont[20pt]\Test VA ffl
   \stoptext
 
 When you use “sa XX” as argument for the size your font scales also when you 
 change the bodyfont
 in the middle of the document.
 
 
 One problem of the definitions above is that kerning, ligatures etc. aren’t 
 activated for the font
 because no feature isn’t applied. To apply a feature set you have to use a 
 different method than
 the one which is used in a typescript because \definefont has no feature-key. 
 What you have to
 do to apply the set is to append it after the name name and separate both 
 with a asterisks.
 
   \definefont[Test][texgyrepagellaregular*default sa 1]
 
   \starttext
   \Test VA ffl
   \stoptext
 
 
 Instead of the real name of a file you can also use a symbolic name from a 
 typescript.
 
   \definefont[Test][SansBold sa 1]
 
   \starttext
   \Test VA ffl
   \stoptext
 
 In this example I used the bold version of the sans style for my \Test font, 
 in this case
 you don’t have to add the name of a feature because it has been already set 
 in the typescript.
 
 
 A complete example in a document could be look like this:
 
 \definetypeface[mainface][rm][specserif][Antykwa Poltawskiego]
 \definetypeface[mainface][ss][specsans] [Iwona]
 
 \definefont[ChapterStyle][SansBold sa 3]
 
 \setuphead[chapter][style=ChapterStyle]
 
 \setupbodyfont[mainface]
 
 \starttext
 
 \chapter{Knuth}
 
 \input knuth
 
 \stoptext
 
 
 Wolfgang
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
  ___
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] float combinations

2013-04-13 Thread Alan BRASLAU
This is probably not exactly what you want, however, one can use list=
in \startplacefigure\stopplacefigure to differentiate between the
figure caption and its listing in the list of figures.



\startplacefigure [title={Dutch scenery.
\startitemize [n]
\startitem A cow. \stopitem
\startitem A mill. \stopitem
\stopitemize},
list=Figure title,
reference=fig:scenery]

\startcombination [2]
{\externalfigure [cow]  [width=.5\textwidth]} {a}
{\externalfigure [mill] [width=.45\textwidth} {b}
\stopcombination
\stopplacefigure

A cow is shown in \in{figure} [fig:scenery]a.




The above example raises the following (low priority) feature
suggestion: How about some way of automatically numbering/labeling
combinations just like item lists? Sort-of a hybrid between
combination and itemize. Say,
\startcombination [r*c] [item=a]
\startitem \externalfigure [cow] \stopitem
\startitem \externalfigure [mill] \stopitem
\stopcombination

Hmm. A challenge for Hans (as if he is not busy enough).

(However, I am sure that Wolfgang can suggest an obvious solution that
is already available, that I overlook... :)

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

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


Re: [NTG-context] float combinations

2013-04-13 Thread Marco Patzer
On 2013–04–13 Alan BRASLAU wrote:

 A cow is shown in \in{figure} [fig:scenery]a.

A cow is shown in \in{figure}{a}[fig:scenery]

 The above example raises the following (low priority) feature
 suggestion: How about some way of automatically numbering/labeling
 combinations just like item lists? Sort-of a hybrid between
 combination and itemize.

I think this could be a useful feature.

 Say,
 \startcombination [r*c] [item=a]

It's not that simple. You need other itemgroup settings as well,
otherwise you don't know the lefttext, righttext, stopper, etc.
options which are required for consistency, the sole purpose of this
feature.


Marco


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

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

[NTG-context] [***SPAM***] Background color with dotted frame formula

2013-04-11 Thread hwitloc


I am trying to make a rounded corner dotted frame with a formula on a gray 
background.

I can't seem to get both the background and the dotted frame working well at 
the same time.

Here is the same mkiv macros showing three specimens.

#1 is stand rounded gray background.  This works
#2 The grey background seems to not go up to the dotted frame of the frame is 
too high?
#3 The dotted frame does not show up at all.

Here is the mkiv file:

\startuniqueMPgraphic{Label}
path p; p := (0,0) -- (OverlayWidth,0) -- (OverlayWidth, OverlayHeight) -- (0, 
OverlayHeight) -- (0,0);
draw p withpen pencircle scaled 1pt dashed withdots;
setbounds currentpicture to boundingbox OverlayBox;
\stopuniqueMPgraphic

\defineoverlay[Label][\useMPgraphic{Label}]

\def\dottext#1%
{  \mframed[frame=off, background=Label, location=low]
  { #1 }
 }

\setupcolors[state=start]

\def\rndgraymath{\mframed[frame=off,% for math have to use \mframed
corner=0, background=color,  backgroundcolor=gray,  backgroundoffset=3pt] }

\starttext

Large font with rounded gray background 
\startformula
\rndgraymath{\tfc e^{i\pi} + 1 = 0 }
\stopformula \blank[big]

Large font in dotted rounded frame  gray background (should be)
\startformula
\rndgraymath{\dottext{\tfc e^{i\pi} + 1 = 0 }}
\stopformula \blank[big]

Large font in dotted rounded frame  gray background  (should be)
\startformula
\dottext{\rndgraymath{\tfc e^{i\pi} + 1 = 0 }}
\stopformula

\stoptext

Thanks___
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] hyperlink bug in \cite

2013-04-10 Thread Hans Hagen

On 4/9/2013 10:25 AM, Alan BRASLAU wrote:

Hello,

\cite[A] can yield a hyperlink to the bibliography. However,
\cite[A,B] does not (and should).

I suppose that this could be a bit complicated when using numbered references 
(rather than Author, year), in the particular case where one collapses the list 
of numbers, in which case the hyperlink could naturally point to the first 
numbered reference of the list.


can probably be solved (by rewriting some low level bin code ... but as 
there is no sample attached ...)


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] hyperlink bug in \cite

2013-04-10 Thread Alan BRASLAU
On Wed, 10 Apr 2013 11:47:21 +0200
Hans Hagen pra...@wxs.nl wrote:

 can probably be solved (by rewriting some low level bin code ... but
 as there is no sample attached ...)

Minimal example attached.

Alan\setupinteraction  [state=start]
\setupbibtex   [database=biblio,sort=author]
\setuppublications [refcommand=authoryear,sorttype=bbl,criterium=cite] % author (year)
\starttext

Cybernetics. \cite [Ashby1954] \cite[Wiener1961]

Cybernetics. \cite [Ashby1954,Wiener1961]

\starttitle [title=Bibliography]
  \placepublications [criterium=all]
\stoptitle

\stoptext
@BOOK{ Ashby1954,
	author = {Ashby, W. Ross},
	title = {Design for a Brain},
	year = {1954},
	publisher = {John Wiley {\} Sons Inc.},
	address = {New York}
}

@BOOK{ Wiener1961,
	author = {Wiener, N.},
	title = {Cybernetics or Control and Communication in the Animal and in the Machine},
	year = {1961},
	publisher = {M.I.T. Press and John Wiley {\} Sons},
	address = {New York}
}
___
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] White Space after \startalign

2013-04-08 Thread Hans Hagen

On 4/8/2013 1:21 PM, Devendra Ghate wrote:

Dear all,

I have noticed a new problem in the \startalign environment recently.
\startalign adds whitespace after the formula. If I remove the *\NR* from the
last equation then the white space disappears. But I need to keep it for
numbering the last equation.

In any case, I thought that the last *\NR* is required in the *math
align* environment. I remember getting errors for not including the last
\NR when I was just starting out with ConTeXt. May be something has
changed or my memory is not quite what I thought it was.

Please let me know if I am making a silly mistake. Thank you for your
time in advance.


a side effect of \startalign being math or text aware (lookahead issue 
in low level tex align) ... fixed in next upload



*MWE*

\starttext¬
Some text before the equation.¬
\placeformula¬
\startformula \startalign¬
  \NC a \NC= b\NR¬
  \NC c \NC= d\NR[eq:trivial]¬
\stopalign \stopformula¬
Some text after the equation.¬
\stoptext¬

Regards,
Devendra Ghate
___
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] White Space after \startalign

2013-04-08 Thread Devendra Ghate
On Mon, Apr 08, 2013 at 05:49:51PM +0200, Hans Hagen wrote:
 On 4/8/2013 1:21 PM, Devendra Ghate wrote:
 Dear all,
 
 I have noticed a new problem in the \startalign environment recently.
 \startalign adds whitespace after the formula. If I remove the *\NR* from the
 last equation then the white space disappears. But I need to keep it for
 numbering the last equation.
 
 In any case, I thought that the last *\NR* is required in the *math
 align* environment. I remember getting errors for not including the last
 \NR when I was just starting out with ConTeXt. May be something has
 changed or my memory is not quite what I thought it was.
 
 Please let me know if I am making a silly mistake. Thank you for your
 time in advance.
 
 a side effect of \startalign being math or text aware (lookahead
 issue in low level tex align) ... fixed in next upload
 

Thank you Hans. Problem solved.

Cheers,
Devendra

___
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] A thinner hrule for headers

2013-03-29 Thread Thomas Kreuzer

Am 3/24/2013 20:43, schrieb Marcin Borkowski:

If this \hrule is TeX's primitive \hrule, then you can (maybe) type
[after={\hrule height 0.4pt\relax}] for the default (and change the
height for other dimensions).

That said, this is a low-level hack and not very ConTeXt-y (even if it
works, which I don't know.)

Best,



Strangly, it DOES work for a value of 0.01pt (it looks like 0.2pt for 
framethickness), a value of 0.2pt doesn't make a noticable difference 
somehow.


This is the most convenient solution for me, but it has a weird 
aftertaste, given that I do nut understand why I have to give it such a 
low parameter.


Thank you very much,
Thomas

___
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] A thinner hrule for headers

2013-03-29 Thread Thomas Kreuzer

Am 3/24/2013 20:43, schrieb Marcin Borkowski:

If this \hrule is TeX's primitive \hrule, then you can (maybe) type
[after={\hrule height 0.4pt\relax}] for the default (and change the
height for other dimensions).

That said, this is a low-level hack and not very ConTeXt-y (even if it
works, which I don't know.)

Best,



Oddly enough, it works well, but somehow I had to use 0.01pt to make it 
noticable.


regards!
___
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] A thinner hrule for headers

2013-03-29 Thread Hans Hagen

On 3/28/2013 4:36 PM, Thomas Kreuzer wrote:

Am 3/24/2013 20:43, schrieb Marcin Borkowski:

If this \hrule is TeX's primitive \hrule, then you can (maybe) type
[after={\hrule height 0.4pt\relax}] for the default (and change the
height for other dimensions).

That said, this is a low-level hack and not very ConTeXt-y (even if it
works, which I don't know.)

Best,



Strangly, it DOES work for a value of 0.01pt (it looks like 0.2pt for
framethickness), a value of 0.2pt doesn't make a noticable difference
somehow.

This is the most convenient solution for me, but it has a weird
aftertaste, given that I do nut understand why I have to give it such a
low parameter.


In print or on screen? TeX is very precise but displays and printers can 
do rounding and snapping.


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] setups in the latest Context release

2013-03-25 Thread Devendra Ghate
Hello Everyone

I have been using the following setup (provided by Wolfgang on this list)
to format my chapter headings till now. However, it does not work since
I upgraded by context installation today.

If the entire *\startlinealignment  \stoplinealignment* block is
copied outside the setups then it works fine. So the change must
have been in the interface for *setups*.

Please let me know if there has been a change OR I have made some
kind of mistake.

Thank you,
Devendra Ghate

-

\startsetups[head:margin]

  \startlinealignment[left]

\startframed

  [width=1cm,

   height=3cm,

   frame=on,

   align={flushleft,nothyphenated,verytolerant,low}]

  \headtextcontent

\stopframed

%
\inmargin[location=outer,align={right}]{%

  \framed[%

width=3cm,

height=3cm,

align={bottom,middle},

frame=on]{\headnumbercontent}

 }

  \stoplinealignment

\stopsetups



\defineheadalternative[margin][renderingsetup=head:margin]



\definehead[dchapter][chapter]

\setuphead[dchapter][alternative=margin]



\starttext

  \dchapter{Inexpensive Monte Carlo}
\stoptext


-- 

Cheers,
Devendra.
___
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] A thinner hrule for headers

2013-03-24 Thread Marcin Borkowski
Dnia 2013-03-24, o godz. 13:32:28
Thomas Kreuzer thomas.kreu...@rwth-aachen.de napisał(a):

 Hello everyone,
 
 I'd like to know if it is possible to get a thinner hrule in headers
 (mkiv).
 
 Right now I am using
 
 \setupheader[after=\hrule]

If this \hrule is TeX's primitive \hrule, then you can (maybe) type
[after={\hrule height 0.4pt\relax}] for the default (and change the
height for other dimensions).

That said, this is a low-level hack and not very ConTeXt-y (even if it
works, which I don't know.)

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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] upto current

2013-03-19 Thread Hans Hagen

Hi,

One these days there will be a first iteration of this years 'current' 
release. This has to do with the texlive code freeze. As usual the 
current is paired with a version of luatex and mplib, of which there 
also will be a frozen version soon. This year we also have luajittex.


Among the biggest differences between this and the previous current are:

- More low level tex code has been made mkiv compliant. This had a side 
effect of introducing bugs. As expected more flexibility an potential 
for extensions has not resulted in slower runs.


- Some mechanisms have been rewritten, some even from scratch (a new 
table mechanism, multi columns). We tried to remain compatible but where 
possible inconsistencies have been removed.


- Of course bugs have been removed also thanks to Wolfgang and others. 
Like before users have been very patient and willing to test. The 
updated wiki and good examples that show up on sites are an indication 
that mkiv has mostly replaced mkii.


- There is some new math magic under the hood. We switched to tex gyre 
and latin modern open math as defaults.


- Lua code has been optimized: leaner, meaner, less dependent, version 
5.2 etc. There is more helper code available pending future extensions 
to mkiv. Basic code can be used in stock Lua.


- The 2013 current performs significantly faster than previous versions 
and (certainly) on complex jobs mkiv outperforms mkii. Lots of time went 
into identifying and removing bottlenecks.


- When luajittex is used, thanks to the faster virtual machine, mkiv 
benefits a lot: 20-490% faster runs are possible. I usually test with 
manuals I'm working on, but a nice base test is \dorecurse {1000} 
{test\page} which now runs 20% faster with stock luatex and 50% faster 
with luajittex.


- The font database generator is made more efficient and unless you do a 
full reload take hardly any time to regenerate after an update. This 
means that updating betas is more convenient. In general all logging to 
the terminal and log file is faster due to several optimizations.


- Some mtx scripts have been extended, some more will show up.

- We ship a set of advanced scite lexers (tex, lua, cld, mp, w, xml, 
etc. plus a context setup) that can serve as benchmark for syntax 
highlighting context code. To some extent this also determines the way 
mkiv is coded.


I probably forgot a lot. After the current is done, we can start 
thinking of what to do next. Here are some thoughts:


- Improving the output routines. This is non-trivial. Maybe I'll rewrite 
the columnsets code. The mixed column figure placement can be improved too.


- Some mechanism will get support for setups alongside commands, like 
sections and list related mechanisms already has.


- Parts of the xml handling can be cleaned up, although the current code 
performs rather well already.


- Support for sql might get more integrated into the core (a side effect 
of projects I'm working on).


- I might pickup the metatex thread: a generic base with special purpose 
subsets of code. It might not be worth the trouble, but it's good to 
have a proper dependency tree.


- I will continue making some of the Lua code more generic (maybe by 
introducing some additional namespaces).


- I need to cleanup all the s-* files: namespaces, mkii-mkiv, etc. A 
tedious job. Clean up all mkiv presentation styles. (Something for rainy 
days or cold winter nights with stacks of new cd's to make that effort 
bearable.)


- Play with a partial css simulator (relates to export), but only when 
I'm really bored or need it (getting css itself right is already enough 
of a challenge).


- Pick up on ideas with respect to math dictionaries. Add some support 
for breaking large math formulas. Kick out more old code.


- Play with alternative par builders, i.e. finally add the mkiv Lua 
parbuilder that I have around for years into the distribution. This 
relates to a drastic cleanup of expansion code in the luatex front- and 
backend.


- Include some third party modules into the core distribution.

- Remove bottlenecks in mkiv where possible (user input is needed for 
this).


Then there are the documents:

- Update the xml descriptions (Wolfgang has been working on this, and 
there is the wiki).


- Finish the 'cld' manual (mostly done).

- Update the 'xml' mkiv manual (doable, maybe users have examples too).

- Finish the updated 'mathml' manual (done but needs checking but then I 
might overhaul the whole lot again).


- Finish the more technical 'mkiv font' manual (tedious job but okay).

- Pickup the 'stylistics' manual (also nice to do but a bit tedious). 



- Turn 'hybrid' into a more finished document (the second part of the 
history of mkiv/luatex).


- Add more to the 'about' series (the third part).

Of course this is too ambitious but it's good to remind myself that some 
work needs to be done. And ... users might have ideas of what needs to 
be done as well.


Hans

Re: [NTG-context] etexshow and generation of cont-en.xlm (cont-XX.xml)?

2013-03-18 Thread Hans Hagen

On 3/18/2013 11:35 PM, Jonathan Barchi wrote:

Hi all,

I'm using the emacs package etexshow to provide a quick ConTeXt
command reference in EMACS. This utility parses the interface file
cont-en.xml (for english, in my case) and uses the contents to provide
a basic dictionary of available commands.

In the documentation for etexshow, there is a reference to being able
to generate a complete interface description (the aforementioned xml
file) like so:

;; There is still an xml-file shipped with this code. Usually you would
;; generate the xml-file with 'texexec'ing the file setupe.tex. Then you
;; will get the cont-en.xml file that can (could) be used as an input for
;; this etexshow. But for now, this won't work. It will work rsn.

It is not clear whether that file (setupe.tex or setup.tex) is/was
supposed to be shipped with etexshow or was supposed to be a part of
context. I've searched and found a few references to this problem, but
never a definitive answer, so if anyone knows the answer to these
questions I would love to know!!

1. Is the referenced setup(e).tex a file that was previously shipped
with ConTeXt - presumably mkii since the author refers to texexec - or
would this be something the author would have included with etexshow
itself?

2. Is the interface file, e.g. cont-en.xml, auto-generated from all of
the defined macros in ConTeXt, or is that file hand-written as
metadata to accompany the source-code definitions?


the xml file is the master file (but I admit that it's a bit behind)

if you only need the commands then the mult-def.lua files are better, 
also because they contain low level commands and primitives (it's what I 
use to generate files for scite where we have a rather advanced lexer)



3. Since self-documentation is a goal of the project, is it possible
to generate something akin to the interface file that presents a
snapshot of all commands known to context at a given time, for use in
things like etexshow or other tools? If so, is it possible to do this
with modules loaded to see what they additionally define?


we can add a --emacs to mtx-interfaces.lua if something other than xml 
is needed .. so, what does emacs need?



Thanks in advance for any help! I'm hoping to use any information I
get to update etexshow, if possible, and maybe update the ConTeXt
support in AUCTEX as well. I think it would be really cool if AUCTEX
could reach out at compile or run time and pull in macro definitions
from the installed environment, for example.


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] caption on layoutgrid

2013-03-02 Thread Eidenbenz Michael
hi all, 

is there a way to typeset a caption on the layout grid?

thanks michael



\showgrid
\setuplayout [grid=yes]

\starttext
\setupfloats[figure][location=left]
\setupcaption [figure]  [location={low,right},width=fit]
\input tufte
\reservefigure[height=4cm,width=10cm,frame=on]{\placeongrid{How do I place this 
caption on the grid (bottom aligned with figure)?}}{}
\reservefigure[height=4cm,width=10cm,frame=on]{How do I place this caption on 
the grid(bottom aligned with figure)?}{}
\input tufte
\stoptext

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

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


Re: [NTG-context] Alignment problem with labels and textext

2013-02-13 Thread Keith J. Schultz
Hi Lutz,

Just updated, to make sure I have the latest.

I see the problems. 
top  bottom labels are not centered correctly
bottom label not low enough
left and right labels are not aligned at the same height

Sorry, no ansers.

regards
Keith.

Am 13.02.2013 um 11:11 schrieb Lutz Haseloff lutz.hasel...@gmail.com:

 Hi Keith,
 
 following testfile perhaps describes my problem better:
 
 \starttext
 \startMPpage
 drawdot (origin);
 label.rt (textext(right) , origin) ;
 label.top (textext(top) , origin) ;
 label.lft (textext(left) , origin) ;
 label.bot (textext(bottom) , origin) ;
 \stopMPpage
 \stoptext
 
 If i run it by texexec(mkii), all is ok, with context(mkiv) the labels 
 overlap.
 
 I try to add the problematic mkiv pdf.
 
 Greetings Lutz
 
 
 2013/2/13 Keith J. Schultz keithjschu...@web.de
 Hi Lutz,
 
 With
 This is LuaTeX, Version beta-0.74.0-2012122517 (rev 4541) 
 ConTeXt  ver: 2013.02.05 22:32 MKIV  fmt: 2013.2.9  int: english/english
 
 Things look fine. Actually, without textext the left and right seem to be 
 aligned 
 on the baseline. Where with textext it is aligned in the middle of the text, 
 which
 I find to be the correct way. 
 
 regards
   Keith
 

___
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] Alignment problem with labels and textext

2013-02-13 Thread Lutz Haseloff
It seems to me, that the label.xx mechanism is completely broken.
the results of label, label.rt and label.lft are exactly the same if i set
labeloffset := 0bp ;
(default is 3bp)


2013/2/13 Keith J. Schultz keithjschu...@web.de

 Hi Lutz,

 Just updated, to make sure I have the latest.

 I see the problems.
 top  bottom labels are not centered correctly
 bottom label not low enough
 left and right labels are not aligned at the same height

 Sorry, no ansers.

 regards
 Keith.

 Am 13.02.2013 um 11:11 schrieb Lutz Haseloff lutz.hasel...@gmail.com:

 Hi Keith,

 following testfile perhaps describes my problem better:

 \starttext
 \startMPpage
 drawdot (origin);
 label.rt (textext(right) , origin) ;
 label.top (textext(top) , origin) ;
 label.lft (textext(left) , origin) ;
 label.bot (textext(bottom) , origin) ;
 \stopMPpage
 \stoptext

 If i run it by texexec(mkii), all is ok, with context(mkiv) the labels
 overlap.

 I try to add the problematic mkiv pdf.

 Greetings Lutz


 2013/2/13 Keith J. Schultz keithjschu...@web.de

 Hi Lutz,

 With
 This is LuaTeX, Version beta-0.74.0-2012122517 (rev 4541)
 ConTeXt  ver: 2013.02.05 22:32 MKIV  fmt: 2013.2.9  int: english/english

 Things look fine. Actually, without textext the left and right seem to be
 aligned
 on the baseline. Where with textext it is aligned in the middle of the
 text, which
 I find to be the correct way.

 regards
 Keith




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

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

 ___

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

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

Re: [NTG-context] Alignment problem with labels and textext

2013-02-13 Thread Lutz Haseloff
It seems, that my ConTeXt installation was broken in this point.
A complete new installation of the standalone heped.
Sorry for the noise.


2013/2/13 Lutz Haseloff lutz.hasel...@gmail.com

 It seems to me, that the label.xx mechanism is completely broken.
 the results of label, label.rt and label.lft are exactly the same if i set
 labeloffset := 0bp ;
 (default is 3bp)


 2013/2/13 Keith J. Schultz keithjschu...@web.de

 Hi Lutz,

 Just updated, to make sure I have the latest.

 I see the problems.
 top  bottom labels are not centered correctly
  bottom label not low enough
 left and right labels are not aligned at the same height

 Sorry, no ansers.

 regards
 Keith.

 Am 13.02.2013 um 11:11 schrieb Lutz Haseloff lutz.hasel...@gmail.com:

 Hi Keith,

 following testfile perhaps describes my problem better:

 \starttext
 \startMPpage
 drawdot (origin);
 label.rt (textext(right) , origin) ;
 label.top (textext(top) , origin) ;
 label.lft (textext(left) , origin) ;
 label.bot (textext(bottom) , origin) ;
 \stopMPpage
 \stoptext

 If i run it by texexec(mkii), all is ok, with context(mkiv) the labels
 overlap.

 I try to add the problematic mkiv pdf.

 Greetings Lutz


 2013/2/13 Keith J. Schultz keithjschu...@web.de

 Hi Lutz,

 With
 This is LuaTeX, Version beta-0.74.0-2012122517 (rev 4541)
 ConTeXt  ver: 2013.02.05 22:32 MKIV  fmt: 2013.2.9  int: english/english

 Things look fine. Actually, without textext the left and right seem to
 be aligned
 on the baseline. Where with textext it is aligned in the middle of the
 text, which
 I find to be the correct way.

 regards
 Keith




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

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

 ___



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

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

[NTG-context] Figure captions in margin

2013-01-20 Thread Devendra Ghate
I am using a layout with wide right margin. For floats that are 
\textwidth wide, I can place captions in the margin 
using**\setupcaption[location=rightmargin,high/low].


However, for figures that are 
(*\textwidth+\marginwidth+\margindistance*) wide, I would like to *place 
the caption in the margin below the figure*. I have tried 
spacebefore=\vskip but it doesn't seem to do anything. Another option 
was to use default caption location (below the figure) and add \hspace 
before figure placement.

None of these work as I am not able to make spacebefore do anything.

*MWE*

\setuplayout[width=5cm, height=13cm,rightmargin=5cm]

\setupexternalfigures[option=empty]
\setupfloat[figure][location=inner]
%
\setupcaption
  [figure]
   [width=5cm,
location={rightmargin,low},
spacebefore=big]

%\setupcaption
  %[figure]
  %[width=5cm]

\starttext
  \showframe
  \placefigure{A small but important
  caption.}{\externalfigure[cow][width=10cm]}
\stoptext

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

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

Re: [NTG-context] Figure captions in margin

2013-01-20 Thread Marco Patzer
On 2013–01–20 Devendra Ghate wrote:

 I am using a layout with wide right margin. For floats that are
 \textwidth wide, I can place captions in the margin
 using**\setupcaption[location=rightmargin,high/low].
 
 However, for figures that are
 (*\textwidth+\marginwidth+\margindistance*) wide, I would like to
 *place the caption in the margin below the figure*.

For a recent project I had the similar requirements. I did not find
a proper solution. I attached an example of the code I used.
However, it has several issues:

1) Margin floats and texts overlay and need manual adjustment.
2) The baseline of the float description does not match the baseline
   of the main text (fixed using  manual trial and error). I used an
   ugly hack (toffset=7.5ex) to align the description vertically.
3) The \startplacesmartfigure is not very robust. My notes say “Do
   not indent \startplacesmartfigure”. I don't recall what the exact
   issue was.
4) Probably many more that I haven't discovered, yet.

Feel free to suggest fixes for the mentioned issues.

Marco
\useMPlibrary [dum]

\unprotect

\setupfloat
  [figure]
  [default={top,bottom}]

\setupfloat
  [table]
  [default={bottom,top}]

\definefloat
  [margintable]
  [margintables]
  [table]

\definefloat
  [marginfigure]
  [marginfigures]
  [figure]

\setupcaptions
  [width=\marginwidth,
   prefix=no]

\setupcaption
  [table]
  [location={outermargin, high}]

\setupcaption
  [figure]
  [location={outermargin, high}]

\setupcaption
  [marginfigure, margintable]
  [align=flushleft,
   location=bottom]

\setupcaption
  [table, figure]
  [way=bytext]

\setupfloat
  [marginfigure, margintable]
  [default=margin]

\definefloat
  [widetable]
  [widetables]
  [table]

\setupfloat
  [widetable]
  [location=inner]

\definefloat
  [widefigure]
  [widefigures]
  [figure]

\setupfloat
  [widefigure]
  [location=inner]

\defineframed
  [caption_framed]
  [frame=off,
   offset=overlay,
   location=high,
   toffset=7.5ex]

\starttexdefinition caption_command #1
  \caption_framed{#1}
\stoptexdefinition

\setupcaption
  [widetable]
  [location={outermargin, low},
   command=\caption_command]

\setupcaption
  [widefigure]
  [location={outermargin, low},
   command=\caption_command]

\newtoks\t_smart_figure_args

\starttexdefinition startplacesmartfigure [#1]
  \t_smart_figure_args={#1}
  \grabbufferdata
[smart_figure_buffer]
[startplacesmartfigure]
[stopplacesmartfigure]
\stoptexdefinition

\startluacode
  userdata = userdata or { }

  function userdata.do_place_smart_figure(width)
context.unprotect()
if tex.sp(width) = tex.dimen.rightmarginwidth + tex.sp(.1pt) then
  context.startplacemarginfigure{tex.toks.t_smart_figure_args}
tex.print(buffers.getcontent(smart_figure_buffer))
  context.stopplacemarginfigure()
else
  if tex.sp(width) = tex.dimen.textwidth + tex.sp(.1pt) then
context.startplacefigure{tex.toks.t_smart_figure_args}
  tex.print(buffers.getcontent(smart_figure_buffer))
context.stopplacefigure()
  else
context.startplacewidefigure{tex.toks.t_smart_figure_args}
  tex.print(buffers.getcontent(smart_figure_buffer))
context.stopplacewidefigure()
  end
end
context.protect()
  end
\stopluacode

\starttexdefinition stopplacesmartfigure
  \scratchdimen\hsize
  \hsize\maxdimen
\setbox\scratchbox\vbox{\getbuffer[smart_figure_buffer]}
  \hsize\scratchdimen

  \luacode{userdata.do_place_smart_figure(\the\wd\scratchbox)}
\stoptexdefinition

\protect

\starttext

\startplacesmartfigure [title=Foo]
  \externalfigure [dummy] [width=\rightmarginwidth, height=3cm]
\stopplacesmartfigure

\dorecurse{5}{%%
  \input knuth\par}

\startplacesmartfigure [title=\input ward\par]
  \externalfigure [dummy] [width=\textwidth, height=8cm]
\stopplacesmartfigure

\startplacesmartfigure [title=\input ward\par]
  \externalfigure [dummy] [width=\dimexpr\textwidth+\rightmargintotal\relax, height=3cm]
\stopplacesmartfigure

\stoptext


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] Figure captions in margin

2013-01-20 Thread Devendra Ghate

Hello Marco,

Your code goes well beyond what I was looking for.

As I am working on a deadline right now, I am just going to use the 
frame trick to place the caption for wide figures.


However, expect to hear from me in future regarding this code.

Regards,
Devendra


On 01/20/2013 09:31 PM, Marco Patzer wrote:

On 2013--01--20 Devendra Ghate wrote:


I am using a layout with wide right margin. For floats that are
\textwidth wide, I can place captions in the margin
using**\setupcaption[location=rightmargin,high/low].

However, for figures that are
(*\textwidth+\marginwidth+\margindistance*) wide, I would like to
*place the caption in the margin below the figure*.

For a recent project I had the similar requirements. I did not find
a proper solution. I attached an example of the code I used.
However, it has several issues:

1) Margin floats and texts overlay and need manual adjustment.
2) The baseline of the float description does not match the baseline
of the main text (fixed using  manual trial and error). I used an
ugly hack (toffset=7.5ex) to align the description vertically.
3) The \startplacesmartfigure is not very robust. My notes say Do
not indent \startplacesmartfigure. I don't recall what the exact
issue was.
4) Probably many more that I haven't discovered, yet.

Feel free to suggest fixes for the mentioned issues.

Marco


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

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


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

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

Re: [NTG-context] ConTeXt on the Mac (TexShop). Problem of a newbie

2013-01-10 Thread Hans Hagen

On 1/10/2013 12:19 PM, Martin Schröder wrote:

2013/1/10 Keith J. Schultz keithjschu...@web.de:

I am kind of confused about the relationship between luatex and ConTeXt.


http://www.tug.org/levels.html

ConTeXt MkIV needs LuaTeX.


That's a somewhat confusing description.

(1) Context is just a format, so it should be mentioned as format.

(2) We call all instances context, i.e. we don't combine engine names 
with 'context' so there is no 'pdfcontext', although one could do that.


(3) As there are language dependent user interfaces, we have more 
formats (cont-en, cont-nl, ...).


(4) We use a management script to run the engine with the context 
format. Reasons for this are: we need to manage multiple runs, we might 
need to call intermediate programs (in mkii for instance we need to sort 
indices).


(5) This also permits us to present to user with an engine independent 
call to context. In mkii we had 'texexec' (on top of a more generic 
script manager called texmfstart), in mkiv we have 'context' (and again 
a script manager called mtxrun).


Now, to come to luatex: this project is quite related to context as it 
all started in the context community. We also use context for testing 
and exploring new functionality. For this we use mkiv/mkvi which is a 
rewrite of context using the full potential of luatex so that we can go 
beyond what traditional tex engines can do. We explicitly have chosen 
for a lua + tex combination so that we don't have to hardcode solutions 
in the engine (macro packages have too many conflicting demands anyway) 
and are more future proof.


Given that mkii is frozen, and given that type1 fonts are sort of 
obsolete (context has always been an early adopter of lm and gyre 
fonts), and given that utf is the way to go (so no messing with input 
and font encodings any more), and given some more reasons, in practice 
users will no longer use pdftex and/or xetex but luatex. In that sense 
context depends on luatex and also keep the development of that engine 
going.


The philosophy of context is that by having most functionality in the 
core, users can rather easy create their own styles (the average style 
has not that many lines anyway). I'm always sort of puzzled when I see 
remarks that context is close to plain, as I cannot see where that 
conclusion comes from. The whole reason that context exists is that I 
didn't want to hack around in low level style files and deal with funny 
commands having @ in their names.


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] ConTeXt on the Mac (TexShop). Problem of a newbie

2013-01-10 Thread Pavneet Arora

Hans,

This is a most lucid explanation.  I have been waiting for this myself.

To quote the great American philosopher, Corporal Radar O'Reilly, from the 
television show of the 1970s, M*A*S*H:


Ah, Bark! [He was instructed to say Ah, Baaah! by Hawkeye Pierce]

I apologise in advance for this most peculiar and culturally specific bit of 
history.


Regards.



--

Message: 5
Date: Thu, 10 Jan 2013 12:58:43 +0100
From: Hans Hagen pra...@wxs.nl
To: mailing list for ConTeXt users ntg-context@ntg.nl
Subject: Re: [NTG-context] ConTeXt on the Mac (TexShop). Problem of a
newbie
Message-ID: 50eeacf3.9040...@wxs.nl
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 1/10/2013 12:19 PM, Martin Schr?der wrote:

2013/1/10 Keith J. Schultz keithjschu...@web.de:

I am kind of confused about the relationship between luatex and ConTeXt.


http://www.tug.org/levels.html

ConTeXt MkIV needs LuaTeX.


That's a somewhat confusing description.

(1) Context is just a format, so it should be mentioned as format.

(2) We call all instances context, i.e. we don't combine engine names
with 'context' so there is no 'pdfcontext', although one could do that.

(3) As there are language dependent user interfaces, we have more
formats (cont-en, cont-nl, ...).

(4) We use a management script to run the engine with the context
format. Reasons for this are: we need to manage multiple runs, we might
need to call intermediate programs (in mkii for instance we need to sort
indices).

(5) This also permits us to present to user with an engine independent
call to context. In mkii we had 'texexec' (on top of a more generic
script manager called texmfstart), in mkiv we have 'context' (and again
a script manager called mtxrun).

Now, to come to luatex: this project is quite related to context as it
all started in the context community. We also use context for testing
and exploring new functionality. For this we use mkiv/mkvi which is a
rewrite of context using the full potential of luatex so that we can go
beyond what traditional tex engines can do. We explicitly have chosen
for a lua + tex combination so that we don't have to hardcode solutions
in the engine (macro packages have too many conflicting demands anyway)
and are more future proof.

Given that mkii is frozen, and given that type1 fonts are sort of
obsolete (context has always been an early adopter of lm and gyre
fonts), and given that utf is the way to go (so no messing with input
and font encodings any more), and given some more reasons, in practice
users will no longer use pdftex and/or xetex but luatex. In that sense
context depends on luatex and also keep the development of that engine
going.

The philosophy of context is that by having most functionality in the
core, users can rather easy create their own styles (the average style
has not that many lines anyway). I'm always sort of puzzled when I see
remarks that context is close to plain, as I cannot see where that
conclusion comes from. The whole reason that context exists is that I
didn't want to hack around in low level style files and deal with funny
commands having @ in their names.

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
-




--
-
- Pavneet Arora

Waroc Fine Audio + Custom Home Cinema
www.waroc.com  416.937.WAROC (9276)

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

2012-12-18 Thread Hans Hagen

On 12/18/2012 12:47 PM, Wolfgang Schuster wrote:


Am 18.12.2012 um 12:31 schrieb Roger Mason rma...@mun.ca:


Hello all,

I have a manuscript to review that I have managed to coerce into DocBook xml.  
I'd like to turn it into context so that I can mark it up in a comfortable 
environment.  I just tried Simon Pepping's DocBookInContext package from 2003, 
but it fails on the provided test document:

! Undefined control sequence.
l.968 \stelsectiein

pandoc is not an option for me at the moment: I am currently using Arch Linux 
and have not been able to get their Haskell installation to finish successfully.


1. The module uses a mix of english and dutch commands which doesn’t work 
(maybe it worked when module was written).


That was an experiment by Simon and (in latex style) it overloaded quite 
some low level stuff so it never really worked out well I think.



2. The code is outdated, written for MkII and rewrites commands which are 
already part of the core.


Indeed.

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

2012-12-18 Thread Roger Mason

Wolfgang, Thomas, Hans,

On 12/18/2012 09:51 AM, Hans Hagen wrote:

On 12/18/2012 12:47 PM, Wolfgang Schuster wrote:


Am 18.12.2012 um 12:31 schrieb Roger Mason rma...@mun.ca:


Hello all,

I have a manuscript to review that I have managed to coerce into 
DocBook xml.  I'd like to turn it into context so that I can mark it 
up in a comfortable environment.  I just tried Simon Pepping's 
DocBookInContext package from 2003, but it fails on the provided 
test document:


! Undefined control sequence.
l.968 \stelsectiein

pandoc is not an option for me at the moment: I am currently using 
Arch Linux and have not been able to get their Haskell installation 
to finish successfully.


1. The module uses a mix of english and dutch commands which doesn’t 
work (maybe it worked when module was written).


That was an experiment by Simon and (in latex style) it overloaded 
quite some low level stuff so it never really worked out well I think.


2. The code is outdated, written for MkII and rewrites commands which 
are already part of the core.


Indeed.

Hans

Thank you for your replies.  The hint given by Thomas was enough to 
allow me to get pandoc installed and I now have a workflow that provides 
ConTeXt output.


Many thanks.

Roger

This electronic communication is governed by the terms and conditions at
http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2012.php
___
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 module: simplesteps.

2012-12-14 Thread Philipp Gesang
···date: 2012-12-14, Friday···from: Andre Caldas···

  \unexpanded\def\uncover[#1]%
{\ctxlua{
   distance = simplesteps.distance_to_step(\!!bs#1\!!es)
   ...
}}
 
  it works because the  is now only part of the string.
 
 Thanks. That's what I needed. I guess
 bs = begin string
 es = end string.

These expand to Lua long strings, [===[ and ]===] respectively,
without checking, so theoretically the same issue will arise iff
your string contains ]===]. I consider the likelihood for this to
happen to be too low to bother, but if you want to be absolutely
on the safe side you can also use \luaescapestring. See the
Luatex manual, section 2.3.6.

Philipp



pgp9lYpucmZ36.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] New module: simplesteps.

2012-12-14 Thread Andre Caldas
 These expand to Lua long strings, [===[ and ]===] respectively,
 without checking, so theoretically the same issue will arise iff
 your string contains ]===]. I consider the likelihood for this to
 happen to be too low to bother, but if you want to be absolutely
 on the safe side you can also use \luaescapestring. See the
 Luatex manual, section 2.3.6.

The luaescapestring will also escape the quotation marks... :-)

I will use it, then.
I used to develop WEB systems. Very vulnerable to injection attacks. I
really like things properly escaped...


Cheers,
André Caldas.
___
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] [luatex-plain] call to undefined function in font-def.lua

2012-12-09 Thread Hans Hagen

On 12/8/2012 1:27 PM, Philipp Gesang wrote:

Hi Hans,

the plain format from context calls a non-existing function
fonts.goodies.filenames.resolve(). It appears that the format was
not updated to include the expected code from fonts-gds.lua. [1]
Terminal output below.


that code is context specific so we need

local resolvefile   = fontgoodies and fontgoodies.filenames and 
fontgoodies.filenames.resolve or function(s) return s end


no beta today (as i upgraded some low level file code which needs 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] drops module (draft)

2012-12-07 Thread Peter Rolf
Am 06.12.2012 19:35, schrieb Marco:
 On 2012–12–06 Aditya Mahajan wrote:
 
 I always thought that shadows were possible to do in PDF (after all
 TikZ does it using some type of PDF primitives).
 
 It is. I use MetaPost to draw the shadows using the shading
 mechanism:
 
   withshading(circular, urcorner bottom_left, urcorner bottom_left, radius, 
 0)
   withfromshadecolor \MPcolor{c:transparent}
   withtoshadecolor   col;


Don't mix Type2/3 with Type 4/5 shadings (see my answer to Aditya). They
are all called 'shadings', but only the latter can be used for the
creation of realistic looking drop shadows.

And to repeat myself: there is nothing wrong with bitmaps. Take the best
from both worlds ;-)


 and it works well if placed in an overlay. However, I did not manage
 to get it working in TikZ, it could not display shadings to
 transparent colours (which is very handy for slides where the
 shadings might overlay graphics with a non-uniform colour).
 
 Since you are the PDF expert, I am interested in knowing why you
 choose to go the ImageMagic route.
 
 From my experience shadows made from MetaPost shadings (which uses
 PDF shadings, I assume) are quite low level. It's harder to get the
 angle, distance and shadow size correctly implemented. I think the
 ImageMagick shadings are more high level and ready to use.
 
 
 Marco
 
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 

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

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

Re: [NTG-context] drops module (draft)

2012-12-06 Thread Marco
On 2012–12–06 Aditya Mahajan wrote:

 I always thought that shadows were possible to do in PDF (after all
 TikZ does it using some type of PDF primitives).

It is. I use MetaPost to draw the shadows using the shading
mechanism:

  withshading(circular, urcorner bottom_left, urcorner bottom_left, radius, 0)
  withfromshadecolor \MPcolor{c:transparent}
  withtoshadecolor   col;

and it works well if placed in an overlay. However, I did not manage
to get it working in TikZ, it could not display shadings to
transparent colours (which is very handy for slides where the
shadings might overlay graphics with a non-uniform colour).

 Since you are the PDF expert, I am interested in knowing why you
 choose to go the ImageMagic route.

From my experience shadows made from MetaPost shadings (which uses
PDF shadings, I assume) are quite low level. It's harder to get the
angle, distance and shadow size correctly implemented. I think the
ImageMagick shadings are more high level and ready to use.


Marco

___
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] drops module (draft)

2012-12-06 Thread Hans Hagen

On 12/6/2012 7:35 PM, Marco wrote:

On 2012–12–06 Aditya Mahajan wrote:


I always thought that shadows were possible to do in PDF (after all
TikZ does it using some type of PDF primitives).


It is. I use MetaPost to draw the shadows using the shading
mechanism:

   withshading(circular, urcorner bottom_left, urcorner bottom_left, radius, 
0)
   withfromshadecolor \MPcolor{c:transparent}
   withtoshadecolor   col;

and it works well if placed in an overlay. However, I did not manage
to get it working in TikZ, it could not display shadings to
transparent colours (which is very handy for slides where the
shadings might overlay graphics with a non-uniform colour).


I think drops are somewhat different as they might follow different 
rules than circular or linear shades



Since you are the PDF expert, I am interested in knowing why you
choose to go the ImageMagic route.


 From my experience shadows made from MetaPost shadings (which uses
PDF shadings, I assume) are quite low level. It's harder to get the
angle, distance and shadow size correctly implemented. I think the
ImageMagick shadings are more high level and ready to use.


Yes. Of course we can make shading more clever, but to be honest I never 
had the need.


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

2012-11-29 Thread Hans Hagen

On 11/29/2012 8:34 PM, Andre Caldas wrote:

Hello!


Is 'toppath:' prefix working?


I use it only with \component, \environment, \product, \project. It
works even if I do like this:

$ mkdir build
$ cd build
$ context ../src/products/assorted.tex



context.exe Test\t-TopPath.mkiv
In this situation compilation fails.
How to make it work?


It seems your observations in an e-mail below are right. Prefixes do
not seem to work with \input. I don't know if prefixes are supposed to
work or not with \input... but this issue is not related to toppath.


input is rather low level (we have \component, processfile, readfile etc 
instead)


-
  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] Updating texlive?

2012-11-27 Thread Hans Hagen

On 11/28/2012 12:39 AM, Mojca Miklavec wrote:

On Wed, Nov 28, 2012 at 12:20 AM, Martin Schröder wrote:

2012/11/27 Mojca Miklavec:

What exactly do you mean with a canonical way? The most reliable way


How about delivering a new version through tlcontrib?


Doable***, but a new beta is usually released several times per day
(and sometimes doesn't even compile the format).


Not that often, does it? Making formats is part of making the zip so it 
only fails when i forgot to add a file to the zip (in which case on my 
machine the file from my local tree is taken).



There is one extra prerequisite though: it would have to be marked as
highly experimental. Not everyone who decides to add tlcontrib to the
list of repositories should get the latest beta every few hours. This
feature is or was on Taco's TODO list on my request, but putting
ConTeXt modules into TLContrib structure currently has a much higher
priority than this feature.


indeed. updating tlcontrib can happen with a low frequency (also because 
sometimes betas are real betas with new features)



It might be a lot easier/faster to simply create a second repository
with just ConTeXt betas.


personally i always use special trees for projects that I inly update
when i need a new feature

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] error when using externalfigure

2012-11-26 Thread Robert Blackstone

On 26 Nov 2012, at 11:41 , Pavel Dohnal pavel.doh...@twobits.cz , wrote:
 When I try this particural image
 convert it gives me this image:
 http://cdn-images-squared.tripomatic.com/e46c68903d2c4445f05a0369578c17dd-270.jpg
 But after context runs this file it falls down with error message:


I have no idea what you are trying to make, but if you can see the picture on 
your screen and you make a screenshot, ConTeXt will process that without a 
problem. The problem is perhaps that its resolution is a bit low so that you 
are limited as far as its size of the picture is concerned. But 4x4 cm would 
give an acceptable result, I think. (I tested it and the result is quite OK.)

Best regards,

Robert Blackstone


___
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] ConTeXt: Page numbering in words for spanish

2012-11-21 Thread Acidrums4
I Sietse, I tried the procedure you described without success. I'm using 
ConTeXt 2011 (I know, it's not the latest and etc, but I got to work with this 
version because compatibility with my work and I have some troubles with 
projects). I pasted the code you wrote at the end of core-con.lua and ran 
'context --make cont-en'. But I got the following:

=== Begining of the output ===

+ /usr/share/texmf-dist/tex/context/base/core-con.lua
! LuaTeX error /usr/share/texmf-dist/tex/context/base/core-con.lua:924: 
attempt to index global 'verbose' (a nil value)
stack traceback:
/usr/share/texmf-dist/tex/context/base/core-con.lua:924: in main chunk
/usr/share/texmf-dist/tex/context/base/luat-cod.lua:42: in function 
'registercode'
main ctx instance:1: in main chunk.

system   tex  error on line 16 in file /usr/share/texmf-
dist/tex/context/base/context.mkiv: LuaTeX error  ...

 6 %D author=Hans Hagen,
 7 %D   date=\currentdate,
 8 %D  copyright={PRAGMA / Hans Hagen \ Ton Otten}]
 9 %C
10 %C This module is part of the \CONTEXT\ macro||package and is
11 %C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12 %C details.
13 
14 \catcode`\{=1 \catcode`\}=2 \catcode`\#=6
15 
16   %D From the next string (which is set by the script that assembles the
17 %D distribution) later on we will calculate a number that can be used
18 %D by use modules to identify the feature level. Starting with version
19 %D 2004.8.30 the low level interface is english. Watch out and adapt
20 %D your styles an modules.
21 
22 \edef\contextformat {\jobname}
23 \edef\contextversion{2011.05.18 18:04}
24 
25 %D For those who want to use this:
26 


\registerctxluafile ...ua.registercode(#1,#2)}
  
l.16 \registerctxluafile{core-con}{1.001}
 
?

=== End of the output ===

Any clue about this? Thanks!

PD.: Here is the correct translation of the 'words' array (and as a gift for 
your effort on this, a translation for 'days' and 'months' arrays):

local words = {
[0] = cero,
[1] = uno,
[2] = dos,
[3] = tres,
[4] = cuatro,
[5] = cinco,
[6] = seis,
[7] = siete,
[8] = ocho,
[9] = nueve,
   [10] = diez,
   [11] = once,
   [12] = doce,
   [13] = trece,
   [14] = catorce,
   [15] = quince,
   [16] = sixteen,
   [17] = seventeen,
   [18] = eighteen,
   [19] = nineteen,
   [20] = veinte,
   [30] = treinta,
   [40] = cuarenta,
   [50] = cincuenta,
   [60] = sesenta,
   [70] = setenta,
   [80] = ochenta,
   [90] = noventa,
  [100] = cien,
 [1000] = mil,
   [1000^2] = millón,
   [1000^3] = mil millones,
   [1000^4] = billón,
}

local days = { -- not variables.sunday
domingo,
lunes,
martes,
miércoles,
jueves,
viernes,
sábado,
}

local months = { -- not variables.januari
enero,
febrero,
marzo,
abril,
mayo,
junio,
julio,
agosto,
septiembre,
octubre,
noviembre,
diciembre,
}

On Mié 21 Nov 2012 12:25:03 pm Sietse Brouwer escribió:
 I worked up the code below,
 put it in core-con.lua,
 and recompiled ConTeXt with `context --make cont-en`.
 It gives the following output. Does it look correct?
___
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] \startplacefigure equivalent of \placefigure

2012-11-18 Thread Wolfgang Schuster

Am 18.11.2012 um 21:58 schrieb Romain Diss romain.d...@yahoo.fr:

 Hi all,
 
 I did not find the \startplacefigure equivalent of:
 \placefigure
[high,low] % - here are the options I need
{test}
{\externalfigure[pic-test]}
 
 I checked in the sources but found nothing about these 'high', 'low' options.

\startplacefigure[location={high,low},title=test]
  \externalfigure[pic-test]
\stopplacefigure

See also http://www.ntg.nl/pipermail/ntg-context/2012/069414.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] \startplacefigure equivalent of \placefigure

2012-11-18 Thread Romain Diss
Le dimanche 18 novembre 2012, Wolfgang Schuster a écrit :
 Am 18.11.2012 um 21:58 schrieb Romain Diss romain.d...@yahoo.fr:
  I did not find the \startplacefigure equivalent of:
  \placefigure
 [high,low] % - here are the options I need
 {test}
 {\externalfigure[pic-test]}
 \startplacefigure[location={high,low},title=test]
   \externalfigure[pic-test]
 \stopplacefigure
Thank you. Like most of the time, the answer seems obvious afterwards.

 See also http://www.ntg.nl/pipermail/ntg-context/2012/069414.html
The wiki also mentions this. I took a look on it before posting but it didn't 
help me because I only used location= to place the caption.

-- 
Romain Diss
romain.d...@yahoo.fr
___
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] \chapter{} vs \startchapter..\stopchapter

2012-11-09 Thread Hans Hagen

On 11/9/2012 7:32 PM, Bill Meahan wrote:

On 11/09/2012 01:25 PM, luigi scarso wrote:




On Fri, Nov 9, 2012 at 7:12 PM, Bill Meahan
subscribed_li...@meahan.net mailto:subscribed_li...@meahan.net wrote:



I don't quite understand the difference between tagged pdf and
what you get when you use a TOC. I get the expected bookmarks (PDF
TOC) using the latter.


You need acrobat (the adobe reader is not enough, but I still have to
check the reader 11)  to see the tagged content.



Got it. Sadly, recent versions of Acrobat do not (currently) run on
Linux and there are problems running it via WINE. I do have a legal copy
of Acrobat 8 around here. Perhaps that will work.

Adobe stopped supporting Linux after Acrobat 9 :(


After I had upgraded to windows 8 and was reinstalling acrobat reader I 
found out that there was a new version. (With previous versions I was 
participating in the beta test program. And normally Martin announces 
new acrobats so maybe the new version has a very low profile.)


Unfortunately the pdfopen program cannot handle acrobat reader xi (but I 
use full acrobat x so it's no big deal).


As far as I can see, the reader does not support showing tags (which is 
weird as it's part of accessibility).


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] Highlight current chapter in list

2012-11-08 Thread Hans Hagen

On 11/8/2012 11:06 AM, Marco Patzer wrote:

2012-11-08 Wolfgang Schuster:

Hi Wolfgang!


\startsetups [headlist]
   \framed[align=normal, frame=off]
 {\placelist [chapter] [alternative=highlight, criterium=all]}
\stopsetups

\definelistalternative
   [highlight]
   [renderingsetup=list:highlight]


I like the flexibility of renderingsetups for \defineheadalternative,
but frankly, I didn't know they can be used for lists as well and
I was clueless about the best place to hook into.


\startsetups [list:highlight]
   \par
   \startlinealignment[middle]
 \doifelse{\fetchmark[chapter][first]}{\currentlistentrytitle}

%\doifelse{\fetchmark[chapter][first]}{\ctxcommand{listtitle(\currentlist,\currentlistindex)}}
   {\color[red] {\currentlistentrytitle}}
   {\color[blue]{\currentlistentrytitle}}
   \stoplinealignment
   \par
\stopsetups


That's a neat and clean solution. Thanks Wolfgang.



Wolfgang:

Say that we have:

\installcorenamespace{internalreference}

\def\structureheadlocation#1%

{\csname\??internalreference\ifcsname\??internalreference#1\endcsname#1\else\s!default\fi\endcsname}

\letvalue{\??internalreference\s!default}\!!zerocount

\def\storeinternalreference#1#2%
  {\setxvalue{\??internalreference\currentstructurename}{#2}}

and in \strc_sectioning_register add:

\storeinternalreference\currentstructurename\nextinternalreference

then we can say:

\startsetups [list:highlight]
  \par
  \startlinealignment[middle]
  \doifelse\currentlistentrylocation{\structureheadlocation{chapter}}
  {\color[red] {\currentlistentrytitle}}
  {\color[blue]{\currentlistentrytitle}}
  \stoplinealignment
  \par
\stopsetups

which is just comparing numbers (so one can also say:

\startsetups [list:highlight]
  \par
  \startlinealignment[middle]
  \ifnum\currentlistentrylocation=\structureheadlocation{chapter}\relax
  \color[red] {\currentlistentrytitle}
  \else
  \color[blue]{\currentlistentrytitle}
  \fi
  \stoplinealignment
  \par
\stopsetups

but that's for low level coders)

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] ConTeXt unofficial test suite stub (chemistry)

2012-10-18 Thread Alan BRASLAU
On Thu, 18 Oct 2012 10:41:00 +0200
Sietse Brouwer sbbrou...@gmail.com wrote:

 Alpha particles are \lohi[left]{40}{2}He.

Alpha particles are He\high{2+} (helium nucleus)
not to be confused with He\low{2} (helium molecules)
that DO exist but are unstable and only last 13 seconds or so.

Someone needs to fix the wiki... (done!)

\lohi[left]{}{4}He is a boson; \lohi[left]{}{3} is a fermion.

By the way, \lohi[left]{2}{4}He is somewhat a tautology, like all such
isotopic nomenclature, as He ALWAYS has an atomic number of 2,
otherwise it is not He (and U ALWAYS has an atomic number of 92,
otherwise it is no longer U).

Alan

-- 
Alan Braslau
CEA DSM-IRAMIS-SPEC
CNRS URA 2464
Orme des Merisiers
91191 Gif-sur-Yvette cedex FRANCE
tel: +33 1 69 08 73 15
fax: +33 1 69 08 87 86
mailto:alan.bras...@cea.fr
___
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] ConTeXt unofficial test suite stub

2012-10-17 Thread Marco Pessotto
Marco Patzer home...@lavabit.com writes:

 Looking at the diffs, many of the differences are really tiny, but
 differences exist nevertheless. It will take me some time to sort out
 which ones are just tiny space shifting, and which ones give really
 different output.

 That's why I use a header for each test file. You can specify
 “sensitivity=low|medium|high”, this sets a predefined tolerance for
 the page difference. I don't see any other option. There is no
 single value which is sensitive enough, for instance to detect if a
 footnote is subscripted or not and at the same time tolerant enough
 not to always mark a fifty page document as “failed”.

I'm not sure that exists a “fuzzy” algorithm for the tolerance. From my
testing, a minimal shift, say, to the right, on a full page will
generate a lot of noise, because each glyph will be “doubled”. I'm
generating, with the visual diffs, a script to launch two PDF viewers and
eventually promote the generated to the new reference.

I guess there is no shortcuts to the manual ispection of the diffs.

-- 
Marco

___
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] ConTeXt unofficial test suite stub

2012-10-17 Thread Hans Hagen

On 17-10-2012 18:57, Marco Pessotto wrote:

Marco Patzer home...@lavabit.com writes:


Looking at the diffs, many of the differences are really tiny, but
differences exist nevertheless. It will take me some time to sort out
which ones are just tiny space shifting, and which ones give really
different output.


That's why I use a header for each test file. You can specify
“sensitivity=low|medium|high”, this sets a predefined tolerance for
the page difference. I don't see any other option. There is no
single value which is sensitive enough, for instance to detect if a
footnote is subscripted or not and at the same time tolerant enough
not to always mark a fifty page document as “failed”.


I'm not sure that exists a “fuzzy” algorithm for the tolerance. From my
testing, a minimal shift, say, to the right, on a full page will
generate a lot of noise, because each glyph will be “doubled”. I'm
generating, with the visual diffs, a script to launch two PDF viewers and
eventually promote the generated to the new reference.

I guess there is no shortcuts to the manual ispection of the diffs.


vertical shifts are probably more an issue; for horizontal shifts you 
can use a threshold of .1em because that catches spaces and distances 
etc but ignores differences in fonts.


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] ConTeXt unofficial test suite stub

2012-10-17 Thread Hans Hagen

On 17-10-2012 19:58, Marco Pessotto wrote:


Ok, this is my first bug report. I noticed that the column width/margin
is quite altered since TL12. There are some other problems, tough.

Full report here:

https://github.com/melmothx/context-unofficial-test-suite/commit/8575456ae9e5dfe1f5dea5ac1224f75b5d1eb0a2

(It's stored in the commit log).

I also caught some problems which are fixed in the beta, but broken in
TL12.

Hans Hagen writes:


vertical shifts are probably more an issue; for horizontal shifts you
can use a threshold of .1em because that catches spaces and distances
etc but ignores differences in fonts.


I'm comparing pixel by pixel, I don't have any idea how to implement a
sensible treshold system, without writing another TeX engine...


Last time I looked into this (quite a while ago) i did something like 
the attached; in there you find:


local command = string.format('gm convert -verbose -density 72 %s 
%s',pdfname,ppmname)


so I used a rather low density and (and then used md5 for comparing)

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 not modules then modules = { } end modules ['mtx-testsuite'] = {
version   = 1.002,
comment   = companion to mtxrun.lua,
author= Hans Hagen, PRAGMA-ADE, Hasselt NL,
copyright = PRAGMA ADE / ConTeXt Development Team,
license   = see context related readme files
}

-- maybe use a list

local helpinfo = [[
--compare compare files (--pattern --newname --oldname --collect)
]]

local application = logs.application {
name = mtx-testsuite,
banner   = Experiments with the testsuite.,
helpinfo = helpinfo,
}

local gmatch, match, gsub, find, lower, format = string.gmatch, string.match, string.gsub, string.find, string.lower, string.format
local concat = table.concat
local split = string.split
local are_equal = table.are_equal
local tonumber = tonumber

local report = application.report

scripts   = scripts   or { }
scripts.testsuite = scripts.testsuite or { }

function scripts.testsuite.compare()
local pattern = environment.argument(pattern)
local oldname = environment.argument(oldname)
local newname = environment.argument(newname)
local collect = environment.argument(collect)
if pattern and newname then
oldname = oldname and file.addsuffix(oldname,lua)
newname = file.addsuffix(newname,lua)
local files = dir.glob(pattern)
local oldhashes = oldname and lfs.isfile(oldname) and dofile(oldname) or { }
local newhashes = {
version = 0.01,
files   = { },
data= os.date(),
}
local old = oldhashes and oldhashes.files or {}
local new = newhashes and newhashes.files or {}
for i=1,#files do
local filename = files[i]
local olddata = old[filename]
if collect then
new[filename] = olddata or { status = collected }
elseif olddata and olddata.status == skip then
new[filename] = olddata
else
local dirname = file.dirname(filename)
local basename = file.basename(filename)
local texname = basename
local pdfname = file.replacesuffix(basename,pdf)
local ppmname = temp.ppm
local workdir = lfs.currentdir()
lfs.chdir(dirname)
os.remove(pdfname)
os.remove(ppmname)
local command = string.format('context --batch %s',texname)
local result = os.execute(command)
if lfs.isfile(texname) then
local command = string.format('gm convert -verbose -density 72 %s %s',pdfname,ppmname)
local result = os.execute(command)
if lfs.isfile(ppmname) then
local newhash = md5.HEX(io.loaddata(ppmname))
local oldhash = olddata and olddata.hash
if not oldhash then
new[filename] = { status = new, hash = newhash }
elseif oldhash == newhash then
new[filename] = { status = unchanged, hash = oldhash }
else
new[filename] = { status = changed, hash = newhash }
end
else
new[filename] = { status = error, comment = processing problem }
end
else
new[filename] = { status = error, comment = conversion problem

[NTG-context] Controlling vertical position of floats

2012-10-15 Thread Marcin Borkowski
Hi again,

\placefigure[right,option]{caption}{figure}

does different things with option being (a) empty, (b) high, (c) low.
Could anyone explain to me the exact meaning of these three
alternatives?  Also, is it possible to manually fine-tune the vertical
position, so that the figure seems optically aligned with the
surrounding text?

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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] [OT] scilua

2012-09-19 Thread luigi scarso
 www.scilua.org

This is a MIT licensed library for general purpose numerical computing
written entirely in Lua(JIT).

The Sci library is composed of a number of modules:

* alg: vector and matrix algebra operations;
* math: special mathematical functions;
* quad: quadrature (integration) algorithms for real-valued functions;
* fmin,fmax: function minimization and maximization via local and
global algorithms;
* prng: pseudo random number generators;
* qrng: quasi random number generators, also known as low discrepancy
sequence generators;
* dist: statistical distributions.


PS:
give a look  at
http://www.scilua.org/sci_math.html
to see the power of mathjax

-- 
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] [OT] scilua

2012-09-19 Thread Aditya Mahajan

On Thu, 20 Sep 2012, luigi scarso wrote:


www.scilua.org

This is a MIT licensed library for general purpose numerical computing
written entirely in Lua(JIT).

The Sci library is composed of a number of modules:

* alg: vector and matrix algebra operations;
* math: special mathematical functions;
* quad: quadrature (integration) algorithms for real-valued functions;
* fmin,fmax: function minimization and maximization via local and
global algorithms;
* prng: pseudo random number generators;
* qrng: quasi random number generators, also known as low discrepancy
sequence generators;
* dist: statistical distributions.


Have you played around with loading it from within ConTeXt?

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] [OT] scilua

2012-09-19 Thread luigi scarso
On Thu, Sep 20, 2012 at 1:48 AM, Aditya Mahajan adit...@umich.edu wrote:

 On Thu, 20 Sep 2012, luigi scarso wrote:

  www.scilua.org

 This is a MIT licensed library for general purpose numerical computing
 written entirely in Lua(JIT).

 The Sci library is composed of a number of modules:

 * alg: vector and matrix algebra operations;
 * math: special mathematical functions;
 * quad: quadrature (integration) algorithms for real-valued functions;
 * fmin,fmax: function minimization and maximization via local and
 global algorithms;
 * prng: pseudo random number generators;
 * qrng: quasi random number generators, also known as low discrepancy
 sequence generators;
 * dist: statistical distributions.


 Have you played around with loading it from within ConTeXt?

no, I think you need luajit

-- 
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] Problem with *lettrine* module in Mk-iv

2012-09-10 Thread Sietse Brouwer
Hello Francisco,

Welcome to ConTeXt! You are sure to enjoy it here.

 My conclusion is that *lettrine* does not work correctly with Mark-iv and
 there is somewhere a bug that has to be corrected. But I could be
 mistaken. Am I doing something wrongly?

No, you are correct, there is a bug. It happens on my end, too; I have
attached the resulting output.

\usemodule[lettrine]
\starttext
\lettrine[Lines=3]{T}{he two} typeset arguments are the
dropped capital. \input knuth
\stoptext

I had a look at the module code, but it's too low-level for me, so I'm
CC-ing Taco Hoekwater who wrote the module. Depending on how trivial
the bug is, and how busy Taco is, he might be able to help.

Kind regards,
Sietse
Sietse Brouwer


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

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

Re: [NTG-context] Problem with *lettrine* module in Mk-iv

2012-09-10 Thread Jörg Hagmann
I had to switch to \placeinitial, e.g.

Instead of:
% \usemodule[lettrine]
% \setuplettrine[Raise=0.1,FontHook=\darkgrey,TextFont=\tf]

I used:

\setupinitial[color=darkgrey,n=2,voffset=-1.5ex]
and then:
\placeinitial My text …

See also 
http://archive.contextgarden.net/message/20120322.214713.ca22f882.en.html

Cheers, Jörg

On Sep 10, 2012, at 1:43 PM, Sietse Brouwer wrote:

 Hello Francisco,
 
 Welcome to ConTeXt! You are sure to enjoy it here.
 
 My conclusion is that *lettrine* does not work correctly with Mark-iv and
 there is somewhere a bug that has to be corrected. But I could be
 mistaken. Am I doing something wrongly?
 
 No, you are correct, there is a bug. It happens on my end, too; I have
 attached the resulting output.
 
 \usemodule[lettrine]
 \starttext
 \lettrine[Lines=3]{T}{he two} typeset arguments are the
 dropped capital. \input knuth
 \stoptext
 
 I had a look at the module code, but it's too low-level for me, so I'm
 CC-ing Taco Hoekwater who wrote the module. Depending on how trivial
 the bug is, and how busy Taco is, he might be able to help.
 
 Kind regards,
 Sietse
 Sietse Brouwer
 lettrine-bug.pdf___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___


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

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


[NTG-context] Luatex crash with x86-64 Linux binary

2012-09-10 Thread Brian R. Landy
Hi, I am running the latest minimals on a 64bit Linux system and ran 
into a luatex crash with a specific file.  I reduced the file down to a 
simpler version that still triggers the crash, and thought it would be 
of some interest to post (the resulting pdf, if generated, will be ugly 
since I removed a lot of formatting, and some of the code in the file 
may appear extraneous).

I am running:

$ context --version
mtx-context | ConTeXt Process Management 0.60
mtx-context | current version: 2012.09.06 23:03

$ luatex --version
This is LuaTeX, Version beta-0.70.2-2012052410 (TeX Live 2012)

What I think makes this interesting is the same file does not crash on 
three other setups I tested:
- 32bit OS X (beta-0.70.2-2012052310)
- 64bit OS X (beta-0.70.2-2012052309)
- the same Linux system, but I replaced the 64bit Linux luatex binary 
  with the 32bit Linux binary (beta-0.70.1-2012052416 (rev 4277), I see 
  this is an older version but I downloaded directly from the minimals 
  site today).  It rebuilt caches and processed the file successfully.

I updated minimals on both OS X systems today so all three systems 
should be otherwise identically configured.

Various alterations to the file can avoid the crash; a few I found 
are---adding a \strut before the word jumbo, removing the nested bTABLE 
(this appears to be unneeded in the attached example), removing the 
\definefontfeature statement at the top of the file.

Anyway I'd be interested to know if anyone else sees the same issue.  
I'm sure this is a real edge case error but hope it is helpful to track 
down the problem.  Please let me know if there is any other debugging 
info you would like to see from my end.

Thanks,
Brian\definefontfeature [default] [default] [kern=yes, liga=yes, 
texligatures=yes, texquotes=yes, protrusion=pure, expansion=quality, mode=node, 
script=latn]%
\setupbodyfont[modern,10pt]%
\starttext%
\start%
\bTABLE[offset=overlay,frame=off,align=middle,aligncharacter=no]%
\bTR%
\bTD[]{%
\start%
\setupTABLE[r][5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,4,3,2][loffset=0.020in]%
\setupTABLE[r][5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,4,3,2][roffset=0.020in]%
\setupTABLE[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][4][bottomframe=on]%
\setupTABLE[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][4,3,2][align={middle,low},aligncharacter=no]%
\setupTABLE[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][1,4,3,2][style={\switchtobodyfont[modern,rm]\bf}]%
\setupTABLE[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][5][topframe=on]%
\setupTABLE[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][20][align={flushleft,lohi},aligncharacter=no,style={\small}]%
\setupTABLE[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][1][align={middle,lohi},aligncharacter=no]%
\setupTABLE[r][4,3,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19][frame=off]%
\setupTABLE[r][2][topframe=on]%
\setupTABLE[r][4][bottomframe=on]%
\setupTABLE[r][19][bottomframe=on]%
\setupTABLE[23][4,3,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19][rightframe=on]%
\setupTABLE[1][4,3,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19][leftframe=on]%
\setupTABLE[1][4,3,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19][frame=off,leftframe=on,rightframe=on,aligncharacter=no]%
\setupTABLE[1][2][topframe=on]%
\setupTABLE[1][5,19][topframe=on,bottomframe=on]%
\setupTABLE[1][19][bottomframe=on]%
\setupTABLE[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][5][topframe=on]%
\setupTABLE[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][19,19][bottomframe=on]%
\setupTABLE[1][4,3,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19][leftframe=on,rightframe=on]%
\setupTABLE[1][4,3,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19][frame=off,leftframe=on,rightframe=on,aligncharacter=no]%
\setupTABLE[1][2][topframe=on]%
\setupTABLE[1][5,19][topframe=on,bottomframe=on]%
\setupTABLE[1][19][bottomframe=on]%
\setupTABLE[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][5][topframe=on]%
\setupTABLE[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][19,19][bottomframe=on]%
\setupTABLE[2][4,3,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19][leftframe=on]%
\setupTABLE[2][4,3,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19][frame=off,leftframe=on,rightframe=on,aligncharacter=no]%
\setupTABLE[2][2][topframe=on]%
\setupTABLE[2][5,19][topframe=on,bottomframe=on]%
\setupTABLE[2][19][bottomframe=on]%
\setupTABLE[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][5][topframe=on]%
\setupTABLE[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][19,19][bottomframe=on]%
\setupTABLE[2][4,3,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19][leftframe=on,rightframe=on]%
\setupTABLE[2][4,3,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19][frame=off,leftframe=on,rightframe=on,aligncharacter=no]%
\setupTABLE[2][2][topframe=on]%
\setupTABLE[2][5,19][topframe=on,bottomframe=on]%
\setupTABLE[2][19][bottomframe=on]%
\setupTABLE

[NTG-context] Vertical alignment in Natural tables

2012-08-27 Thread Aditya Mahajan

Hi,

How do I set the vertical alignment of cells in natural tables? I remember 
that


\setupTABLE[align={middle,middle}]

used to set center align vertically and horizontally. Currently, 
\setupTABLE[align={middle,high}] and \setupTABLE[align={middle,low}] work 
as expected, but \setupTABLE[align={middle,middle}] does not work.


I also tried \setupTABLE[location={low}] (or lohi, or middle), but the 
calculation of height is wrong in those cases.


Minimal example:


\startsetups table
  \setupTABLE[align={middle,middle}]
\stopsetups

\starttext

\startTABLE[setups=table]
  \NC Ward \NC \input ward \endgraf \NC \NR
\stopTABLE

\stoptext


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] Vertical alignment in Natural tables

2012-08-27 Thread Wolfgang Schuster

Am 27.08.2012 um 20:37 schrieb Aditya Mahajan adit...@umich.edu:

 Hi,
 
 How do I set the vertical alignment of cells in natural tables? I remember 
 that
 
 \setupTABLE[align={middle,middle}]
 
 used to set center align vertically and horizontally. Currently, 
 \setupTABLE[align={middle,high}] and \setupTABLE[align={middle,low}] work as 
 expected, but \setupTABLE[align={middle,middle}] does not work.
 
 I also tried \setupTABLE[location={low}] (or lohi, or middle), but the 
 calculation of height is wrong in those cases.
 
 Minimal example:
 
 
\startsetups table
  \setupTABLE[align={middle,middle}]
\stopsetups
 
\starttext
 
\startTABLE[setups=table]
  \NC Ward \NC \input ward \endgraf \NC \NR
\stopTABLE
 
\stoptext

Can you show your output because I can’t see something odd with 
\setupTABLE[align={middle,loci}]

Wolfgang


test.pdf
Description: Adobe PDF document


test.tex
Description: Binary data


___
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] Vertical alignment in Natural tables

2012-08-27 Thread Aditya Mahajan

On Mon, 27 Aug 2012, Wolfgang Schuster wrote:



Am 27.08.2012 um 20:37 schrieb Aditya Mahajan adit...@umich.edu:


Hi,

How do I set the vertical alignment of cells in natural tables? I remember that

\setupTABLE[align={middle,middle}]

used to set center align vertically and horizontally. Currently, 
\setupTABLE[align={middle,high}] and \setupTABLE[align={middle,low}] work as 
expected, but \setupTABLE[align={middle,middle}] does not work.

I also tried \setupTABLE[location={low}] (or lohi, or middle), but the 
calculation of height is wrong in those cases.

Minimal example:


   \startsetups table
 \setupTABLE[align={middle,middle}]
   \stopsetups

   \starttext

   \startTABLE[setups=table]
 \NC Ward \NC \input ward \endgraf \NC \NR
   \stopTABLE

   \stoptext


Can you show your output because I can’t see something odd with 
\setupTABLE[align={middle,loci}]


Thanks. That's the permutation that I did not try. Indeed, 
align={middle,lohi} works correctly. Sorry for the noise.


Thanks,
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] Creating TeX dimensions and counters registers directly in Lua

2012-08-22 Thread Jaroslav Hajtmar

Great!!!
Thanx very much Hans...

Normally I do all things in ConTeXt, but I am preparing a beginning 
tutorial for users of LaTeX and PlainTeX, who would be interested in 
getting to know the basics LuaTEX. Therefore I am seeking a solution 
applicable in LuaLaTeX and LuaPlain too.


Jaroslav Hajtmar



Dne 22.8.2012 14:12, Hans Hagen napsal(a):

On 22-8-2012 13:24, Jaroslav Hajtmar wrote:

Thank to Hans and Peter too.
It works in context fine now. I would like realize this same in pure
LuaTeX.

I was primarily in the query for it to find Lua equivalent of TeX
primitives \newdimen and  \newcount (for direct creating new TeX 
registers)

I could use something like \directlua{tex.newdimen.mydimen} that would
create TeX register mydimen and then
\directlua{tex.dimen.mydimen=200*2^16} which set value of register and
that should be present in TeX for direct use such as \the\mydimen etc.
I apologize for my naivete :-).


Just do:

tex.dimen[20001] = 100pt

at the lau end and at the tex end:

\dimen20001=100pt

keep in mind that \newdimen is just an allocator that associates a \cs 
and the implementation of that is pretty macro package dependent! 
Starting at 2 makes sure that you have no clash with existing 
registers.



Of course, I did not think that the global variable is magically changed
the registry value, I just did not know how to implement it.
Plus, I had in mind that ConTeXt conversion functions do not work in a
clean LuaTEX (without reading about some library functions).


Ok, but keep in mind that clean luatex does not exist. As soon as one 
starts doing things at the lua end that reflects on the tex end, you 
have a dependency.


I will add a context.newdimen function so that one can do:

\startluacode

document.mydimen = context.newdimen(MyDimen)

tex.dimen[document.mydimen] = 10pt

\stopluacode

\the\MyDimen

\MyDimen=100pt

\the\MyDimen

\startluacode
context(number.points(tex.dimen[document.mydimen]))
\stopluacode

Posting the implemenation makes no sense as it refers to low level 
context properties that users should not be troubled with.


PS. From the context point of view I see no advantages of using plain. 
First of all, one can still do pretty plain things in context.


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] Figured bass symbols in a text.

2012-08-12 Thread Robert Blackstone

On 10 aug. 2012, at 21:09, 19:59:36, Hans Hagen pra...@wxs.nl wrote
 The next beta has:
 
 \starttext
 
 \definelow   [MyLow]   [style=\txx]
 \definehigh  [MyHigh]  [style=\txx]
 \definelowhigh   [MyLoHi]  [style=\txx]
 \definelowmidhigh[MyLoMiHi][style=\txx]
 
 We have
 \ruledhbox{\low {L}} and \ruledhbox{\MyLow {L}} and
 \ruledhbox{\high{H}} and \ruledhbox{\MyHigh{H}} and
 \ruledhbox{\lohi {L}{H}} and \ruledhbox{\MyLoHi {L}{H}} and
 \ruledhbox{\lomihi{L}{M}{H}} and \ruledhbox{\MyLoMiHi{L}{M}{H}}.
 
 \stoptext

Hi Hans,
I just tested this for the figured bass symbols in my text. It is perfect.

And it has at least one important advantage over the plain-TeX method, kindly 
offered by Michael Rogers, in that it uses the same font as that for he main 
text, which, in my case, will be probably a sans-serif font. The plain TeX 
solution, as far as I could see, uses only the serif version of LM, so it would 
haven given me serif-like figured bass symbols in an otherwise sans-serif 
document.

Thank you very much.

Kind regards,
Robert


___
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] Figured bass symbols in a text.

2012-08-12 Thread Rogers, Michael K
On Aug 12, 2012, at 5:00 AM, Robert Blackstone wrote:
 On 10 aug. 2012, at 21:09, 19:59:36, Hans Hagen pra...@wxs.nl wrote
 The next beta has:

 \starttext

 \definelow   [MyLow]   [style=\txx]
 \definehigh  [MyHigh]  [style=\txx]
 \definelowhigh   [MyLoHi]  [style=\txx]
 \definelowmidhigh[MyLoMiHi][style=\txx]

 We have
\ruledhbox{\low {L}} and \ruledhbox{\MyLow {L}} and
\ruledhbox{\high{H}} and \ruledhbox{\MyHigh{H}} and
\ruledhbox{\lohi {L}{H}} and \ruledhbox{\MyLoHi {L}{H}} and
\ruledhbox{\lomihi{L}{M}{H}} and \ruledhbox{\MyLoMiHi{L}{M}{H}}.

 \stoptext

 Hi Hans,
 I just tested this for the figured bass symbols in my text. It is perfect.

 And it has at least one important advantage over the plain-TeX method, kindly 
 offered by Michael Rogers, in that it uses the same font as that for he main 
 text,...

It uses the math font, which is worse.  I should have wrapped the arguments 
with \hbox and thrown in a \tx or \txx.  Or waited a little longer for the good 
solution. :)

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] Clarification on methods of toggling maximum compression

2012-08-11 Thread Hans Hagen

On 11-8-2012 01:26, Kip Warner wrote:

On Sat, 2012-08-11 at 01:05 +0200, Hans Hagen wrote:

hm, suspicious


Really? It's over 300 pages in length and contains plenty of vector
graphics (more text). But actually that 70 MB seems an overestimate and
I must have been looking at something else.


yes, that's best because as soon as that command is called, the set
value of 'level' is used, no matter what other values has been set


Here is the result of some experimentation:

23,396,929 Bytes using just \setupbackend[level=9].

21,945,243 Bytes using the aforementioned, \pdfcompresslevel9, and
\maximumpdfcompression.

23,396,827 Bytes using none of those three.

So I guess I'm still not sure which one to use since the one you said
should be sufficient doesn't seem to compress it fully.


never use \pdf* commands directly .. way too low level and use the oher
command only for fast tests (i use it in small test files)


I made

\setupbackend[level=9]

listen to that setting also if no 'format' is set. Also, in the report 
at the end of a run, the compress levels are reported so that you can 
check it.



-
  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] Figured bass symbols in a text.

2012-08-10 Thread Hans Hagen

On 10-8-2012 18:08, Wolfgang Schuster wrote:


Am 10.08.2012 um 18:00 schrieb Rogers, Michael K mrog...@emory.edu:


Hi,

Since no one has offered a quick ConTeXt solution, I offer my usual -- a dumb 
Plain TeX solution:

\def\lomihi#1#2#3{${\scriptstyle{#2}}\limits_{#1}^{#3}$}

With the Computer Modern font, the top is a little further away from the middle 
than the bottom.  It can be adjusted with something like

\def\lomihi#1#2#3{${\scriptstyle{#2}}\limits_{#1}^{\lower0.23pt\hbox{$\scriptstyle{#3}$}}$}

but this would probably have to be adjusted for each font and size.


You can use \framed:

\defineframed[lohimi][align=flushleft,location=middle,frame=off,foregroundstyle=\tx]

\starttext
text \lohi{1}{2} text \lohimi{1\\2\\3} text
\stoptext


Neat trick.

===

Wolfgang,

The next beta has:

\starttext

\definelow   [MyLow]   [style=\txx]
\definehigh  [MyHigh]  [style=\txx]
\definelowhigh   [MyLoHi]  [style=\txx]
\definelowmidhigh[MyLoMiHi][style=\txx]

We have
\ruledhbox{\low {L}} and \ruledhbox{\MyLow {L}} and
\ruledhbox{\high{H}} and \ruledhbox{\MyHigh{H}} and
\ruledhbox{\lohi {L}{H}} and \ruledhbox{\MyLoHi {L}{H}} and
\ruledhbox{\lomihi{L}{M}{H}} and \ruledhbox{\MyLoMiHi{L}{M}{H}}.

\stoptext

So, we have low/high definable and clonable etc. Best check if the 
defaults are compatible. Valid parameters are 'up', 'down' and 
'distance' (dimensions) and of course 'style' and 'color'.


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] Figured bass symbols in a text.

2012-08-10 Thread Sietse Brouwer
Hans wrote:
 So, we have low/high definable and clonable etc. Best check if the defaults
 are compatible. Valid parameters are 'up', 'down' and 'distance'
 (dimensions) and of course 'style' and 'color'.

Just downloaded and tested, looks nice.
Small bug: It's called lomihi, but the arguments are placed middle/high/low.

For documentation/clarification, is the following correct?
distance = extra kerning, distance between lomihi and preceding character.
up = how much the {hi} arg is raised
down = how much the {low} arg is lowered

Support for the [left] keyword seems to have been dropped, but is
still in the documentation comments.
Perhaps instead support align=..., and turn distance= into kernbefore=
and kernafter=? Sorry about not knowing enough to implement it myself.

Cheers,
Sietse

On Fri, Aug 10, 2012 at 7:59 PM, Hans Hagen pra...@wxs.nl wrote:
 On 10-8-2012 18:08, Wolfgang Schuster wrote:


 Am 10.08.2012 um 18:00 schrieb Rogers, Michael K mrog...@emory.edu:

 Hi,

 Since no one has offered a quick ConTeXt solution, I offer my usual -- a
 dumb Plain TeX solution:

 \def\lomihi#1#2#3{${\scriptstyle{#2}}\limits_{#1}^{#3}$}

 With the Computer Modern font, the top is a little further away from the
 middle than the bottom.  It can be adjusted with something like


 \def\lomihi#1#2#3{${\scriptstyle{#2}}\limits_{#1}^{\lower0.23pt\hbox{$\scriptstyle{#3}$}}$}

 but this would probably have to be adjusted for each font and size.


 You can use \framed:


 \defineframed[lohimi][align=flushleft,location=middle,frame=off,foregroundstyle=\tx]

 \starttext
 text \lohi{1}{2} text \lohimi{1\\2\\3} text
 \stoptext


 Neat trick.

 ===

 Wolfgang,

 The next beta has:

 \starttext

 \definelow   [MyLow]   [style=\txx]
 \definehigh  [MyHigh]  [style=\txx]
 \definelowhigh   [MyLoHi]  [style=\txx]
 \definelowmidhigh[MyLoMiHi][style=\txx]

 We have
 \ruledhbox{\low {L}} and \ruledhbox{\MyLow {L}} and
 \ruledhbox{\high{H}} and \ruledhbox{\MyHigh{H}} and
 \ruledhbox{\lohi {L}{H}} and \ruledhbox{\MyLoHi {L}{H}} and
 \ruledhbox{\lomihi{L}{M}{H}} and \ruledhbox{\MyLoMiHi{L}{M}{H}}.

 \stoptext

 So, we have low/high definable and clonable etc. Best check if the defaults
 are compatible. Valid parameters are 'up', 'down' and 'distance'
 (dimensions) and of course 'style' and 'color'.

 Hans

 -
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
  | www.pragma-pod.nl
 -

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

 maillist : ntg-context@ntg.nl /
 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Clarification on methods of toggling maximum compression

2012-08-10 Thread Hans Hagen

On 11-8-2012 00:19, Kip Warner wrote:

Hey list,

I've noticed at least three methods of setting what I think is the
generated PDF to maximum compression.


the official way, plays nicely with pdf standards:


\setupbackend[level=9]


pretty low level, might even disappear (overloaded):


\pdfcompresslevel9


low level, but wil stay:


\maximumpdfcompression



Are these all redundant? Do they do different things? Do I need but one
to achieve the desired maximum compression of the resulting PDF?


keep in mind that max compression slows down processing and often not 
much is gained


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] Figured bass symbols in a text.

2012-08-10 Thread Hans Hagen

On 10-8-2012 21:09, Sietse Brouwer wrote:

Hans wrote:

So, we have low/high definable and clonable etc. Best check if the defaults
are compatible. Valid parameters are 'up', 'down' and 'distance'
(dimensions) and of course 'style' and 'color'.


Just downloaded and tested, looks nice.
Small bug: It's called lomihi, but the arguments are placed middle/high/low.


ok, i'll fix that ... (or maybe midlowhigh is nicer ?)


For documentation/clarification, is the following correct?
distance = extra kerning, distance between lomihi and preceding character.


only with low, high an lohi


up = how much the {hi} arg is raised
down = how much the {low} arg is lowered


indeed


Support for the [left] keyword seems to have been dropped, but is
still in the documentation comments.


still there, only for lohi .. maybe we should add an align key some day


Perhaps instead support align=..., and turn distance= into kernbefore=
and kernafter=? Sorry about not knowing enough to implement it myself.


hm, distance is often used for this so that's better

I'll do 'align' when there is demand for it.

Thanks for keeping the wiki so up to date.

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] Clarification on methods of toggling maximum compression

2012-08-10 Thread Hans Hagen

On 11-8-2012 01:00, Kip Warner wrote:

On Sat, 2012-08-11 at 00:57 +0200, Hans Hagen wrote:

Are these all redundant? Do they do different things? Do I need but one
to achieve the desired maximum compression of the resulting PDF?


keep in mind that max compression slows down processing and often not
much is gained


Hey Hans. My document shrinks from about 70 MB to 20MB with compression.


hm, suspicious


But back to my original question, do I need all three or are they all
redundant and only one of them I actually need? If only one is
necessary, should I just use \setupbackend[level=9] ?


yes, that's best because as soon as that command is called, the set 
value of 'level' is used, no matter what other values has been set


never use \pdf* commands directly .. way too low level and use the oher 
command only for fast tests (i use it in small test files)


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] Clarification on methods of toggling maximum compression

2012-08-10 Thread Kip Warner
On Sat, 2012-08-11 at 01:05 +0200, Hans Hagen wrote:
 hm, suspicious

Really? It's over 300 pages in length and contains plenty of vector
graphics (more text). But actually that 70 MB seems an overestimate and
I must have been looking at something else.

 yes, that's best because as soon as that command is called, the set 
 value of 'level' is used, no matter what other values has been set

Here is the result of some experimentation:

23,396,929 Bytes using just \setupbackend[level=9].

21,945,243 Bytes using the aforementioned, \pdfcompresslevel9, and
\maximumpdfcompression.

23,396,827 Bytes using none of those three.

So I guess I'm still not sure which one to use since the one you said
should be sufficient doesn't seem to compress it fully.

 never use \pdf* commands directly .. way too low level and use the oher 
 command only for fast tests (i use it in small test files)

Understood.

-- 
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] Strange bug with \ in footnotes

2012-08-05 Thread Hans Hagen

On 4-8-2012 20:59, Aditya Mahajan wrote:
Hi Aditya,


I usually use \ after abbreviations to avoid bad interword spaces. For
example, Prof.\ ABC. However, when using this in footnotes, if there is a
linebreak after the \, I get an error:

! Undefined control sequence.

1   \starttext
2 Someone\footnote{Prof.\
3 ABC}
4 \stoptext
5


Ok, the next is only for those who want to spend some time on the 
internals ...


\starttext

\def\TestA#1%
  {\writestatus{Test A}{#1}%
   \ctxlua{str = #1 print(str) context(str) io.savedata(temp.tmp,str)}}

\def\TestB#1%
  {\writestatus{Test B}{#1}%
   \ctxlua{str = \detokenize{#1} print(str) context(str) 
io.savedata(temp.tmp,str)}}


\def\TestC#1%
  {\writestatus{Test C}{#1}%
   \edef\temp{#1}%
   \ctxlua{str = \detokenize\expandafter{\temp} print(str) 
context(str) io.savedata(temp.tmp,str)}%

   \typefile{temp.tmp}}

\TestA{Test\
A}

\TestB{Test\
B}

\TestC{Test\
C}

Test\
D

\section{Test\
E}

Test F\footnote{Note\
F}

\stoptext

I patched the helpers.title macro to deal with it but it's still 
something to look into as one might wonder why the newline end up there 
(Taco might know).


(The 'context' function takes care of newlines so this is why it don't 
get noticed in other cases. Here a more low level sprint (catcodeid, 
str) was used.


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] Struggling with ConTeXt

2012-08-02 Thread Olivier Binda

Hello

I'm trying to port a big 300+ pages math course full of macros from 
plain XeTEX to ConTeXt mark IV (ubuntu 12.04+ stand alone beta)

and I'm having some difficulties, could you please help ?

My questions :

1) does lxml.att(#1,some tag)  really work ?


the next snipet doesn't work for me:

\startluacode
function set(node)
p = lxml.att(node,p) -- or p = lxml.att(lxml.id(node),p)
end
\stopluacode

\startxmlsetups xml:section
\ctxlua{set(#1)}
\stopxmlsetups

it looks like it returns the p attribute of the node before #1

the following snipet works though (which is strange because I looked in 
the context source and it gives 
\def\xmlatt#1#2{\ctxlua{lxml.att(#1,#2)}}...)


\startxmlsetups xml:section
\ctxlua{p = \xmlatt{#1,p}}
\stopxmlsetups

2) I'm trying to export to xml and have set

\setupbackend[export=yes, xhtml=yes, css=mkiv-export.css]

But
a) my Metafun/Tikz  pictures aren't exported to svg :/
b) the exported xml has namespaces problems (like error on line 63 at 
column 20: Namespace prefix m on math is not defined error on line 64 at 
column 22: Namespace prefix m on mrow is not defined)


What am I doing wrong ? (I'm compiling with context mydoc.tex)
Is there some \csname tex4ht\endcsname command or some other directive 
that I should use to get my xml export right ?
Am I missing some namespace commands (there are lots of m:math and 
m:mrow mathml tags int the exported xml source, this smells like a 
tex4ht issue)



3) I have defined some framed text with metafun overlays (like in the 
Context manual)

and I'm trying to type something like

\inmargin{some label}
\startMyFramedText...\stopMyFramedText

Yet, the text in the margin is after the framed text :(
(fiddling with the location setting (low, ..) doesn't allow me to have 
the in margin text right next the top of the framed text


I somehow found a dirty workaround with typing a blank space

\defineframedtext[Property][frame=off,background=OverlayProperty,before={}]

and
\inmargin{some label}\noindent\startMyFramedText...\stopMyFramedText

but it's not really satisfying. (hate to lose vertical space with 
wandering blank spaces)


Is there a better way ?

4) I'm trying to port the following TeX code to ConTeXt

$$\eqalign{x=1\cr y=2\cr}\qquad \hbox{haha}$$

it looks like \startformula\startalign.. doesn't allow me to do that
I somehow managed to have it by typing

\startformula
\vcenter{\starttabular[|rM|lM|]
\NC x \NC =1\NC\NR
\NC y \NC =2\NC\NR
\stoptabular}\qquad\text{haha}
\stopformula

the pdf export is fine, but the xml export is awfull (because of 
\vcenter I guess)



a) Is there a way to use tables inside math mode alongside other stuff 
(would be handy) ?
b) what is the correct way to type the previous text, so the pdf and xml 
are fine in Context ?


Best regards
Olivier... really enjoying utf, xml, lua inside TeX as well as other 
nice ConTeXt features


___
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] Added licensing information to PDF

2012-08-01 Thread Peter Rolf
Am 01.08.2012 09:21, schrieb Philipp Gesang:
 Hi Tobias,
 
 ···date: 2012-07-31, Tuesday···from: Tobias Mueller···
 
 I am trying to switch from LaTeX to ConTeXt and I'd like to add
 licensing information to the generated PDF, just like what the
 hyperxmp package would do for LaTeX.
 
 you can include XMP files with one line:
 
 \setupbackend[xmpfile=metadata.xmp]


You can also use some low level commands here (with the risk that names
change or they vanish some time). The risk in this case is very low.
Read the documentation about XMP from Adobe and you will exactly know
why. :-D

Add something like this after \setupinteraction|\setupbackend (they also
add info to the XMP blob).

\startluacode
-- keep the order

-- mark as copyrighted material
lpdf.injectxmpinfo(xml://rdf:RDF,rdf:Description rdf:about=''
xmlns:xmpRights='http://ns.adobe.com/xap/1.0/rights/'xmpRights:MarkedTrue/xmpRights:Marked/rdf:Description,false)
-- url for copyright information
lpdf.insertxmpinfo(xml://rdf:Description/xmpRights:Marked,xmpRights:WebStatementhttp://www.yoururl.com/xmpRights:WebStatement,false)
\stopluacode


The adding is also limited to a predefined list of values. See
lpdf-xmp.lua ('mapping') for the details.


Best wishes,  Peter


 Of course, the XMP needs to be generated beforehand. I was using
 the export functionality at http://wiki.creativecommons.org for
 this, but maybe Context can do the conversion for you already?
 
 Hth
 Philipp
 
 

 Something like this:

 \setupinteraction[
 title={My Title},
 author={Tobias Mueller},
 keyword={foo bar baz},
 pdfcopyright={This work is licensed to the public under the Creative 
 Commons Attribution-Non-Commercial-Share Alike 3.0 Germany License.},
 pdflicenseurl={http://creativecommons.org/licenses/by-nc-sa/3.0/de/}
 ]

 \starttext
 Hello, World!
 \stoptext


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

 maillist : ntg-context@ntg.nl / 
 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 
 
 
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 

___
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] Left margin of vim module output

2012-08-01 Thread Aditya Mahajan

On Wed, 1 Aug 2012, Aditya Mahajan wrote:


On Wed, 1 Aug 2012, Marco Patzer wrote:


how can I adjust the left margin of the output of the vim module?


Currently, vim module does not provide any option similar to the margin key 
for typing mechanism, but you can wrap the code around a `narrower` 
environment.


Sorry, this does not work because of the \forgetall in 
t-syntax-highlight.mkiv (I was testing with that line commented out).


I'll add a margin key to vim module (but not the oddmargin and evenmargin 
keys; they would require a complete low-level rewrite of the module).


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] Left margin of vim module output

2012-08-01 Thread Aditya Mahajan

On Wed, 1 Aug 2012, Aditya Mahajan wrote:

I'll add a margin key to vim module (but not the oddmargin and evenmargin 
keys; they would require a complete low-level rewrite of the module).


The dev version on github now includes a margin key, so you can add 
margin=dimen to \setupvimtyping or \definevimtyping. (I haven't tested 
it too much, hence no new release at the moment).


Note that this works differently from \definetyping. The typing 
environment honors the leftskip set by its parent environment (for 
example, if typing is inside startbackground); vimtyping environment 
resets all the settings of its parent environment.


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] Left margin of vim module output

2012-08-01 Thread Marco Patzer
On 2012-08-01 Aditya Mahajan adit...@umich.edu wrote:

  I'll add a margin key to vim module (but not the oddmargin and
  evenmargin keys; they would require a complete low-level rewrite
  of the module).

Thanks a million. That was fast :)

 The dev version on github now includes a margin key,

Does it? I just can see a new test file in the recent commit history
(without margin key, however). Did you already push the changes to
the public repo?

 I haven't tested it too much

That's my part, I guess

 hence no new release at the moment).

No problem, I'm totally fine with the git repo.

 Note that this works differently from \definetyping. The typing
 environment honors the leftskip set by its parent environment (for
 example, if typing is inside startbackground); vimtyping
 environment resets all the settings of its parent environment.

That's why the hacks that I tried before all miserably failed.

Thanks again!


Marco

___
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] alignment in TABLE

2012-07-24 Thread Aditya Mahajan

On Tue, 24 Jul 2012, Peter Münster wrote:


Hi,

How could I please align vertically the 2 table cells in the following
example:

--8---cut here---start-8---
\starttext
\bTABLE
\bTR \bTD 1 \eTD \bTD \framed{1 Über} \eTD \eTR
\eTABLE
\stoptext
--8---cut here---end---8---


Each cell of a TABLE is already a \frame, so you don't need to add a 
\framed inside a cell.


You can use location=(bottom|low|lohi|high|top) (as part of \setupTABLE) 
to vertically align frames.


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] about \startformula\startalign error

2012-07-22 Thread Aditya Mahajan

On Mon, 23 Jul 2012, dalyoung wrote:


I have two more questions.

1. In the output of the following code, 'x' in the first column is 
vertically centered, but matrix in the second column is not(located at 
top). What option can solve this?


Normally matrices are centered on the math axis (and their location can be 
controlled by location=(low|lohi|high) keys, but for some reason that is 
not working in a table.



\starttable[|c|c|w4cm|w4cm|]


The normal syntax is w(4cm) ...


\HL
\NC A \VL B \VL C \VL D \NC\SR
\HL
\NC $x$ \VL \startmatrix
\NC x' = \NC \NR
.\NC y' = \NC \NR
\stopmatrix \VL \VL \NC\SR


The matrix should be in math mode $\startmatrix ... \stopmatrix$


\HL
\stoptable


2. In the output of the following code, the matrix in the second column is 
vertically centered, but 'x' in the first column is located at the bottom.

\starttext
\starttable[|c|c|w4cm|w4cm|]
\HL
\NC A \VL B \VL C \VL D \NC\SR
\HL
\NC $y$ \VL {\framed[frame=off, align=normal]{\startformula\startalign
\NC x' = \NC \NR
\NC y' = \NC \NR
\stopalign\stopformula}} \VL \VL \NC\LR
\HL
\stoptable
\stoptext

Both of them are good for compiling, but need a slight touch.


Use the \frame aligning options (better to hide this in a macro):

\starttext
\starttable[|c|c|]
\HL
\NC A \VL B \VL \SR
\HL
\NC $x$ \VL \framed[frame=no,height=fit, strut=no, 
location=lohi,align=normal]{

\setupformula[spacebefore=,spaceafter=]
\startformula \startalign
\NC x' \NR
\NC y' \NR
\stopalign \stopformula} \VL \SR
\HL
\stoptable
\stoptext

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] Critical editions with ConTeXt

2012-07-20 Thread Sietse Brouwer
I'm trying to get straight in my head what critical-edition-related
commands are already implemented in ConTeXt.

Implemented:
(a) footnotes on specific lines, specified inline: \linenote{note text}
(b) ditto on line ranges: \startlinenote[tag]{note text} ... \stoplinenote[tag]
(c) tag a line and refer to it later in text: \someline[tag]; refer
back with \inline[tag] or \inlinerange[tag] (the former has a spurious
space before the number). The low-level backreferences are
\in[lr:b:tag] and \in[lr:e:tag]; see page-lin.mkiv
(d) ditto for line ranges: \startlines[tag] ... \stoplines[tag]; refer
to these with \inlinerange[tag].

Not implemented AFAIK:
(e) tag a line, but write the linenote on it later; at the end of the
stanza or the quotation, say. Nice to keep notes from overpowering the
text in the source code.).
(f) ditto for line ranges
This would have the added advantage that you could place tags in the
text according to its contents, and then use those tags for both
footnotes and textual references.

Hans wrote:
 but as you mention the interface is a bit problematic as start/stop is not 
 nice when being nested

Do you mean it doesn't look nice, or is it so that nesting or
interleaving \startlinenote[tag] ... \stoplinenote[tag] environments
causes problems because the commands start with \start... and
\stop...?
If looks are the only problem, I think that is a problem with
interleaving environments; no matter whether you call them
\startlinenote...\stoplinenote, or \fromlinenote...\tolinenote. And in
that case, I think consistently naming environment commands
\start...\stop... is a very valuable thing, and should get priority.

Regards,

Sietse
Sietse Brouwer
___
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] \seeindex and processors

2012-07-14 Thread Wolfgang Schuster

Am 13.07.2012 um 19:56 schrieb Andreas Mang:

 Dear Hans  Wolfgang,
 
 Thanks for looking into this. I know that this has quite low priority. As it 
 seems to me processors do not really seem to provide the behaviour I had in 
 mind. Clearly, I should have thought of a better example in the first place:
 
 %
 \defineprocessor[smallcaps][style=\sc]
 
 \starttext
 
 % this works nicely
 {\sc Test}\index{smallcaps-Test}
 
 % this is what I want it to look like
 % (which does not work for \seeindex[.])
 \index{{\sc Cauchy}||Problem}
 
 % this is what I tried after you have suggested
 % to use processors, but it does not work (*) 
 {\sc Cauchy}||Problem\index{{smallcaps-Cauchy}||Problem}
 
 \placeindex[n=1]
 
 \stoptext
 %
 
 (*) As you can see I am using smallcaps as an indicator for a personal 
 name. From looking at the code (I have to admit that I do not know anything 
 about what's beyond the context front end) I think there's no quick solution 
 to get this to work with preprocessors. Am I doing something wrong?


With a simple change of the string type in strc-reg.mkiv you can also use 
commands/style switches in \seeindex:

\def\strc_registers_insert_see_indeed#1#2#3#4% register key entry seeword
  {\begingroup
   ...
entries = {
% we need a special one for xml, this is just a single one
-   \currentregisterentries, #2
+   \!!bs\currentregisterentries\!!es, #2
},
seeword = {
-   text = \currentregisterseeword
+   text = \!!bs\currentregisterseeword\!!es
},
 }
   }}%
   \endgroup}

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] \seeindex and processors

2012-07-13 Thread Andreas Mang
Dear Hans  Wolfgang,

Thanks for looking into this. I know that this has quite low priority. As it 
seems to me processors do not really seem to provide the behaviour I had in 
mind. Clearly, I should have thought of a better example in the first place:

%
\defineprocessor[smallcaps][style=\sc]

\starttext

% this works nicely
{\sc Test}\index{smallcaps-Test}

% this is what I want it to look like
% (which does not work for \seeindex[.])
\index{{\sc Cauchy}||Problem}

% this is what I tried after you have suggested
% to use processors, but it does not work (*) 
{\sc Cauchy}||Problem\index{{smallcaps-Cauchy}||Problem}

\placeindex[n=1]

\stoptext
%

(*) As you can see I am using smallcaps as an indicator for a personal name. 
From looking at the code (I have to admit that I do not know anything about 
what's beyond the context front end) I think there's no quick solution to get 
this to work with preprocessors. Am I doing something wrong?

If you do not have the time to look into this right now never mind.

Sorry for the hassle.

Cheers,
Andreas

Am Jul 13, 2012 um 7:23 PM schrieb Hans Hagen:

 On 13-7-2012 09:57, Wolfgang Schuster wrote:
 Hi Hans,
 
 processors aren’t applied to the second argument of \seeindex, only the 
 first is formatted.
 
 \defineprocessor[smallcaps][style=\sc]
 
 \starttext
 
 Apples\index{smallcaps-Apple}
 
 Malus domestica\seeindex{smallcaps-Malus domestica}{smallcaps-Apple}
 
 \placeindex[n=1]
  
 \stoptext
 
 ok, so the next beta will have
 
 \setupinteraction[state=start]
 
 \defineprocessor[smallcaps][style=\sc]
 \defineprocessor[bold] [style=\bf]
 
 \starttext
 
 Apples\index{smallcaps-Apple}
 Pears\index{Pears}
 
 Malus domestica\seeindex{smallcaps-Malus domestica}{bold-Apple}
 
 Bonus domestica\seeindex{Bonus domestica}{Pears}
 
 \placeindex[n=1]
 
 \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
 ___

--
Andreas Mang, MSc
  Research Associate

UNIVERSITY OF LUEBECK
  INSTITUTE OF MEDICAL ENGINEERING

  Division of Computer Science, 
  Engineering and Natural Sciences

  Ratzeburger Allee 160, Building 64
  23562 Luebeck, Germany

  Phone: +49 (0) 451 500 5416
  Fax:   +49 (0) 451 500 5403
  m...@imt.uni-luebeck.de
  http://www.imt.uni-luebeck.de

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

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


[NTG-context] setupcaptions

2012-07-11 Thread Meer, H. van der
I want to make my figure captions both slanted and small, or bold and small,etc.
The wiki has for setupcaptions:

headstyle normal, bold, .. , small, ..
style normal, bold, .. , small, ..

I therefore expected to work the following setup:

\setupcaptions[headstyle={slanted,small},style={bold,small}]
\starttext
\placefigure{A dummy figure}{\externalfigure[dummy]}
Caption test.
\stoptext

But no, two seems too much. style={bold} does work and style={small} but style 
= {bold,small} does not. From the general principles of ConTeXt's parameter 
handling I would have expected this to work.
Of course I could have used style={\bf\switchtobodyfont[small]}, but I would 
prefer to refrain from low level font commands when possible.

I am right the setupcaptions should work with combined fontsettings, or is it 
my mistake?

Hans van der Meer






setup.pdf
Description: setup.pdf
___
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] setupcaptions

2012-07-11 Thread Wolfgang Schuster

Am 11.07.2012 um 17:17 schrieb Meer, H. van der:

 I want to make my figure captions both slanted and small, or bold and 
 small,etc.
 The wiki has for setupcaptions:
 
 headstyle normal, bold, .. , small, ..
 style normal, bold, .. , small, ..
 
 I therefore expected to work the following setup:
 
 \setupcaptions[headstyle={slanted,small},style={bold,small}]
 \starttext
 \placefigure{A dummy figure}{\externalfigure[dummy]}
 Caption test.
 \stoptext
 
 But no, two seems too much. style={bold} does work and style={small} but 
 style = {bold,small} does not. From the general principles of ConTeXt's 
 parameter handling I would have expected this to work. 
 Of course I could have used style={\bf\switchtobodyfont[small]}, but I would 
 prefer to refrain from low level font commands when possible.
 
 I am right the setupcaptions should work with combined fontsettings, or is it 
 my mistake?

You misunderstand how named styles work. When you have style key (can be style, 
textstyle etc.)
for a command you can write “style=\bf” and use the font switch as argument. 
Another way to set
the font is to use a name, e.g. “style=bold”. The argument in this case is a 
identifier which is defined as

  \definealternativestyle [\v!bold]   [\bf] []

As you can see “bold” is only a synonym for \bf (with the third argument you 
can specify what should
happen when a command when the identifier is used in a heading, see below for a 
example.

\definehead[HeadA][section][style=bold]
\definehead[HeadB][section][style=italic]

\starttext

\HeadA{normal \style[style=italic]{italic} normal \style[style=bold]{bold} 
normal \style[style=\it]{it} normal \style[style=\bf]{bf} normal}

normal \style[style=italic]{italic} normal \style[style=bold]{bold} normal 
\style[style=\it]{it} normal \style[style=\bf]{bf} normal

\HeadB{normal \style[style=italic]{italic} normal \style[style=bold]{bold} 
normal \style[style=\it]{it} normal \style[style=\bf]{bf} normal}

normal \style[style=italic]{italic} normal \style[style=bold]{bold} normal 
\style[style=\it]{it} normal \style[style=\bf]{bf} normal
 
\stoptext


Having a list as argument for the style key is interesting and you have my vote 
for this but it would
be more complex and slower than the current mechanism.

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] clutter with \start and \stop

2012-07-05 Thread luigi scarso
On Thu, Jul 5, 2012 at 12:44 AM, Rogers, Michael K mrog...@emory.eduwrote:

 On Jul 4, 2012, at 1:29 PM, Peter Münster wrote:
  On Wed, Jul 04 2012, Hans Hagen wrote:
 
  no, mixing this way is asking for troubles, if not now, than maybe in
 the
  future
 
  just use \section
 
  Yes, but isn't \startsection the recommended method for the future and
  needed for XML output?

 XML documents should form a tree, so a structure like

 \startA % A
 \startB % B
 \stopA % /A
 \stopB % /B

 won't translate to XML.

 Grouping in TeX follows the same restrictions, and \start... and \stop...
 behave like \begingroup and \endgroup.  The \stop... is supposed to restore
 the state before the corresponding \start... (at least I assume so --
 \endgroup works that way).  One cannot stop A in the middle of B and return
 to the state before \startA without also stopping B.  So one should put
 \stopB before \stopA, not after it.

 It depends.

\starttext
\long\def\startA#1\stopA{\low{A}#1\low{A}}
\long\def\startB#1\stopB{\low{B}#1\low{B}}

\startA
textAA
\startB
textAB
\stopA
textBB
\stopB
\stoptext


is ok  (not the context way, btw: real code is more complex).


The meaning of this can be
content of \startA..\stopA = textAA ⋃ textAB
content of \startB..\stopB = textAB ⋃ textBB
\startA..\stopA ⋂  \startB..\stopB = textAB

If we are describing programs, textAB can be the common code between the
function A and B.



-- 
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] clutter with \start and \stop

2012-07-05 Thread Rogers, Michael K

On Jul 5, 2012, at 1:23 AM, luigi scarso wrote:
On Thu, Jul 5, 2012 at 12:44 AM, Rogers, Michael K 
mrog...@emory.edumailto:mrog...@emory.edu wrote:
XML documents should form a tree, so a structure like

\startA % A
\startB % B
\stopA % /A
\stopB % /B

won't translate to XML.

Grouping in TeX follows the same restrictions, and \start... and \stop... 
behave like \begingroup and \endgroup.  The \stop... is supposed to restore the 
state before the corresponding \start... (at least I assume so -- \endgroup 
works that way).  One cannot stop A in the middle of B and return to the state 
before \startA without also stopping B.  So one should put \stopB before 
\stopA, not after it.

It depends.

\starttext
\long\def\startA#1\stopA{\low{A}#1\low{A}}
\long\def\startB#1\stopB{\low{B}#1\low{B}}

\startA
textAA
\startB
textAB
\stopA
textBB
\stopB
\stoptext


is ok  (not the context way, btw: real code is more complex).


The meaning of this can be
content of \startA..\stopA = textAA ⋃ textAB
content of \startB..\stopB = textAB ⋃ textBB
\startA..\stopA ⋂  \startB..\stopB = textAB

If we are describing programs, textAB can be the common code between the 
function A and B.



--
luigi

Again, I agree with what you write.  Somewhere I must have expressed myself 
poorly and I apologize.  It seems like a side issue (my issue with XML), and I 
did not mean to hijack the thread.  Sorry.



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] Centering a figure vertically on a page

2012-07-03 Thread Hans Hagen

On 3-7-2012 15:10, Alan BRASLAU wrote:

On Tue, 3 Jul 2012 13:30:22 +0200
Wolfgang Schuster schuster.wolfg...@gmail.com wrote:


\centerbox{\externalfigure[cow]}


Wow! \centerbox{}


It's a rather (old) low level boxing macro ...

\start
\showboxes
\centerbox width 10cm height 3cm {Alan is surprised}
\stop

.. simulating the regular tex syntax for box dimensions

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] Centering a figure vertically on a page

2012-07-03 Thread Alan BRASLAU
On Tue, 3 Jul 2012 15:48:43 +0200
Hans Hagen pra...@wxs.nl wrote:

 It's a rather (old) low level boxing macro ...
 
 \start
  \showboxes
  \centerbox width 10cm height 3cm {Alan is surprised}
 \stop

My TeX culture remains, alas, always limited (even if I have the
TeXbook on my office bookshelf, indeed \centerbox does not appear in
plain TeX). Nothing in the ConTeXt manual, either. Of course, a
leisurely browsing of the source code would reveal many such treasures!

On the garden:

Context 2005.05.25
...
\centerbox now accepts \par in it;s argument
...


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

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


Re: [NTG-context] Centering a figure vertically on a page

2012-07-03 Thread luigi scarso
On Tue, Jul 3, 2012 at 5:27 PM, Alan BRASLAU alan.bras...@cea.fr wrote:
 On Tue, 3 Jul 2012 15:48:43 +0200
 Hans Hagen pra...@wxs.nl wrote:

 It's a rather (old) low level boxing macro ...

 \start
  \showboxes
  \centerbox width 10cm height 3cm {Alan is surprised}
 \stop

 My TeX culture remains, alas, always limited (even if I have the
 TeXbook on my office bookshelf, indeed \centerbox does not appear in
 plain TeX). Nothing in the ConTeXt manual, either. Of course, a
 leisurely browsing of the source code would reveal many such treasures!
There is also \vcenter

\starttext
xxg\ruledvbox{\hsize=5cm\vcenter to 3cm{Alan is
surprised}}gx \type{\vcenter}\par
xxg\ruledvbox{\centerbox width5cm height3cm{Alan is
surprised}}gx \type{\centerbox}\par
xxg\ruledvbox{\vcenter{\centerbox width5cm height3cm{Alan is
surprised}}}gx\type{\centerbox+\vcenter}\par
\stoptext

(\vcenter is a TeX primitive)


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

<    3   4   5   6   7   8   9   10   11   12   >