← Back to team overview

yade-dev team mailing list archive

Re: newline in class attribute docs

 

> chystam se na commit Peri3dControlleru, zrovna dodelavam dokumentaci, a
> zajimalo by me, jestli jde do .hpp do docstringu (viz nize) vlozit novy
> radek? povedlo se mi ze nn zacne novy radek, ale s mezerou (jakoby novy
> odstavec). Jde neco bez mezery?

[this is a question appropriate for the list]

Hi Jan,

you can insert newline in docstring using usual c escape sequence \n. New
paragraph is created with \n\n, though you have to be careful to *not*
leave space after the second \n -- otherwise the line will be indented by
that space and sphinx will ,ake an indented block instead of plain new
paragraph. Therefore: end of first paragraph\n\nstart of new paragraph.

Currently, though, Peri3dController is documented in py/_extraDocs.py,
which is easier to read and write (python multi-line strings) than in c. Be
also careful to not document in both places; _extraDocs.py will overwrite
the doc given in c++, that is explain the that file.

Cheers, Vaclav