Re: [NTG-context] Difference in doifinset in MkII and MkIV

2011-09-21 Thread Wolfgang Schuster

Am 21.09.2011 um 05:20 schrieb Aditya Mahajan:

 The following works in MkIV but fails in MkIV:
 
 \unprotect
 \def\!!yesandon{yes,on}
 \doifinsetelse{yes}\!!yesandon

\ExpandSecondAfter\doifinsetelse{yes}\!!yesandon

It’s awkward but this how it works in MkII.

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] placing endnotes throws a missing number error

2011-09-21 Thread Wolfgang Schuster

Am 20.09.2011 um 21:14 schrieb Daniel Schopper:

 Dear list,
 I’m running into a strange issue with endnotes. I seem to hit a limit of how 
 many endnotes I can place in a document - although there are only 52 of them 
 in the document. Recursing the following minimal example 12 times works fine 
 on my machine (using today’s beta 2011.09.20 00:09)
 
 Any clues?
 Thanks in advance!
 Daniel
 
 Here’s an example:
 
 -
 \definenote[myFirstEndnote][endnote]
 \definenote[mySecondEndnote][endnote]
 \definenote[myThirdEndnote][endnote]
 \definenote[myFourthEndnote][endnote]
 
 \starttext
 \dorecurse{13}{
   \myFirstEndnote{endnote}
   \input tufte
   \mySecondEndnote{endnote}
   \input tufte
   \myThirdEndnote{endnote}
   \input tufte
   \myFourthEndnote{endnote}
   \input tufte
 }
 \page
 \placenotes[myFirstEndnote]
 \placenotes[mySecondEndnote]
 \placenotes[myThirdEndnote]
 \placenotes[myFourthEndnote]
 
 \stoptext

Use \placenotes[…][height=\textheight].

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] Verbatim in framed text

2011-09-21 Thread Wolfgang Schuster

Am 20.09.2011 um 17:50 schrieb Felix Ingram:

 Some of my verbatim lines are overflowing the framed text box I'm
 putting them in. I see that I could define a pretty printer to handle
 this but I came up with the following:
 
 
 \starttext
 \startframedtext[middle][width=.8\textwidth]
 \startframedtext[left][frame=off, width=.6\textwidth]
 \starttyping
 import x
 from x import y
 for z in b:
print dfdg
 Some text
 Some text
 Some text
 Some text
 Some really long text Some really long text Some really long text Some
 really long text Some really longtextSomereallylong text Some really
 long text Some really long text Some really long text Some really long
 text Some really long text
 \stoptyping
 \stopframedtext
 \stopframedtext
 \stoptext
 
 
 This works but seems like cheating.
 
 Is there a better third way I could try, or could someone point to a
 mkiv pretty printer example I could study?

Change the alignment of the verbatim text with “\setuptyping[align=flushleft]”.

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] placing endnotes throws a missing number error

2011-09-21 Thread Daniel Schopper

Thanks, it’s working now!

Am 21.09.11 13:06, schrieb Wolfgang Schuster:


Am 20.09.2011 um 21:14 schrieb Daniel Schopper:


Dear list,
I’m running into a strange issue with endnotes. I seem to hit a limit of how 
many endnotes I can place in a document - although there are only 52 of them in 
the document. Recursing the following minimal example 12 times works fine on my 
machine (using today’s beta 2011.09.20 00:09)

Any clues?
Thanks in advance!
Daniel

Here’s an example:

-
\definenote[myFirstEndnote][endnote]
\definenote[mySecondEndnote][endnote]
\definenote[myThirdEndnote][endnote]
\definenote[myFourthEndnote][endnote]

\starttext
\dorecurse{13}{
\myFirstEndnote{endnote}
\input tufte
\mySecondEndnote{endnote}
\input tufte
\myThirdEndnote{endnote}
\input tufte
\myFourthEndnote{endnote}
\input tufte
}
\page
\placenotes[myFirstEndnote]
\placenotes[mySecondEndnote]
\placenotes[myThirdEndnote]
\placenotes[myFourthEndnote]

\stoptext


Use \placenotes[…][height=\textheight].

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

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


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

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


Re: [NTG-context] insert unicode character

2011-09-21 Thread Wolfgang Schuster

