On 2012-01-09, andreash wrote:
> Hi Sphinx experts,

> how can I make a substitution depending on the output-format?

> Basically, I would like to have something like this::

>    if html:
>       |CLICK| unicode:: U+21E8
>    elif latex:
>       |CLICK| raw:: latex

>                  $\LongRightArrow$


Ugly workaround:

.. |CLICK| raw:: latex

    $\LongRightArrow$

.. |CLACK| raw:: html

    ⇨

Now |CLICK|\ |CLACK| here!

Another option would be to add a conversion for U+21E8 in the
LaTeX preamble. The latex writer uses e.g.

  '\\DeclareUnicodeCharacter{00A0}{\\nobreakspace}',

* I recommend \ensuremath{\LongRightArrow} to get this working in both
  text and math.
* of course this requires that you use utf8 encoding for
  the latex source. 
* Untested!

Günter

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-dev@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to