Re: [NTG-context] modes

2010-10-14 Thread Henning Hraban Ramm

Am 2010-10-14 um 15:57 schrieb Hans Hagen:


(for module writers)

The latest beta gives access to modes at the lua end


Wikified (unmodified):
http://wiki.contextgarden.net/Modes#Modes_in_LuaTeX


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

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

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


Re: [NTG-context] How to call a ctx command with parameters from Lua

2010-10-14 Thread Procházka Lukáš Ing . - Pontex s . r . o .

... Thanks, Wolfgang. Lukas

On Thu, 14 Oct 2010 22:43:44 +0200, Wolfgang Schuster 
 wrote:



context.typefile( { "default" }, "MyFile.txt" )

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] Access figure data?

2010-10-14 Thread Peter Münster
On Thu, Oct 14 2010, Peter Rolf wrote:

> Nice to have. Is this also possible from the lua side?

Hello,

Perhaps with the img library of luatex (see luatex manual).

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___
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 it possible to pass unmarked paragraphs into Lua for processing

2010-10-14 Thread Aditya Mahajan

On Thu, 14 Oct 2010, Kevin D. Robbins wrote:


Hi all,

I am wondering if and how it might be possible to catch all unmarked
paragraphs in a TeX file and pass them into Lua. So, in the following
example, each of the first three unmarked paragraphs would be passed to the
Lua function "process_paragraph" for optional processing, but the fourth
paragraph between \startmarkedparagraph...\stopmarkedparagraph would not be
passed to "process_paragraph".


If you are willing to add some more markup, then you can do

\starttext
\startMarking
...
\startmarkedparagraph
...
\stopmarkedparagraph
\stopMarking
\stoptext

where \startMarking .. \stopMarking passes everything to lua 
(http://wiki.contextgarden.net/Programming_in_LuaTeX#Manipulating_verbatim_text_for_dummies) 
and you can then search for \startmarkedparagraph ... \stopmarkedparagraph 
in lua.


Or you could just redefine \starttext ... \stoptext to do the capturing. 
Something like:


\let\normalstarttext\starttext
\let\normalstoptext\stoptext

\def\starttext{}

And in the lua end call \normalstarttext before starting typesetting and 
\normalstoptext after all typesetting is done.


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
___


[NTG-context] Is it possible to pass unmarked paragraphs into Lua for processing

2010-10-14 Thread Kevin D. Robbins
Hi all,

I am wondering if and how it might be possible to catch all unmarked
paragraphs in a TeX file and pass them into Lua. So, in the following
example, each of the first three unmarked paragraphs would be passed to the
Lua function "process_paragraph" for optional processing, but the fourth
paragraph between \startmarkedparagraph...\stopmarkedparagraph would not be
passed to "process_paragraph".

I want the Lua function to be able to eat each of the first three unmarked
paragraphs and optionally write some processed version back out to be
typeset, but there should be the possibility that none of the paragraphs are
typeset at all.

In the latter case that no text is to be typeset at all, is there a way to
prevent ConTeXt/LuaTeX from creating an empty PDF?

\startluacode

def process_paragragh (par)
   -- Some magic here...
   -- Maybe a context (processed_par) to typeset the processed paragraph...
end

\stopluacode

\starttext

Thus, I came to the conclusion that the designer of a new
system must not only be the implementer and first
large||scale user; the designer should also write the first
user manual.
\startitemize
\item One
\item Two
\item Three
\stopitemize

The separation of any of these four components would have
hurt \TeX\ significantly. If I had not participated fully in
all these activities, literally hundreds of improvements
would never have been made, because I would never have
thought of them or perceived why they were important.

But a system cannot be successful if it is too strongly
influenced by a single person. Once the initial design is
complete and fairly robust, the real test begins as people
with many different viewpoints undertake their own
experiments.

\startmarkedparagraph
Thus, I came to the conclusion that the designer of a new
system must not only be the implementer and first
large||scale user; the designer should also write the first
user manual.
\stopmarkedparagraph

\stoptext

Thanks,

Kevin
___
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] Access figure data?

2010-10-14 Thread Peter Rolf
Am 14.10.2010 22:22, schrieb Hans Hagen:
> On 14-10-2010 10:10, Peter Rolf wrote:
> 
>> Nice to have. Is this also possible from the lua side? I ask, because I
>> need the pixel size of a graphic for some border checking ('clip' a
>> frame out of a bitmap). Currently I use \getfiguredimensions from the
>> tex side, as I haven't found a way in lua yet.
> 
> local f = figures.current()
> 
> f.used.xresolution
>
Thanks, will test asap :-)

