KosmosisDire / obsidian-webpage-export

Export html from single files, canvas pages, or whole vaults. Direct access to the exported HTML files allows you to publish your digital garden anywhere. Focuses on flexibility, features, and style parity.
https://docs.obsidianweb.net/
MIT License
834 stars 70 forks source link

[Bug] [1.8.01]: LaTex displayed wrongly/broken #398

Open lvlanson opened 7 months ago

lvlanson commented 7 months ago

What happened?

After export mathematical expressions displayed in latex are displayed wrongly

Reproduction

-> \left( \dfrac{1}{2}\right) braces -> \begin{pmatrix} 1 \ 1 \ 1 \ 1 \ 1\end{pmatrix} matrices/vectors -> \underbrace{a + b + c + d}_{=e}

Last Working Version

Don't know, new to this

Version

1.8.01

Operating System

Linux Manjaro

Obsidian Version

1.5.8

Which browsers can you reproduce this in?

Firefox, Chrome

Relevant log output

Also Vivaldi and Brave Browser (which are chromium based)

Additional Info

Missing underbraces Screenshot from 2024-03-09 11-58-38 Parentheses too small Screenshot from 2024-03-09 11-58-19 Integral too small Screenshot from 2024-03-09 11-58-08

No response

KosmosisDire commented 7 months ago

Hi you didn't include the debug info, could you copy the debug info from the plugin settings page and paste it here that would be helpful thanks!

lvlanson commented 7 months ago

I am sorry that I oversaw this. Here you go

Log: [WARNING] For Excalidraw embed support, set the embed mode to "Native SVG" in the Excalidraw plugin settings. [INFO] Including stylesheet: ADMONITIONS_CUSTOM_STYLE_SHEET [WARNING] No existing export metadata found. All files will be exported. [WARNING] No existing search index found. All files will be exported. [WARNING] No existing RSS feed found. All files will be exported. [INFO] Using "linear differential equations" header as title because it was H1 at the top of the page [INFO] Using "state space models (ssm)" header as title because it was H1 at the top of the page [INFO] Using "qips (quantized inner product search)" header as title because it was H1 at the top of the page [INFO] Closing render window

Settings: settingsVersion --------- 1.8.01 makeOfflineCompatible false inlineAssets ------------ true includePluginCSS 1 plugins included includeSvelteCSS -------- true titleProperty PhD Studies Thomas Davies customHeadContentPath --- faviconPath
documentWidth ----------- 40em sidebarWidth 20em minOutlineCollapse ------ 2 startOutlineCollapsed false allowFoldingHeadings ---- true allowFoldingLists true allowResizingSidebars --- true logLevel warning minifyHTML -------------- true makeNamesWebStyle false onlyExportModified ------ true deleteOldFiles true addThemeToggle ---------- true addOutline true addFileNav -------------- true addSearchBar false addGraphView ------------ false addTitle true addRSSFeed -------------- true siteURL https://www.staff.hs-mittweida.de/~davies/intranet/ authorName -------------- Thomas Davies vaultTitle PhD Studies exportPreset ------------ documents openAfterExport true graphAttractionForce ---- 1 graphLinkLength 10 graphRepulsionForce ----- 150 graphCentralForce 3 graphEdgePruning -------- 100 graphMinNodeSize 3 graphMaxNodeSize -------- 7 showDefaultTreeIcons false emojiStyle -------------- Native defaultFileIcon lucide//file defaultFolderIcon ------- lucide//folder defaultMediaIcon lucide//file-image exportPath -------------- /home/thomas/Documents/HTML_EXPORT filesToExport 0

Enabled Plugins: Zotero Integration Citations Obsidian Link Converter Admonition Extended MathJax LanguageTool Integration TikZJax Execute Code Codeblock Customizer css snippets Icon Shortcodes CSS Editor Obsidian Git Excalidraw Advanced Tables Duplicate Line Latex Suite Desmos Pandoc Plugin Marp Slides Webpage HTML Export

KosmosisDire commented 7 months ago

If you use the online web server export is it also broken? Or is it only broken in HTML Documents mode?

lvlanson commented 7 months ago

The math looks fixed with the web server export.

KosmosisDire commented 7 months ago

Okay that is good to know. I will check it out. It is also possible that this is fixed in the beta version if you want to try that out.

lvlanson commented 7 months ago

I will wait until it is officially uploaded. I am happy to confirm back when it is.

KosmosisDire commented 7 months ago

Okay, I will be sure to update this issue once a stable version is released, and whether I was able to reproduce and fix the issue.

lvlanson commented 7 months ago

Let me know if I can assist somehow anytime, I am happy to do what I can.

KosmosisDire commented 7 months ago

Can you take a screenshot of the developer console in the broswer after opening the export? You can open the developer console using Ctrl+Shift+J or Ctrl+Shift+i

lvlanson commented 7 months ago

Screenshot from 2024-03-09 13-18-24 Screenshot from 2024-03-09 13-18-44

KosmosisDire commented 7 months ago

Sorry, not the console in obsidian, the console in the browser. Like open the .html files that are having this problem and then open the browser dev tools in chrome

lvlanson commented 7 months ago

Got you Screenshot from 2024-03-09 13-22-29

KosmosisDire commented 7 months ago

Okay that is what I suspected. Do you have a lib/fonts/ folder in the export folder?

lvlanson commented 7 months ago

yes image

lvlanson commented 7 months ago

it looks like filenames should not be uppercase, or the resources should be loaded using uppercase filenaming on first glance.

KosmosisDire commented 7 months ago

I am curious what happens if you rename MathJax_Main-Regular.woff to use lowercase letters. Does one of those errors go away?

KosmosisDire commented 7 months ago

I think probably windows doesn't care about the case of the file but maybe linux does. Either way I am pretty sure this bug is fixed in the beta version.

lvlanson commented 7 months ago

renaming does not help, it has problem loading the given resources. The resources exists and I can find them over the developer options.

Screencast from 2024-03-09 13-44-08.webm

KosmosisDire commented 7 months ago

Those three fonts don't effect the latex, those are just basic fonts from obsidian. Does the latex still not work?

lvlanson commented 7 months ago

The same behavior can be observed for the latex ones, they are now named properly, but can't be loaded.

I showed this example, because I didn't alter these files, but they can't be loaded aswell. So there must be a problem in loading these files in general.

KosmosisDire commented 7 months ago

Latex.zip

Can you try opening the html file zipped here and tell me if it loads correctly for you?

lvlanson commented 7 months ago

image

I consider this rendered correctly

KosmosisDire commented 7 months ago

Okay, then I beleive the beta version should work. I won't look into this more since it will work once that is released. I will notify you here once I release it in stable.