digitalmars.D.learn - Sections in Ddoc?
- Philippe Sigaud <philippe.sigaud gmail.com> Aug 01 2010
- Lutger <lutger.blijdestijn gmail.com> Aug 02 2010
- Philippe Sigaud <philippe.sigaud gmail.com> Aug 02 2010
Hi, as per Nick's advice, I was reading on Goldie's GenDocs template documentation system: http://www.semitwist.com/goldiedocs/v0.3/Docs/Tools/GenDocs/TemplateFormat/ That's a nice work, and I saw there something I'd like to do with Ddocs: sections. As in, document sections. Ideally there are some modules I'd like to document that way: Module Name some general documentation on the module, what its use is supposed to be, the things to do, etc. Imagine an algorithm module, for example. Section #1 - Sorting. general documentation on the section, a specific part of the module. Say, sorting. functions documentation for section 1. Section #2 - Finding. another subject there, say finding elements in a range... General explanations on the modules assumptions, trade-off, etc. functions documentation for section 2. an so on... But I cannot do that with DDocs. Or can I? Does anyone know a way to do this? (ideally, I'd also like a summary-like part, like in Wikipedia :) ) Philippe
Aug 01 2010
Philippe Sigaud wrote:Hi, as per Nick's advice, I was reading on Goldie's GenDocs template documentation system: http://www.semitwist.com/goldiedocs/v0.3/Docs/Tools/GenDocs/TemplateFormat/ That's a nice work, and I saw there something I'd like to do with Ddocs: sections. As in, document sections. Ideally there are some modules I'd like to document that way: Module Name some general documentation on the module, what its use is supposed to be, the things to do, etc. Imagine an algorithm module, for example. Section #1 - Sorting. general documentation on the section, a specific part of the module. Say, sorting. functions documentation for section 1. Section #2 - Finding. another subject there, say finding elements in a range... General explanations on the modules assumptions, trade-off, etc. functions documentation for section 2. an so on... But I cannot do that with DDocs. Or can I? Does anyone know a way to do this? (ideally, I'd also like a summary-like part, like in Wikipedia :) ) Philippe
It isn't supported out of the box. You could further process ddoc output, I had something working nicely by spitting out xml instead of html and then using xquery to generate the docs, but am too much pressed for time to finish it. A more lightweight approach is to insert a css class though a custom ddoc macro: API_GROUP = <span class="$0"/> From there you can use css selectors for styling. I'm not sure how far you can get with just css. A wee bit of jquery might help. It will be pretty awkard anyway I suppose.
Aug 02 2010
--0016e6d50b4241b22a048cdbc0b1 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Aug 2, 2010 at 09:18, Lutger <lutger.blijdestijn gmail.com> wrote:It isn't supported out of the box. You could further process ddoc output, I had something working nicely by spitting out xml instead of html and then using xquery to generate the docs, but am too much pressed for time to finish it. A more lightweight approach is to insert a css class though a custom ddoc macro: API_GROUP = <span class="$0"/> From there you can use css selectors for styling. I'm not sure how far you can get with just css. A wee bit of jquery might help. It will be pretty awkard anyway I suppose.
OK, thanks. I'll admit it readily: I've barely touched css, and I don't have the faintest idea what a selector is, nor how to use jquery. So I'll write it down as something that you cannot do easily and hope for brighter tomorrows. Philippe --0016e6d50b4241b22a048cdbc0b1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div class=3D"gmail_quote">On Mon, Aug 2, 2010 at 09:18, Lutger <span dir= =3D"ltr"><<a href=3D"mailto:lutger.blijdestijn gmail.com">lutger.blijdes= tijn gmail.com</a>></span> wrote:<br><blockquote class=3D"gmail_quote" s= tyle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> <div><div></div><div class=3D"h5"><br> </div></div>It isn't supported out of the box. You could further proces= s ddoc output, I had<br> something working nicely by spitting out xml instead of html and then using= <br> xquery to generate the docs, but am too much pressed for time to finish it.= <br> <br> A more lightweight approach is to insert a css class though a custom ddoc m= acro:<br> <br> API_GROUP =3D <span class=3D"$0"/><br> <br>From there you can use css selectors for styling. I'm not sure how far =
get with just css. A wee bit of jquery might help. It will be pretty awkard= <br> anyway I suppose.<br> </blockquote></div><br><div>OK, thanks. I'll admit it readily: I've= barely touched css, and I don't have the faintest idea what a selector= is, nor how to use jquery. So I'll write it down as something that you= cannot do easily and hope for brighter tomorrows.</div> <div><br></div><div>Philippe</div><div><br></div> --0016e6d50b4241b22a048cdbc0b1--
Aug 02 2010









Lutger <lutger.blijdestijn gmail.com> 