> eventually there will be a documented interface for the lua end (for the
> moment I want to have the freedom to change the code) as I need to add a
> few more wrappers.
>
> 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] How to call a ctx command with parameters from Lua

2010-10-14 Thread Wolfgang Schuster

Am 14.10.2010 um 17:31 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

> Hello,
> 
> this thing was probably shown during last Ctx meeting, but I can't remember 
> the answer.
> 
> Let's ave the Ctx code:
> 
> \typefile[default]{Myfile.txt}
> 
> and I'd need to call this command by Lua, like:
> 
> \startluacode
>  context.typefile("MyFile.txt")
> \stoluacode
> 
> But how to pass the "[default]" option?

context.typefile( { "default" }, "MyFile.txt" )

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] Custom enumeration

2010-10-14 Thread Wolfgang Schuster

Am 14.10.2010 um 15:24 schrieb Aditya Mahajan:

> On Oct 14, 2010, at 8:31 AM, Bela Mulder  wrote:
> 
>> Sorry, for my initial vagueness: I want the exercises in part 5, chapter 3 
>> of the syllabus to come out as:
>> 
>> Exercise 5.3.1  etc.
> 
> Does way=bychapter work? (untested)

You need also „prefix=yes“ but it would have been easier with a minimals 
example which was missing.

