* macro for api-documentation
@ 2007-04-13 7:03 Janko Hauser
2007-04-13 7:39 ` Wolfgang Schuster
0 siblings, 1 reply; 2+ messages in thread
From: Janko Hauser @ 2007-04-13 7:03 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1205 bytes --]
Hello everyone, good morning europe, I want to generate an API-
documentation. For this I use a table (bTABLE) for every function
definition. That's a lot of code, which is in part dynamic (number of
rows for example depends on number of arguments). Here is a simple
example, but I will need colors and different fonts, different lines
between in/out and so on.
\startalignment[middle]
\midaligned{\ss
\bTABLE
\bTR \bTD[nc=3] validateRegistration \eTD \eTR
\bTR \bTD[nr=3] \rotate[rotation=90]{Input} \eTD \bTD parameter1 \eTD
\bTD Beschreibung zu
Parameter 1 \eTD \eTR
\bTR \bTD parameter2 \eTD \bTD Beschreibung zu
Parameter 2 \eTD \eTR
\bTR \bTD parameter2 \eTD \bTD Beschreibung zu
Parameter 2 \eTD \eTR
\bTR \bTD[nr=3] \rotate[rotation=90]{Output} \eTD \bTD parameter1
\eTD \bTD Beschreibung zu
Parameter 1 \eTD \eTR
\bTR \bTD parameter2 \eTD \bTD Beschreibung zu
Parameter 2 \eTD \eTR
\bTR \bTD parameter3 \eTD \bTD Beschreibung zu
Parameter 3 \eTD \eTR
\eTABLE}
\stopalignment
Are there any examples to do this more generally or better approaches
to set this up?
With regards,
__Janko
--
Janko Hauser email: jhauser@zscout.de
mobile: +49 1721 641552
[-- Attachment #1.2: Signierter Teil der Nachricht --]
[-- Type: application/pgp-signature, Size: 155 bytes --]
[-- Attachment #2: Type: text/plain, Size: 139 bytes --]
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: macro for api-documentation
2007-04-13 7:03 macro for api-documentation Janko Hauser
@ 2007-04-13 7:39 ` Wolfgang Schuster
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2007-04-13 7:39 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 2204 bytes --]
2007/4/13, Janko Hauser <jh@zscout.de>:
>
> Hello everyone, good morning europe, I want to generate an API-
> documentation. For this I use a table (bTABLE) for every function
> definition. That's a lot of code, which is in part dynamic (number of
> rows for example depends on number of arguments). Here is a simple
> example, but I will need colors and different fonts, different lines
> between in/out and so on.
>
> \startalignment[middle]
> \midaligned{\ss
> \bTABLE
> \bTR \bTD[nc=3] validateRegistration \eTD \eTR
> \bTR \bTD[nr=3] \rotate[rotation=90]{Input} \eTD \bTD parameter1 \eTD
> \bTD Beschreibung zu
> Parameter 1 \eTD \eTR
> \bTR \bTD parameter2 \eTD \bTD Beschreibung zu
> Parameter 2 \eTD \eTR
> \bTR \bTD parameter2 \eTD \bTD Beschreibung zu
> Parameter 2 \eTD \eTR
> \bTR \bTD[nr=3] \rotate[rotation=90]{Output} \eTD \bTD parameter1
> \eTD \bTD Beschreibung zu
> Parameter 1 \eTD \eTR
> \bTR \bTD parameter2 \eTD \bTD Beschreibung zu
> Parameter 2 \eTD \eTR
> \bTR \bTD parameter3 \eTD \bTD Beschreibung zu
> Parameter 3 \eTD \eTR
> \eTABLE}
> \stopalignment
>
>
> Are there any examples to do this more generally or better approaches
> to set this up?
>
> With regards,
>
> __Janko
Hi Janko,
\starttext
\placetable
{none}
{\setupTABLE[style=sans]
\setupTABLE[c][1][left=\rotate\bgroup,right=\egroup]
\setupTABLE[1][1][left=,right=]
\bTABLE
\bTR
\bTD[nc=3] validateRegistration \eTD
\eTR
\bTR
\bTD[nr=3] Input \eTD
\bTD parameter1 \eTD
\bTD Beschreibung zu Parameter 1 \eTD
\eTR
\bTR
\bTD parameter2 \eTD
\bTD Beschreibung zu Parameter 2 \eTD
\eTR
\bTR
\bTD parameter2 \eTD
\bTD Beschreibung zu Parameter 2 \eTD
\eTR
\bTR
\bTD[nr=3] Output \eTD
\bTD parameter1 \eTD
\bTD Beschreibung zu Parameter 1 \eTD
\eTR
\bTR
\bTD parameter2 \eTD
\bTD Beschreibung zu Parameter 2 \eTD
\eTR
\bTR
\bTD parameter3 \eTD
\bTD Beschreibung zu Parameter 3 \eTD
\eTR
\eTABLE}
\stoptext
you can use \placetable or any other coammand defined with \definfloat to
center your figures, tables ... Another positive effect is that setups are
local
to the current float.
Greetings from Ingolstadt
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 3042 bytes --]
[-- Attachment #2: Type: text/plain, Size: 139 bytes --]
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-04-13 7:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-13 7:03 macro for api-documentation Janko Hauser
2007-04-13 7:39 ` Wolfgang Schuster
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).