sphinx-doc / sphinx-doc/sphinx

Preexisting htmls are not embedding correctly (raw:: html)

Open
#10,403 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

builder:html type:question
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:
bad_embedding

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:
original_html

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.