\defineenumeration[test][text=Test,prefix=yes,way=bychapter]
\starttext
\dorecurse{3}
  {\part{Part #1}
   \dorecurse{4}
 {\chapter{Chapter ##1}
  \dorecurse{3}
{\input knuth\par
 \starttest \input ward \stoptest
 \input tufte\par}}}
\stoptext

Wolfgang

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

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


Re: [NTG-context] Access figure data?

2010-10-14 Thread Hans Hagen

On 14-10-2010 10:10, Peter Rolf wrote:


Nice to have. Is this also possible from the lua side? I ask, because I
need the pixel size of a graphic for some border checking ('clip' a
frame out of a bitmap). Currently I use \getfiguredimensions from the
tex side, as I haven't found a way in lua yet.


local f = figures.current()

f.used.xresolution

eventually there will be a documented interface for the lua end (for the 
moment I want to have the freedom to change the code) as I need to add a 
few more wrappers.


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] Access figure data?

2010-10-14 Thread Peter Rolf
Am 14.10.2010 21:33, schrieb Hans Hagen:
> On 14-10-2010 8:10, Brian Wedde wrote:
>> Is there any way to get access to the data about external figures? I
>> would like
>> to know the pixel height/width of the actual image.
>>
>> [I am trying to typeset a mass of html-based documents with images
>> using a
>> series of scripts. The images need to be positioned somewhat like they
>> would
>> be on the screen. However, the html itself carries no info about the
>> image.]
> 
> in next beta (not today):
> 
> \starttext
> 
> \externalfigure[mill.png] % \calculateexternalfigure[mill.png]
> 
> \starttabulate[|l|lT|Tl|]
> \HL
> \NC \tex{figurestatus}  \NC \number\figurestatus  \NC numexpr
> \NC \NR
> \NC \tex{figurewidth}   \NC \figurewidth  \NC \NC \NR
> \NC \tex{figureheight}  \NC \figureheight \NC \NC \NR
> \NC \tex{figurexscale}  \NC \figurexscale \NC \NC \NR
> \NC \tex{figureyscale}  \NC \figureyscale \NC \NC \NR
> \HL
> \NC \tex{figuresize}\NC \figuresize   \NC \NC \NR
> \NC \tex{figurelabel}   \NC \figurelabel  \NC \NC \NR
> \NC \tex{figurefileoriginal}\NC \figurefileoriginal   \NC \NC \NR
> \NC \tex{figurefilepage}\NC \figurefilepage   \NC \NC \NR
> \NC \tex{figurefileoptions} \NC \figurefileoptions\NC \NC \NR
> \NC \tex{figurefileconversion}  \NC \figurefileconversion \NC \NC \NR
> \NC \tex{figurefilecache}   \NC \figurefilecache  \NC \NC \NR
> \NC \tex{figurefileprefix}  \NC \figurefileprefix \NC \NC \NR
> \HL
> \NC \tex{figurenaturalwidth}\NC \figurenaturalwidth   \NC \NC \NR
> \NC \tex{figurenaturalheight}   \NC \figurenaturalheight  \NC \NC \NR
> \NC \tex{figurexresolution} \NC \figurexresolution\NC \NC \NR
> \NC \tex{figureyresolution} \NC \figureyresolution\NC \NC \NR
> \NC \tex{figurexsize}   \NC \figurexsize  \NC \NC \NR
> \NC \tex{figureysize}   \NC \figureysize  \NC \NC \NR
> \NC \tex{figurecolordepth}  \NC \figurecolordepth \NC \NC \NR
> \NC \tex{figuredepth}   \NC \figuredepth  \NC \NC \NR
> \HL
> \NC \tex{figurefilepath}\NC \figurefilepath   \NC \NC \NR
> \NC \tex{figurefilename}\NC \figurefilename   \NC \NC \NR
> \NC \tex{figurefiletype}\NC \figurefiletype   \NC \NC \NR
> \NC \tex{figurefullname}\NC \figurefullname   \NC \NC \NR
> \NC \tex{noffigurepages}\NC \noffigurepages   \NC \NC \NR
> \HL
> \stoptabulate
> 
> \stoptext
> 
> most were already there, new are:
> 
> figurexresolution
> figureyresolution
> figurexsize
> figureysize
> figurecolordepth
> figuredepth
>

Nice to have. Is this also possible from the lua side? I ask, because I
need the pixel size of a graphic for some border checking ('clip' a
frame out of a bitmap). Currently I use \getfiguredimensions from the
tex side, as I haven't found a way in lua yet.

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

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


Re: [NTG-context] Access figure data?

2010-10-14 Thread Hans Hagen

On 14-10-2010 8:10, Brian Wedde wrote:

Is there any way to get access to the data about external figures? I would like
to know the pixel height/width of the actual image.

[I am trying to typeset a mass of html-based documents with images using a
series of scripts. The images need to be positioned somewhat like they would
be on the screen. However, the html itself carries no info about the image.]


in next beta (not today):

\starttext

\externalfigure[mill.png] % \calculateexternalfigure[mill.png]

\starttabulate[|l|lT|Tl|]
\HL
\NC \tex{figurestatus}  \NC \number\figurestatus  \NC numexpr 
\NC \NR
\NC \tex{figurewidth}   \NC \figurewidth  \NC 
\NC \NR
\NC \tex{figureheight}  \NC \figureheight \NC 
\NC \NR
\NC \tex{figurexscale}  \NC \figurexscale \NC 
\NC \NR
\NC \tex{figureyscale}  \NC \figureyscale \NC 
\NC \NR

\HL
\NC \tex{figuresize}\NC \figuresize   \NC 
\NC \NR
\NC \tex{figurelabel}   \NC \figurelabel  \NC 
\NC \NR
\NC \tex{figurefileoriginal}\NC \figurefileoriginal   \NC 
\NC \NR
\NC \tex{figurefilepage}\NC \figurefilepage   \NC 
\NC \NR
\NC \tex{figurefileoptions} \NC \figurefileoptions\NC 
\NC \NR
\NC \tex{figurefileconversion}  \NC \figurefileconversion \NC 
\NC \NR
\NC \tex{figurefilecache}   \NC \figurefilecache  \NC 
\NC \NR
\NC \tex{figurefileprefix}  \NC \figurefileprefix \NC 
\NC \NR

\HL
\NC \tex{figurenaturalwidth}\NC \figurenaturalwidth   \NC 
\NC \NR
\NC \tex{figurenaturalheight}   \NC \figurenaturalheight  \NC 
\NC \NR
\NC \tex{figurexresolution} \NC \figurexresolution\NC 
\NC \NR
\NC \tex{figureyresolution} \NC \figureyresolution\NC 
\NC \NR
\NC \tex{figurexsize}   \NC \figurexsize  \NC 
\NC \NR
\NC \tex{figureysize}   \NC \figureysize  \NC 
\NC \NR
\NC \tex{figurecolordepth}  \NC \figurecolordepth \NC 
\NC \NR
\NC \tex{figuredepth}   \NC \figuredepth  \NC 
\NC \NR

\HL
\NC \tex{figurefilepath}\NC \figurefilepath   \NC 
\NC \NR
\NC \tex{figurefilename}\NC \figurefilename   \NC 
\NC \NR
\NC \tex{figurefiletype}\NC \figurefiletype   \NC 
\NC \NR
\NC \tex{figurefullname}\NC \figurefullname   \NC 
\NC \NR
\NC \tex{noffigurepages}\NC \noffigurepages   \NC 
\NC \NR

\HL
\stoptabulate

\stoptext

most were already there, new are:

figurexresolution
figureyresolution
figurexsize
figureysize
figurecolordepth
figuredepth

-
  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] Access figure data?

