chapter setup with subtitle in margin
Hi again, I have this nice/complicated chapter setup (see attachments): Chapter title Chapter subtitle can have several lines in margin smaller font Three problems I cannot get rid of: - There’s always an indent in front of the title (red box); it should not. - The subtitle should start on the same line as the main title. - The subtitle should have an appropriate line spacing. Please, I’m running out of time... Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG Key ID 1C9B22FD
Am 2018-01-23 um 22:31 schrieb Henning Hraban Ramm
I have this nice/complicated chapter setup (see attachments): Three problems I cannot get rid of:
- There’s always an indent in front of the title (red box); it should not. - The subtitle should start on the same line as the main title. - The subtitle should have an appropriate line spacing.
I could solve the subtitle placement with layers. But the chapter title still has this indent. :-( Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG Key ID 1C9B22FD
On Wed, 24 Jan 2018, Henning Hraban Ramm wrote:
Am 2018-01-23 um 22:31 schrieb Henning Hraban Ramm
: I have this nice/complicated chapter setup (see attachments): Three problems I cannot get rid of:
- There’s always an indent in front of the title (red box); it should not. - The subtitle should start on the same line as the main title. - The subtitle should have an appropriate line spacing.
I could solve the subtitle placement with layers.
But the chapter title still has this indent. :-(
Untested, but you have two spurious spaces in your code \define[2]\ChapterCmd{% \inouter{\framed[frame=off,align=flushleft]{% %\startlinecorrection \switchtobodyfont[rm,12pt] % <-- Here. Remove space before % \structureuservariable{subtitle}}% %\stoplinecorrection }% << HERE: % was missing \framed[width=\textwidth,frame=off,align=flushleft]{\ChapterTitleFont #2} } Aditya
Am 2018-01-24 um 19:25 schrieb Aditya Mahajan
On Wed, 24 Jan 2018, Henning Hraban Ramm wrote:
Am 2018-01-23 um 22:31 schrieb Henning Hraban Ramm
: I have this nice/complicated chapter setup (see attachments): Three problems I cannot get rid of:
- There’s always an indent in front of the title (red box); it should not. - The subtitle should start on the same line as the main title. - The subtitle should have an appropriate line spacing.
I could solve the subtitle placement with layers.
But the chapter title still has this indent. :-(
Untested, but you have two spurious spaces in your code
\define[2]\ChapterCmd{% \inouter{\framed[frame=off,align=flushleft]{% %\startlinecorrection \switchtobodyfont[rm,12pt] % <-- Here. Remove space before % \structureuservariable{subtitle}}% %\stoplinecorrection }% << HERE: % was missing \framed[width=\textwidth,frame=off,align=flushleft]{\ChapterTitleFont #2} }
Thank you, but those existed only in an old version. Current is: \define[2]\ChapterCmd{% \framed[width=\textwidth,frame=off,align=flushleft,style=\ChapterTitleFont]{#2}% without framed it’s a hbox? \setlayerframed[rightmargin]% [frame=off,width=\outermarginwidth,y=0mm,setups=Subtitle,align=flushleft]% {\structureuservariable{subtitle}}% } And the indent is still there. Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG Key ID 1C9B22FD
On Wed, Jan 24, 2018 at 11:00 PM, Henning Hraban Ramm
Am 2018-01-24 um 19:25 schrieb Aditya Mahajan
: On Wed, 24 Jan 2018, Henning Hraban Ramm wrote:
Am 2018-01-23 um 22:31 schrieb Henning Hraban Ramm
: I have this nice/complicated chapter setup (see attachments): Three problems I cannot get rid of:
- There’s always an indent in front of the title (red box); it should not. - The subtitle should start on the same line as the main title. - The subtitle should have an appropriate line spacing.
I could solve the subtitle placement with layers.
But the chapter title still has this indent. :-(
Untested, but you have two spurious spaces in your code
\define[2]\ChapterCmd{% \inouter{\framed[frame=off,align=flushleft]{% %\startlinecorrection \switchtobodyfont[rm,12pt] % <-- Here. Remove space before % \structureuservariable{subtitle}}% %\stoplinecorrection }% << HERE: % was missing \framed[width=\textwidth,frame=off,align=flushleft]{\ChapterTitleFont #2} }
Thank you, but those existed only in an old version. Current is:
\define[2]\ChapterCmd{% \framed[width=\textwidth,frame=off,align=flushleft,style=\ChapterTitleFont]{#2}% without framed it’s a hbox? \setlayerframed[rightmargin]% [frame=off,width=\outermarginwidth,y=0mm,setups= Subtitle,align=flushleft]% {\structureuservariable{subtitle}}% }
And the indent is still there.
Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG Key ID 1C9B22FD
____________________________________________________________ _______________________ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ____________________________________________________________ _______________________
I think you can get rid of that horizontal space by adding "offset=overlay" to the framed environment used in your \ChapterCmd. /Mikael
Am 2018-01-25 um 08:10 schrieb Mikael P. Sundqvist
I think you can get rid of that horizontal space by adding "offset=overlay" to the framed environment used in your \ChapterCmd.
Thank you so much! That helped. Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG Key ID 1C9B22FD
participants (3)
-
Aditya Mahajan
-
Henning Hraban Ramm
-
Mikael P. Sundqvist