setuphead(s), subject, alternative=inmargin
Is this supposed to work?? I'm using ver: 2003.1.31 and try to do the following, right out of the handbook: \setupheads[alternative=inmargin] \subject{Some Text} and expected the subject to start in the margin. It does not, and I found out that this seems to work only for numbered heads like section et al. How do I put a subject in the margin, possibly while using a command to make it white on black (I can do that, only it's not in the margin....) Thanks for any help Mathias -- virtual earth Mathias Picker Geschäftsführer Gesellschaft für Wissens re/prä sentation mbH Mathias.Picker@virtual-earth.de Fon +49 89 / 540 7425-1 Fax +49 89 / 540 7425-9
Mathias.Picker@virtual-earth.de writes:
Is this supposed to work??
It is working. What do you mean by this? It is putting the number of the head in the margin.
How do I put a subject in the margin,
Try this one: ================================================== % taken from core-sec.tex \def\MyHead#1#2% {\vbox {\localheadsetup \begstrut % use one \strut here! \llap{\hbox {\ifheadnumbercontent#1 \fi #2\hskip\localheadskip\hskip\linkermargeafstand}}}} \showframe \starttext \setuphead[section][alternative=command,command=\MyHead] \section{some} \setuphead[section][alternative=command,command=\MyHead,number=no] \section{some} \stoptext ================================================== Probably Hans comes up with some magic, but this might work as well. Patrick
Patrick Gundlach
Try this one:
[...] Uh, Patrick, wake up! This is crap. Perhaps a little better is: % taken from core-sec.tex \def\MyHead#1#2% {\vbox {\localheadsetup \begstrut % use one \strut here! \llap{\hbox {\ifheadnumbercontent{#1}\kern\numberheaddistance\fi #2\hskip\linkermargeafstand}}}} \showframe \starttext \setuphead[section][alternative=command,command=\MyHead] \section{some} \setuphead[section][alternative=command,command=\MyHead,distance=0.1pt] \section{some} \setuphead[section][alternative=command,command=\MyHead,number=no] \section{some} \stoptext Anonymous
Zitat von Patrick Gundlach
Mathias.Picker@virtual-earth.de writes:
Is this supposed to work??
It is working. What do you mean by this? It is putting the number of the head in the margin.
:-) Yes, but subject has no number... I want to put the subject (text!) across margin and text. I don't know if that is even possible..... It should look somewhat like the latex refart classes, e.g. margin|text My Subject header here with more and more text And the text here (more and more text)
How do I put a subject in the margin,
[snipped example]
Probably Hans comes up with some magic, but this might work as well. [snip]
Hopefully :-) Thanks, Mathias
At 02:02 PM 3/21/2003 +0100, you wrote:
Probably Hans comes up with some magic, but this might work as well.
there is the magical command \margintext I leave it to patrick to explore the following: \starttext \margintext{patrick} \margintext{who's that} \input tufte \margintext{patrick} \stackposdown \margintext{who's that} \input tufte \setupinmargin[2][line=2] \margintext{patrick} \margintext{who's that} \input tufte \stoptext ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
Hans Hagen
I leave it to patrick to explore the following:
\starttext
\margintext{patrick} \margintext{that's me}
Well, I was playing with this before (while looking for the answer for Mathias), but I did not get any margintext. Now I know that it works only when there is some text associated with it. I didn't get any margin macro to work in \MyHead (tried \inleft,..). But I didn't feel like looking for the reason (yet). Patrick
At 03:42 PM 3/21/2003 +0100, you wrote:
Hans Hagen
writes: Hello Hans,
I leave it to patrick to explore the following:
\starttext
\margintext{patrick} \margintext{that's me}
Well, I was playing with this before (while looking for the answer for Mathias), but I did not get any margintext. Now I know that it works only when there is some text associated with it.
I didn't get any margin macro to work in \MyHead (tried \inleft,..). But I didn't feel like looking for the reason (yet).
you're lucky: a few days ago i added a key: margintext=yes to the setuphead command that will enable flushing of margin texts Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
Hans Hagen
you're lucky: a few days ago i added a key: margintext=yes to the setuphead command that will enable flushing of margin texts
And how shoud it be used? \setuphead[...][margintext=yes,command=MyHead] \def\MyHead#1#2{\margintext{#1,#2}} is not the way to go, is it? ConTeXt ver: 2003.3.17 fmt: 2003.3.18 int: english mes: english Patrick
At 04:27 PM 3/21/2003 +0100, you wrote:
Hans Hagen
writes: Hello,
you're lucky: a few days ago i added a key: margintext=yes to the setuphead command that will enable flushing of margin texts
And how shoud it be used?
\setuphead[...][margintext=yes,command=MyHead]
\def\MyHead#1#2{\margintext{#1,#2}} is not the way to go, is it?
no, it's just flushing previous ones; maybe the next solution will prevent a sleepless night: \starttext \setuphead [subsubsection] [alternative=text,distance=0pt,command=\MyHead] \def\MyHead#1#2{\inleftmargin{#1 #2}} \subsubsection{patrick} \input tufte \stoptext normally text will put the head in from of the text, so here we let the command lap it to the left; of course we need to nil the distance; so, actually it fits will into the normal configuration. so, if you cook up a nice keyword for this alternative, i will show you how easy it is added as alternative -) Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
Hans Hagen
no, it's just flushing previous ones; maybe the next solution will prevent a sleepless night:
Great! So we have two different setups now (well, there are 100s more) : % |left || textarea % |margin|| | | % | || | | %somelonghead*||We thrive in ... | | (#1) % | || | | % | || | | % | || | | % |*somehead nextsection | | (#2) % | || | | % | ||We thrive in ... | | * is the point of alignment. #1 is covered by \inleftmargin #1 #2 #2 is covered by MyHead which I've posted earlier. It would be nice to have some kind of "numberdistance", which goes between number and head (1____firstsection).
normally text will put the head in from of the text, so here we let the command lap it to the left; of course we need to nil the distance; so, actually it fits will into the normal configuration.
OK, I have tested *without* text in the section ...
so, if you cook up a nice keyword for this alternative,
alternative=a,b,c :) #1: marginright (= right aligned in margin) and #2: marginleft (since I am a bit confused by the naming of right- and leftalign in ConTeXt, this will be the other way round, I guess).
i will show you how easy it is added as alternative -)
Since I had a quick look in core-sec.tex I could guess how to add the keywords. The most difficult part would be the translation to dutch (margelinks?) Patrick
Hans Hagen
\setuphead [subsubsection] [alternative=text,distance=0pt,command=\MyHead]
\def\MyHead#1#2{\inleftmargin{#1 #2}}
shouldn't the distance go between the number and the #2? In the \inleftmargin case it goes bewteen left margin and #2. In the normal case, it is between the text and number. Patrick ... slightly confused
participants (4)
-
Hans Hagen
-
Mathias.Picker@virtual-earth.de
-
mathiasp@virtual-earth.de
-
Patrick Gundlach