2010-10-14 Thread Aditya Mahajan

On Thu, 14 Oct 2010, Brian Wedde wrote:


Is there any way to get access to the data about external figures? I would like
to know the pixel height/width of the actual image.



From one of my private modules:


   \useexternalfigure[cnp:name][\cut!n!paste!parameter\c!name]% Is this really 
needed?
   \getfiguredimensions[cnp:name]%
   \edef\cut!n!paste!NOfpages{\noffigurepages}%
   % MkII returns dimensions in pt, MkIV returns in sp
   % which causes metapost to blow up. So, I use \dimexpr to convert
   % sp to pt.
   \edef\cut!n!paste!figurewidth {\the\dimexpr\figurenaturalwidth   }%
   \edef\cut!n!paste!figureheight{\the\dimexpr\figurenaturalheight  }%

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] Access figure data?

2010-10-14 Thread Hans Hagen

On 14-10-2010 8:10, Brian Wedde wrote:

Is there any way to get access to the data about external figures? I would like
to know the pixel height/width of the actual image.

[I am trying to typeset a mass of html-based documents with images using a
series of scripts. The images need to be positioned somewhat like they would
be on the screen. However, the html itself carries no info about the image.]


i can expose the resolution (remind me in a few days)

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] Titles that spill out

2010-10-14 Thread Peter Münster
On Thu, Oct 14 2010, Brian Wedde wrote:

> \setuphead[section][align={flushleft,nothyphenated}]

\setuphead[section][align={flushleft,nothyphenated,tolerant}]

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___
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] Titles that spill out

2010-10-14 Thread Hans Hagen

On 14-10-2010 7:59, Brian Wedde wrote:

Here is a simple section header. It runs way out of the margin. Any idea why?

I do not want hyphenation. Words that run over the boundary should be skipped
to the next line down. Why does it not do that here?

Also note that if i change "flushleft" to "middle", it works fine (except that i
don't want it middle-aligned!)


\setuphead[section][align={flushleft,nothyphenated}]
\starttext
\showgrid
\section{XXX  XX  XXX XX XXX   XXX XXX}
\stoptext



% Here's another similar example:




\setuplayout[ width=6.5in ]
\setupbodyfont[ 10pt,rm ]
\definebodyfont [10pt] [rm] [ hh=Regular sa 1.85 ]
\setupheads[
align={flushleft,nothyphenated},


add stretch,tolerant

-
  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] Access figure data?

2010-10-14 Thread Brian Wedde
Is there any way to get access to the data about external figures? I would like 
to know the pixel height/width of the actual image.

[I am trying to typeset a mass of html-based documents with images using a 
series of scripts. The images need to be positioned somewhat like they would 
be on the screen. However, the html itself carries no info about the image.]
___
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] Titles that spill out

2010-10-14 Thread Brian Wedde
Here is a simple section header. It runs way out of the margin. Any idea why?

I do not want hyphenation. Words that run over the boundary should be skipped 
to the next line down. Why does it not do that here?

Also note that if i change "flushleft" to "middle", it works fine (except that 
i 
don't want it middle-aligned!)


\setuphead[section][align={flushleft,nothyphenated}]
\starttext
\showgrid
\section{XXX  XX  XXX XX XXX   XXX XXX}
\stoptext



% Here's another similar example:




\setuplayout[ width=6.5in ]
\setupbodyfont[ 10pt,rm ]
\definebodyfont [10pt] [rm] [ hh=Regular sa 1.85 ]
\setupheads[
align={flushleft,nothyphenated},
tolerance=strict
]
\setuphead[section][
number=no,
textstyle=\hh
]
\starttext
\showgrid
\section{XXX  XX  XX XXX XX  XXX XXX}
\stoptext



Thanks for your help.
___
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] mnmls under windows

2010-10-14 Thread Hans Hagen

On 14-10-2010 4:07, Philipp Gesang wrote:


2.  How large will texmf-cache grow when all the fonts from an
 indesign installation are indexed (it’s a small stick and
 context resides next to a linux on it)?


