Re: [NTG-context] Questions on \definition

2012-01-18 Thread Wolfgang Schuster

Am 18.01.2012 um 02:47 schrieb Kip Warner:

 Ah, so \setupdescriptions inherits the default values of
 \definedescription?

WIth \definedescription you create a new command (e.g. \definition) and 
environment (e.g. \startdefinition … \stopdefinition).

With \setupdescriptions you can afterwards change the values of the previous 
defined command/environment.

Each new created command has always default values for the location, style and 
color of the title etc. which be either changed when you create the command 
(\definedescription[…][..,.=.,..]) or afterwards 
(\setupdescriptions[…][..,.=.,..]).

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] another surprising change (line break in TOC)

2012-01-18 Thread Hans Hagen

On 18-1-2012 08:30, luigi scarso wrote:

On Wed, Jan 18, 2012 at 7:25 AM, Steffen Wolfrumcont...@st.estfiles.dewrote:



Am 17.01.2012 um 23:41 schrieb Wolfgang Schuster:





You should try to make your code more readable.

\definelistplacement[MyListItemIT][none]#1#2#3%
   {\maxaligned\bgroup
  \rlap{\it#1}%


  
\framed[frame=off,align=middle,location=bottom,width=broad,foregroundstyle=\TOCstyleBF]{#2}%

  \llap{\tf#3}%
\egroup}



I did not know \maxaligned

even me --- it's normal, it's hard to be in sync with all the changes of

the source. I suspect that it's an internal macro, can even change.
Wolfgang often uses internal macro, gaining speed but loosing compatibility.
As general rule (another...) in my stylesheets I try to use TeX macros and
ConTeXt switches (i.e. key=val) especially if they are related to long term
projects.


Actually, Wolfgang seldom uses internal macros. Macros like \maxaligned 
are helpers that are used to build regular commands, so they're part of 
the infrastructure and Wolfgang knows the context internals amazingly 
well. There are some obscure helpers that might dissappear but most are 
there for a reason and will stay. So, we have:


commands: offcial interface
helpers : more low level, no key/values etc
hidden  : not meant to be used unless on your own risk

Btw, \rlap and \llap are quite standard in a tex system.

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] two problems with natural tables

2012-01-18 Thread Hans Hagen

On 18-1-2012 05:19, Brian Landy wrote:

Hi, sorry to dredge up such an old thread, but I recently updated from a Feb 
2010 vintage minimals to current (first to 1/12/2012, then to today 1/17).  I 
ran into problems splitting a table within a splitfloat.  I search the list 
archives and came up with this example, which is failing for me.

\starttext
\placetable[split]{Test}
{\bTABLE[split=yes]
\dorecurse{60}{
\bTR \bTD hello \eTD \eTR
}
\eTABLE}
\stoptext



argument  \c!suffixstopper


In your cont-new.mkiv file, add (after \unprotect)

\def\c!suffixstopper{suffixstopper}

I wonder why it show up now ... either I lost some definition or it 
suddenly started working


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] Wrong placement parameter (Was: two problems with natural tables)

2012-01-18 Thread Hans Hagen

On 18-1-2012 06:31, Vladimir Lomov wrote:


According to Command reference on wiki, placetable doesn't have 'split'
parameter, see http://wiki.contextgarden.net/Reference/en/placefloat

Just remove 'split' and your example will be compiled.


each \placesomefloat command accepts the same keys, so split is valid

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] xmlprocessfile failing

2012-01-18 Thread Hans Hagen

On 18-1-2012 09:30, Hans van der Meer wrote:

I get an inexplicable error in \xmlprocessfile. It seems to occur after my data 
are processed; somewhere in the aftermath of that call, I guess.

The error is in: ConTeXt  ver: 2012.01.16 18:33 MKIV
This version was ok: ConTeXt  ver: 2012.01.09 10:08 MKIV

The error:
! Missing } inserted.
inserted text
 }
to be read again
\endgroup
l.37\xmlprocessfile{exam}{xam-exam.xml}{}

What happened. Changes here?


not sure ... probably some other command that does this

-
  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] another surprising change (line break in TOC)