Am 20.09.2011 um 09:09 schrieb Hans van der Meer:

 I looked into the recent Fonts in Context book, but could not figure out how 
 to access characters directly in unicode. In my case this is inside a 
 MetaPost picture something like:
 
 \switchtobodyfont[courier,24pt]
 ..
 label (UNICODE character U+2B06 here…
 
 How to?

\utfchar{2B06}

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] Clip and framed not precise in MKIV

2011-09-21 Thread Otso Helenius

Hi,

I've used ConTeXt to chop up a big map svg on separate A4 papers like 
this:


\setuplayout[width=190mm,backspace=10mm,height=297mm,topspace=10mm, 
header=0mm]

\setupclipping[nx=3,ny=3]

\starttext
\dorecurse{3}{\framed{\clip[x=\recurselevel,y=1]{\externalfigure[map.svg][width=570mm]}}}
\dorecurse{3}{\framed{\clip[x=\recurselevel,y=2]{\externalfigure[map.svg][width=570mm]}}}
\dorecurse{3}{\framed{\clip[x=\recurselevel,y=3]{\externalfigure[map.svg][width=570mm]}}}
\stoptext

I'm using framed to indicate where the pieces should be cut. The 
problem is that \framed does not
frame the area produced by \clip precisely. There is a small gap 
between the frame border and
the clipped image area and the gap is of different size on the left and 
right sizes than

for example on the bottom.

Am I overlooking some default setting? Shouldn't \framed frame the 
object inside it without

leaving a padding between them?

Best regards,
Otso Helenius
___
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] Clip and framed not precise in MKIV

2011-09-21 Thread Peter Rolf
Am 21.09.2011 14:26, schrieb Otso Helenius:
 Hi,
 
 I've used ConTeXt to chop up a big map svg on separate A4 papers like this:
 
 \setuplayout[width=190mm,backspace=10mm,height=297mm,topspace=10mm,
 header=0mm]
 \setupclipping[nx=3,ny=3]
 
 \starttext
 \dorecurse{3}{\framed{\clip[x=\recurselevel,y=1]{\externalfigure[map.svg][width=570mm]}}}
 
 \dorecurse{3}{\framed{\clip[x=\recurselevel,y=2]{\externalfigure[map.svg][width=570mm]}}}
 
 \dorecurse{3}{\framed{\clip[x=\recurselevel,y=3]{\externalfigure[map.svg][width=570mm]}}}
 
 \stoptext
 
 I'm using framed to indicate where the pieces should be cut. The problem
 is that \framed does not
 frame the area produced by \clip precisely. There is a small gap between
 the frame border and
 the clipped image area and the gap is of different size on the left and
 right sizes than
 for example on the bottom.
 
 Am I overlooking some default setting? Shouldn't \framed frame the
 object inside it without
 leaving a padding between them?

\framed is normally used for text elements, so the default offset is
some pt (no offset would look ugly). For graphics (and no offset) use

\framed[offset=0pt,strut=no,...]{...}

offset=0pt  no additional offset between border and content;
'offset=none' should work too
strut=nostrut is not added (makes only sense for text)



Best wishes,  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
___


[NTG-context] setupfootnotes failing

2011-09-21 Thread Hans van der Meer
The following did work:
  \setupfootnotes[way=bychapter,rule=off,split=verystrict]

Now I get an error:
to be read again 
   n
argument n
ormal
\addaskedblankskip ...nce \blankskip #1\dimexpr #2
  \relax 
l.8 }
 
\dovspacingyes ...#1\else \currentvspacing \fi )}
  \fi 
to be read again 
   \placenoterule 
...
l.78 ...s[way=bychapter,rule=off,split=verystrict]

What did I miss?

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
___


[NTG-context] patch for bibl-ams.tex

2011-09-21 Thread Stefan Müller

Hi list,

I found two small errors in bibl-ams.tex:
- for articles the period behind page numbers is missing
- there is an additional space after title (or editors if present) of 
incollections because of missing %


A patch is attached.  Hope that this is okay and can be fixed in the core.

