ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Two questions on enumerations/indentation
@ 2021-12-30 20:54 Mikael Sundqvist via ntg-context
  2021-12-30 23:26 ` fv leung via ntg-context
  0 siblings, 1 reply; 4+ messages in thread
From: Mikael Sundqvist via ntg-context @ 2021-12-30 20:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Mikael Sundqvist

Hi,

I have two questions:

1) What is the correct way to indent the first line of a (serried)
enumeration? In the example below, I can use headcommand, but then I
do not know what I should replace "1em" below to fit the medium
indenting.

2) I miss a numberstyle. What is the correct way to (in the example
below) get Remark in italic and the number upright?

/Mikael

\defineenumeration[remark][
  alternative=serried,
  width=fit,
  text=Remark,
  headstyle=italic,
  indenting={yes,medium},
  %headcommand=\groupedcommand{\hskip 1em}{},
]

\starttext

\samplefile{tufte}

\startremark
This line should be indented. The next line should not be indented. I
wonder how we can fix that.

This line is fine and is here for comparison.
\stopremark

\samplefile{tufte}

\stoptext
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Two questions on enumerations/indentation
  2021-12-30 20:54 Two questions on enumerations/indentation Mikael Sundqvist via ntg-context
@ 2021-12-30 23:26 ` fv leung via ntg-context
  2021-12-31 12:19   ` Mikael Sundqvist via ntg-context
  0 siblings, 1 reply; 4+ messages in thread
From: fv leung via ntg-context @ 2021-12-30 23:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: fv leung


[-- Attachment #1.1: Type: text/plain, Size: 1727 bytes --]

Can solve with


\defineenumeration[remark][
  alternative=serried,
  width=fit,
  text={{\it Remark}},
  headstyle=\tf,
  indenting={first,medium},
  %headcommand=\groupedcommand{\hskip 1em}{},
]


Mikael Sundqvist via ntg-context <ntg-context@ntg.nl> 於 2021年12月31日 週五
上午4:55寫道:

> Hi,
>
> I have two questions:
>
> 1) What is the correct way to indent the first line of a (serried)
> enumeration? In the example below, I can use headcommand, but then I
> do not know what I should replace "1em" below to fit the medium
> indenting.
>
> 2) I miss a numberstyle. What is the correct way to (in the example
> below) get Remark in italic and the number upright?
>
> /Mikael
>
> \defineenumeration[remark][
>   alternative=serried,
>   width=fit,
>   text=Remark,
>   headstyle=italic,
>   indenting={yes,medium},
>   %headcommand=\groupedcommand{\hskip 1em}{},
> ]
>
> \starttext
>
> \samplefile{tufte}
>
> \startremark
> This line should be indented. The next line should not be indented. I
> wonder how we can fix that.
>
> This line is fine and is here for comparison.
> \stopremark
>
> \samplefile{tufte}
>
> \stoptext
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 2633 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Two questions on enumerations/indentation
  2021-12-30 23:26 ` fv leung via ntg-context
@ 2021-12-31 12:19   ` Mikael Sundqvist via ntg-context
  2021-12-31 13:04     ` Wolfgang Schuster via ntg-context
  0 siblings, 1 reply; 4+ messages in thread
From: Mikael Sundqvist via ntg-context @ 2021-12-31 12:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Mikael Sundqvist


[-- Attachment #1.1: Type: text/plain, Size: 2662 bytes --]

Thank you for that!

This certainly gives me an italic Remark and an upright 1. I feel a bit
uneasy about adding the style to the text key, but if there is no other way
out...

I do not get the head indented with your code.

/Mikael

Den fre 31 dec. 2021 00:26fv leung via ntg-context <ntg-context@ntg.nl>
skrev:

> Can solve with
>
>
> \defineenumeration[remark][
>   alternative=serried,
>   width=fit,
>   text={{\it Remark}},
>   headstyle=\tf,
>   indenting={first,medium},
>   %headcommand=\groupedcommand{\hskip 1em}{},
> ]
>
>
> Mikael Sundqvist via ntg-context <ntg-context@ntg.nl> 於 2021年12月31日 週五
> 上午4:55寫道:
>
>> Hi,
>>
>> I have two questions:
>>
>> 1) What is the correct way to indent the first line of a (serried)
>> enumeration? In the example below, I can use headcommand, but then I
>> do not know what I should replace "1em" below to fit the medium
>> indenting.
>>
>> 2) I miss a numberstyle. What is the correct way to (in the example
>> below) get Remark in italic and the number upright?
>>
>> /Mikael
>>
>> \defineenumeration[remark][
>>   alternative=serried,
>>   width=fit,
>>   text=Remark,
>>   headstyle=italic,
>>   indenting={yes,medium},
>>   %headcommand=\groupedcommand{\hskip 1em}{},
>> ]
>>
>> \starttext
>>
>> \samplefile{tufte}
>>
>> \startremark
>> This line should be indented. The next line should not be indented. I
>> wonder how we can fix that.
>>
>> This line is fine and is here for comparison.
>> \stopremark
>>
>> \samplefile{tufte}
>>
>> \stoptext
>>
>> ___________________________________________________________________________________
>> 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
>>
>> ___________________________________________________________________________________
>>
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 4524 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Two questions on enumerations/indentation
  2021-12-31 12:19   ` Mikael Sundqvist via ntg-context
@ 2021-12-31 13:04     ` Wolfgang Schuster via ntg-context
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2021-12-31 13:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Mikael Sundqvist via ntg-context
  Cc: Wolfgang Schuster, Mikael Sundqvist

Mikael Sundqvist via ntg-context schrieb am 31.12.2021 um 13:19:
> Thank you for that!
>
> This certainly gives me an italic Remark and an upright 1. I feel a 
> bit uneasy about adding the style to the text key, but if there is no 
> other way out...

Create a custom conversion set for the counter and apply a formatting to 
the counter with a processor.

> I do not get the head indented with your code.

The serried alternative disables paragraph indentation before the title. 
You solution is one possible method, another one is to put the title in 
a \framed block and change the left margin in the block. Another 
possible method is to shift the title to the right with the \offset 
command and increase the distance between the title and the following text.


\defineprocessor [upright] [style=normal]

\defineconversionset [upright-n] [] [upright->n]

\defineenumeration
   [remark]
   [        alternative=serried,
                  width=fit,
                   text=Remark,
              headstyle=italic,
            headcommand={\unframed[offset=0pt,location=low,loffset=1em]},
    numberconversionset=upright-n,
              indenting={yes,medium}]

Wolfgang

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-12-31 13:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-30 20:54 Two questions on enumerations/indentation Mikael Sundqvist via ntg-context
2021-12-30 23:26 ` fv leung via ntg-context
2021-12-31 12:19   ` Mikael Sundqvist via ntg-context
2021-12-31 13:04     ` Wolfgang Schuster via ntg-context

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).