Re: [NTG-context] Re: setuphead(s), subject, alternative=inmargin
Hi Patrick,
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 ----- Ende der weitergeleiteten Nachricht -----
Mathias Picker
I don't know if that is even possible.....
sure it is possible. Why not?
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)
Please show us where the subject header should begin. Should it start at the left edge of the margin or where? Refering to some LaTeX class is not very helpful, since the ConTeXt-source-readers don't use LaTeX very often :) Try this one. If it does not do what you want, please be exact about your specification! [Mostly taken from a source Hans has posted (x-steps style)]: \def\MyHead#1#2% {\vbox {\localheadsetup \begstrut % is this really needed? \hbox {\hskip-\marginwidth\hskip-\margindistance \ifheadnumbercontent{#1}\kern\numberheaddistance\fi #2}}} Patrick
Hi Patrick,
first, thanks! This solved my problem 90%. BIG Thanks!!
If you're interested in why and what's missing:
Zitat von Patrick Gundlach
Mathias Picker
writes: Hello,
I don't know if that is even possible.....
sure it is possible. Why not?
As you probably guessed, I'm quite new at this :-)
[snip] Please show us where the subject header should begin. Should it start at the left edge of the margin or where?
Yes, and I didn't specify it because _my_ problem was how to cross the margin/text boundary. I didn't know it was so easy (shifting a hbox by \hskip-dimen)
Refering to some LaTeX class is not very helpful, since the ConTeXt-source-readers don't use LaTeX very often :)
:-) You're right, obviously..
Try this one. If it does not do what you want, please be exact about your specification!
That's most of what I wanted!! Great. I'm still puzzling over how to change the width of the hbox to \textwidth+\marginwidth\margindistance, but for now I'm saved. Why do I want a wider hbox? I print white fonts on black background, so the left shifted \hbox with a width of (I assume) \textwidth looks different from what I wanted. But it works for now... Have a nice week, Mathias
Mathias Picker
first, thanks! This solved my problem 90%. BIG Thanks!!
good to hear, but usually the rest 10% are the most difficult ;-)
That's most of what I wanted!! Great. I'm still puzzling over how to change the width of the hbox to \textwidth+\marginwidth\margindistance, but for now I'm saved. Why do I want a wider hbox? I print white fonts on black background, so the left shifted \hbox with a width of (I assume) \textwidth looks different from what I wanted. But it works for now...
OK, just in case you run pdfetex (see the e in between pdf and tex ;-}) you can use the \dimexpr ( .... ) primitive: \def\MyHead#1#2% {\vbox {\localheadsetup \begstrut % is this really needed? \hbox {\hskip-\marginwidth\hskip-\margindistance \framed[width=\dimexpr(\marginwidth+\margindistance+\textwidth), align=right, %raggedright frame=off, offset=2pt, background=color, backgroundcolor=black, foregroundcolor=white, ]{% \ifheadnumbercontent{#1}\kern\numberheaddistance\fi #2}}}} %\showframe \starttext \setuphead[section][alternative=command,number=no,command=\MyHead,style=\bf] \section{some quick fox jump over very lazy dogs} \input tufte \stoptext If you don't use pdfetex, you might think of switching. Or you could do some calculation to achieve the same.
Have a nice week,
You, too. Patrick
participants (2)
-
Mathias Picker
-
Patrick Gundlach