* \setuplist with numbercommand renders wrongly
@ 2017-12-11 2:06 SteamedFish
2017-12-12 3:37 ` Henri
0 siblings, 1 reply; 2+ messages in thread
From: SteamedFish @ 2017-12-11 2:06 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 834 bytes --]
I don’t know if I use it wrongly, or it’s a bug in ConTeXt, but use \setuplist with numbercommand renders wrongly
% this is not working, ``chapter’’ and chapter name overlapped
\define[2]\ChapterNumber{chapter #1: #2}
% have to add extra spaces here to avoid overlapping
% \define[2]\ChapterNumber{chapter #1:\space\space\space\space\space\space #2}
\setuplist[section][numbercommand=\ChapterNumber]
\starttext
\completecontent
\section{blabla}
blabla
\section{blabla}
blabla
\section{blabla}
blabla
\stoptext
I use ConTeXt standalone with Mac OS X
mtx-context | ConTeXt Process Management 1.02
mtx-context |
mtx-context | main context file: /Volumes/DATA/ConTeXt/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2017.12.04 16:37
[-- Attachment #1.2.1: Type: text/html, Size: 1667 bytes --]
[-- Attachment #1.2.2: PastedGraphic-1.png --]
[-- Type: image/png, Size: 32396 bytes --]
[-- Attachment #2: Type: text/plain, Size: 492 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] 2+ messages in thread
* Re: \setuplist with numbercommand renders wrongly
2017-12-11 2:06 \setuplist with numbercommand renders wrongly SteamedFish
@ 2017-12-12 3:37 ` Henri
0 siblings, 0 replies; 2+ messages in thread
From: Henri @ 2017-12-12 3:37 UTC (permalink / raw)
To: ntg-context
If you want to format the TOC line you have to use command=... together with alternative=command.
\define[3]\ChapterNumber{\line{Chapter #1: #2\hfill#3}}
\setuplist
[section]
[alternative=command,
command=\ChapterNumber]
\starttext
\completecontent
\startsection[title={blabla}]
blabla
\stopsection
\startsection[title={blabla}]
blabla
\stopsection
\startsection[title={blabla}]
blabla
\stopsection
\stoptext
If you want to use numbercommand anyway, then make sure that you use it correctly. It only takes
one argument and you have increase the width of number field.
\define[1]\ChapterNumber{Chapter #1:}
\setuplist
[section]
[width=2.5cm,
numbercommand=\ChapterNumber]
\starttext
\completecontent
\startsection[title={blabla}]
blabla
\stopsection
\startsection[title={blabla}]
blabla
\stopsection
\startsection[title={blabla}]
blabla
\stopsection
\stoptext
On Mon, 2017-12-11 at 10:06 +0800, SteamedFish wrote:
>
> I don’t know if I use it wrongly, or it’s a bug in ConTeXt, but use \setuplist with numbercommand
> renders wrongly
>
>
>
> % this is not working, ``chapter’’ and chapter name overlapped
> \define[2]\ChapterNumber{chapter #1: #2}
> % have to add extra spaces here to avoid overlapping
> % \define[2]\ChapterNumber{chapter #1:\space\space\space\space\space\space #2}
> \setuplist[section][numbercommand=\ChapterNumber]
> \starttext
> \completecontent
> \section{blabla}
> blabla
> \section{blabla}
> blabla
> \section{blabla}
> blabla
> \stoptext
>
>
>
>
>
>
>
>
> I use ConTeXt standalone with Mac OS X
>
> mtx-context | ConTeXt Process Management 1.02
> mtx-context |
> mtx-context | main context file: /Volumes/DATA/ConTeXt/tex/texmf-
> context/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2017.12.04 16:37
> ___________________________________________________________________________________
> 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-12 3:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-11 2:06 \setuplist with numbercommand renders wrongly SteamedFish
2017-12-12 3:37 ` Henri
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).