ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Procházka Lukáš Ing. - Pontex s. r. o." <LPr@pontex.cz>
To: ConTeXt <ntg-context@ntg.nl>
Subject: Section horizontal space adjustment (LaTeX -> ConTeXt) (reduced attachs)
Date: Mon, 15 Nov 2010 10:59:26 +0100	[thread overview]
Message-ID: <op.vl7h1ckvtpjj8f@lpr> (raw)

[-- Attachment #1: Type: text/plain, Size: 1197 bytes --]

Hello all,

what is the simplest way how to change the horizontal space between the number and the name of a section (chapter, subsection...)? (Migrating from LaTeX to ConTeXt.)

There are two test documents attached -

- t-Sec2.pdf - to see the default view of LaTeX section number/text spacing,

- t-Sec.pdf - to see the same by ConTeXt (i.e. some less h-space).

What is the best (or simplest) way how to adjust this?

I tried to work with stopper and/or separator in \setupheads, but - to be honest - I don't know when they go to an action.

I achieved the required job by defining a new command \MyCmd - but is this the best way? Or are there better options or commands to achieve this? - See the code (and result):

---
\def\MyCmd#1#2{#1\hskip3ex#2}

\setupheads[stopper=STOPPER,separator=SEPARATOR,command=\MyCmd]

% When are the "stopper" and "separator" applied?

\starttext
    \chapter{AAA}
      \section{BBB}
        uuu
\stoptext
---

Cheers,

Lukas


-- 
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o.      [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

[-- Attachment #2: t-SetupHead.pdf --]
[-- Type: application/pdf, Size: 5048 bytes --]

[-- Attachment #3: t-SetupHead.mkiv --]
[-- Type: application/octet-stream, Size: 170 bytes --]

\def\MyCmd#1#2{#1\hskip3ex#2}

\setupheads[stopper=STOPPER,separator=SEPARATOR,command=\MyCmd]

\starttext
  \chapter{AAA}
    \section{BBB}
      uuu
\stoptext

[-- Attachment #4: t-Sec2.tex --]
[-- Type: application/x-tex, Size: 1672 bytes --]

[-- Attachment #5: t-Sec.mkiv --]
[-- Type: application/octet-stream, Size: 745 bytes --]

\setuphead[section][style=\tfb\bf]
\setuphead[subsection][style=\tfa\bf]
\setuphead[subsubsection][style=\tf\bf]

\starttext
  \section{AAA}
    \subsection{aaa}
      \input knuth

  \section{BBB}
    \subsection{bbb}
      \input knuth

  \setuphead[section][before=\blank]

  \section{CCC}
    \subsection{ccc}
      \input knuth

  \setuphead[section][before={\blank[2*big]}]

  \section{DDD}
    \subsection{ddd}
      \input knuth

  \setuphead[subsection][before={\blank[big]}]

  \section{EEE}
    \subsection{eee}
      \subsubsection{eeeeee}
        \input knuth

  \setuphead[subsubsection][before={\blank[big]},after={\blank[medium]}]

  \section{FFF}
    \subsection{fff}
      \subsubsection{ffffff}
        \input knuth
\stoptext

[-- Attachment #6: t-Sec.pdf --]
[-- Type: application/pdf, Size: 13677 bytes --]

[-- Attachment #7: t-Sec2.pdf --]
[-- Type: application/pdf, Size: 22764 bytes --]

[-- Attachment #8: Type: text/plain, Size: 486 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

             reply	other threads:[~2010-11-15  9:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-15  9:59 Procházka Lukáš Ing. - Pontex s. r. o. [this message]
2010-11-15 13:40 ` Wolfgang Schuster
2010-11-15 15:14   ` Procházka Lukáš Ing. - Pontex s. r. o.

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=op.vl7h1ckvtpjj8f@lpr \
    --to=lpr@pontex.cz \
    --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).