Re: [NTG-context] Layer vs. overlay

2013-01-12 Thread Procházka Lukáš

Hello Wolfgang,

thank you for your very detailed answer.

I'll - try to understand how it works, try your examples what they'll produce...

Best regards,

Lukas


On Sat, 12 Jan 2013 08:44:21 +0100, Wolfgang Schuster 
wolfgang.schus...@gmail.com wrote:



Am 11.01.2013 um 16:32 schrieb Procházka Lukáš Ing. - Pontex s. r. o. 
l...@pontex.cz:


Hello,

I need to add a text to the FOREGROUND of the page.

- Layers can refer to a page (or its size) and elements in a layer are drawn 
BELLOW the (normal) page content.

- Overlays are drawn ABOVE the (normal) page content and their size is given by 
an element (often \framed) which uses the overlay.

So - I'd need a layer which would overlay the normal page content (like foreground or 
topmost layer) or an overlay which would refer to (= its size and position would depend 
on) the (current) page (instead of e.g. \framed);
it should be a somewhat combination of layers  overlays.

How to achieve this in ConTeXt?



Overlays and Layers are to different mechanism which are powerful when you 
combine both but first you have to know what each of them does.


1. Overlays

ConTeXt has a overlay environment which cane used in the text to stack the 
arguments on the same spot. When take a close look at the example you can see 
each new element is placed on top of the previous element, when you remove the 
\strut in the argument you would also notice that each argument is placed 
horizontal and vertical centered.

\setupbodyfont[40pt]

\starttext

\startoverlay
  {\strut\red   m}
  {\strut\green a}
  {\strut\blue  l}
\stopoverlay

\stoptext

After you do know now what overlays are I come to the real overlay mechanism.

Overlays are created with the \defineoverlay command which takes a name for the 
overlay and its content. The overlays are then applied to a \framed command or 
the background to the page the textblock, header etc.

In the next example I created two new overlays with the names “behind” and 
“before” (the name itself doesn’t matter) which I activated in the frame with 
tha background key.

\starttext

\defineoverlay[behind][{\blackrule[height=2cm,width=8cm,color=yellow]}]
\defineoverlay[before][{\blackrule[height=8cm,width=2cm,color=orange]}]

\framed
  [width=10cm,
   height=10cm,
   background={color,behind,foreground,before},
   backgroundcolor=red]
  {\blackrule[width=6cm,height=6cm,color=blue]}

\stoptext

When you look at the arguments of the background key you can used two more 
names besides my own “behind” and “before” overlays. The first name in the list 
“color” is needed when you can to use the argument of the backgroundcolor key 
which puts a color two the whole area of the frame. The second name 
“foreground” is more interesting because with this you can place overlays 
*before* the content of the frame because “foreground” is the frame text itself.

The differences between the overlay environment at the begin and the overlay 
mechanism for framed aren’t so big, only the methods to set them because in the 
first case you set the content for each level which the argument in braces 
({…}{…}) and in the second case you define them first with \defineoverlay and 
set the order in the background key.


2. Layers

When you have used layers the content of each layer was always centered in the 
frame but with layers you can put the content from each command at a certain 
horizontal and vertical position.

In the following example I created a new layer and set three texts for it which 
are afterwards placed in the page which the \flushlayer command.

\starttext

\definelayer[test]

\setlayer[test][x=3cm,y=6cm]{ONE}
\setlayer[test][x=8cm,y=2cm]{TWO}
\setlayer[test][x=2cm,y=9cm]{THREE}

\flushlayer[test]

\stoptext

When you put new some text after \flushlayer would be surprised because it 
would end put on the following page but you shouldn’t wonder about this because 
layers have nothing to do with the page background or foreground.

What makes the layer and overlay mechanism is interesting is when you combine 
them and put the \flushlayer command in a overlay which does now place the 
texts before or after the content of a frame. With my next example we’re 
finally in the process to combine them.

\setupbodyfont[30pt]

\starttext

\definelayer[behindtext]
\definelayer[beforetext]

\setupbackgrounds[text][background={behindtext,foreground,beforetext}]

\setlayer[behindtext][x=-2cm,y=.75ex]{\redBehind}
\setlayer[beforetext][x=+2cm,y=.75ex]{\yellow Before}

The Text!