2012-01-18 Thread luigi scarso
On Tue, Jan 17, 2012 at 1:14 PM, Steffen Wolfrum cont...@st.estfiles.dewrote:


 And this interlineskip is ignored in your solution, test the following
 please:


 \def\TOCstyleBF{\switchtobodyfont[9pt]\bf\setupinterlinespace[line={40pt}]}

 \definelistplacement[MyListItemIT][none]#1#2#3%

 {\hfill\kern-1em\it#1\hfill\strut\crlf\strut\hfill\hphantom{\tf#3}\framedtext[frame=off,offset=overlay,align=middle,style=TOCstyleBF]{#2}\hfill\tf#3}
 % here the interlinespace is ignored
 %
 {\hfill\kern-1em\it#1\hfill\strut\crlf\strut\hfill\hphantom{\tf#3}\framedtext[frame=off,offset=overlay]{\TOCstyleBF\midaligned{#2}}\hfill\tf#3}
 % here the interlinespace worked

 \setuplist[chapter]
   [alternative=MyListItemIT]

 \definecombinedlist[TOCtoc]
 [chapter]

 \setupcombinedlist[TOCtoc]
 [aligntitle=yes,criterium=text,interaction=all]


 \starttext

 \placeTOCtoc[criterium=text,interaction=all]

 \startchapter[
   title={Das Krankenhaus als Leistungserbringer in der GKV},
  marking={Das Krankenhaus als Leistungserbringer in der GKV},
list={Das Krankenhaus\\als Leistungserbringer in der GKV},
 bookmark={Das Krankenhaus als Leistungserbringer in der GKV}]

 \stopchapter

 \stoptext


Now the above example  it's ok for me with

# context --version

mtx-context | main context file:
/opt/luatex/standalone/tex/texmf-context/tex/context/base/context.mkiv
mtx-context | current version: 2012.01.16 18:33


-- 
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] xmlverbatim api changes?

2012-01-18 Thread Meer, H. van der
Did I miss in the recent past some changes in the xmlverbatim API?
Exercising from the manual the macros
\xmldisplayverbatim{#1}{.} and \xmlinlineverbatim{#1}{.}
I get as an error:
! Undefined control sequence.
\startxmlinlineverbatim ... \doinitializeverbatim
l.4 ]
\ctxlxml #1-\directlua \zerocount {lxml.#1}
\006:xmlcommon:pre #1-\xmlinlineverbatim {#1} 
  {.}
l.7 }
\ctxlxml #1-\directlua \zerocount {lxml.#1}



This version: ConTeXt  ver: 2012.01.09 10:08 MKIV

Hans van der Meer



___
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] Tikz module causes errors

2012-01-18 Thread Christophe Jorssen
Hello Mojca, thanks for the follow-up.