in a next beta you can configure it using directives:

system_compile_cleanup   = "no",-- remove tma files
system_compile_strip = "yes",   -- strip tmc files

this replaces the PURGE and STRIP variables

(not tested yet)

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] Multiple bibliographies (reminder)

2010-10-14 Thread Florian Wobbe
Hi Taco, hi Philipp,

I need to place two different publication lists in different locations inside 
the same document. This has been asked before in April and there was the 
following suggestion:

\chapter{one}
\placepublications[database=first]

\chapter{two}
\placepublications[database=second]

Is something like this implemented already? If not I'd kindly ask you, Philipp, 
to help me with your lua-sed-shell-magic. Thanks!

Best wishes,
Florian

___
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] How to call a ctx command with parameters from Lua

2010-10-14 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

this thing was probably shown during last Ctx meeting, but I can't remember the 
answer.

Let's ave the Ctx code:

\typefile[default]{Myfile.txt}

and I'd need to call this command by Lua, like:

\startluacode
  context.typefile("MyFile.txt")
\stoluacode

But how to pass the "[default]" option?

I remember that key-value pairs are passed by tables (context.cmd{key="val"}), 
but how in this case?

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___
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] mnmls under windows

2010-10-14 Thread Hans Hagen

On 14-10-2010 4:07, Philipp Gesang wrote:

Hi all,


I just discovered that the windows pcs in the library have
certain adobe stuff installed that comes with a neat collection
of adobe fonts. So I thought I’d want to use them in context and
prepared a minimals for windows on a usb stick using wine. I
haven’t used windows in ages so I’d like to ask some questions
before I actually start testing.

1.  Why is there an mtxrun.exe binary in addition to the lua
 script?


because texlua has to be run


2.  How large will texmf-cache grow when all the fonts from an
 indesign installation are indexed (it’s a small stick and
 context resides next to a linux on it)?


indexing is not that much an issue as only partial data is stored

usage will create tma/tmc files (reminds me that I need to add a 
configuration option to clear the tma files as they are only there for 
tracing purposes)



3.  Anything I should be aware of where windows context behaves
 differently from linux?


not that I know of

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] structuresectionstarterset ?

2010-10-14 Thread Steffen Wolfrum

Am 14.10.2010 um 15:58 schrieb Hans Hagen:

> On 13-10-2010 1:49, Steffen Wolfrum wrote:
>> Hi,
>> 
>> 
>> as definestructureconversionset is such a convenient command, could we also 
>> have the accompanying structuresectionstarterset and 
>> structuresectionstopperset?
>> 
>> 
>> \definestructureconversionset [default] [ 
>> ,Characters,Romannumerals,Numbers,characters,charcharacters][numbers]
>> \definestructuresectionstarterset [default] [ , , , , ,{(}][{.}]
>> \definestructuresectionstopperset [default] [ ,{.},{.},{)},{)},{)}][{.}]
> 
> maybe ... you can set a tracker item so that it can be considered


done.

st
___
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] mnmls under windows

2010-10-14 Thread Philipp Gesang
Hi all,


I just discovered that the windows pcs in the library have
certain adobe stuff installed that comes with a neat collection
of adobe fonts. So I thought I’d want to use them in context and
prepared a minimals for windows on a usb stick using wine. I
haven’t used windows in ages so I’d like to ask some questions
before I actually start testing.

1.  Why is there an mtxrun.exe binary in addition to the lua
script?

2.  How large will texmf-cache grow when all the fonts from an
indesign installation are indexed (it’s a small stick and
context resides next to a linux on it)?

3.  Anything I should be aware of where windows context behaves
differently from linux?

Thanks for your time and expertise,


Philipp

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


pgpLwTq7XxnXd.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] structuresectionstarterset ?

2010-10-14 Thread Hans Hagen

On 13-10-2010 1:49, Steffen Wolfrum wrote:

Hi,


as definestructureconversionset is such a convenient command, could we also 
have the accompanying structuresectionstarterset and structuresectionstopperset?


\definestructureconversionset [default] [ 
,Characters,Romannumerals,Numbers,characters,charcharacters][numbers]
\definestructuresectionstarterset [default] [ , , , , ,{(}][{.}]
\definestructuresectionstopperset [default] [ ,{.},{.},{)},{)},{)}][{.}]


maybe ... you can set a tracker item so that it can be considered

-
  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] structure sanity checks

2010-10-14 Thread Hans Hagen

