ConTeXt 레지스터의 페이지 번호 앞에 점을 추가하고 싶습니다. 이를 달성하는 가장 좋은 방법은 무엇입니까?
다음은 현재 동작과 이를 통해 생성하고 싶은 동작에 대한 최소한의 작업 예입니다.
\defineregister[cases][n=1,pagestyle=normal,indicator=no]
\setupcombinedlist[content][alternative=c]
\setuplist[chapter][headnumber=no]
\setuphead[chapter][number=no]
\starttext
\title{Table of Contents}
\placecontent
\chapter{Register Table}
\placecases
\chapter{Content}
This is a \cases{test}test. This is \cases{another test}another test.
\stoptext
답변1
결합된 목록과 같이 목록 대안을 설정할 항목을 찾지 못했지만 textcommand
점을 삽입하기 위해 를 하이재킹할 수 있습니다. 텍스트와 점, 숫자와 점 사이의 거리를 키로 조정할 수 있습니다 distance
.
\starttexdefinition unexpanded register:text #1
#1
\hskip\registerparameter{distance}\relax
\dotfill
\stoptexdefinition
\defineregister
[cases]
[
n=1,
pagestyle=normal,
indicator=no,
distance=1em,
textcommand=\getvalue{register:text},
]
\setupcombinedlist[content][alternative=c]
\setuplist[chapter][headnumber=no]
\setuphead[chapter][number=no]
\starttext
\title{Table of Contents}
\placecontent
\chapter{Register Table}
\placecases
\chapter{Content}
This is a \cases{test}test. This is \cases{another test}another test. \dorecurse{5}{\input knuth} This is a \cases{test}test. This is \cases{another test}another test.
\stoptext
갖고 싶다면정확히결합된 목록에 대한 목록 대안과 동일한 점은 와 함께 c
다음을 사용합니다 .textcommand
distance=.5em
\starttexdefinition unexpanded register:text #1
#1
\hskip\registerparameter{distance}\relax
\gleaders\hbox to .5em{\hss.\hss}\hfill
\stoptexdefinition