Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a bunch of tutorials I have written and they are written in Latex. Now I want to convert them to HTML and to Blogger also.

I heard about Pandoc and decided to try it. Below are my results :

My original latex file : https://github.com/abidrahmank/OpenCV2-Python-Tutorials/blob/master/thresholding/threshold.tex

HTML created from that file : https://github.com/abidrahmank/OpenCV2-Python-Tutorials/blob/master/thresholding/threshold.html

Below is the command I used to create HTML :

pandoc -s  --listings --latexmathml threshold.tex -o threshold.html

Problem 1 :

If you check the HTML file, you can see there are some latex labels and parameters printed out near images and equations. How to avoid that?

Problem 2 :

There is no code highlighting. How can I add code highlighting in HTML?

Problem 3 :

When I copied this HTML to blogger, it doesn't work. How can I create a blogger friendly HTML file using Pandoc.

Problem 4 :

Is there any other better option other than Pandoc ?

share|improve this question

closed as off-topic by Joseph Wright Aug 3 at 17:02

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – Joseph Wright
If this question can be reworded to fit the rules in the help center, please edit the question.

1  
for 4) try htlatex threshold "xhtml, mathml, charset=utf-8" " -cunihtf -utf8" –  michal.h21 May 19 '13 at 8:10
    
wow.. that is a coincidence, I am just trying it now... –  Abid Rahman K May 19 '13 at 8:11
    
@michal.h21 : that is great, It looks better than pandoc. But a plenty of extra files are created. Pandoc has a --standalone option for that. anything like that for htlatex? –  Abid Rahman K May 19 '13 at 8:14
    
do you mean files with extensions like .lg, .4tc, 4ct, etc.? There is no option to not generate them, but you can delete them with some script –  michal.h21 May 19 '13 at 9:46
    
A better option is to write in markdown and then convert to html and latex with pandoc. I've found that gives better results. Also, writing in markdown is simpler for simple files. I realise that's not helpful for the current situation... –  Seamus May 19 '13 at 10:02