4

Can I compile .tex to .html from within AUCTeX? What are the keybindings?

Thanks!

5

Well, you can do it directly from emacs without having to use AUCTeX: M-x compile and then change the Compile command: to the appropriate latex2html command. If you are going to be doing the .html rendering a lot, you can add the following code to the end of your .tex file:

% Local Variables:
% compile-command: "latex2html yourfile.tex"

From then on, whenever you load your .tex file the M-x compile command will default to the correct latex2html command.

You can bind M-x compile to a keyboard shortcut by adding something like (global-set-key "\C-xc" 'compile) to your .emacs file.

  • will this work alongside Auctex? Currently, it loads PDFLatex major mode when I open a .tex file. – David LeBauer Nov 30 '10 at 18:27
  • I am fairly certain that it will not affect AUCTeX at all. – ESultanik Nov 30 '10 at 18:32
  • Also, you can obviously put whatever command you want (e.g., htlatex) as the compile-command; it does not need to be latex2html. – ESultanik Nov 30 '10 at 21:40

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.