On 13-10-2010 2:29, Alan BRASLAU wrote:


Indeed, under ConTeXt, unknown or incorrect arguments are simply ignored.


maybe some day ...


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

2010-10-14 Thread Hans Hagen

Hi,

(for module writers)

The latest beta gives access to modes at the lua end

\starttext

\enablemode[test]
\enablemode[]

\doifallmodes{test,xxx}{NO}
\doifallmodes{test,}{YES}
\doifmode{test}{YES}
\doifnotmode{xxx}{YES}

\startluacode
tex.sprint(tex.modes['x']and "YES" or "NOP")
tex.sprint(tex.modes['xx']   and "YES" or "NOP")
tex.sprint(tex.modes['xxx']  and "YES" or "NOP")
tex.sprint(tex.modes[''] and "YES" or "NOP")
tex.sprint(tex.modes['test'] and "YES" or "NOP")
\stopluacode

\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] Custom enumeration

2010-10-14 Thread Aditya Mahajan
On Oct 14, 2010, at 8:31 AM, Bela Mulder  wrote:

> Sorry, for my initial vagueness: I want the exercises in part 5, chapter 3 of 
> the syllabus to come out as:
> 
> Exercise 5.3.1  etc.


Does way=bychapter work? (untested)

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] Custom enumeration

2010-10-14 Thread Bela Mulder
 Sorry, for my initial vagueness: I want the exercises in part 5, 
chapter 3 of the syllabus to come out as:


Exercise 5.3.1  etc.

Right now, on a per chapter basis I get:

Exercise 1 etc.

Hope this helps.

--

Bela Mulder
Group Leader Theory of Biomolecular matter

FOM Institute AMOLF
Science Park 104, 1098XG Amsterdam, THE NETHERLANDS
Tel: + 31 20 7547100 FAX: + 31 20 7547290
web: http://www.amolf.nl/research/theory_of_biomolecular_matter/


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

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


Re: [NTG-context] section kills break ?

2010-10-14 Thread Wolfgang Schuster

Am 14.10.2010 um 12:21 schrieb Steffen Wolfrum:

> Hi,
> 
> Is this a known issue?
> 
> Without chapter the linebreak "\\" works.
> With a section header before it fails.

Headers redefined \\ to \space but it’s a bad idea to assume \\ make always a 
linebreak, following all the other command like \% \# etc. you should expect to 
get \ with \\

Wolfgang

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

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


Re: [NTG-context] section kills break ?

2010-10-14 Thread luigi scarso
On Thu, Oct 14, 2010 at 12:21 PM, Steffen Wolfrum
 wrote:
> Hi,
>
> Is this a known issue?
I don't know, while it's known that
video killed the radio stars

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

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


[NTG-context] section kills break ?

2010-10-14 Thread Steffen Wolfrum
Hi,

Is this a known issue?

Without chapter the linebreak "\\" works.
With a section header before it fails.


Steffen

---

\starttext

%\chapter{test} % <- un-/comment

\starttabulate[|p|p|]
\NC test\\test \NC text \NC\NR
\stoptabulate

\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] page breaks in cells?

2010-10-14 Thread luigi scarso
On Thu, Oct 14, 2010 at 11:23 AM, Wolfgang Schuster
 wrote:
> I’m sorry to disappoint you but the „x“ is only a placeholder for either „i“ 
> or „v“ because the example is in both files.
what a pity ...
-- 
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] background over two page

2010-10-14 Thread luigi scarso
On Thu, Oct 14, 2010 at 11:05 AM, Emanuele Sacco
 wrote:
> Hi all,
>
> I'm using context MkII.
> My code is
>
>
> \setupcolors[state=start]
> \setupbackground
> [bottomframe=on,
> rulethickness=1pt,
> rightframe=on,
> leftframe=on]
>
> \starttext
> Good:
> \startbackground
> \input knuth
> \stopbackground
>
> Not good:
>
> \startbackground
> \input knuth
> \input knuth
> \input knuth
> \stopbackground
> \stoptext
>
>
>
> The second backgrounded text is on two pages. Is there a way to not
> show the bottomframe at the end of the first page?
> thanks
>
> ES
> --
> Al mondo ci sono 10 tipi di persone: quelli che conoscono il sistema
> binario e quelli che non lo conoscono.
> ___
> 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
> ___
>

As always  my pov: a wrapper macro.

