[TYPO3-doc] [ReST] Inline code markup question

Martin Bless m.bless at gmx.de
Thu Sep 27 09:36:13 CEST 2012


Hi François,

>Hi all (well, mostly Martin ;-) ),

:-)

In general I think here we are facing the task of having to develop our
own TYPO3 specific notations gradually.

>The ReST doc states that inline code markup can be achieved with a 
>double backquote, as in:
>
>This is some ``code``.

Better say: This is some ``inline literal``. It is the inline version of
literal blocks that are marked up by "::".

>In the migrated manuals we have the following construct instead:
>
>This is some :code:`code`.

Here we are saying: This `code` is interpreted and has the *meaning* of
code. It will be treated specially in output (for example "pygmented" =
syntax highlighted in PDF) or at least get a <span
class="code">...</span> or something in HTML output.


>What's the difference and why was the second form chosen?

What I know:

http://docutils.sourceforge.net/docs/user/rst/quickref.html#literal-blocks

`interpreted text`
The rendering and *meaning* of interpreted text is domain- or
application-dependent. It can be used for things like index entries or
explicit descriptive markup (like program identifiers).

``inline literal``
Normally rendered as monospaced text. Spaces should be preserved, but
line breaks will not be.





>And is there any meaning to single backquotes used without a role, as in:
>
>What does this `markup` do?

See http://sphinx.pocoo.org/markup/inline.html
"""
The default role (`content`) has no special meaning by default. You are
free to use it for anything you like, e.g. variable names; use the
default_role config value to set it to a known role.
"""

http://sphinx.pocoo.org/config.html#confval-default_role
"""
default_role
The name of a reST role (builtin or Sphinx extension) to use as the
default role, that is, for text marked up `like this`. This can be set
to 'py:obj' to make `filter` a cross-reference to the Python function
“filter”. The default is None, which doesn’t reassign the default role.

The default role can always be set within individual documents using the
standard reST default-role directive.

New in version 0.4.
"""

Example:
--------



More information about the TYPO3-project-documentation mailing list