sphinx-doc / sphinx-doc/sphinx
Preexisting htmls are not embedding correctly (raw:: html)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
My documentation largely depends on the raw:: html method of embedding preexisting html files. For example:
.. raw:: html
:file: ../another_directory/to_embed.html
However, the rendering of the embedded file looks VERY different from the original html file. Here is a snapshot of one of the sphinx rendered embedded htmls:

How to Reproduce
$ git clone https://github.com/iqcToolbox/iqcToolbox.git
$ python3 -m pip install sphinx_rtd_theme
$ cd iqcToolbox/docs
$ git checkout docs-003-delta_user_documentation
$ make html
$ firefox build/html/user.html
$ firefox mat_html/userUlft.html
The last firefox command shows you what you should be seeing, whereas the 2nd to last shows you what sphinx is producing.
Expected behavior
To compare against the previously posted image, this is what the original html produces:

Your project
https://github.com/iqcToolbox/iqcToolbox/tree/docs-003-delta_user_documentation/docs
Screenshots
No response
OS
Ubuntu 20.04
Python version
3.8.10
Sphinx version
1.8.5
Sphinx extensions
No response
Extra tools
No response
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue from the iqcToolbox docs checkout using the raw:: html directive, make html, and the generated build/html/user.html, then compare it with mat_html/userUlft.html. Trace how the preexisting HTML file is embedded and determine what would make the rendered result match the original HTML; done means the two renderings agree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100