Skip to content

Commit

Permalink
regenerate the manual
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeInnes committed Jul 31, 2015
1 parent be7f7c6 commit dfc7168
Show file tree
Hide file tree
Showing 18 changed files with 4,540 additions and 50 deletions.
5 changes: 5 additions & 0 deletions doc/devdocs/cartesian.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ Macro reference
~~~~~~~~~~~~~~~

.. function:: @nloops N itersym rangeexpr bodyexpr

::
@nloops N itersym rangeexpr preexpr bodyexpr
@nloops N itersym rangeexpr preexpr postexpr bodyexpr

Expand Down Expand Up @@ -191,6 +193,8 @@ Macro reference
bounds-checking.

.. function:: @nif N conditionexpr expr

::
@nif N conditionexpr expr elseexpr

Generates a sequence of ``if ... elseif ... else ... end`` statements. For example::
Expand All @@ -200,6 +204,7 @@ Macro reference
would generate::

if i_1 > size(A, 1)

error("Dimension ", 1, " too big")
elseif i_2 > size(A, 2)
error("Dimension ", 2, " too big")
Expand Down
Loading

5 comments on commit dfc7168

@yuyichao
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems that this commit messes something up?

@MikeInnes
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it looks like RST doesn't like code blocks unless there's a blank line after the ::. Another one of those nice features which is apparently just so intuitive that it doesn't need writing down anywhere.

@yuyichao
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems that this is actually written down. Although as important as it is, it is usually only the last thing mentioned....

Sphinx doc

Literal code blocks (ref) are introduced by ending a paragraph with the special marker ::. The literal block must be indented (and, like all paragraphs, separated from the surrounding ones by blank lines):

Also in the ref above http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#literal-blocks

Blank lines are required before and after a literal block, but these blank lines are not included as part of the literal block.

@yuyichao
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, I guess we can easily fix this.

@MikeInnes
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not obvious to me from the wording that the "literal block" doesn't include the preceding ::. It has a certain consistency if you think of the :: as a blank paragraph, but that's not at all intuitive. Either way, it's fixed in #12435.

Please sign in to comment.