1

I have begun to post in a new social network called PeakD, here, I can create several posts using HTML as an option. I don't know HTML, I would like not to have to learn HTML. But I know LaTex, I have been looking for a way to take my code in LaTex and translate it into an HTML code, then, copy and paste the result on the page, in this way I hope to get my equations and formulas in the post, I don't know if this can be possible, but I.'m going to try. This is my first question.

Is it possible to pass the code from LaTex to HTML and then copy and paste it into this page that says it has an HTML mode?

enter image description here

As you can see, the syntax to write on the page is very similar to Stack Overflow

I have been using Texmaker to code in latex long time ago so I look into its options to find some tool that could help me, I found something called Latex4htm, but I wasn't able to make it worked

enter image description here

When I hit the button "iniciar" (enter or go) this appears

enter image description here

Therefore, nothing happens, this is my second question.

How can I turn a LaTex code into an HTML code? or how can I do Texmaker does the conversion?

Thank you in advance.

VEBP
  • 59
  • 7

1 Answers1

0

You could use pandoc (documentation) at the terminal in the following way:

pandoc input.tex -o output.html

If you do not include the -o argument, the output will be displayed on the terminal. You might also include -t html5 if you want to make sure the output is in html.

Be aware that you might have to make some tweaks on the output if your .tex input is too complex.

  • Greetings, thanks for your answer, I'm actually awkward working with "non-common programs", so I have to ask you. – VEBP Aug 10 '20 at 23:19
  • Once I have extracted the file, I only have to click in the name pandoc? then, to have ready the document LaTex in a .txt file in the same folder, then execute the command? – VEBP Aug 10 '20 at 23:21
  • I don't know exactly what to do with I downloaded – VEBP Aug 10 '20 at 23:41
  • 1
    If you are using a UNIX system (MacOS or Linux), you should 1. Open a terminal 2. Use `cd` to navigate to the folder where the `.tex` document is. 3. Use the command I showed in the answer. If you are on Windows, you should: 1. Open the PowerShell 2. Use `cd` to navigate to the folder where the `.tex` document is. 3. use the command `pandoc.exe -i input.tex` (basically chaning `pandoc` to `pandoc.exe`). – caiobaguida Aug 12 '20 at 00:26