I tested margin notes and may have found a discrepancy with the (albeit old) manual. \setupcolors[state=start] \setupinmargin[][align=right,foregroundcolor=red] \starttext ABC\inright{\framed[width=10mm,height=5mm,foregroundcolor=red]{R1}} \inleft{L1} \stoptext This shows un uncolored "L1". But according to the manual there is a parameter choice as in \setupframed. This means for example colored contents with foregroundcolor. The code above leaves "L1" black, but does honor the color inside the framed. I also fail to see a difference between the align options right, middle, left. Something wrong? Or something not understood? ConTeXt ver: 2010.03.20 22:59 MKIV fmt: 2010.3.23 int: english/ english Hans van der Meer
On Tue, Mar 23, 2010 at 7:34 PM, Hans van der Meer
I tested margin notes and may have found a discrepancy with the (albeit old) manual. \setupcolors[state=start] \setupinmargin[][align=right,foregroundcolor=red] \starttext ABC\inright{\framed[width=10mm,height=5mm,foregroundcolor=red]{R1}} \inleft{L1} \stoptext This shows un uncolored "L1". But according to the manual there is a parameter choice as in \setupframed. This means for example colored contents with foregroundcolor. The code above leaves "L1" black, but does honor the color inside the framed. I also fail to see a difference between the align options right, middle, left. Something wrong? Or something not understood? ConTeXt ver: 2010.03.20 22:59 MKIV fmt: 2010.3.23 int: english/english Hans van der Meer
\showframe \setuppapersize[A4][A3] \setuplayout[location=middle] \setupinmargin[left][align=left,foregroundcolor=red] \setupinmargin[right][align=right,foregroundcolor=blue] \starttext ABC\inright{\framed[width=10mm,height=5mm,foregroundcolor=red]{R1 }} %% override blue, but not for frame \inleft{\tfx A small note in this margin. But we need to setup something before \ldots } \stoptext -- luigi
I tried this code with both \setupinmargin[left][...] and \setupinmargin[][...]. The first one worked, the second obviously not. I take it therefore that the [left]-argument is mandatory. In the manual I have, the \setupinmargin[][] description has its first argument printed slanted. I checked the manual's introduction and expressis verbis it is mentioned there that "Optional arguments are displayed as slanted text." So I would not easily have inferred the necessity to specify a value in both the arguments. Even to the point of having \setupinmargin[{left,right}][...] needed to set both margin notes to the same value. So, thanks of pointing this out. Hans van der Meer On 23 mrt 2010, at 20:56, luigi scarso wrote:
On Tue, Mar 23, 2010 at 7:34 PM, Hans van der Meer
wrote: I tested margin notes and may have found a discrepancy with the (albeit old) manual. \setupcolors[state=start] \setupinmargin[][align=right,foregroundcolor=red] \starttext ABC\inright{\framed[width=10mm,height=5mm,foregroundcolor=red]{R1}} \inleft{L1} \stoptext This shows un uncolored "L1". But according to the manual there is a parameter choice as in \setupframed. This means for example colored contents with foregroundcolor. The code above leaves "L1" black, but does honor the color inside the framed. I also fail to see a difference between the align options right, middle, left. Something wrong? Or something not understood? ConTeXt ver: 2010.03.20 22:59 MKIV fmt: 2010.3.23 int: english/ english Hans van der Meer
\showframe \setuppapersize[A4][A3] \setuplayout[location=middle] \setupinmargin[left][align=left,foregroundcolor=red] \setupinmargin[right][align=right,foregroundcolor=blue] \starttext ABC\inright{\framed[width=10mm,height=5mm,foregroundcolor=red]{R1 }} %% override blue, but not for frame \inleft{\tfx A small note in this margin. But we need to setup something before \ldots } \stoptext
-- luigi ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
On Tue, Mar 23, 2010 at 10:36 PM, Hans van der Meer
I tried this code with both \setupinmargin[left][...] and \setupinmargin[][...]. The first one worked, the second obviously not. I take it therefore that the [left]-argument is mandatory.
In the manual I have, the \setupinmargin[][] description has its first argument printed slanted. I checked the manual's introduction and expressis verbis it is mentioned there that "Optional arguments are displayed as slanted text." So I would not easily have inferred the necessity to specify a value in both the arguments. Even to the point of having \setupinmargin[{left,right}][...] needed to set both margin notes to the same value.
So, thanks of pointing this out. Given that we are talking about mkiv, I usually search for *lua /*mkiv/*tex file --- actually page-mar.mkiv. Also # context --ctx=s-mod.ctx page-mar.mkiv
I also expected some differences in respect to mkii --- maybe bugs. -- luigi
Am 23.03.10 22:36, schrieb Hans van der Meer:
I tried this code with both \setupinmargin[left][...] and \setupinmargin[][...]. The first one worked, the second obviously not. I take it therefore that the [left]-argument is mandatory. When the first argument is optional you can write
\setupinmargin[style=xxx,color=yy] where the values are applied to all margin commands if not specified otherwise for a certain (e.g. \inleft) comand. With the two argument version \setupinmargin[left][style=xx,color=yy] you can set special settings for the leftmargin texts, the global settings are now replaced. The manual mentions you can use all commands from \framed but this is only true when you use the two argument version of the \setupinmargin command. Wolfgang
Must I really understand from your reply that \setupinmargin[x=y] is not equivalent to \setupinmargin[][x=y]? That is: an absent optional argument is not really optionally absent? I checked by running the thing, of course, and the answer I found is "yes". The empty [] does not honor what leaving [] out does. To me -- but that is of course a personal opinion-- this is a little bit shocking. The fact that empty optional (supposed to leave the defaults as is) has another meaning than leaving out completely (which I also tend to interprete as leaving defaults untouched). May I ask for some thought about this behaviour? If it confuses me, I am vain enough to suppose others could be confused too. But thanks anyway for your elucidation. Hans van der Meer On 24 mrt 2010, at 15:21, Wolfgang Schuster wrote:
Am 23.03.10 22:36, schrieb Hans van der Meer:
I tried this code with both \setupinmargin[left][...] and \setupinmargin[][...]. The first one worked, the second obviously not. I take it therefore that the [left]-argument is mandatory. When the first argument is optional you can write
\setupinmargin[style=xxx,color=yy]
where the values are applied to all margin commands if not specified otherwise for a certain (e.g. \inleft) comand.
With the two argument version
\setupinmargin[left][style=xx,color=yy]
you can set special settings for the leftmargin texts, the global settings are now replaced.
The manual mentions you can use all commands from \framed but this is only true when you use the two argument version of the \setupinmargin command.
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 ___________________________________________________________________________________
Hans van der Meer wrote:
Must I really understand from your reply that \setupinmargin[x=y] is not equivalent to \setupinmargin[][x=y]? That is: an absent optional argument is not really optionally absent?
Your [] is not an absent optional argument at all, it is a given optional argument (that is empty). Best wishes, Taco
On 24 mrt 2010, at 16:10, Taco Hoekwater wrote:
Hans van der Meer wrote:
Must I really understand from your reply that \setupinmargin[x=y] is not equivalent to \setupinmargin[][x=y]? That is: an absent optional argument is not really optionally absent?
Your [] is not an absent optional argument at all, it is a given optional argument (that is empty).
Point taken. But should that has the effect: "ignore what follows in the second argument?" Because that is what I observe. Hans van der Meer
Am 24.03.10 16:57, schrieb Hans van der Meer:
Must I really understand from your reply that \setupinmargin[x=y] is not equivalent to \setupinmargin[][x=y]? That is: an absent optional argument is not really optionally absent? Your [] is not an absent optional argument at all, it is a given optional argument (that is empty). Point taken. But should that has the effect: "ignore what follows in the second argument?" It’s a effect how the \setupinmargin command is implemented.
What you tried to do is similar to the effect of the second \processcommalist command. \starttext \processcommalist[foo,bar]\quotation \processcommalist[]\quotation \processcommalist[abc,xyz]\quotation \stoptext You expect to get “foo”“bar” “” “abc”“xyz” as output but what you really get is “foo”“bar” “abc”“xyz” The empty argument is ignored and nothing happens. Wolfgang
Wolfgang Schuster wrote:
Am 24.03.10 16:57, schrieb Hans van der Meer:
Must I really understand from your reply that \setupinmargin[x=y] is not equivalent to \setupinmargin[][x=y]? That is: an absent optional argument is not really optionally absent? Your [] is not an absent optional argument at all, it is a given optional argument (that is empty). Point taken. But should that has the effect: "ignore what follows in the second argument?" It’s a effect how the \setupinmargin command is implemented.
What you tried to do is similar to the effect of the second
In other words: you have explicitly disabled the built-in default for the optional argument. Best wishes, Taco
On Wed, Mar 24 2010, Hans van der Meer wrote:
Must I really understand from your reply that \setupinmargin[x=y] is not equivalent to \setupinmargin[][x=y]? That is: an absent optional argument is not really optionally absent?
Your [] is not an absent optional argument at all, it is a given optional argument (that is empty).
Point taken. But should that has the effect: "ignore what follows in the second argument?"
You can consider this logic: \setupinmargin[left][...] % apply ... to left \setupinmargin[right][...] % apply ... to right \setupinmargin[][...] % apply ... to nothing Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/
Am 23.03.10 19:34, schrieb Hans van der Meer:
I tested margin notes and may have found a discrepancy with the (albeit old) manual.
\setupcolors[state=start] In MKIV colors are enabled by default. \setupinmargin[][align=right,foregroundcolor=red] All margin texts:
\setupinmargin[color=red] Texts in the left margin: \setupinmargin[left][foregroundcolor=red] % color=red is possible too Wolfgang
participants (5)
-
Hans van der Meer
-
luigi scarso
-
Peter Münster
-
Taco Hoekwater
-
Wolfgang Schuster