2

I have some documents in LyX/Latex and I want them as a wordpress post. I have tried converting latex to HTML (with latex2html) and afterwards, pasting that code in the wordpress editor but everything looks ugly. Do you know a better approach?

  • You may be interested in this project – egwene sedai Mar 16 '15 at 15:57
  • do you mean I can convert to XML and then paste in wordpress? I have already converted from LyX to XML and then pasted in wordpress, but results look awkward – Open the way Mar 16 '15 at 16:00
  • Wordpress has a a very good QuickLaTeX plugin for math expressions, however, it's not so sophisticated for other macros. – user31729 Mar 16 '15 at 16:28
  • well, i Just tried a very basic document (my CV) and could not import it correctly – Open the way Mar 19 '15 at 18:25
  • Can you tell us what looks wrong, or provide a screenshot? Without more detail on what the problem is and a minimum working example, we can't even begin to guess what might be wrong on the LaTeX side. – John Laviolette Mar 20 '15 at 0:04
2

Wordpress supports a couple different formatting options, including HTML and Markdown. You can convert LaTeX to either of these formats, as well as several others, using Pandoc. But it's probably not the low-level formatting that you are objecting to, but things like margins, header positions, colors, choice of font, and other elements that simply don't get translated, because they are dependent on the intended final form. LaTeX document class, \usepackage, and the like don't get translated to HTML, and on the HTML side, anything controlled by CSS generally won't get translated into LaTeX.

Wordpress has themes available that control the way the website looks, and the style of individual elements like headings are going to be controlled by adding a CSS class to the element, something like <P CLASS="myparagraphstyle">. You should really talk to other Wordpress users about this, since it probably has nothing to do with LaTeX.

  • thanks for the comment. I am desperate, do not know what to do! – Open the way Mar 19 '15 at 18:25
1

That's an old question, but I have stumbled upon it recently and thought that it might help pointing out to the link below

https://lucatrevisan.wordpress.com/2009/02/21/converting-latex-to-wordpress/

Seems like someone came-up with an automatic script in python that can translate math oriented latex to nice wordpress formatted text.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.