Best regards,
Stefan.
--- C:/context/tex/texmf-context/tex/context/bib/bibl-ams.tex   Thu Aug 13 
11:48:24 2009
+++ C:/Users/warrence/Documents/My Documents/ConTeXt/diplomarbeit/bibl-ams.tex  
Wed Sep 21 19:13:49 2011
@@ -162,7 +162,7 @@
\insertvolume{ \bgroup\bf }{\egroup}{}%
\insertpubyear{ (}{)}{\unskip}%
\insertissue{\unskip, no.~}{}{}%
-   \insertpages{\unskip, }{}{}%
+   \insertpages{\unskip, }{.}{}%
\insertNote{ }{.}{}%
\insertcomment{}{.}{}%
 }
@@ -290,7 +290,7 @@
{\egroup
 \inserteditors{, edited by }%
{}%
-   {}
+   {}%
 \insertseries
  {\insertvolume{, number }{~in }{ }}%
  {}%
___
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 \columnsetspan

2011-09-21 Thread Marcin Borkowski
Please help, anybody...?

Dnia 2011-09-20, o godz. 21:27:52
Marcin Borkowski mb...@wmi.amu.edu.pl napisał(a):

 Dnia 2011-09-20, o godz. 09:13:47
 Marcin Borkowski mb...@wmi.amu.edu.pl napisał(a):
 
  Hello,
  
  I tried columnsets today, and the following minimal example shows
  that something is wrong with columnsetspans (which I wanted to use
  to make a title).
  
  \definecolumnset[main][n=2]
  \definecolumnsetspan[title][n=2]
  
  \starttext
  \startcolumnset[main]
  
  \startcolumnsetspan[title]
\input knuth
  \stopcolumnsetspan
  \dorecurse{10}{\input knuth}
  
  \stopcolumnset
  
  \stoptext
  
  Is it a bug or am I doing something wrong?
 
 Update: it works fine in MkII, so I am afraid that it might be a bug.
 
  
  BTW: is there a better way to have a title centered on the top of
  the page and then text in columnsets?
  
  Regards,
  
 
 


-- 
Marcin Borkowski
___
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] t-vim: additional space in \inlineX{}

2011-09-21 Thread Romain Diss
Aditya Mahajan wrote:
 \ReadFile introduces a spurious space when reading the file!
 (...)
 t-vim uses \ReadFile internally and hence inherits the bug.
Is this a long known bug which nobody can solve or is it possible to solve the 
problem ?

-- 
Romain Diss
romain.d...@yahoo.fr
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] t-vim: additional space in \inlineX{}

2011-09-21 Thread Aditya Mahajan

On Wed, 21 Sep 2011, Romain Diss wrote:


Aditya Mahajan wrote:

\ReadFile introduces a spurious space when reading the file!
(...)
t-vim uses \ReadFile internally and hence inherits the bug.

Is this a long known bug which nobody can solve


No, I just noticed this.


or is it possible to solve the problem ?


\def\InputFile#1{\input#1\relax}
\setupvimtyping[readcommand=\InputFile]

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] t-vim: additional space in \inlineX{}

2011-09-21 Thread Aditya Mahajan

On Wed, 21 Sep 2011, Aditya Mahajan wrote:


On Wed, 21 Sep 2011, Romain Diss wrote:


Aditya Mahajan wrote:

\ReadFile introduces a spurious space when reading the file!
(...)
t-vim uses \ReadFile internally and hence inherits the bug.

Is this a long known bug which nobody can solve


No, I just noticed this.


In file-res.mkvi change

 \long\def\dodoreadfile#true#false%
-  {#true
+  {#true%
\relax
\normalinput{\readfilename}%
\relax}

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

2011-09-21 Thread Wolfgang Schuster

Am 21.09.2011 um 16:10 schrieb Hans van der Meer:

 The following did work:
  \setupfootnotes[way=bychapter,rule=off,split=verystrict]
 
 Now I get an error:
 to be read again 
   n
 argument n
ormal
 \addaskedblankskip ...nce \blankskip #1\dimexpr #2
  \relax 
 l.8 }
 
 \dovspacingyes ...#1\else \currentvspacing \fi )}
  \fi 
 to be read again 
   \placenoterule 
 ...
 l.78 ...s[way=bychapter,rule=off,split=verystrict]
 
 What did I miss?

A example!

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
___