\showframe
\newdimen\SpaceLeft
\def\CheckSpace{%
\ifdim\pagetotal=0pt\SpaceLeft=\vsize\else\SpaceLeft=\pagegoal\advance\SpaceLeft
 by -\pagetotal\advance\SpaceLeft by -2\lineheight\fi}%


\setupcolors[state=start]


\long\def\StartBg#1\StopBg{%
\bgroup
\setbox8000=\vbox{#1}
\CheckSpace% \the\SpaceLeft\the\ht8000 \the\dp8000
\ifdim\dimexpr(\ht8000+\dp8000)>\SpaceLeft\relax
%
\setbox8001=\vsplit8000 to \SpaceLeft%
\setbox8001=\vbox{\unvbox8001}%
%
\setupbackground
[bottomframe=off,
rulethickness=1pt,
rightframe=on,
leftframe=on]
\startbackground\unvbox8001\stopbackground%

\setupbackground
[bottomframe=on,
rulethickness=1pt,
rightframe=on,
leftframe=on]
\startbackground\unvbox8000\stopbackground%
\else
\setupbackground
[bottomframe=on,
rulethickness=1pt,
rightframe=on,
leftframe=on]
\startbackground #1\stopbackground%
\fi
\egroup
}

\setupbackground
[bottomframe=on,
rulethickness=1pt,
rightframe=on,
leftframe=on]

\starttext
Good:
\startbackground
\input knuth
\stopbackground

Not good:

\StartBg
\input knuth
\input knuth
\input knuth
\StopBg

\stoptext



-- 
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] Custom enumeration

2010-10-14 Thread Wolfgang Schuster

Am 14.10.2010 um 11:22 schrieb Bela Mulder:

> Dear ConTeXters,
> 
> A newbie question: I am trying to set up a custom enumeration for exercises 
> in a syllabus. The numbering of these exercises should reflect both part and 
> chapter information, but \defineenumeration does not allow me to write my own 
> custom command for this (unlike \setuphead). Am I missing something, or is 
> there another solution?

Can you give us more information what you want!

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] page breaks in cells?

2010-10-14 Thread Wolfgang Schuster

Am 14.10.2010 um 09:09 schrieb luigi scarso:

> On Thu, Oct 14, 2010 at 8:06 AM, Wolfgang Schuster
>  wrote:
>> 
>> Am 13.10.2010 um 23:41 schrieb Steffen Wolfrum:
>> 
> Which kind table supports page breaks in cells?
 
 tabulate
>>> 
>>> but there we (still) don't have vertical lines, right?
>> 
>> yes, tabulate has no vertical lines but anch-pgr.mkix shows
> Hm, we need something like \fromfutureimport[module=anch-pgr.mkix]

I’m sorry to disappoint you but the „x“ is only a placeholder for either „i“ or 
„v“ because the example is in both files.

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] Custom enumeration

2010-10-14 Thread Bela Mulder

 Dear ConTeXters,

A newbie question: I am trying to set up a custom enumeration for 
exercises in a syllabus. The numbering of these exercises should reflect 
both part and chapter information, but \defineenumeration does not allow 
me to write my own custom command for this (unlike \setuphead). Am I 
missing something, or is there another solution?


Thanks in advance for any help.

--

Bela Mulder
Group Leader Theory of Biomolecular matter

FOM Institute AMOLF
Science Park 104, 1098XG Amsterdam, THE NETHERLANDS
Tel: + 31 20 7547100 FAX: + 31 20 7547290
web: http://www.amolf.nl/research/theory_of_biomolecular_matter/


___
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] background over two page

2010-10-14 Thread Emanuele Sacco
Hi all,

I'm using context MkII.
My code is


\setupcolors[state=start]
\setupbackground
[bottomframe=on,
rulethickness=1pt,
rightframe=on,
leftframe=on]

\starttext
Good:
\startbackground
\input knuth
\stopbackground

Not good:

\startbackground
\input knuth
\input knuth
\input knuth
\stopbackground
\stoptext



The second backgrounded text is on two pages. Is there a way to not
show the bottomframe at the end of the first page?
thanks

ES
-- 
Al mondo ci sono 10 tipi di persone: quelli che conoscono il sistema
binario e quelli che non lo conoscono.
___
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] \setupnote (was subfootnote)

