Re: [NTG-context] Diagonal rule in table (was: Divided cells and bullet points in tables)

2012-08-31 Thread Marco Patzer
 Hi Malte,
 
  1. The top left cell is divided in two by a diagonal line with
  separate text into each triangle
 
 This should get you started:
 http://article.gmane.org/gmane.comp.tex.context/67721

That solution is very hackish and the result ugly. Here is a more
clean solution. It has (at least ) one caveat: Because the first
tabulate column is set in paragraph mode, it will eat up as much
space as *possible*, in contrast to occupying as much space as
*necessary*. That is why the width of the column has to be set
explicitly.

\startuseMPgraphic{DiagonalRule}
  rulethickness := \frameddimension{rulethickness};

  drawoptions(
withpen pencircle scaled rulethickness
withcolor \MPcolor{\framedparameter{framecolor}});

  pair leftcorner, rightcorner;
  leftcorner  := (rulethickness, \overlayheight-rulethickness);
  rightcorner := (\overlaywidth-rulethickness, rulethickness);

  draw leftcorner -- rightcorner;
\stopuseMPgraphic

\defineoverlay
  [DiagonalRule]
  [\useMPgraphic{DiagonalRule}]

\define[2]\DiagonalLabel{%
  \setuptabulate [after={\blank[\frameddimension{offset}]}]
  \starttabulate [|p|r|]
\NC\NC #2 \NC\NR
\NC #1 \NC\NC\NR
  \stoptabulate
}

\starttext
  \setupTABLE [1] [width=2cm]
  \bTABLE
\bTR
  \bTD [background=DiagonalRule]
\DiagonalLabel{Foo}{Bar}
  \eTD
  \bTD Second \eTD
  \bTD Third \eTD
\eTR
\bTR
  \bTD Alpha \eTD
  \bTD Beta  \eTD
  \bTD Gamma \eTD
\eTR
  \eTABLE
\stoptext


Marco

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

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


[NTG-context] Subfootnotes broken

2012-08-31 Thread Marco Patzer
Hi,

the subfootnote feature is broken or changed the interface. Is there
a workaround or fix?

\starttext
  Alpha\footnote{alpha}
  Beta\subfootnote{beta}
\stoptext


Marco

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

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


Re: [NTG-context] Margin text and multiple columns

2012-08-31 Thread Sietse Brouwer
Hi Marcel,

As far as I know, margins end up directly next to columns: multiple
columns do not share one margin at the edge of the page. This answer
on tex.stackexchange.com comes tot the same conclusion:
http://tex.stackexchange.com/questions/67078/text-in-outer-margin-of-multiple-columns

If margins are indeed per-column instead of per-page, that should be
reflected in the code determining where to set margin text.
In 
[`typo-mar.lua`](http://repo.or.cz/w/context.git/blob/HEAD:/tex/context/base/typo-mar.lua),
line 434 (in the `realign`) function suggests the margintext's box is
moved by hsize:

if location == v_left then
move_x = (reference.x or 0) - (blob.x or 0)
elseif location == v_right then
move_x = (reference.x or 0) - (blob.x or 0) +
(reference.w or 0) - hsize
else

The `hsize` is as wide as the column one is currently in, and the
variable `columns` is defined once and used never in the file. So that
indeed suggests columns are not taken into account.

Hans will know for sure, though.

Cheers,
Sietse

On Thu, Aug 30, 2012 at 12:25 PM, Marc Rummel
marc.rum...@googlemail.com wrote:
 Hello,

 I have a problem with margin texts in combination with multiple columns using 
 mkiv. I want to set a text in the outer margin of a double sided document. 
 This works well using \inouter as seen in the following document:

 ---
 \setuppagenumbering[alternative=doublesided]

 \starttext

 \inouter{Text in Margin}
 \input knuth

 \page[yes]

 \inouter{Text in Margin}
 \input knuth

 \stoptext
 ---

 But fails, when I use it in combination with multiple columns. Then the 
 margin text of the odd pages is set in the second column (probably in the 
 margin of the first column) instead of the margin of the whole page.

 ---
 \setuppagenumbering[alternative=doublesided]

 \starttext

 \inouter{Text in Margin}
 \startcolumns
 \input knuth
 \stopcolumns

 \page[yes]

 \inouter{Text in Margin}
 \startcolumns
 \input knuth
 \stopcolumns

 \stoptext
 ---

 I hope someone can help me.

 Best wishes,
 Marc
 ___
 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] modules.contextgarden.net internal error on /gfsdidot

2012-08-31 Thread Marco Pessotto

Hello there.

I get an internal error pointing the browser to
http://modules.contextgarden.net/gfsdidot :

 Internal error, please contact p...@contextgarden.net

I tried the address above, but it fails:

Diagnostic-Code: smtp; 550 5.1.1 p...@contextgarden.net: Recipient address
rejected: User unknown in local recipient table

So I'm posting here the problem.

Best wishes

-- 
Marco

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

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


Re: [NTG-context] Divided cells and bullet points in tables

2012-08-31 Thread Wolfgang Schuster

Am 30.08.2012 um 13:48 schrieb Malte Stien ma...@stien.de:

 Hi,
 
 I'm trying to create a table with the following formatting:
 
 1. The top left cell is divided in two by a diagonal line with separate text 
 into each triangle
 2. Another cell in the table body has a bulleted list
 
 I've had no success with the first. With the second I've tried using the 
 \startitemize command. It generates the bullet points but places all the 
 items on a single line and hence pushing the table wider than the page. I've 
 also tried using \par or \newline but to no avail.
 
 I have been using tabulate for the table; is there another table library that 
 might make this work?


Use natural tables or xtables where you can use the background/overlay 
mechanism.

\startuseMPgraphic{table:line:diagonal}

  draw lrcorner OverlayBox -- ulcorner OverlayBox
withpen pencircle scaled \frameddimension{rulethickness}
withcolor \MPcolor{\framedparameter{framecolor}} ;

  draw textext.llft(\strut\getvariable{table:diagonal}{first})
shifted 
(OverlayWidth-\frameddimension{offset},OverlayHeight-\frameddimension{offset}) ;

  draw textext.urt (\strut\getvariable{table:diagonal}{second})
shifted (\frameddimension{offset},\frameddimension{offset}) ;

  setbounds currentpicture to OverlayBox ;

\stopuseMPgraphic

\defineoverlay[table:line:diagonal][\useMPgraphic{table:line:diagonal}]

\starttext

\bTABLE[width=4cm,height=4cm]
  \bTR
\bTD[background=table:line:diagonal]
  \setgvariables[table:diagonal][first=Risk,second=Probabality]
\eTD
\bTD C1 \eTD
\bTD C2 \eTD
  \eTR
  \bTR
\bTD R1 \eTD
\bTD
  \startitemize
  \startitem Item 1 \stopitem
  \startitem Item 2 \stopitem
  \stopitemize
\eTD
\bTD \eTD
  \eTR
  \bTR
\bTD R2 \eTD
\bTD \eTD
\bTD \eTD
  \eTR
\eTABLE

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