2012/1/17 Mojca Miklavec mojca.miklavec.li...@gmail.com:
 On Tue, Jan 17, 2012 at 16:00, Felix Ingram wrote:
 I've just updated to the latest beta and the following will cause an error:

 \usemodule[tikz]
 \starttext
 Hello World
 \stoptext


 The error is:

 system           tex  error on line 129 in file example.tex:
 Undefined control sequence ...

 l.129   \catcode`\;=\active

 Obviously there is no line 129. A quick greg shows that the likely suspect 
 is:
 tex\texmf-modules\tex\generic\pgf\utilities\pgffor.code.tex:129

 Is this the best place to report this, or should I drop a mail to the
 Tikz/PGF list?

 It's complicated because I'm not aware of any major TikZ developer
 using ConTeXt.

 The main question is: is this a recent problem in TikZ or in ConTeXt?
 Usually people on this list might know how to fix problems, but then
 you need to convince pgf team to accept patches. (And then Aditya
 started contributing and collecting some patches independently.)


If they aren't yet in the official repo, I would be happy to add those
patches. Note that I'm not a ConTeXt user, so I won't be able to test
them carefully.

 I didn't follow development of ConTeXt too closely, but I'm lead to
 believe that \active has disappeared from ConTeXt MKIV. Others will
 have to correct me if I'm wrong - I didn't check ConTeXt sources. And
 others will have to make suggestion about what to do about this.
 Patching might as easy as adding \def\active{13} somewhere on top of
 TikZ sources, but it might help to understand why Hans decided to
 remove the \active command if that is true.


I add it to my todo list.

 On the other hand (completely unrelated), I just realized that the
 following commit (unofficial and unreliable temporary repository):
    
 https://github.com/mojca/pgf/commit/418b278dcf6a2193d0d564d9d85194bdce1e505e
 only fixes LaTeX and plain TeX and doesn't fix ConTeXt. I don't know
 what the patch is about, but I'm lead to believe that the same patch
 might be needed in ConTeXt as well if it is needed for the other two.


Not sure if it is needed for ContTeXt because I added the required
file on top of pgffor.code.tex that is loaded by any format one use.

I did add a \RequirePackage to the .sty file because LaTeX manages a
list of package loaded. I would be happy to do the same for ConTeXt if
it has a similar mechanism.

Best regards

-- 
Christophe
___
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] Wrong placement parameter (Was: two problems with natural tables)

2012-01-18 Thread luigi scarso
On Wed, Jan 18, 2012 at 9:48 AM, Hans Hagen pra...@wxs.nl wrote:

 On 18-1-2012 06:31, Vladimir Lomov wrote:

  According to Command reference on wiki, placetable doesn't have 'split'
 parameter, see 
 http://wiki.contextgarden.net/**Reference/en/placefloathttp://wiki.contextgarden.net/Reference/en/placefloat

 Just remove 'split' and your example will be compiled.


 each \placesomefloat command accepts the same keys, so split is valid

 Hans


\starttext
\setupcaptions[suffix=]
\placetable[split]{Test}
{\bTABLE[split=yes]
\dorecurse{60}{
\bTR \bTD hello \eTD \eTR
}
\eTABLE}
\stoptext

it's ok.


-- 
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] Tikz module causes errors

2012-01-18 Thread Philipp A.
2012/1/17 Christophe Jorssen christophe.jors...@gmail.com

 If they aren't yet in the official repo, I would be happy to add those
 patches. Note that I'm not a ConTeXt user, so I won't be able to test
 them carefully.


which ones? all those in mojca’s repo https://github.com/mojca/pgf?

because getting them into mainline tikz would be awesome. some gems like
thishttp://tex.stackexchange.com/questions/27952/cmyk-context-colors-in-tikz#27955already
made
ithttp://sourceforge.net/tracker/?func=detailatid=752792aid=3407097group_id=142562into
the cvs, but we have still qite some bugs that are only fixed in
mojca’s repo. (e.g. matrices are still unusable if you don’t do
\unprotect\ReadFile{pgfmodulematrix.code.tex}\protect after loading the
tikz module afaik)
http://tex.stackexchange.com/questions/27952/cmyk-context-colors-in-tikz#27955
___
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] Tikz module causes errors

2012-01-18 Thread Felix Ingram
Adding the \def\active{13} statement to the sources seems to fix
things for the time being. All of my graphics appear to have shifted
to the right by leftmarginwidth but I can correct for that. I believe
that someone else had a similar issue (Daniel Edwards in a mail sent
on 14 Jan 2012).

Oh, and suffix={ --} no longer works for setupcaption but I can
survive without that for the moment.

Thanks all for the help,

Felix

On 18 January 2012 11:54, Philipp A. flying-sh...@web.de wrote:
 2012/1/17 Christophe Jorssen christophe.jors...@gmail.com

 If they aren't yet in the official repo, I would be happy to add those
 patches. Note that I'm not a ConTeXt user, so I won't be able to test
 them carefully.


 which ones? all those in mojca’s repo?

 because getting them into mainline tikz would be awesome. some gems like
 this already made it into the cvs, but we have still qite some bugs that are
 only fixed in mojca’s repo. (e.g. matrices are still unusable if you don’t
 do \unprotect\ReadFile{pgfmodulematrix.code.tex}\protect after loading the
 tikz module afaik)

 ___
 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] Tikz module causes errors

2012-01-18 Thread luigi scarso
On Wed, Jan 18, 2012 at 1:14 PM, Felix Ingram f.ingram.li...@gmail.comwrote:

 Adding the \def\active{13} statement to the sources seems to fix
 things for the time being. All of my graphics appear to have shifted
 to the right by leftmarginwidth but I can correct for that. I believe
 that someone else had a similar issue (Daniel Edwards in a mail sent
 on 14 Jan 2012).

 Oh, and suffix={ --} no longer works for setupcaption but I can
 survive without that for the moment.

You can try with this temporary  patch
\unprotect\def\c!suffixstopper{}\protect
just in the beginning of you file


-- 
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] Using non-math fonts for letters and numerals in formulas

2012-01-18 Thread Nikita Volchenkov
On 14:00 Tue 17 Jan , Hans Hagen wrote:
 you can make a virtual font ... see palatino-math.lfg etc for an example 
 definition
 

Thanks Hans!

I looked into it, but it's not much helpful for me without API documentation.
Where I can find it?
___
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] Counters again

2012-01-18 Thread Felix Ingram
On 17 January 2012 18:10, Wolfgang Schuster
schuster.wolfg...@googlemail.com wrote:

 Am 17.01.2012 um 15:55 schrieb Felix Ingram:


 I'm now trying to use counters that will tally some values. The value
 of these could be zero, which the wiki states will be the default
 value. The following shows that nothing is displayed when the counter
 is 0.

 \definenumber[examplecounter]
 \setnumber[examplecounter]{1}
 \starttext
 This is the default value: \getnumber[examplecounter]
 \incrementnumber[examplecounter]
 This is the new value: \getnumber[examplecounter]
 \resetnumber[examplecounter]
 This is the reset value: \getnumber[examplecounter]
 \setnumber[examplecounter]{0}
 This is the set value: \getnumber[examplecounter]
 \stoptext

 I can include some conditionals to check this but thought I'd report
 it in case I'm doing it wrong/the wiki needs updating.

 The wiki explains often the behavior for MkII but MkIV does sometimes things 
 different
 but when you need only the value of the counter without chapter or section 
 prefixes
 you can use \rawnumber which shows also the start value.

 BTW: In the next beta the syntax for \setnumber will change, now both 
 arguments are
 written in brackets, e.g. \setnumber[mycount][4]

Thanks Wolfgang - \rawnumber works as expected.

I think that my approach is flawed, however. I'm letting users set a
userstructurevariable that I'm tying to counters in order to produce
a(nother) summary table. The problem is that the table is at the start
of the document and so the counters will all be at their initial
value. I'll need to find a way to save the counters over compile runs
or to delay the building of the summary table until after the rest of
the document is done.

Felix
___
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] two problems with natural tables

2012-01-18 Thread Brian R. Landy
This worked perfectly, thanks!

Brian

On Jan 18, 2012, at 3:47 AM, Hans Hagen pra...@wxs.nl wrote:

 On 18-1-2012 05:19, Brian Landy wrote:
 Hi, sorry to dredge up such an old thread, but I recently updated from a Feb 
 2010 vintage minimals to current (first to 1/12/2012, then to today 1/17).  
 I ran into problems splitting a table within a splitfloat.  I search the 
 list archives and came up with this example, which is failing for me.
 
 \starttext
 \placetable[split]{Test}
 {\bTABLE[split=yes]
 \dorecurse{60}{
 \bTR \bTD hello \eTD \eTR
 }
 \eTABLE}
 \stoptext
 
 argument  \c!suffixstopper
 
 In your cont-new.mkiv file, add (after \unprotect)
 
 \def\c!suffixstopper{suffixstopper}
 
 I wonder why it show up now ... either I lost some definition or it suddenly 
 started working
 
 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
___


[NTG-context] Problem with letter module

2012-01-18 Thread Romain Diss
Hi,

I am writing a letter with the 'letter' module (mkiv and last beta) and the 
\encl{} command doesn't work anymore. I know that the module has been rewriten 
recently but I can't find any doc or examples of the new syntax. I tried to 
look at the source code but it doesn't help.

So is there any command which replace \encl{}? And is there any documentation 
(even succint) of the new module?

Thanks.

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


[NTG-context] Problem with location=left (at least) of setlayer

2012-01-18 Thread Cedric Mauclair
Hi Hans, hi list,


The following example shouts at me (something about
\syst_boxes_with_next_box, \pack_layers... and a bunch of other
stuff) if I uncomment the location=left part (right and others are
fine):

% Example below
\definelayer[page][x=0pt, y=0pt]
\setupbackgrounds [page] [background=page]

\starttext
  %% \setlayer[page][location=left]{It doesn't work}
  \setlayer[page][location=rightbottom]{It works!}

  \input knuth
\stoptext


Best regards.

-- Cédric
___
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 location=left (at least) of setlayer

2012-01-18 Thread Wolfgang Schuster

Am 18.01.2012 um 21:34 schrieb Cedric Mauclair:

 Hi Hans, hi list,
 
 
 The following example shouts at me (something about
 \syst_boxes_with_next_box, \pack_layers... and a bunch of other
 stuff) if I uncomment the location=left part (right and others are
 fine):

supp-box.mkiv (line 2188):

-\def\syst_boxes_rightbox_finish
+\def\syst_boxes_leftbox_finish
  {\global\boxhdisplacement-\wd\nextbox
   \global\advance\boxhdisplacement-\boxoffset
   \global\boxvdisplacement.5\ht\nextbox
   \global\advance\boxvdisplacement-.5\dp\nextbox
   \boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box\nextbox
   \egroup}

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] \par in macro definition (mkii issue)

2012-01-18 Thread Otared Kavian
Hi,

It seems that with the recent updates, I found that the following minimal 
example does not work in mkii, while it does in mkiv:
 
\define[1]\MyTest{The test variable is #1.\par}

\starttext
Is this a bug in mkii?
\MyTest{3}
\stoptext

Am I doing something wrong, or mkii has changed despite being officially « 
frozen », a side effect of  the global warming…?  :-)

Best regards: OK
PS: the version I am using is ConTeXt  ver: 2012.01.16 18:33 MKII, and the 
error message says:
(/context-minimal/tex/texmf-context/tex/context/base/spec-fdf.mkii))
Runaway argument?
{The test variable is ##1.
! Paragraph ended before \complexdefine was complete.
to be read again 
   \par 
l.1 \define[1]\MyTest{The test variable is #1.\par
  }
? 
Process aborted

___
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] \par in macro definition (mkii issue)

2012-01-18 Thread Wolfgang Schuster

Am 18.01.2012 um 22:59 schrieb Otared Kavian:

 Hi,
 
 It seems that with the recent updates, I found that the following minimal 
 example does not work in mkii, while it does in mkiv:
 
 \define[1]\MyTest{The test variable is #1.\par}
 
 \starttext
 Is this a bug in mkii?
 \MyTest{3}
 \stoptext
 
 Am I doing something wrong, or mkii has changed despite being officially « 
 frozen », a side effect of  the global warming…?  :-)

This is a limitation of the MkII version of the \define command, you can’t use 
\par in the replacement text but you can use \endgraf which does also end a 
paragraph.

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] \par in macro definition (mkii issue)

2012-01-18 Thread Otared Kavian

On 18 janv. 2012, at 23:07, Wolfgang Schuster wrote:
 […]
 This is a limitation of the MkII version of the \define command, you can’t 
 use \par in the replacement text but you can use \endgraf which does also end 
 a paragraph.
 
 Wolfgang

Thanks Wolfgang: indeed 
\def\MyTest#1{The test variable is #1.\par}
works both in mkii and mkiv. 
There must be a reason for the behavior of \define in mkii, but that's fine: 
I'll use \endgraf, when I have to use mkii.

Best regards: OK___
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] Questions on \definition

2012-01-18 Thread Kip Warner
On Wed, 2012-01-18 at 09:26 +0100, Wolfgang Schuster wrote:
 Am 18.01.2012 um 02:47 schrieb Kip Warner:
 
  Ah, so \setupdescriptions inherits the default values of
  \definedescription?
 
 WIth \definedescription you create a new command (e.g. \definition) and 
 environment (e.g. \startdefinition  \stopdefinition).
 
 With \setupdescriptions you can afterwards change the values of the previous 
 defined command/environment.
 
 Each new created command has always default values for the location, style 
 and color of the title etc. which be either changed when you create the 
 command (\definedescription[][..,.=.,..]) or afterwards 
 (\setupdescriptions[][..,.=.,..]).
 
 Wolfgang

Thanks Wolfgang. I kind of understand. But when you say create a new
command, how does ConTeXt know what the command does?

-- 
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] Questions on \definition

2012-01-18 Thread Wolfgang Schuster

Am 18.01.2012 um 23:39 schrieb Kip Warner:

 On Wed, 2012-01-18 at 09:26 +0100, Wolfgang Schuster wrote:
 Am 18.01.2012 um 02:47 schrieb Kip Warner:
 
 Ah, so \setupdescriptions inherits the default values of
 \definedescription?
 
 WIth \definedescription you create a new command (e.g. \definition) and 
 environment (e.g. \startdefinition  \stopdefinition).
 
 With \setupdescriptions you can afterwards change the values of the previous 
 defined command/environment.
 
 Each new created command has always default values for the location, style 
 and color of the title etc. which be either changed when you create the 
 command (\definedescription[][..,.=.,..]) or afterwards 
 (\setupdescriptions[][..,.=.,..]).
 
 Wolfgang
 
 Thanks Wolfgang. I kind of understand. But when you say create a new
 command, how does ConTeXt know what the command does?

The following is only a simplified explanation.

When you define a new command with \definedescription, e.g. 
\definedescription[definition] you get the commands

\definition

and

   \startdefinition

Both are only shortcuts for \dodescription[definition] and 
\dostartdescription[definition], as you can see the internal command tells 
context that it’s dealing with a description and “definition” is only the name 
of the instance.

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] Questions on \definition

2012-01-18 Thread Kip Warner
On Wed, 2012-01-18 at 11:44 +0900, Vladimir Lomov wrote:
 Actually Vladimir, Vlad is usually used as short for Vladislav.

Except in the case of my buddy Vlad(imir) here in Vancouver ;)

  (not an expert, just read command reference)
  (1) What is the difference between \definedescription and
  \setupdescriptions?
  the first should define new description, the second change style of
  already defined description.
 
  Ah, so \setupdescriptions inherits the default values of
  \definedescription?
 
 I suppose no, '\define...', eh-m, defines a command while '\setup...', eh-m,
 sets up its 'style'. When one defines a command one could set its
 custom 'style' instead of default.
 
 Consider the following example:
 example file=ex1.tex
 \starttext
 
 \definedescription[definition]

Why is this above command necessary? Why can one not simply begin with
the next one, \definition{Hi}?

 \definition{Hi} This is first definition.

 May be because this is an example? I would say that ConTeX User Manual
 shows different commands from context itself and how one could define
 custom commands. The '\definition' is one them.

???

 I don't know but reading manuals (context and latex ones), wiki and etc
 somehow convince me that 'head' relates with section heading (styling),
 for the rest there are '\setup...' commands and 'headstyle' key (not
 always, of course), may be that's why I always consult reference on wiki
 and sometimes source code.

It's kind of inconsistent that it isn't using a \setuphead, but I
suppose it doesn't matter now as I got the desired effect =)

Thanks Vladimir =)

-- 
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] Questions on \definition

2012-01-18 Thread Kip Warner
On Wed, 2012-01-18 at 23:58 +0100, Wolfgang Schuster wrote:
 When you define a new command with \definedescription, e.g. 
 \definedescription[definition] you get the commands
 
 \definition
 
 and
 
\startdefinition
 
 Both are only shortcuts for \dodescription[definition] and 
 \dostartdescription[definition], as you can see the internal command tells 
 context that it’s dealing with a description and “definition” is only the 
 name of the instance.
 
 Wolfgang

I guess my confusion is why do you need to call \definedescription when
you just want a \definition to typeset? Shouldn't the command already be
available?

-- 
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] Questions on \definition

2012-01-18 Thread Wolfgang Schuster

Am 19.01.2012 um 00:03 schrieb Kip Warner:

 On Wed, 2012-01-18 at 23:58 +0100, Wolfgang Schuster wrote:
 When you define a new command with \definedescription, e.g. 
 \definedescription[definition] you get the commands
 
\definition
 
 and
 
   \startdefinition
 
 Both are only shortcuts for \dodescription[definition] and 
 \dostartdescription[definition], as you can see the internal command tells 
 context that it’s dealing with a description and “definition” is only the 
 name of the instance.
 
 Wolfgang
 
 I guess my confusion is why do you need to call \definedescription when
 you just want a \definition to typeset? Shouldn't the command already be
 available?

When there would be a predefined description command I would prefer \description
and \startdescription but not \definition but it’s hard to say which command 
should
be available by default everyone has a different opinion.

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] Referencing a \startdefinition

2012-01-18 Thread Kip Warner
On Wed, 2012-01-18 at 08:36 +0100, Wolfgang Schuster wrote:
 \startdefinition[des:some]{Some Definition}
 
 \stopdefinition
 
 \in{Definition}[des:some]
 
 Wolfgang

Hey Wolfgang. That works, but in the text I would just see linkable text
Definition which is fine for online viewing, but for print, which is
what I need to, I'd like it to be something like some in section 10.2.
Can that be done? 

-- 
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] Questions on \definition

2012-01-18 Thread Kip Warner
On Thu, 2012-01-19 at 00:12 +0100, Wolfgang Schuster wrote:
 When there would be a predefined description command I would prefer 
 \description
 and \startdescription but not \definition but it’s hard to say which command 
 should
 be available by default everyone has a different opinion.

Thanks Wolfgang.

-- 
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] Problem with letter module

2012-01-18 Thread Wolfgang Schuster

Am 18.01.2012 um 21:14 schrieb Romain Diss:

 Hi,
 
 I am writing a letter with the 'letter' module (mkiv and last beta) and the 
 \encl{} command doesn't work anymore. I know that the module has been 
 rewriten 
 recently but I can't find any doc or examples of the new syntax. I tried to 
 look at the source code but it doesn't help.
 
 So is there any command which replace \encl{}? And is there any documentation 
 (even succint) of the new module?

With the new version of the module I tried to get rid of a few things which lead
to problems or which didn’t fit into context normal syntax. The \encl, \cc and 
\ps
had been such a thing and all three value can now only bet set as keyval 
argument,
e.g. \startletter[enclosure=…]

There isn’t a new documentation yet but I’ll give a short overview.

There is now only one way to set values for the letter variables in this is 
\setupletter
with it’s keyval syntax, e.g. \setupletter[name=…,address=…]. The 
\setlettervalue
command from the previous version is gone and won’t come back.

The letter environment has now only optional argument which acts like a local
version of \setupletter where the values are only used in the environment.
When you use your document only for a single letter without anything else
you can even drop \starttext and \stoptext because this is handled by 
\startletter
and \stopletter.

To change the labels in the reference line for the “Date” string you have
to use the \setuplettertext command, a special version of \setuplabeltext only
for the letter module.

Styles are still loaded with \useletterstyle but when you want to put your own
settings in a style file you have to name the file “letter-style.tex|mkiv”. 
To load
the style you need only the style part as argument for the command because
the “letter-” part is always added. It doesn't matter if you use tex or mkiv as 
file
extension because the file is found in either case.

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] bold is not working (simplefonts)

2012-01-18 Thread Jan Heinen

Hello,

I want to get bold text - without simplefonts it is 
working - with simplefonts it does not work.

What is wrong and what do I have to do?

My example:

\usemodule[simplefonts]
\setmainfont[Allerlight]
\starttext
This is not bold! {\bf Is this bold?} This is not bold!
\stoptext


Regards
Jannis

___
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] bold is not working (simplefonts)

2012-01-18 Thread Wolfgang Schuster

Am 19.01.2012 um 00:27 schrieb Jan Heinen:

 Hello,
 
 I want to get bold text - without simplefonts it is working - with 
 simplefonts it does not work.
 What is wrong and what do I have to do?

The module can’t find italic, bold etc. alternatives when don’t match a certain 
name pattern, in your case for “Aller Light” the normal “Aller” font has to be 
used for the bold alternative but the module is looking for “Aller Light Bold” 
which doesn’t exist. To have a bold alternative besides this limitation you can 
say which font should be used for bold, see below how this can be done.

 My example:
 
 \usemodule[simplefonts]
 \setmainfont[Allerlight]

\setmainfont[Allerlight][boldfont={Aller},bolditalicfont={Aller Italic}]

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] \externalfigure and file size

2012-01-18 Thread Kip Warner
Hey list,

I have a number of \externalfigure commands to typeset some svg images.
This is often handy to have them vectorized because it allows for the
user to zoom in on diagrams of great detail. 

In other situations, I find that for images that are not so important,
they would benefit from ConTeXt rasterizing them when they are imported.
The reason for this is I find some vector images get enormously bloated
when they are typeset. As an example, I have a Logo.svg of only 6.8 KB.
The m_k_i_v_Logo.pdf intermediate ConTeXt generates is nearly a megabyte
in size. Why? I have no idea, as they both appear to be the same image
with the same gausian blur.

Is there a flag I can pass certain instances of \externalfigure that
tells the image processing backend that a simple rasterized version of
the figure is fine? Or is there a better approach? I don't want to
pre-convert all of these images to raster formats.

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

[NTG-context] xtable formatting issues

2012-01-18 Thread Brian Landy
Hi, I’ve been experimenting a bit with converting some natural tables into 
xtables and ran across two issues.

The first has to do with nested xtables and settings.  In particular, if you 
attempt to set a cell’s width on the internal table using \setupxtable the 
option is lost.  In the below example testtable1 doesn’t format properly when 
nested; testtable2 does.  I also included some font and color examples to show 
they cascade more as I’d expect (the outer table’s settings are used unless 
overridden by the inner table).

The second thing I noticed is that attempting to set the font via 
foregroundstyle only works when done vie \setupxtable.  Attempting to assign 
this directly to the cell causes compile errors (the commented table in the 
example).  Maybe I should be setting the font some other way?  (this is how I 
always did it with natural tables).

Finally, does xtable have something like the aligncharacter mechanism in 
natural tables?

Thanks,
Brian


\starttext

\setupxtable[wd1][background=color,backgroundcolor=yellow,width=1.0in]
\setupxtable[wd2][background=color,backgroundcolor=green,width=2.0in]
\setupxtable[fnit][foregroundstyle={\switchtobodyfont[modern,ss]\it}]
\setupxtable[fnbf][foregroundstyle={\switchtobodyfont[modern,ss]\bf}]

\startbuffer[testtable1]
\startxtable
\startxrow \startxcell[fnbf] bold \stopxcell \startxcell[wd1] 1in? \stopxcell 
\stopxrow
\stopxtable
\stopbuffer

\startbuffer[testtable2]
\startxtable
\startxrow \startxcell[fnbf] bold \stopxcell 
\startxcell[background=color,backgroundcolor=yellow,width=1.0in] 1in?  
\stopxcell \stopxrow
\stopxtable \stopbuffer

\getbuffer[testtable1]
\getbuffer[testtable2]

\startxtable
\startxrow \startxcell[fnit] \getbuffer[testtable1] \stopxcell \startxcell[wd2] 
\getbuffer[testtable1] \stopxcell \stopxrow
\startxrow \startxcell[fnit] \getbuffer[testtable2] \stopxcell \startxcell[wd2] 
\getbuffer[testtable2] \stopxcell \stopxrow
\stopxtable

% below fails, foregroundstyle set in this fashion must be done through 
\setuptable
%\startxtable
%\startxrow \startxcell[foregroundstyle={\switchtobodyfont[modern,rm]\it}] 
italic \stopxcell \stopxrow
%\stopxtable

\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] Problem with location=left (at least) of setlayer

2012-01-18 Thread Cédric Mauclair
Many thanks Wolfgang.

-- Cédric

Le 18 janv. 2012 à 21:51, Wolfgang Schuster schuster.wolfg...@googlemail.com 
a écrit :

 
 Am 18.01.2012 um 21:34 schrieb Cedric Mauclair:
 
 Hi Hans, hi list,
 
 
 The following example shouts at me (something about
 \syst_boxes_with_next_box, \pack_layers... and a bunch of other
 stuff) if I uncomment the location=left part (right and others are
 fine):
 
 supp-box.mkiv (line 2188):
 
 -\def\syst_boxes_rightbox_finish
 +\def\syst_boxes_leftbox_finish
  {\global\boxhdisplacement-\wd\nextbox
   \global\advance\boxhdisplacement-\boxoffset
   \global\boxvdisplacement.5\ht\nextbox
   \global\advance\boxvdisplacement-.5\dp\nextbox
   \boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box\nextbox
   \egroup}
 
 Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] \externalfigure and file size

2012-01-18 Thread Mojca Miklavec
On Thu, Jan 19, 2012 at 01:25, Kip Warner k...@thevertigo.com wrote:

 In other situations, I find that for images that are not so important,
 they would benefit from ConTeXt rasterizing them when they are imported.
 The reason for this is I find some vector images get enormously bloated
 when they are typeset. As an example, I have a Logo.svg of only 6.8 KB.
 The m_k_i_v_Logo.pdf intermediate ConTeXt generates is nearly a megabyte
 in size. Why? I have no idea, as they both appear to be the same image
 with the same gausian blur.

If original svg image is 7 KB, the PDF should not be any bigger apart
from the header and maybe embded fonts. However if you are using some
smooth shading, it might be that the program which does the conversion
is performing a poor job and converts shading into hundreds of thin
strips of different colors.

I would try to use a different tool for conversion into PDF (not into
raster image, but into vector image) before running ConTeXt. I don't
know which one, but you can try to experiment.

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