Using the command window to convert LaTeX to HTML

2,994

You need to change to the folder containing filename.tex before executing htlatex filename.tex. Under Windows, this can be achieved using

cd path\to\the\folder

You can either use backslashes \ or forward slashes /. If your path contains spaces, you can either use TAB to let Windows auto-complete a partially completed folder name (that is, you type cd Docu and press TAB and Windows will auto-complete this to cd "Documents and Settings"), or use quotes to denote the folder names, for example

cd "Documents and Settings\Users\XYZ\Documents\My Documents"

Once in the correct folder, use

htlatex filename.tex
Share:
2,994

Related videos on Youtube

XYZ
Author by

XYZ

Updated on December 29, 2020

Comments

  • XYZ
    XYZ almost 3 years

    I am trying to convert a LaTeX file to HTML. I have tried to do this by typing cmd into the search bar of the START menu. When the black background box comes up, I type in htlatex filename.tex where instead of filename I write the name of the file. It then comes up,

    I can't find file filename.
    Please type another input file name.
    

    I am using MiKTeX and Windows 7.

    • Werner
      Werner almost 12 years
      You need to change to the folder that contains filename.tex using cd the\folder\that\has\the\file. Under Windows (7), if the folders have spaces in them, you can press <TAB> to auto-complete the folder name, or use quotes: cd "\Document and Settings\Users\XYZ\Documents\LaTeX", and then use htlatex filename.tex. Regardless, this is off-topic.
    • Marco Daniel
      Marco Daniel almost 12 years
      @Werner: I also think it is off-topic but you can provide an answer -- "First steps inside the command window".
    • N.N.
      N.N. almost 12 years
      This is your fourth question on TeX.SX and we welcome new questions. However, you have not accepted any answer to any of your questions here and you have neither voted on any of the answers you have gotten. Please see the faq for details on accepting and voting.