scripts icon indicating copy to clipboard operation
scripts copied to clipboard

[BUG] Latex script doesnt work

Open jgardona opened this issue 1 year ago • 12 comments

Hello, good morning.

The latex script doen't works on windows 11. I had read the other bugs about latex here, and think its happening again in windows 11 x64 24h2.

image

Log panel didnot show nothing

image

Expected behavior

To show properly latex.

jgardona avatar Dec 21 '24 13:12 jgardona

Can you please mention the authors of the script.

pbek avatar Dec 21 '24 19:12 pbek

Can you please mention the authors of the script.

{
  "name": "Latex Math",
  "identifier": "latex-math",
  "script": "latex-math.qml",
  "version": "0.0.6",
  "platforms": ["linux", "macos", "windows"],
  "minAppVersion": "20.8.0",
  "authors": ["@r00tr4v3n","@Aganel"],
  "description" : "This script creates LaTex images on the fly with KLatexFormula. e. g. $x^2$ or $[22] x^2$ to create larger images. \nThe images are created once and reused as long as the formula does not change. If you changed the preamble you have to clean the cache folder to regenerate the images. \nDon't make it too complicated, this size works though: $[33] \\frac{1}{2\\pi}\\int{-\\infty}^{\\infty}e^{-\\frac{x^2}{a}}dx$\nHint: You might want to add the $-signs after writing the formula to prevent intermediate image generation."
}

jgardona avatar Dec 21 '24 19:12 jgardona

I installed it in two ways, by the scripts settings, using the qownotes to download it. And did it manually also when I saw the issue.

@Aganel and @r00tr4v3n

jgardona avatar Dec 21 '24 19:12 jgardona

Is there any useful log output if you enable the log panel (see Window / Panels)? Please make sure you also enable debug logging in the log panel (by right-clicking on the panel and selecting Debug in Options).

pbek avatar Dec 22 '24 12:12 pbek

Is there any useful log output if you enable the log panel (see Window / Panels)? Please make sure you also enable debug logging in the log panel (by right-clicking on the panel and selecting Debug in Options).

Hello, here is it. The log panel with debug option on

[10:57:33] [debug] currentLocalPath - 'currentLocalPath': "C:/Users/jcbri/Notes"
[10:57:33] [scripting] [LaTex] got cmds: 1
[10:57:33] [scripting] [LaTex] exec1: "/usr/bin/klatexformula" -f "#000000" -b "-" --base64arg --preamble="XHVzZXBhY2thZ2V7YW1zbWF0aH1cdXNlcGFja2FnZXthbXNzeW1ifVx1c2VwYWNrYWdle2Ftc2ZvbnRzfVxuZXdjb21tYW5ke1xteWNtZH1bMV17XGJmIFx1bmRlcmxpbmV7IzF9fQ==" --base64arg --latexinput="XGJmICBhICsgYiA9IGM=" --dpi 600 --quiet 1 --output C:/Users/jcbri/AppData/Local/PBE/QOwnNotes/cache/scripts/latex-math/c11f24ab538e915889a96fb7773c85c4.png
[10:57:33] [scripting] [LaTex] remaining: 0
[10:57:33] [scripting] [LaTex] done

image

jgardona avatar Dec 22 '24 14:12 jgardona

@Aganel, @r00tr4v3n, does that help?

pbek avatar Dec 22 '24 14:12 pbek

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jan 22 '25 02:01 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Feb 06 '25 02:02 github-actions[bot]

This also happens in fedora linux 41

Image

jgardona avatar Mar 10 '25 11:03 jgardona

I tested it a few months ago with EndeavourOS Linux, and it just worked out of the box. Since then, I have newer tested it again, as my main platform for writing is MacOS, where I never got it to work.

rkirner avatar Apr 27 '25 17:04 rkirner

I can confirm that there are currently also problems with [Latex Math] on MacOS. I installed KLatexFormula and set the [executable] to /Applications/klatexformula.app/Contents/MacOS/klatexformula

Whenever I select a note with formulas, QOwnNotes takes a high CPU load and does not render the formulas. When I then select a different note without formulas, QOwnNotes becomes responsive again.

rkirner avatar Apr 27 '25 17:04 rkirner

https://github.com/qownnotes/scripts/pull/266 could be interesting. Does anyone want to test that PR?

pbek avatar May 04 '25 05:05 pbek