
Meu myconfig.cfg
bloco de código é:
\Preamble{xhtml}
\Configure{AddCss}{blitz-lite.css}
\begin{document}
\EndPreamble
Minha linha de comando é tex4ebook -c myconfig test2.tex -f epub3 mathml
o seguinte:
[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
O \begin{document}
não está faltando no arquivo de configuração. Salvei o arquivo no Bloco de Notas como UTF-8
.
Eu também blitz-lite.css
salvei no diretório de trabalho.
Qual poderia ser o problema?
ATUALIZAÇÃO: @ michal.h21 indicou corretamente que posso ter uma versão mais antiga de tex4ht
Isto é o que vejo no console MikTex2.9
Existem duas versões de ```tex4ht``. Talvez o fluxo de trabalho esteja chamando o antigo?
Responder1
Acho que esse problema pode ser causado pela falta de definição \Configure{AddCss}
no Miktex. Quando você usa indefinido \Configure
no arquivo de configuração, os argumentos terminam no conteúdo do documento e você obterá o Missing \begin{document} in
myconfig.cfg' error. You would get more detailed listing with the
-a debug argument to
tex4ebook`:
tex4ebook -a debug -c myconfig test2.tex -f epub3 mathml
De qualquer forma, como solução alternativa, você pode usar a definição das \Configure{AddCss}
fontes 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
A \Configure{Needs}
configuração registra o arquivo CSS como arquivo usado. É necessário para inclusão no arquivo Epub.