ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* style questions
@ 2004-01-01 19:49 Janko Hauser
  2004-01-01 22:23 ` Henning Hraban Ramm
  2004-01-03 22:00 ` Hans Hagen
  0 siblings, 2 replies; 4+ messages in thread
From: Janko Hauser @ 2004-01-01 19:49 UTC (permalink / raw)


Hello everybody,

Over the last days I started to write a "Requirement" document. I
started from the example documents provided at the fiee-site, which
are a big help. I use this as an exercise to see, what markup is
actually needed in the content, to transform from XML documents later
on.

First some things I already solved, but want to ask, if it was in the
right way.

1. I want to mark some words consistently and used the \definesynonyms
   command for this, although I only use the second form.

   \definesynonyms[glossar][explanation][\infull]
   \glossar [ZOPE] {\em Zope} {Web Applikationsserver}

   Is there a better way to style words consistently? I find it
   difficult to distinguish between \ZOPE\ and \ZOPE, especially for
   the possible later translation from XML.

2. In the example there is an indirection for the section definitions.

   \definehead [Topic]   [chapter]
   \definehead [Nopic]   [title]

   Later on the newly defined headers are styled. But they are used as
   the only headers throughout the document. So why not style the
   original ones?

3. I have defined colored header bars in the following ways.

\setuphead
  [subject, Subject,section]
  [command=\mysec,
   page=no,
   continue=no,
   style={\ss\bs},
   color=black]

\def\mysec#1#2{\framed[width=\textwidth,
   corner=round,
   radius=0.05em,
   background=color,
   backgroundcolor=HKS5,
   framecolor=HKS5]{\startnarrower[1*left,1*right] #2 \hfill #1
\stopnarrower}}

   They are spanning the complete textwidth. What I now want is to
   have a smaller textwidth, but the bars should remain broader, as
   broad as the header and footer lines. Any hints?

4. How to deal with metadata, like author, version, last modified and
   so. Would you recommend to use buffers for this? This information
   is probably used on the title page and the footer of each page.

Ok, now a real question. I want to style the actual requirements in
form of a papercard, whith their actual status at the top. This would
be an new definition with 2 or 3 arguments. But the requirements
should also be enumerated. How can one build such an environment?
Derive somehow from \defineenumeration?

---------------------------------------------------------------
|ReqNbr  | Title                               | status | date|
---------------------------------------------------------------
| longer text .... with paragraphs and pagebreaks             |
---------------------------------------------------------------

Sorry for the ascii-art (cough :-). These cards should be able to span
more than one page. In the light of this a table with running heads
would also be an option, right?

Thanks for this great package, it is a lot of fun and full of gems.

TIA,

__Janko

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: style questions
  2004-01-01 19:49 style questions Janko Hauser
@ 2004-01-01 22:23 ` Henning Hraban Ramm
  2004-01-01 23:43   ` Janko Hauser
  2004-01-03 22:00 ` Hans Hagen
  1 sibling, 1 reply; 4+ messages in thread
From: Henning Hraban Ramm @ 2004-01-01 22:23 UTC (permalink / raw)



Am Donnerstag, 01.01.04, um 20:49 Uhr (Europe/Zurich) schrieb Janko 
Hauser:
> 2. In the example there is an indirection for the section definitions.
>
>    \definehead [Topic]   [chapter]
>    \definehead [Nopic]   [title]
>
>    Later on the newly defined headers are styled. But they are used as
>    the only headers throughout the document. So why not style the
>    original ones?

I copied my styles from one of Hans', he used Topic/Nopic, and I just
didn't change it - first I didn't understand what was going on,
later I was too lazy...


Grüßlis vom Hraban!
-- 
http://www.fiee.net/texnique/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: style questions
  2004-01-01 22:23 ` Henning Hraban Ramm
@ 2004-01-01 23:43   ` Janko Hauser
  0 siblings, 0 replies; 4+ messages in thread
From: Janko Hauser @ 2004-01-01 23:43 UTC (permalink / raw)


On Thu, 1 Jan 2004 23:23:41 +0100
Henning Hraban Ramm <hraban@fiee.net> wrote:

> 
> Am Donnerstag, 01.01.04, um 20:49 Uhr (Europe/Zurich) schrieb Janko 
> Hauser:
> > 2. In the example there is an indirection for the section
> > definitions.
> >
> >    \definehead [Topic]   [chapter]
> >    \definehead [Nopic]   [title]
> >
> >    Later on the newly defined headers are styled. But they are
> >    used as the only headers throughout the document. So why not
> >    style the original ones?
> 
> I copied my styles from one of Hans', he used Topic/Nopic, and I
> just didn't change it - first I didn't understand what was going on,
> later I was too lazy...
> 
> 

Thanks for the info. I learned a lot from the examples. It is good to
have a structure for playing with the parameters.

__Janko

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: style questions
  2004-01-01 19:49 style questions Janko Hauser
  2004-01-01 22:23 ` Henning Hraban Ramm
