* Wide descriptions protruding into the margin
@ 2012-09-14 10:47 Marco Patzer
2012-09-14 12:14 ` Philipp Gesang
0 siblings, 1 reply; 3+ messages in thread
From: Marco Patzer @ 2012-09-14 10:47 UTC (permalink / raw)
To: context
Hi,
with wide description heads I have the problem that the following
description protrudes into the margin.
\definedescription
[description]
[alternative=hanging,
width=broad]
\starttext
\startdescription{conclusion that}
\input knuth
\stopdescription
\startdescription{conclusion that the designer of a new system must not only be literally}
\input knuth
\stopdescription
\stoptext
In the second case the “Thus,” should be placed on the line after
the head. How do I achieve that? My current workaround is to append
a \hbox{ } to the problematic entries.
Marco
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Wide descriptions protruding into the margin
2012-09-14 10:47 Wide descriptions protruding into the margin Marco Patzer
@ 2012-09-14 12:14 ` Philipp Gesang
2012-09-14 12:33 ` Marco Patzer
0 siblings, 1 reply; 3+ messages in thread
From: Philipp Gesang @ 2012-09-14 12:14 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 2482 bytes --]
Hi Marco,
···<date: 2012-09-14, Friday>···<from: Marco Patzer>···
> \definedescription
> [description]
> [alternative=hanging,
> width=broad]
<... />
> In the second case the “Thus,” should be placed on the line after
> the head. How do I achieve that? My current workaround is to append
> a \hbox{ } to the problematic entries.
you can hack the hanging alternative and substitute a glue for
the kern that is used for spacing (strc-con.mkvi):
·······································································
\definedescription
[description]
[alternative=hanging,
width=broad]
\unprotect
\startsetups[\??constructionrenderings:\v!hanging]
% tricky: leftskipadaption is somewhat unpredictable
\let\\=\crlf
\noindent
\advance\leftskip-\leftskipadaption\relax
\ifdim\leftskipadaption=\zeropoint
\leftskipadaption1.5\emwidth\relax % just some default
\ifnum\c_strc_constructions_nested_state=\plusone
\ifdim\leftskip>\zeropoint \relax
\leftskipadaption\leftskip
\fi
\fi
\fi
\ifnum\c_strc_constructions_nested_state>\zerocount % was \ifnum\c_strc_constructions_nested_state=\plusone
\advance\leftskip\leftskipadaption % but we're already further on
\fi
\hskip-\leftskipadaption\relax
\ifhbox\constructionheadbox\unhcopy\else\copy\fi\constructionheadbox
%% here’s the change: ·············································
% \kern\ifdim\constructionsheaddistance=\zeropoint .75\emwidth\else\constructionsheaddistance\fi
\hskip\ifdim\constructionsheaddistance=\zeropoint .75\emwidth\else\constructionsheaddistance\fi
\useconstructionstyleandcolor\c!style\c!color
\ignorespaces
\stopsetups
\protect
\starttext
\startdescription{conclusion that}
\input knuth
\stopdescription
\startdescription{conclusion that the designer of a new system must not only be literally}
\input knuth
\stopdescription
\stoptext
·······································································
But maybe this could be made an option?
Regards
Philipp
--
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Wide descriptions protruding into the margin
2012-09-14 12:14 ` Philipp Gesang
@ 2012-09-14 12:33 ` Marco Patzer
0 siblings, 0 replies; 3+ messages in thread
From: Marco Patzer @ 2012-09-14 12:33 UTC (permalink / raw)
To: ntg-context
2012-09-14 Philipp Gesang <gesang@stud.uni-heidelberg.de>:
Hi Philipp,
> you can hack the hanging alternative and substitute a glue for
> the kern that is used for spacing (strc-con.mkvi):
>
> […]
>
This works perfectly. Thanks a lot for digging into the sources.
> But maybe this could be made an option?
\dorecurse{10}{+1}
Marco
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-14 12:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-14 10:47 Wide descriptions protruding into the margin Marco Patzer
2012-09-14 12:14 ` Philipp Gesang
2012-09-14 12:33 ` Marco Patzer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).