2010-10-14 Thread luigi scarso
On Tue, Oct 12, 2010 at 1:09 PM, Yury G. Kudryashov  wrote:
> luigi scarso wrote:
>
>> On Tue, Oct 12, 2010 at 12:27 PM, Alan BRASLAU 
>> wrote:
>>> On Tuesday 12 October 2010 11:54:28 Steffen Wolfrum wrote:

 Hans recommended:

 \stopfootnote{}

>>>
>>> Thank you.
>>>
>>> This will work, but it is pretty ugly.%
>>> \startfootnote
>>> Hopefully Hans will fix this in mkiv.
>>> \stopfootnote{}
>>> In the meantime, we will just have to make do,
>>> but the special syntax as seen here raises eyebrows
>>> with my MS-Word bound collaborators.
>> Maybe for now
>> \let\StartFootnote\startfootnote
>> \def\StopFootnote{\stopfootnote{}}
>> and after fix
>> \let\StartFootnote\startfootnote
>> \let\StopFootnote\stopfootnote
> How would that help? \somecommand automatically gobbles the next space.
>>
>>
I meant this
\long\def\StartFootnote#1\StopFootnote{\startfootnote#1\stopfootnote\relax{} }

-- 
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] page breaks in cells?

2010-10-14 Thread Henning Hraban Ramm


Am 2010-10-14 um 09:09 schrieb luigi scarso:


On Thu, Oct 14, 2010 at 8:06 AM, Wolfgang Schuster
 wrote:


Am 13.10.2010 um 23:41 schrieb Steffen Wolfrum:


Which kind table supports page breaks in cells?


tabulate


but there we (still) don't have vertical lines, right?


yes, tabulate has no vertical lines but anch-pgr.mkix shows

Hm, we need something like \fromfutureimport[module=anch-pgr.mkix]
O perhaps
\fromDistantFutureimport[module=anch-pgr.mkix]
given the ix suffix.


Oh, Wolfgang's time machine! So, Guido isn't the only time traveller.

Greetlings, Hraban
___
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] How to center a MP graphics generated by Lua?

2010-10-14 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Great, thanks.

Lukas

On Thu, 14 Oct 2010 10:00:29 +0200, Wolfgang Schuster 
 wrote:


\dontleavehmode


___
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] How to center a MP graphics generated by Lua?

2010-10-14 Thread Wolfgang Schuster

Am 14.10.2010 um 09:49 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

> Hello,
> 
> I'm trying to center a MP graphics generated by Lua.
> 
> Although the inline Ctx code is (or seems to be) the same as generated by 
> Lua, I cannot understand why the red line is drawn on the left and not 
> centered.
> 
> So how to make the Lua->MP graphics centered?
> 
>  \startalignment[center]

\dontleavehmode

>\startluacode
>  context.startMPcode()
>  context("draw (0,0)--(1in,0) withrgbcolor (1,0,0)") % Red line LEFT?
>  context.stopMPcode()
>\stopluacode
>  \stopalignment

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] How to center a MP graphics generated by Lua?

2010-10-14 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

I'm trying to center a MP graphics generated by Lua.

Although the inline Ctx code is (or seems to be) the same as generated by Lua, 
I cannot understand why the red line is drawn on the left and not centered.

So how to make the Lua->MP graphics centered?

My code:

---
\showframe
\starttext
  \startalignment[center]
AAA\externalfigure[cow][width=4cm]BBB % OK, centered

aaa\startMPcode draw (0,0)--(1in,0)\stopMPcode bbb % OK, centered
  \stopalignment

  \startalignment[center]
\startluacode
  context.startMPcode()
  context("draw (0,0)--(1in,0) withrgbcolor (1,0,0)") % Red line LEFT?
  context.stopMPcode()
\stopluacode
  \stopalignment

  \startalignment[center]
TTT\startMPcode draw (0,0)--(1in,0)\stopMPcode UUU % OK, centered
  \stopalignment
\stoptext
---

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

t-CenFig.mkiv
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] page breaks in cells?

2010-10-14 Thread luigi scarso
On Thu, Oct 14, 2010 at 8:06 AM, Wolfgang Schuster
 wrote:
>
> Am 13.10.2010 um 23:41 schrieb Steffen Wolfrum:
>
 Which kind table supports page breaks in cells?
>>>
>>> tabulate
>>
>> but there we (still) don't have vertical lines, right?
>
> yes, tabulate has no vertical lines but anch-pgr.mkix shows
Hm, we need something like \fromfutureimport[module=anch-pgr.mkix]
O perhaps
\fromDistantFutureimport[module=anch-pgr.mkix]
given the ix suffix.

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