@ 2004-01-03 22:00 ` Hans Hagen
  1 sibling, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2004-01-03 22:00 UTC (permalink / raw)


At 20:49 01/01/2004, you wrote:

>1. I want to mark some words consistently and used the \definesynonyms
>    command for this, although I only use the second form.
>
>    \definesynonyms[glossar][explanation][\infull]
>    \glossar [ZOPE] {\em Zope} {Web Applikationsserver}
>
>    Is there a better way to style words consistently? I find it
>    difficult to distinguish between \ZOPE\ and \ZOPE, especially for
>    the possible later translation from XML.

you can try: {\ZOPE} for both, so between {\ZOPE} and {\ZOPE},

technically a lookahead for space is possible but there are border cases ...

in XML, when you use

between <meaning label="ZOPE"/> and <meaning label="ZOPE"/>, with:

   \defineXMLsingular [meaning] [label=] {\infull{\XMLop{label}}}

there is no space problem (the \ is needed to prevent eating up the space, 
which is a result from the way tex parses \COMMANDS.

>2. In the example there is an indirection for the section definitions.
>
>    \definehead [Topic]   [chapter]
>    \definehead [Nopic]   [title]
>
>    Later on the newly defined headers are styled. But they are used as
>    the only headers throughout the document. So why not style the
>    original ones?

hm, a matter of taste, a topic is not a chapter; imagine a quality 
assurance manual:

   \Procedure \WorkInstruction \Process

is then more meaningfull than chapter section subsection (also, the 
indirectness enables you to reassign levels)

>3. I have defined colored header bars in the following ways.
>
>\setuphead
>   [subject, Subject,section]
>   [command=\mysec,
>    page=no,
>    continue=no,
>    style={\ss\bs},
>    color=black]
>
>\def\mysec#1#2{\framed[width=\textwidth,
>    corner=round,
>    radius=0.05em,
>    background=color,
>    backgroundcolor=HKS5,
>    framecolor=HKS5]{\startnarrower[1*left,1*right] #2 \hfill #1
>\stopnarrower}}
>
>    They are spanning the complete textwidth. What I now want is to
>    have a smaller textwidth, but the bars should remain broader, as
>    broad as the header and footer lines. Any hints?

I don't understand what you want, maybe:

\def\mysec#1#2%
   {\framed
     [width=\textwidth,
      corner=round,
      radius=0.05em,
      background=color,
      backgroundcolor=HKS5,
      align=normal,
      strut=no,
      framecolor=HKS5]
     {\setuptabulate[before=,after=]
      \starttabulate[|p(5cm)|r|]\NC#2\NC#1\NC\NR\stoptabulate}}

or

\def\mysec#1#2%
   {\bTABLE
    \bTR \bTD #2 \eTD \bTD #1 \eTD \eTR
    \eTABLE}

>4. How to deal with metadata, like author, version, last modified and
>    so. Would you recommend to use buffers for this? This information
>    is probably used on the title page and the footer of each page.

\setvariables
   [category]
   [something=whatever]

and then

\getvariable{category}{something}

>Ok, now a real question. I want to style the actual requirements in
>form of a papercard, whith their actual status at the top. This would
>be an new definition with 2 or 3 arguments. But the requirements
>should also be enumerated. How can one build such an environment?
>Derive somehow from \defineenumeration?
>
>---------------------------------------------------------------
>|ReqNbr  | Title                               | status | date|
>---------------------------------------------------------------
>| longer text .... with paragraphs and pagebreaks             |
>---------------------------------------------------------------
>
>Sorry for the ascii-art (cough :-). These cards should be able to span
>more than one page. In the light of this a table with running heads
>would also be an option, right?
>
>Thanks for this great package, it is a lot of fun and full of gems.

something

\long\def\StartMyCard#1#2#3#4#5\StopMyCard
   {\bTABLE
    \bTR \bTD #1 \eTD \bTD #2 \eTD \bTD #3 \eTD \bTD #4 \eTD \eTR
    \bTR \bTD[nc=4] #5 \eTD \eTR
    \eTABLE}

\StartMyCard{Req}{Title}{status}{date} text .... \StopMyCard

or:

\long\def\StartMyCard[#1]#2\StopMyCard
   {\getvariables[card][nr=,title=,status=,date=,#2]
    \bTABLE
    \bTR \bTD \getvariable{card}{nr} \eTD .... \eTR
    \bTR \bTD[nc=4] #2 \eTD \eTR
    \eTABLE}

\StartMyCard[nr=10,title=whatever]
some text
\StopMyCard

etc etc

Hans

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-01-03 22:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-01 19:49 style questions Janko Hauser
2004-01-01 22:23 ` Henning Hraban Ramm
2004-01-01 23:43   ` Janko Hauser
2004-01-03 22:00 ` Hans Hagen

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