Last modified: 2014-03-24 05:09:24 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T29574, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27574 - PDF export: Use LaTeX formulas instead of inline images
PDF export: Use LaTeX formulas instead of inline images
Status: REOPENED
Product: MediaWiki extensions
Classification: Unclassified
Collection (Other open bugs)
unspecified
All All
: Normal enhancement with 2 votes (vote)
: ---
Assigned To: PediaPress Development Team
:
Depends on: 37933
Blocks: hidpi 41037
  Show dependency treegraph
 
Reported: 2011-02-20 00:06 UTC by Henning Thielemann
Modified: 2014-03-24 05:09 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Henning Thielemann 2011-02-20 00:06:05 UTC
Say I have the page
  https://secure.wikimedia.org/wikipedia/en/wiki/Septic_equation
then I create a PDF from it via "Print/export, Download as PDF".
In the generated document the formulas are obviously embedded as bitmap images.
How about using LaTeX formulas directly (that is enclosed in $..$)? What we have in <math>..</math> Wikipedia markup are actually LaTeX formulas.
Comment 1 Volker Haas 2011-06-24 12:51:43 UTC
This is not possible since the PDFs are generated using a toolkit that can not render LaTeX forumulas - therefore embedding them as images is the only solution.
Comment 2 Henning Thielemann 2011-06-24 20:50:31 UTC
Then I propose that PDFs are generated from LaTeX code that is generated from Wiki markup. I assumed, that it works already this way.
Comment 3 Brion Vibber 2011-06-24 20:56:52 UTC
Hmm, well really it *ought* to be possible to render the latex to EPS and then embed that into the PDF output, or some such. I don't know how hard that'd be to plug into the current mwlib & friends export arch though (might still need bitmaps for other formats?)
Comment 4 Henning Thielemann 2011-06-24 21:09:09 UTC
Problems with embedding EPS: You have to ensure that font size of text and formulas match and you should certainly avoid that math fonts are embedded in every EPS formula.
All this is easily avoided by generating PDF from LaTeX in one go.
Comment 5 Henning Thielemann 2011-06-24 21:12:50 UTC
I have found a LaTeX style called 'wiki.sty' that allows to typeset (currently very simple) Wiki markup by LaTeX:
http://www.latex-community.org/index.php?option=com_content&view=article&id=279:wikipedia-markup-for-latex&catid=44:news-latex&Itemid=111
Comment 6 Brion Vibber 2011-07-20 00:08:39 UTC
I'm reopening this as I agree that the bitmap math is not really very nice. It looks like the PDF output gets something circa 150dpi, which may be ok for on-screen reading (depending on how the viewer scales them), but looks pretty bad when zoomed in or blown up.
Comment 7 Henning Thielemann 2011-09-28 18:31:06 UTC
I found the project wb2pdf, that might solve the problem.
http://de.wikibooks.org/wiki/Benutzer:Dirk_Huenniger/wb2pdf
Comment 8 Dirk Huenniger 2011-09-29 10:19:44 UTC
Well my tool (wb2pdf) didn't work yesterday because there was a change in the mediawiki software. Now I have taken this into account, thus it works and you can generate LaTeX documents from wikis using the tool, found at the link given above. Especially you get the formulas embedded as vector graphics in the pdf file.
Comment 9 Platonides 2011-10-31 22:08:48 UTC
There are extensions which convert wikitext to LaTeX (and from there to pdf if needed).
http://www.mediawiki.org/wiki/Extension:Wiki2LaTeX
http://www.mediawiki.org/wiki/Extension:WikiPDF
Comment 10 Brion Vibber 2011-11-30 00:02:11 UTC
Note that we're also looking into switching our main math rendering to using MathJax (bug 32696) which uses MathML or HTML+CSS to render lovely equations in client-side web goodness.
Comment 11 Dirk Hünniger 2013-08-23 19:42:14 UTC
My tool is now part of debian sid. The package is called mediawiki2latex. So this problem is actually solved. The question is do you want to integrate into mediawiki. Currently its a standalone command line version. A GUI version for windows is also provided.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links