\setlayer[behindtext][x=5cm,y=4cm]{\redMore background text!}
\setlayer[beforetext][x=3cm,y=8cm]{\yellow More foreground text!}

\stoptext

When you look at the example you can see that haven't created a overlay for 
layer even though I said you need it to put the layer after the text. This 
isn’t necessary because when you create a new layer context does also create a 
overlay with the same name in which the layer is placed. The other question is 
how you can place overlays on the 

Re: [NTG-context] Layer vs. overlay

2013-01-12 Thread Hans Hagen

On 1/12/2013 8:44 AM, Wolfgang Schuster wrote:


Overlays and Layers are to different mechanism which are powerful when you 
combine both but first you have to know what each of them does.


 ...

perfect explanation

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] Page Numbers on Outer Edge of Outer Margin

2013-01-12 Thread Malte Stien
Hi,

I have a rather wide, 41mm, outer margin in a manual and I am trying to put the 
page number into the margin like so:

  \setuppagenumbering[
alternative=doublesided,
location={header, margin},
style=bold,
]

The trouble is that the page number is only a few millimetres wide and gets 
positioned on the inside edge of my outside margin. Hence, it does not end up 
close enough to the edge of the page. I guess, I would like to right-align it 
4mm from the edge of a right-hand page and left-align it by the same amount 
from the edge of a left-hand page. Is that doable?

Thank you,
Malte.

___
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 Numbers on Outer Edge of Outer Margin

2013-01-12 Thread Wolfgang Schuster

Am 12.01.2013 um 14:49 schrieb Malte Stien ma...@stien.de:

 Hi,
 
 I have a rather wide, 41mm, outer margin in a manual and I am trying to put 
 the page number into the margin like so:
 
  \setuppagenumbering[
   alternative=doublesided,
   location={header, margin},
   style=bold,
 ]
 
 The trouble is that the page number is only a few millimetres wide and gets 
 positioned on the inside edge of my outside margin. Hence, it does not end up 
 close enough to the edge of the page. I guess, I would like to right-align it 
 4mm from the edge of a right-hand page and left-align it by the same amount 
 from the edge of a left-hand page. Is that doable?

Method 1:

\setuppagenumbering[alternative=doublesided,location=]

\definelayer[pagenumber][doublesided=yes,width=\paperwidth,height=\paperheight]

\startsetups[pagenumber]
  \setlayer[pagenumber][even][preset=lefttop, 
x=4mm,y=\topspace]{\strut\bf\userpagenumber}
  \setlayer[pagenumber][odd] 
[preset=righttop,x=4mm,y=\topspace]{\strut\bf\userpagenumber}
\stopsetups

\setupbackgrounds[page][background=pagenumber,setups=pagenumber]

\starttext \showframe
\dorecurse{10}{\dontleavehmode\page}
\stoptext

Method 2:

\setuppagenumbering[alternative=doublesided,location=]

\setupheadertexts
  [margin]
  [][\rightaligned{\bf\userpagenumber}]
  [\leftaligned{\bf\userpagenumber}][]

\setupheader[margin][align=outer]

\starttext \showframe
\dorecurse{10}{\dontleavehmode\page}
\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] Page Numbers on Outer Edge of Outer Margin

2013-01-12 Thread Marco Patzer
On 2013–01–13 Malte Stien wrote:

 The trouble is that the page number is only a few millimetres wide
 and gets positioned on the inside edge of my outside margin.
 Hence, it does not end up close enough to the edge of the page. I
 guess, I would like to right-align it 4mm from the edge of a
 right-hand page and left-align it by the same amount from the edge
 of a left-hand page. Is that doable?

You can use the `command` key to hook in a custom macro which does
the placement.

\setuppagenumbering
  [alternative=doublesided,
   location={header, margin},
   style=bold,
   command=\PageNumberCommand]

\starttexdefinition PageNumberCommand #pageno
  \signalrightpage
  \doifrightpageelse
{\rightaligned{#pageno}}
{\leftaligned{#pageno}}
\stoptexdefinition


Marco


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

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

Re: [NTG-context] Page Numbers on Outer Edge of Outer Margin

2013-01-12 Thread Wolfgang Schuster

Am 12.01.2013 um 15:23 schrieb Marco Patzer home...@lavabit.com:

 On 2013–01–13 Malte Stien wrote:
 
 The trouble is that the page number is only a few millimetres wide
 and gets positioned on the inside edge of my outside margin.
 Hence, it does not end up close enough to the edge of the page. I
 guess, I would like to right-align it 4mm from the edge of a
 right-hand page and left-align it by the same amount from the edge
 of a left-hand page. Is that doable?
 
 You can use the `command` key to hook in a custom macro which does
 the placement.
 
 \setuppagenumbering
  [alternative=doublesided,
   location={header, margin},
   style=bold,
   command=\PageNumberCommand]
 
 \starttexdefinition PageNumberCommand #pageno
  \signalrightpage
  \doifrightpageelse
{\rightaligned{#pageno}}
{\leftaligned{#pageno}}
 \stoptexdefinition
 
 Marco

When you’re in the header you can just use \doifoddpageelse to set different
values for left/right pages, \signalrightpage is only necessary for text *in*
the document.

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] Node for startbuffer.

2013-01-12 Thread Andre Caldas
 I've added the markers code to the beta so that we have an
 abstract way to deal with such matters.
 [...]
 Node lists are processed \hbox \boxmarker{mymarker}{1} {nested from
 [...]

Does it have to be an hbox?



 It's somewhat experimental. Up to you to update the wiki.

I've never updated the wiki... I am a bit scared... but I will... :-)


 I've added the example to the cld manual.

How can I see it?


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

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

Re: [NTG-context] Page Numbers on Outer Edge of Outer Margin

2013-01-12 Thread Marco Patzer
On 2013–01–12 Wolfgang Schuster wrote:

 When you’re in the header you can just use \doifoddpageelse to set different
 values for left/right pages, \signalrightpage is only necessary for text *in*
 the document.

Thanks for the correction. I updated the wiki.


Marco


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

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

Re: [NTG-context] getnameinfo (Hans Hagen)

2013-01-12 Thread Wolfgang Werners-Lucchini
  I have to update LuaTex on a win2k machine. But I get
  two errors while running mtxrun.exe and texlua.exe resp. via first-
  setup.bat.
 
  There is a call to getnameinfo in WS2_32.dll which is available in
  winxp and above.
 
  Here is an info from ms how to deal with this:
 
  The getnameinfo function was added to the Ws2_32.dll on Windows XP
  and later. If you want to execute an application using this function
  on earlier versions of Windows (Windows 2000, Windows NT, and Windows
  Me/98/95), then you need to include the Ws2tcpip.h file and also
  include the Wspiapi.h file. When the Wspiapi.h include file is added,
  the getnameinfo function is defined to the WspiapiGetNameInfo inline
  function in the Wspiapi.h file. At runtime, the WspiapiGetNameInfo
  function is implemented in such a way that if the Ws2_32.dll or the
  Wship6.dll (the file containing getnameinfo in the IPv6 Technology
  Preview for Windows 2000) does not include getnameinfo, then a
  version of getnameinfo is implemented inline based on code in the
  Wspiapi.h header file. This inline code will be used on older Windows
  platforms that do not natively support the getnameinfo function.
 
  Hope this can be done.
 
 So you're using xp or win2K?
 
 Hans

I use win2K. What I have included was the solution who to solve this 
incompatibility.

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] [***Spam/VIR***] Re: Layer vs. overlay

2013-01-12 Thread Procházka Lukáš

Hello Wolfgang,

some more attempts:

The sample Lay3 is simple enough and brings some text to the top of the page:


\setupbodyfont[30pt]
\setuplayout[page]

\starttext
  \definelayer[beforetext]

  \setupbackgrounds
[page]
[background={foreground,beforetext}]

  \setlayer[beforetext]{\red BEFORE}

  The Text!
\stoptext


This works well.

The Lay4 differs in one point - it encloses the text into \start/stop-TEXpage:


\setupbodyfont[30pt]

\starttext
  \startTEXpage
\definelayer[beforetext]

\setupbackgrounds
  [page]
  [background={foreground,beforetext}]

\setlayer[beforetext]{\red BEFORE}

The Text!
  \stopTEXpage
\stoptext


In the latter case, the red text BEFORE doesn't appear.

What's wrong? How to make it appear?

Best regards,

Lukas


On Sat, 12 Jan 2013 08:44:21 +0100, Wolfgang Schuster 
wolfgang.schus...@gmail.com wrote:



Am 11.01.2013 um 16:32 schrieb Procházka Lukáš Ing. - Pontex s. r. o. 
l...@pontex.cz:


Hello,

I need to add a text to the FOREGROUND of the page.

- Layers can refer to a page (or its size) and elements in a layer are drawn 
BELLOW the (normal) page content.

- Overlays are drawn ABOVE the (normal) page content and their size is given by 
an element (often \framed) which uses the overlay.

So - I'd need a layer which would overlay the normal page content (like foreground or 
topmost layer) or an overlay which would refer to (= its size and position would depend 
on) the (current) page (instead of e.g. \framed);
it should be a somewhat combination of layers  overlays.

How to achieve this in ConTeXt?



Overlays and Layers are to different mechanism which are powerful when you 
combine both but first you have to know what each of them does.


1. Overlays

ConTeXt has a overlay environment which cane used in the text to stack the 
arguments on the same spot. When take a close look at the example you can see 
each new element is placed on top of the previous element, when you remove the 
\strut in the argument you would also notice that each argument is placed 
horizontal and vertical centered.

\setupbodyfont[40pt]

\starttext

\startoverlay
  {\strut\red   m}
  {\strut\green a}
  {\strut\blue  l}
\stopoverlay

\stoptext

After you do know now what overlays are I come to the real overlay mechanism.

Overlays are created with the \defineoverlay command which takes a name for the 
overlay and its content. The overlays are then applied to a \framed command or 
the background to the page the textblock, header etc.

In the next example I created two new overlays with the names “behind” and 
“before” (the name itself doesn’t matter) which I activated in the frame with 
tha background key.

\starttext

\defineoverlay[behind][{\blackrule[height=2cm,width=8cm,color=yellow]}]
\defineoverlay[before][{\blackrule[height=8cm,width=2cm,color=orange]}]

\framed
  [width=10cm,
   height=10cm,
   background={color,behind,foreground,before},
   backgroundcolor=red]
  {\blackrule[width=6cm,height=6cm,color=blue]}

\stoptext

When you look at the arguments of the background key you can used two more 
names besides my own “behind” and “before” overlays. The first name in the list 
“color” is needed when you can to use the argument of the backgroundcolor key 
which puts a color two the whole area of the frame. The second name 
“foreground” is more interesting because with this you can place overlays 
*before* the content of the frame because “foreground” is the frame text itself.

The differences between the overlay environment at the begin and the overlay 
mechanism for framed aren’t so big, only the methods to set them because in the 
first case you set the content for each level which the argument in braces 
({…}{…}) and in the second case you define them first with \defineoverlay and 
set the order in the background key.


2. Layers

When you have used layers the content of each layer was always centered in the 
frame but with layers you can put the content from each command at a certain 
horizontal and vertical position.

In the following example I created a new layer and set three texts for it which 
are afterwards placed in the page which the \flushlayer command.

\starttext

\definelayer[test]

\setlayer[test][x=3cm,y=6cm]{ONE}
\setlayer[test][x=8cm,y=2cm]{TWO}
\setlayer[test][x=2cm,y=9cm]{THREE}

\flushlayer[test]

\stoptext

When you put new some text after \flushlayer would be surprised because it 
would end put on the following page but you shouldn’t wonder about this because 
layers have nothing to do with the page background or foreground.

What makes the layer and overlay mechanism is interesting is when you combine 
them and put the \flushlayer command in a overlay which does now place the 
texts before or after the content of a frame. With my next example we’re 
finally in the process to combine them.

\setupbodyfont[30pt]

\starttext

\definelayer[behindtext]
\definelayer[beforetext]


Re: [NTG-context] Layer vs. overlay

2013-01-12 Thread Wolfgang Schuster

Am 12.01.2013 um 18:54 schrieb Procházka Lukáš l...@pontex.cz:

 Hello Wolfgang,
 
 some more attempts:
 
 The sample Lay3 is simple enough and brings some text to the top of the page:
 
 
 \setupbodyfont[30pt]
 \setuplayout[page]
 
 \starttext
  \definelayer[beforetext]
 
  \setupbackgrounds
[page]
[background={foreground,beforetext}]
 
  \setlayer[beforetext]{\red BEFORE}
 
  The Text!
 \stoptext
 
 
 This works well.
 
 The Lay4 differs in one point - it encloses the text into \start/stop-TEXpage:
 
 
 \setupbodyfont[30pt]
 
 \starttext
  \startTEXpage
\definelayer[beforetext]
 
\setupbackgrounds
  [page]
  [background={foreground,beforetext}]
 
\setlayer[beforetext]{\red BEFORE}
 
The Text!
  \stopTEXpage
 \stoptext
 
 
 In the latter case, the red text BEFORE doesn't appear.
 
 What's wrong? How to make it appear?

Move \definelayer and \setupbackgrounds *before* \startTEXpage because the 
environment creates a local group and you background setup is lost.

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] big vertical distance

2013-01-12 Thread Wolfgang Werners-Lucchini
Hallo,

the following was ok with mkII:

% coding: utf-8
\def\B{\vphantom{\bigg)}}
\setupbodyfont[11pt,sans]
\starttext
\startitemize[a,columns,three,joinedup][grid=no,width=8mm,right=)]
\item $\B 5b\cdot (3a+4b-5c)$
\item $\B 3xy\cdot (2x-6y-xy)$
\item $\B (-0{,}5x)\cdot (3y-5x)$
\item $\B (2z-3x+5)\cdot (0{,}5z+x)$
\item $\B 8ac\cdot 3\frac{1}{4}ax$
\item $\B 2\frac{1}{2}ab\cdot 6ax$
\item $\B \frac{2}{3}ax\cdot 1\frac{1}{2}by$
\item $\B 7\frac{1}{2}ay\cdot 1\frac{3}{5}ax$
\item $\B (+4ab)\cdot (-15xy)$
\stopitemize
\stoptext

now with LuaTeX I get very large vertical distances. Much more then 
\bigg(. Why is this? 

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 Numbers on Outer Edge of Outer Margin

2013-01-12 Thread Malte Stien
] 
 [preset=righttop,x=4mm,y=\topspace]{\strut\bf\userpagenumber}
 \stopsetups
 
 \setupbackgrounds[page][background=pagenumber,setups=pagenumber]
 
 \starttext \showframe
 \dorecurse{10}{\dontleavehmode\page}
 \stoptext
 
 Method 2:
 
 \setuppagenumbering[alternative=doublesided,location=]
 
 \setupheadertexts
  [margin]
  [][\rightaligned{\bf\userpagenumber}]
  [\leftaligned{\bf\userpagenumber}][]
 
 \setupheader[margin][align=outer]
 
 \starttext \showframe
 \dorecurse{10}{\dontleavehmode\page}
 \stoptext
 
 Wolfgang
 
 --
 
 Message: 4
 Date: Sat, 12 Jan 2013 15:23:03 +0100
 From: Marco Patzer home...@lavabit.com
 To: ntg-context@ntg.nl
 Subject: Re: [NTG-context] Page Numbers on Outer Edge of Outer Margin
 Message-ID: 20130112142303.GI31752@homerow
 Content-Type: text/plain; charset=utf-8
 
 On 2013?01?13 Malte Stien wrote:
 
 The trouble is that the page number is only a few millimetres wide
 and gets positioned on the inside edge of my outside margin.
 Hence, it does not end up close enough to the edge of the page. I
 guess, I would like to right-align it 4mm from the edge of a
 right-hand page and left-align it by the same amount from the edge
 of a left-hand page. Is that doable?
 
 You can use the `command` key to hook in a custom macro which does
 the placement.
 
 \setuppagenumbering
  [alternative=doublesided,
   location={header, margin},
   style=bold,
   command=\PageNumberCommand]
 
 \starttexdefinition PageNumberCommand #pageno
  \signalrightpage
  \doifrightpageelse
{\rightaligned{#pageno}}
{\leftaligned{#pageno}}
 \stoptexdefinition
 
 
 Marco
 -- next part --
 A non-text attachment was scrubbed...
 Name: signature.asc
 Type: application/pgp-signature
 Size: 490 bytes
 Desc: Digital signature
 URL: 
 http://www.ntg.nl/pipermail/ntg-context/attachments/20130112/eae9e4aa/attachment-0001.pgp
 
 --
 
 Message: 5
 Date: Sat, 12 Jan 2013 15:31:50 +0100
 From: Wolfgang Schuster wolfgang.schus...@gmail.com
 To: mailing list for ConTeXt users ntg-context@ntg.nl
 Subject: Re: [NTG-context] Page Numbers on Outer Edge of Outer Margin
 Message-ID: eb8cabc6-ba91-40cf-a5b8-d17c1b5fc...@gmail.com
 Content-Type: text/plain; charset=windows-1252
 
 
 Am 12.01.2013 um 15:23 schrieb Marco Patzer home...@lavabit.com:
 
 On 2013?01?13 Malte Stien wrote:
 
 The trouble is that the page number is only a few millimetres wide
 and gets positioned on the inside edge of my outside margin.
 Hence, it does not end up close enough to the edge of the page. I
 guess, I would like to right-align it 4mm from the edge of a
 right-hand page and left-align it by the same amount from the edge
 of a left-hand page. Is that doable?
 
 You can use the `command` key to hook in a custom macro which does
 the placement.
 
 \setuppagenumbering
 [alternative=doublesided,
  location={header, margin},
  style=bold,
  command=\PageNumberCommand]
 
 \starttexdefinition PageNumberCommand #pageno
 \signalrightpage
 \doifrightpageelse
   {\rightaligned{#pageno}}
   {\leftaligned{#pageno}}
 \stoptexdefinition
 
 Marco
 
 When you?re in the header you can just use \doifoddpageelse to set different
 values for left/right pages, \signalrightpage is only necessary for text *in*
 the document.
 
 Wolfgang
 
 
 
 --
 
 Message: 6
 Date: Sat, 12 Jan 2013 12:49:52 -0200
 From: Andre Caldas andre.em.cal...@gmail.com
 To: Hans Hagen pra...@wxs.nl
 Cc: mailing list for ConTeXt users ntg-context@ntg.nl
 Subject: Re: [NTG-context] Node for startbuffer.
 Message-ID:
   CADVh14VJYDi2gZ9khbrC_Ws4jKnt2QZwi5dkEDwLhfLP=aa...@mail.gmail.com
 Content-Type: text/plain; charset=UTF-8
 
 I've added the markers code to the beta so that we have an
 abstract way to deal with such matters.
 [...]
 Node lists are processed \hbox \boxmarker{mymarker}{1} {nested from
 [...]
 
 Does it have to be an hbox?
 
 
 
 It's somewhat experimental. Up to you to update the wiki.
 
 I've never updated the wiki... I am a bit scared... but I will... :-)
 
 
 I've added the example to the cld manual.
 
 How can I see it?
 
 
 Andr? Caldas.
 
 
 --
 
 Message: 7
 Date: Sat, 12 Jan 2013 16:20:25 +0100
 From: Marco Patzer home...@lavabit.com
 To: ntg-context@ntg.nl
 Subject: Re: [NTG-context] Page Numbers on Outer Edge of Outer Margin
 Message-ID: 20130112152025.GJ31752@homerow
 Content-Type: text/plain; charset=utf-8
 
 On 2013?01?12 Wolfgang Schuster wrote:
 
 When you?re in the header you can just use \doifoddpageelse to set different
 values for left/right pages, \signalrightpage is only necessary for text *in*
 the document.
 
 Thanks for the correction. I updated the wiki.
 
 
 Marco
 -- next part --
 A non-text attachment was scrubbed...
 Name: signature.asc
 Type: application/pgp-signature
 Size: 490 bytes
 Desc: Digital signature
 URL: 
 http://www.ntg.nl/pipermail/ntg-context/attachments/20130112/11f853a0

[NTG-context] Controlling Appearance of \inoutermargin

2013-01-12 Thread Malte Stien
Hi,

I have just changed one of my documents from single-page to double-page to be 
printed as a book. I have some margin remarks, that used to be on the left 
which I am now trying to move to the outer margin on odd and even pages (that 
is, left on even, right on odd pages). In doing so, I had to modify all of my 
\inmargin's to \inoutermargins (Please pull me up on this if this is not a good 
way of doing this; I found this in some forum, there does not seem to be a Wiki 
page about this command).

As it turns out, I am no longer able to control the appearance of these 
\inoutermargins using my \setupinmargin command. I have been playing with 
different options, like

  \setupinmargin[outer][style=\slx, color=darkgray, stack=yes]

or

  \setupinoutermargin[style=\slx, color=darkgray, stack=yes]

but cannot get it to work. Is there any documentation about the \inoutermargins 
command? Any hints?

Thank you,
Malte.

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