[dev-context] Re: Inline items indent paragraph

2023-08-23 Thread Wolfgang Schuster

Hans Hagen schrieb am 24.08.2023 um 00:28:

On 8/23/2023 10:13 PM, Wolfgang Schuster wrote:

Hi,

when inline items are used and the itemize environment has a settings 
for the margin the value the whole paragraph is indented by the set 
value for itemize.


[...]

We need a check in this case to ensure the margin settings (margin, 
leftmargin and rightmargin) are ignored for inline items.


like this?

   \ifconditional\c_strc_itemgroups_inline
 % ignore
   \orelse\ifnum\c_strc_itemgroups_nesting=\plusone % NIEUW
 \doadaptleftskip {\itemgroupparameter\c!margin}%
 \doadaptleftskip {\itemgroupparameter\c!leftmargin}%
 \doadaptrightskip{\itemgroupparameter\c!rightmargin}%
   \fi


More like this (text conditional):

   \ifconditional\c_strc_itemgroups_text \else
 \ifnum\c_strc_itemgroups_nesting=\plusone % NIEUW
   \doadaptleftskip {\itemgroupparameter\c!margin}%
   \doadaptleftskip {\itemgroupparameter\c!leftmargin}%
   \doadaptrightskip{\itemgroupparameter\c!rightmargin}%
 \fi
 %
 \doadaptleftskip {\itemgroupparameter\c!leftmargindistance}%
 \doadaptrightskip{\itemgroupparameter\c!rightmargindistance}%
   \fi

Wolfgang

___
dev-context mailing list -- dev-context@ntg.nl
To unsubscribe send an email to dev-context-le...@ntg.nl


[dev-context] Re: Inline items indent paragraph

2023-08-23 Thread Hans Hagen

On 8/23/2023 10:13 PM, Wolfgang Schuster wrote:

Hi,

when inline items are used and the itemize environment has a settings 
for the margin the value the whole paragraph is indented by the set 
value for itemize.



\starttext

\samplefile{lorem}

\samplefile{lorem}\startitemize[a,intext][margin=2em]\item one \item two 
\stopitemize \samplefile{lorem}


\samplefile{lorem}

\stoptext


The culprit in this case is the \doadaptleftskip command which keeps the 
margin value even after the group has ended.



\starttext

\samplefile{lorem}

\samplefile{lorem}\bgroup\doadaptleftskip{1cm}\egroup\samplefile{lorem}

\samplefile{lorem}

\stoptext


We need a check in this case to ensure the margin settings (margin, 
leftmargin and rightmargin) are ignored for inline items.


like this?

   \ifconditional\c_strc_itemgroups_inline
 % ignore
   \orelse\ifnum\c_strc_itemgroups_nesting=\plusone % NIEUW
 \doadaptleftskip {\itemgroupparameter\c!margin}%
 \doadaptleftskip {\itemgroupparameter\c!leftmargin}%
 \doadaptrightskip{\itemgroupparameter\c!rightmargin}%
   \fi


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

___
dev-context mailing list -- dev-context@ntg.nl
To unsubscribe send an email to dev-context-le...@ntg.nl


[dev-context] Inline items indent paragraph

2023-08-23 Thread Wolfgang Schuster

Hi,

when inline items are used and the itemize environment has a settings 
for the margin the value the whole paragraph is indented by the set 
value for itemize.



\starttext

\samplefile{lorem}

\samplefile{lorem}\startitemize[a,intext][margin=2em]\item one \item two 
\stopitemize \samplefile{lorem}


\samplefile{lorem}

\stoptext


The culprit in this case is the \doadaptleftskip command which keeps the 
margin value even after the group has ended.



\starttext

\samplefile{lorem}

\samplefile{lorem}\bgroup\doadaptleftskip{1cm}\egroup\samplefile{lorem}

\samplefile{lorem}

\stoptext


We need a check in this case to ensure the margin settings (margin, 
leftmargin and rightmargin) are ignored for inline items.


Wolfgang

___
dev-context mailing list -- dev-context@ntg.nl
To unsubscribe send an email to dev-context-le...@ntg.nl