Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several formulas from mathpublish #433

Open
Juergen-aus-Zuendorf opened this issue Apr 23, 2021 · 7 comments
Open

Several formulas from mathpublish #433

Juergen-aus-Zuendorf opened this issue Apr 23, 2021 · 7 comments
Labels

Comments

@Juergen-aus-Zuendorf
Copy link
Contributor

Hello,

when I write several formulas one below the other, everything is ok on the screen. But in the pdf output the formulas overlay each other:
Example from the plugin page:

<m>S(f)(t)=a_{0}+sum{n=1}{+infty}{a_{n} cos(n omega t)+b_{n} sin(n omega t)}</m> 
<m 8>delim{lbrace}{matrix{3}{1}{{3x-5y+z=0} {sqrt{2}x-7y+8z=0} {x-8y+9z=0}}}{ }</m>
<m 32>delim{|}{{1/N} sum{n=1}{N}{gamma(u_n)} - 1/{2 pi} int{0}{2 pi}{gamma(t) dt}}{|} <= epsilon/3</m>

Result:
2021-04-23 14_27_47-spielplatz-10 - PDF-XChange Editor

For pdf generation I use the default template.

So what can I do?

Best regards
Juergen

@Klap-in
Copy link
Collaborator

Klap-in commented Apr 23, 2021

Here you could find more how plugins can support exporting to pdf
https://www.dokuwiki.org/plugin:dw2pdf:exportsupport

@Juergen-aus-Zuendorf
Copy link
Contributor Author

In version 2020-08-20 of the dw2pdf plugin it worked

@Klap-in
Copy link
Collaborator

Klap-in commented Apr 26, 2021

I’m sorry, you mean that an older version was working, but the newest not any more?

@Juergen-aus-Zuendorf
Copy link
Contributor Author

Juergen-aus-Zuendorf commented Apr 26, 2021

Yes, that's it !

Here is the output with the older versions:
grafik

@Juergen-aus-Zuendorf
Copy link
Contributor Author

Notice:
I've described the problem analogously at issue #15 of the mathpublish plugin

@Klap-in
Copy link
Collaborator

Klap-in commented Oct 12, 2022

The html output, shown by adding &debughtml=html to the export url, does look logically?

@Juergen-aus-Zuendorf
Copy link
Contributor Author

Juergen-aus-Zuendorf commented Oct 13, 2022

Here is a screenshot of the html-output using the example from the plugin page:
image
... with this HTML code:

<h1><bookmark content="Spielplatz" level="0" /><a name="playgroundplayground__spielplatz">Spielplatz</a></h1>
<div class="level1">

<p>
<img src="dw2pdf:///var/www/html/wiki/data/cache/7/75e9cfb249c4a779a3b1055c97d22e74.mathpublish.png"
                         class=" mathpublish"
                         alt="S(f)(t)=a_{0}+sum{n=1}{+infty}{a_{n} cos(n omega t)+b_{n} sin(n omega t)}"
                         title="S(f)(t)=a_{0}+sum{n=1}{+infty}{a_{n} cos(n omega t)+b_{n} sin(n omega t)}"
                         style="display: inline-block; vertical-align:-22px" />
</p>

<p>
<img src="dw2pdf:///var/www/html/wiki/data/cache/b/b1c71eef23f8ae2b6e200cc7b4e1aa73.mathpublish.png"
                         class=" mathpublish"
                         alt="delim{lbrace}{matrix{3}{1}{{3x-5y+z=0} {sqrt{2}x-7y+8z=0} {x-8y+9z=0}}}{ }"
                         title="delim{lbrace}{matrix{3}{1}{{3x-5y+z=0} {sqrt{2}x-7y+8z=0} {x-8y+9z=0}}}{ }"
                         style="display: inline-block; vertical-align:-28px" />
</p>

<p>
<img src="dw2pdf:///var/www/html/wiki/data/cache/8/81ef9243903efdbfd366fe38e569a0ac.mathpublish.png"
                         class=" mathpublish"
                         alt="delim{|}{{1/N} sum{n=1}{N}{gamma(u_n)} - 1/{2 pi} int{0}{2 pi}{gamma(t) dt}}{|} &lt;= epsilon/3"
                         title="delim{|}{{1/N} sum{n=1}{N}{gamma(u_n)} - 1/{2 pi} int{0}{2 pi}{gamma(t) dt}}{|} &lt;= epsilon/3"
                         style="display: inline-block; vertical-align:-71px" />
</p>

</div>

splitbrain added a commit to cosmocode/dokuwiki-plugin-mathpublish that referenced this issue Jan 2, 2023
It seems that manually adjusting the vertical alignment is no longer
needed, since inline-block is doing the correct thing already.

For exporting to PDF a higher resolution image is needed. In theory this
could also be used in the browser, but on "normal" displays that looks
even shittier. The proper approach would probably be to render the image
in multiple size and use a source set...

Ideally the underlying library would need to be rewritten to use SVG.

Addresses splitbrain/dokuwiki-plugin-dw2pdf#433, #14 and #15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants