Search code examples
unicodepython-sphinxrestructuredtext

restructuredText / Sphinx: explicit horizontal space


How can I explicitly insert a horizontal spacing in Sphinx/reStructuredText?

The original problem is that I want to have a vocalization sign ُ to appear over space, but it is always displayed over the first letter of the next word.


Solution

  • Assuming that is "U+064F : ARABIC DAMMA", it appears to be a combination character, which means, if I read this correctly, that it cannot be displayed inline and separate from another character, unless you trick it out with a non-breaking space replacement. I grabbed an example from this answer.

    this is |damma| |nbsp| damma
    
    .. |damma|  unicode:: U+064F .. ARABIC DAMMA
    .. |nbsp|   unicode:: U+00A0 .. NO-BREAK SPACE
    

    I was able to display it in isolation using either a .. code-block:: directive or as its own paragraph.

    .. code-block:: text
    
        ُ
    
    
    ُ
    

    damma