From: mf <massifr@fastwebnet.it>
To: ntg-context@ntg.nl
Subject: setup for paragraph styles
Date: Fri, 13 Mar 2015 00:43:32 +0100 [thread overview]
Message-ID: <1426203812.11794.20.camel@fastwebnet.it> (raw)
Hello,
I'd like to kwnow the commands I should use in ConTeXt to define styles
for paragraphs of text that are not headers/titles nor normal text.
With titles I know I must use:
\definehead[MyTitle][title]
\setuphead[MyTitle][...]
What should I use for texts like subtitles, dates of letters,
signatures? They are "paragraphs" often made by a few words, with a
different alignment, margins, style and vertical space above and below.
For a long quote I've seen that I can use:
\definedelimitedtext[MySpecialText]
\setupdelimitedtext[MySpecialText]
Are those the right commands for my purpose in ConTeXt?
In particular, I'm typesetting XHTML, where all those elements are <p
class="subtitle">, <p class="letter-date">, <p class="signature"> and so
on.
An example taken from my xml environment:
...
\startxmlsetups xml:myenv
\xmlsetsetup{\xmldocument}{*}{-}
\xmlsetsetup{\xmldocument}{html|body|h3|p|i}{xml:*}
...
\xmlsetsetup{\xmldocument}{p[@class='letter-date']}{xml:p:letter-date}
...
\stopxmlsetups
...
\startxmlsetups xml:p:letter-date
\page[no]\rightaligned{\noindent\xmlflush{#1}}\par\page[no]
\stopxmlsetups
...
Is that the right way or is it better to define and setup a style like
this?
\define_???_[LetterDate]
\setup_???_[LetterDate][
before=...,
after=...,
...,
]
and use it like this:
\startxmlsetups xml:p:letter-date
\startLetterDate \xmlflush{#1} \stopLetterDate
\stopxmlsetups
And if it's better like that, what should I write instead of _???_ ?
Thanks,
Massi
___________________________________________________________________________________
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:[~2015-03-12 23:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1426203812.11794.20.camel@fastwebnet.it \
--to=massifr@fastwebnet.it \
--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).