From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: margin in TocEntry definition
Date: Fri, 12 Mar 2021 06:19:43 +0100 [thread overview]
Message-ID: <9e8fccd7-2a3c-946c-32fd-ec2ba081f2e0@gmail.com> (raw)
In-Reply-To: <af818f32-d329-7e86-c267-0b53326aad2d@gmail.com>
jbf schrieb am 11.03.2021 um 23:22:
> Thanks for trying, Bruce. That earlier question you refer to was for a
> similar situation and the answer resolved that one at the time (it was
> my question even then!) but not the precise one I am facing now.
>
> The problem, you see, is that \startalignment only offers a few key
> words like flushleft, middle etc. and not what I need this time, which
> is a precise indentation feature like .5cm. I suppose my real problem is
> not being sufficiently au fait with how definitions work. I just can't
> seem to get a definition that gives me a result like
>
> Chapter title
> author ..................................... page number
>
> the \startalignment approach with flushleft would not give me the
> indentation obviously, and middle does not work for what I need, and
> either of them also pushes the page number line down onto the next line,
> which I don't want. I tried \skip .5cm, so:
>
> \define[1]\SectionTocEntry{%
> #1\crlf% title
> \hskip
> .5cm\doifnot{\structurelistuservariable{author}}{}{\structurelistuservariable{author}}%
> }
>
> But the \hskip is ignored at the beginning of a line. I wonder if there
> is something else I can substitute it for?
Use \par after the first line (and add \relax after \hskip).
\define[1]}SectionTocEntry
{#1\par
\hskip.5cm\relax\doifnot{...}{...}}
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
___________________________________________________________________________________
next prev parent reply other threads:[~2021-03-12 5:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-11 2:20 jbf
2021-03-11 22:04 ` Bruce Horrocks
2021-03-11 22:22 ` jbf
2021-03-12 0:51 ` Bruce Horrocks
2021-03-12 7:16 ` jbf
2021-03-12 5:19 ` Wolfgang Schuster [this message]
2021-03-12 0:03 ` jbf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9e8fccd7-2a3c-946c-32fd-ec2ba081f2e0@gmail.com \
--to=wolfgang.schuster.lists@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).