tex4ebook: 設定ファイルでコンパイル中にエラーが発生しました

tex4ebook: 設定ファイルでコンパイル中にエラーが発生しました

私のmyconfig.cfgコードブロックは次のとおりです:

\Preamble{xhtml}   
\Configure{AddCss}{blitz-lite.css}
\begin{document}
\EndPreamble

私のコマンドラインはtex4ebook -c myconfig test2.tex -f epub3 mathml 次のようになります:

[STATUS]  tex4ebook: Conversion started
[STATUS]  tex4ebook: Input file: test2.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7250 64-bit)
entering extended mode
[ERROR]   htlatex: Compilation errors in the htlatex run
[ERROR]   htlatex: Filename     Line    Message
[ERROR]   htlatex: ?    4        LaTeX Error: Missing \begin{document} in `myconfig.cfg'.
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7250 64-bit)
entering extended mode
[ERROR]   htlatex: Compilation errors in the htlatex run
[ERROR]   htlatex: Filename     Line    Message
[ERROR]   htlatex: ?    4        LaTeX Error: Missing \begin{document} in `myconfig.cfg'.
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7250 64-bit)
entering extended mode
[ERROR]   htlatex: Compilation errors in the htlatex run
[ERROR]   htlatex: Filename     Line    Message
[ERROR]   htlatex: ?    4        LaTeX Error: Missing \begin{document} in `myconfig.cfg'.
        1 file(s) copied.
        1 file(s) copied.
        1 file(s) copied.
        1 file(s) copied.
        1 file(s) copied.
        1 file(s) copied.
        1 file(s) copied.
        1 file(s) copied.
HTML Tidy for Windows released on 25 March 2009
        1 file(s) copied.
[STATUS]  tex4ebook: Conversion finished

\begin{document}設定ファイル内に欠落していません。ファイルを としてメモ帳に保存しましたUTF-8

blitz-lite.css作業ディレクトリにも保存しました。

何が問題なのでしょうか?

更新: @michal.h21は、私が古いバージョンを持っている可能性があることを正しく示しました。tex4ht これはMikTex2.9コンソールに表示されるものです。 tex4ht パッケージ

```tex4ht`` には 2 つのバージョンがあります。ワークフローが古い方を呼び出しているのかもしれません。

答え1

\Configure{AddCss}この問題は、Miktex での定義が欠落していることが原因であると考えられます。設定ファイルで undefined を使用すると、引数はドキュメントの内容で終了し、 myconfig.cfg' -a debug tex4ebook`\Configureが取得されます。Missing \begin{document} inerror. You would get more detailed listing with theargument to

tex4ebook -a debug -c myconfig test2.tex -f epub3 mathml 

\Configure{AddCss}とにかく、回避策として、 TeX4ht ソースの定義を使用できます。

\Preamble{xhtml}   
\NewConfigure{AddCss}[1]{%
  {\Configure{Needs}{File: #1}\Needs{}}
  \Configure{@HEAD}{\HCode{<link rel="stylesheet" type="text/css" href="#1" />\Hnewline}}
}
\Configure{AddCss}{blitz-lite.css}
\begin{document}
\EndPreamble

設定\Configure{Needs}により、CSS ファイルを使用ファイルとして登録します。これは、Epub ファイルへの組み込みに必要です。

関連情報