在 shell 脚本(bash、mac)中运行 htlatex

在 shell 脚本(bash、mac)中运行 htlatex

我只是想运行一个命令:

htlatex texfilename "xhtml,charset=utf-8"

在终端命令行中,它运行良好。如果我创建一个如下所示的 shell 脚本文件:

#!/bin/bash
htlatex texfilename "xhtml,charset=utf-8"

它产生以下内容:

This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
 restricted \write18 enabled.
entering extended mode
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman-x-2012-05-30, ngerman-x-2012-05-30, afrikaans, ancientgreek, ibycus, arabi
c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis
h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis
h, french, friulan, galician, german, ngerman, swissgerman, monogreek, greek, h
ungarian, icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, ma
rathi, oriya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian, 
kurmanji, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk,
 polish, portuguese, romanian, romansh, russian, sanskrit, serbian, serbianc, s
lovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian, uppersorbian, 
welsh, loaded.

*

然后停止。

我该如何实现它?我应该给一些选项吗htlatex?我正在使用 Mac。

答案1

我删除了“”,并且效果很好。

#!/bin/bash  
htlatex texfilename xhtml,charset=utf-8

谢谢。

相关内容