ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* setup for paragraph styles
@ 2015-03-12 23:43 mf
  0 siblings, 0 replies; only message in thread
From: mf @ 2015-03-12 23:43 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-03-12 23:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-12 23:43 setup for paragraph styles mf

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).