sphinx-simplepdf icon indicating copy to clipboard operation
sphinx-simplepdf copied to clipboard

Code formatting with hyphen creates two lines

Open WalterHof opened this issue 1 year ago • 0 comments

Texts formatted as code that contain a hyphen are displayed on two lines in the PDF. For example: zypper ps -s is the -s under the zypper ps. Everything is correct in the HTML output.

The code:

SuSE - ``zypper ps -s``
-----------------------

``zypper ps -s`` zeigt Dienste die neu gestartet werden sollen.

.. code-block:: bash
   :linenos:
   :caption: SuSE prüfen mit ``zypper ps -s``

    zypper ps -s

The PDF output:

Image

You see 3 times where the -s is below zypper ps.

The HTML output is OK:

Image

Environment:

sphinx: 8.1.3 sphinx_simplepdf: 1.6.0 weasyprint: 63.1 python 3.13.1 Windows 11

Any idea what I am doing wrong?

WalterHof avatar Mar 08 '25 10:03 WalterHof