jothepro / doxygen-awesome-css

Custom CSS theme for doxygen html-documentation with lots of customization parameters.
https://jothepro.github.io/doxygen-awesome-css/
MIT License
1.04k stars 118 forks source link

The line number is displayed in the wrong position #20

Closed chenboshuo closed 3 years ago

chenboshuo commented 3 years ago

image As shown in the image, the line number of the code snippets not perfectly

jothepro commented 3 years ago

What browser are you using?

chenboshuo commented 3 years ago

What browser are you using?


Google Chrome | 88.0.4324.182 (Official Build) (64-bit)
-- | --
Revision | 73ee5087001dcef33047c4ed650471b225dd8caf-refs/branch-heads/4324@{#2202}
OS | Linux
JavaScript | V8 8.8.278.17
User Agent | Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36

Thank you for your attention

jothepro commented 3 years ago

Sry, I didn't investigate that any further. Your browser seems up to date, so I cannot explain this right now. It would help if you could provide a repo / link so I can inspect what's broken... 🤔

chenboshuo commented 3 years ago

Thank you! You can clone my repo with this issue

git clone https://github.com/chenboshuo/learn_c51.git
cd learn_c51
git submodule init
git submodule update

Then open the docs/ and make the docx

cd docs
doxygen

The output file is put in /tmp/learn_c51/docs/build/doxygen_html, go to this file and open the alternative__single__string_8c_source.html using chrome(linux)

image

Maybe you can find this issue, and fix it, Thank you for your help

jothepro commented 3 years ago

I found the problem. In your Doxyfile you defined doxygen-awesome.css twice. Remove the definition of HTML_STYLESHEET and everything should work fine! 💪

HTML_STYLESHEET        = doxygen-awesome-css/doxygen-awesome.css # <-- Remove this
HTML_EXTRA_STYLESHEET  = doxygen-awesome-css/doxygen-awesome.css doxygen-awesome-css/doxygen-awesome-sidebar-only.css

Btw. the doxygen documentation discourages the usage HTML_STYLESHEET:

Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as it is more robust and this tag (HTML_STYLESHEET) will in the future become obsolete.

Thx for you patience and good luck with your project, I can only imagine the flashy animations that your code creates! 🙈

jothepro commented 3 years ago

Pls close this issue if my suggestion resolves your problem.

chenboshuo commented 3 years ago

Thank you for Your help, it works.