Open gbarnich opened 11 years ago
Hello Glenn,
4) I encountered similiar issues when closing environments. So, I manually add a space, e.g. "I love {\tt bash\ } but not {\tt csh}.". Perhaps, you can also manually add a "\ " after your math? It should look good in the epub version as well as in your .dvi version - at least, I want to generate an .epub and a .dvi version from the same latex source code and both output formats must look good.
3) I encountered similiar issues here and there and added a space by hand, e.g. [ 1,2 ]. This is not correct, but consistent. Now, the problem for citations is that you don't have easy control over the spacing as it's automatically generated. If Michal can help, great. Otherwise, dig deep how to change the closing character "]" to "\ ]". Then, to get the space ofter the "]", you can add a manual space. I assume that should work "\cite{important}\ ..."
Stefan
Hello Glenn,
1) you can put starred sections on standalone page with something like
\CutAt{likesection, section}
in the custom cfg file. Starred sectioning commands are named with prefix like* But at the moment this causes prblem, because title page doesn't show in Azardi. I have to figure out the reason.
2) I see. It must be caused with some bug in tex4ebook, because with plain tex4ht it doesn't happen.
3) This is caused by some known problem in mathml support in tex4ht. See http://tug.org/applications/tex4ht/mml.html
Concretely, it is caused by code like {}^{4}. You may declare new command
\newcommand\emptybase{}
and in custom config file, after \begin{document}, redefine it like:
\renewcommand\emptybase{{\csname HCode\endcsname{}}}
as is recommended on the tex4ht page.
4) Yes, it happens, I have also to investigate on this.
Best regards, Michal
2013/10/19 schaecsn notifications@github.com
Hello Glenn,
4) I encountered similiar issues when closing environments. So, I manually add a space, e.g. "I love {\tt bash\ } but not {\tt csh}.". Perhaps, you can also manually add a "\ " after your math? It should look good in the epub version as well as in your .dvi version - at least, I want to generate an .epub and a .dvi version from the same latex source code and both output formats must look good.
3) I encountered similiar issues here and there and added a space by hand, e.g. [ 1,2 ]. This is not correct, but consistent. Now, the problem for citations is that you don't have easy control over the spacing as it's automatically generated. If Michal can help, great. Otherwise, dig deep how to change the closing character "]" to "\ ]". Then, to get the space ofter the "]", you can add a manual space. I assume that should work "\cite{important}\ ..."
Stefan
— Reply to this email directly or view it on GitHubhttps://github.com/michal-h21/tex4ebook/issues/11#issuecomment-26640397 .
Regarding issue 2), it seems to be caused by --tidy
option. Without this option,
<p class="noindent">In recent work, Strominger <span class="cite">[<a
href="#Xstrominger_2013">1</a>, <a
href="#XStrominger_2013lka">2</a>]</span> has proposed
is produced, with --tidy
, the result is:
<p class="noindent">In recent work, Strominger
<span class="cite">[
<a href="#Xstrominger_2013">1</a>, 
<a href="#XStrominger_2013lka">2</a>]</span>has proposed to
note that the newline characters are displayed as space.
Issue 4) may be related to --tidy
as well, or it may be some misconfiguration in the cfg file or source file, because this MWE
doesn't show this behaviour:
\documentclass{article}
\usepackage{url}
\let\href=\url
\begin{document}
In recent work, Strominger \cite{strominger:2013,Strominger:2013lka} has proposed to replace the computation of integrated surface charges
and their algebra associated to asymptotic symmetries in gravitational
or gauge theories by a local computation in terms of Ward identities
and current algebra\footnote{just try footnote} and math $M=0=J$ or.
\begin{thebibliography}{10}
\addcontentsline{toc}{section}{References}
\bibitem{strominger:2013}
A.~Strominger, ``{Asymptotic Symmetries for Gauge and Gravitational Theories in Minkowski Space. Talk given at Strings 2013}.'' Contribution available online at
\href{http://strings2013.sogang.ac.kr//main/?skin=video\_26\_3.htm}{http://strings2013.sogang.ac.kr//main/?skin=video\_26\_3.htm}, June, 2013.
\bibitem{Strominger:2013lka} A.~Strominger, ``{Asymptotic Symmetries of Yang-Mills Theory},'' \href{http://arxiv.org/abs/1308.0589}{{\ttfamily arXiv:1308.0589 [hep-th]}}.
%%CITATION = ARXIV:1308.0589;%%.
\end{thebibliography}
\end{document}
compile sequence
tex4ebook -m -f epub3 sample
I hope I fixed --tidy
option problem, the issue was that I used -xml
tidy option, as otherwise tidy stopped on mathml or html5 tags used in epub3
. But this option put all starting elements on new lines, resulting in bad spacing. Now I created new tidy config file, where all new html5, mathml, and svg elements are listed, so tidy shouldn't break on them.
New code is in the devel
branch for testing.
Michal
Tested the devel branch, unfortunately it introduces many more errors (can send details if needed). However your explanation completely solves the problem for me: first run with tidy to see if there are errors, second run without tidy option to get nice formatting at the end Glenn
On 23 Oct 2013, at 17:48, Michal Hoftich notifications@github.com wrote:
I hope I fixed --tidy option problem, the issue was that I used -xml tidy option, as otherwise tidy stopped on mathml or html5 tags used in epub3. But this option put all starting elements on new lines, resulting in bad spacing. Now I created new tidy config file, where all new html5, mathml, and svg elements are listed, so tidy shouldn't break on them.
New code is in the devel branch for testing.
Michal
— Reply to this email directly or view it on GitHub.
OK, if you use tidy only to see html errors, your solution will work. What are the errors you see? There are much more Tidy warnings, which I don't know how to suppress. These are produced for all new html5, mathml and svg elements. Or are there any other errors? Plese send me the details.
Michal
2013/10/24 gbarnich notifications@github.com
Tested the devel branch, unfortunately it introduces many more errors (can send details if needed). However your explanation completely solves the problem for me: first run with tidy to see if there are errors, second run without tidy option to get nice formatting at the end Glenn
On 23 Oct 2013, at 17:48, Michal Hoftich notifications@github.com wrote:
I hope I fixed --tidy option problem, the issue was that I used -xml tidy option, as otherwise tidy stopped on mathml or html5 tags used in epub3. But this option put all starting elements on new lines, resulting in bad spacing. Now I created new tidy config file, where all new html5, mathml, and svg elements are listed, so tidy shouldn't break on them.
New code is in the devel branch for testing.
Michal
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/michal-h21/tex4ebook/issues/11#issuecomment-26957878 .
below the result of the same command tex4ebook -c hej -t -f epub3 currentalgebra.tex with the devel branch and the master branch
devel:
...
4ht.c (2010-12-16-08:47 kpathsea) t4ht currentalgebra.dvi (/usr/local/texlive/2012/texmf-dist/tex4ht/base/unix/tex4ht.env) Entering currentalgebra.lg Entering currentalgebra.css Entering currentalgebra.tmp
Parse LG Tidy: currentalgebra.html line 17 column 57 - Warning:
master:
....
t4ht.c (2010-12-16-08:47 kpathsea) t4ht currentalgebra.dvi (/usr/local/texlive/2012/texmf-dist/tex4ht/base/unix/tex4ht.env) Entering currentalgebra.lg Entering currentalgebra.css Entering currentalgebra.tmp
Parse LG Tidy: currentalgebra.html Copy: cp currentalgebra.html currentalgebra-epub3/OEBPS Copy: cp currentalgebra.css currentalgebra-epub3/OEBPS Mimetype for tmp is not registered Tidy: currentalgebrase1.html Copy: cp currentalgebrase1.html currentalgebra-epub3/OEBPS Tidy: currentalgebrase2.html Copy: cp currentalgebrase2.html currentalgebra-epub3/OEBPS Tidy: currentalgebrase3.html Copy: cp currentalgebrase3.html currentalgebra-epub3/OEBPS Tidy: currentalgebrase4.html Copy: cp currentalgebrase4.html currentalgebra-epub3/OEBPS Tidy: currentalgebrase5.html Copy: cp currentalgebrase5.html currentalgebra-epub3/OEBPS Tidy: currentalgebrase6.html Copy: cp currentalgebrase6.html currentalgebra-epub3/OEBPS Tidy: currentalgebrase7.html Copy: cp currentalgebrase7.html currentalgebra-epub3/OEBPS Copy: cp currentalgebra.ncx currentalgebra-epub3/OEBPS Mimetype for opf is not registered Mimetype for opf is not registered Copy: cp content.opf currentalgebra-epub3/OEBPS Tidy ncx 0 Tidy opf 0 currentalgebra-epub3/mimetype Pack mimetype 0 Pack metadir 0 Pack outputdir 0 Copy generated epub On 24 Oct 2013, at 08:44, Michal Hoftich notifications@github.com wrote:
OK, if you use tidy only to see html errors, your solution will work. What are the errors you see? There are much more Tidy warnings, which I don't know how to suppress. These are produced for all new html5, mathml and svg elements. Or are there any other errors? Plese send me the details.
Michal
2013/10/24 gbarnich notifications@github.com
Tested the devel branch, unfortunately it introduces many more errors (can send details if needed). However your explanation completely solves the problem for me: first run with tidy to see if there are errors, second run without tidy option to get nice formatting at the end Glenn
On 23 Oct 2013, at 17:48, Michal Hoftich notifications@github.com wrote:
I hope I fixed --tidy option problem, the issue was that I used -xml tidy option, as otherwise tidy stopped on mathml or html5 tags used in epub3. But this option put all starting elements on new lines, resulting in bad spacing. Now I created new tidy config file, where all new html5, mathml, and svg elements are listed, so tidy shouldn't break on them.
New code is in the devel branch for testing.
Michal
Reply to this email directly or view it on GitHub.
Reply to this email directly or view it on GitHubhttps://github.com/michal-h21/tex4ebook/issues/11#issuecomment-26957878 .
Reply to this email directly or view it on GitHub.
Hi Glenn, before reading your new email I figured out that the configuraton file was in wrong form and new inline tags weren't recognized. I pushed corrected version, with warning messages suppressed, to the devel branch. Michal
2013/10/24 gbarnich notifications@github.com
below the result of the same command tex4ebook -c hej -t -f epub3 currentalgebra.tex with the devel branch and the master branch
devel:
...
4ht.c (2010-12-16-08:47 kpathsea) t4ht currentalgebra.dvi (/usr/local/texlive/2012/texmf-dist/tex4ht/base/unix/tex4ht.env) Entering currentalgebra.lg Entering currentalgebra.css Entering currentalgebra.tmp
Parse LG
Parse LG Tidy: currentalgebra.html line 17 column 57 - Warning:
is not approved by W3C line 20 column 1 - Error: is not recognized! line 20 column 1 - Warning: discarding unexpected line 20 column 7 - Error: line 46 column 59 - Warning:is not recognized! line 20 column 7 - Warning: discarding unexpected line 21 column 2 - Warning: discarding unexpected line 21 column 9 - Error:is not recognized! line 21 column 9 - Warning: discarding unexpected line 22 column 2 - Warning: line 23 column 15 - Warning: discarding unexpectedis not approved by W3C line 23 column 8 - Warning: discarding unexpected is not approved by W3C line 48 column 20 - Error: is not recognized! line 48 column 20 - Warning: discarding unexpected line 48 column 26 - Error: is not recognized! line 48 column 26 - Warning: discarding unexpected line 49 column 2 - Warning: discarding unexpected line 49 column 9 - Error:is not recognized! Copy: cp currentalgebra.html currentalgebra-epub3/OEBPS Copy: cp currentalgebra.css currentalgebra-epub3/OEBPS Mimetype for tmp is not registered Tidy: currentalgebrase1.html line 46 column 97 - Warning: is not approved by W3C line 49 column 1 - Error: is not recognized! line 49 column 1 - Warning: discarding unexpected line 49 column 10 - Error: line 62 column 88 - Warning:is not recognized! line 49 column 10 - Warning: discarding unexpected line 50 column 2 - Warning: line 53 column 15 - Error:is not approved by W3C line 51 column 8 - Warning: is not approved by W3C line 52 column 8 - Warning: is not approved by W3C line 53 column 8 - Warning: discarding unexpected is not recognized! line 53 column 15 - Warning: discarding unexpected line 54 column 2 - Warning: line 54 column 19 - Error:is not approved by W3C line 54 column 12 - Warning: discarding unexpected is not recognized! line 54 column 19 - Warning: discarding unexpected line 55 column 2 - Warning: line 59 column 15 - Warning: discarding unexpectedis not approved by W3C line 56 column 8 - Warning: is not approved by W3C line 57 column 8 - Warning: is not approved by W3C line 58 column 8 - Warning: is not approved by W3C line 59 column 8 - Warning: discarding unexpected is not approved by W3C line 65 column 1 - Error: is not recognized! line 65 column 1 - Warning: discarding unexpected line 65 column 10 - Error: is not recognized! Copy: cp currentalgebrase1.html currentalgebra-epub3/OEBPS Tidy: currentalgebrase2.html line 26 column 101 - Warning: is not approved by W3C line 29 column 1 - Warning: is not approved by W3C line 30 column 34 - Warning: is not approved by W3C line 31 column 30 - Warning: is not approved by W3C line 32 column 8 - Error: is not recognized! line 32 column 8 - Warning: discarding unexpected line 32 column 14 - Error: line 37 column 2 - Warning:is not recognized! line 32 column 14 - Warning: discarding unexpected line 33 column 2 - Warning: line 34 column 15 - Error:is not approved by W3C line 34 column 8 - Warning: discarding unexpected is not recognized! line 34 column 15 - Warning: discarding unexpected line 35 column 2 - Warning: line 36 column 15 - Warning: discarding unexpectedis not approved by W3C line 36 column 8 - Warning: discarding unexpected is not approved by W3C line 38 column 47 - Warning: is not approved by W3C line 41 column 1 - Warning: is not approved by W3C line 43 column 36 - Warning: is not approved by W3C line 45 column 20 - Error: is not recognized! line 45 column 20 - Warning: discarding unexpected line 45 column 26 - Error: is not recognized! line 45 column 26 - Warning: discarding unexpected line 46 column 2 - Warning: line 47 column 15 - Error:is not approved by W3C line 47 column 8 - Warning: discarding unexpected is not recognized! Copy: cp currentalgebrase2.html currentalgebra-epub3/OEBPS Tidy: currentalgebrase3.html line 21 column 14 - Warning: is not approved by W3C line 24 column 29 - Warning: is not approved by W3C line 25 column 8 - Error: is not recognized! line 25 column 8 - Warning: discarding unexpected line 25 column 14 - Error: line 29 column 3 - Warning:is not recognized! line 25 column 14 - Warning: discarding unexpected line 26 column 2 - Warning: line 27 column 15 - Error:is not approved by W3C line 27 column 8 - Warning: discarding unexpected is not recognized! line 27 column 15 - Warning: discarding unexpected line 28 column 2 - Warning: line 28 column 19 - Warning: discarding unexpectedis not approved by W3C line 28 column 12 - Warning: discarding unexpected is not approved by W3C line 30 column 30 - Error: is not recognized! line 30 column 30 - Warning: discarding unexpected line 31 column 22 - Error: is not recognized! line 31 column 22 - Warning: discarding unexpected line 31 column 28 - Warning: is not approved by W3C line 32 column 29 - Error: is not recognized! Copy: cp currentalgebrase3.html currentalgebra-epub3/OEBPS Tidy: currentalgebrase4.html line 11 column 83 - Warning: is not approved by W3C line 14 column 1 - Error: is not recognized! line 14 column 1 - Warning: discarding unexpected line 14 column 7 - Error: line 33 column 45 - Warning:is not recognized! line 14 column 7 - Warning: discarding unexpected line 15 column 2 - Warning: line 16 column 16 - Error:is not approved by W3C line 16 column 9 - Warning: discarding unexpected is not recognized! line 16 column 16 - Warning: discarding unexpected line 17 column 2 - Warning: line 18 column 36 - Warning: discarding unexpectedis not approved by W3C line 18 column 29 - Warning: discarding unexpected is not approved by W3C line 35 column 20 - Error: is not recognized! line 35 column 20 - Warning: discarding unexpected line 35 column 26 - Error: is not recognized! line 35 column 26 - Warning: discarding unexpected line 36 column 2 - Warning: line 37 column 16 - Error:is not approved by W3C line 37 column 9 - Warning: discarding unexpected is not recognized! Copy: cp currentalgebrase4.html currentalgebra-epub3/OEBPS Tidy: currentalgebrase5.html line 2 column 1 - Warning: proprietary attribute "xmlns:epub" Copy: cp currentalgebrase5.html currentalgebra-epub3/OEBPS Tidy: currentalgebrase6.html line 25 column 15 - Warning: is not approved by W3C line 28 column 18 - Warning: is not approved by W3C line 29 column 8 - Error: is not recognized! line 29 column 8 - Warning: discarding unexpected line 29 column 14 - Error: line 33 column 3 - Warning:is not recognized! line 29 column 14 - Warning: discarding unexpected line 30 column 2 - Warning: line 31 column 15 - Error:is not approved by W3C line 31 column 8 - Warning: discarding unexpected is not recognized! line 31 column 15 - Warning: discarding unexpected line 32 column 2 - Warning: line 32 column 19 - Warning: discarding unexpectedis not approved by W3C line 32 column 12 - Warning: discarding unexpected is not approved by W3C line 34 column 30 - Error: is not recognized! line 34 column 30 - Warning: discarding unexpected line 34 column 36 - Error: is not recognized! line 34 column 36 - Warning: discarding unexpected line 35 column 2 - Warning: line 36 column 15 - Error:is not approved by W3C line 36 column 8 - Warning: discarding unexpected is not recognized! Copy: cp currentalgebrase6.html currentalgebra-epub3/OEBPS Tidy: currentalgebrase7.html line 2 column 1 - Warning: proprietary attribute "xmlns:epub" Copy: cp currentalgebrase7.html currentalgebra-epub3/OEBPS Copy: cp currentalgebra.ncx currentalgebra-epub3/OEBPS Mimetype for opf is not registered Mimetype for opf is not registered Copy: cp content.opf currentalgebra-epub3/OEBPS Tidy ncx 0 Tidy opf 0 currentalgebra-epub3/mimetype Pack mimetype 0 Pack metadir 0 Pack outputdir 0 Copy generated epub master:
....
t4ht.c (2010-12-16-08:47 kpathsea) t4ht currentalgebra.dvi (/usr/local/texlive/2012/texmf-dist/tex4ht/base/unix/tex4ht.env) Entering currentalgebra.lg Entering currentalgebra.css Entering currentalgebra.tmp
Parse LG
Parse LG Tidy: currentalgebra.html Copy: cp currentalgebra.html currentalgebra-epub3/OEBPS Copy: cp currentalgebra.css currentalgebra-epub3/OEBPS Mimetype for tmp is not registered Tidy: currentalgebrase1.html Copy: cp currentalgebrase1.html currentalgebra-epub3/OEBPS Tidy: currentalgebrase2.html Copy: cp currentalgebrase2.html currentalgebra-epub3/OEBPS Tidy: currentalgebrase3.html Copy: cp currentalgebrase3.html currentalgebra-epub3/OEBPS Tidy: currentalgebrase4.html Copy: cp currentalgebrase4.html currentalgebra-epub3/OEBPS Tidy: currentalgebrase5.html Copy: cp currentalgebrase5.html currentalgebra-epub3/OEBPS Tidy: currentalgebrase6.html Copy: cp currentalgebrase6.html currentalgebra-epub3/OEBPS Tidy: currentalgebrase7.html Copy: cp currentalgebrase7.html currentalgebra-epub3/OEBPS Copy: cp currentalgebra.ncx currentalgebra-epub3/OEBPS Mimetype for opf is not registered Mimetype for opf is not registered Copy: cp content.opf currentalgebra-epub3/OEBPS Tidy ncx 0 Tidy opf 0 currentalgebra-epub3/mimetype Pack mimetype 0 Pack metadir 0 Pack outputdir 0 Copy generated epub On 24 Oct 2013, at 08:44, Michal Hoftich notifications@github.com wrote:
OK, if you use tidy only to see html errors, your solution will work. What are the errors you see? There are much more Tidy warnings, which I don't know how to suppress. These are produced for all new html5, mathml and svg elements. Or are there any other errors? Plese send me the details.
Michal
2013/10/24 gbarnich notifications@github.com
Tested the devel branch, unfortunately it introduces many more errors (can send details if needed). However your explanation completely solves the problem for me: first run with tidy to see if there are errors, second run without tidy option to get nice formatting at the end Glenn
On 23 Oct 2013, at 17:48, Michal Hoftich notifications@github.com wrote:
I hope I fixed --tidy option problem, the issue was that I used -xml tidy option, as otherwise tidy stopped on mathml or html5 tags used in epub3. But this option put all starting elements on new lines, resulting in bad spacing. Now I created new tidy config file, where all new html5, mathml, and svg elements are listed, so tidy shouldn't break on them.
New code is in the devel branch for testing.
Michal
Reply to this email directly or view it on GitHub.
Reply to this email directly or view it on GitHub< https://github.com/michal-h21/tex4ebook/issues/11#issuecomment-26957878> .
Reply to this email directly or view it on GitHub.
Reply to this email directly or view it on GitHubhttps://github.com/michal-h21/tex4ebook/issues/11#issuecomment-26970602 .
Now it works perfectly with the -tidy option in the devel branch, G
On 24 Oct 2013, at 09:25, Michal Hoftich notifications@github.com wrote:
Hi Glenn, before reading your new email I figured out that the configuraton file was in wrong form and new inline tags weren't recognized. I pushed corrected version, with warning messages suppressed, to the devel branch. Michal
Dear Michal,
I have a couple of smaller issues.
1) for references and acknowledgments, I use sections without numbering \section, but \addcontentsline to make it appear in table of contents. The problem that arises is that these go in front of the document in a funny way. The workaround is to remove all \section, but is there another possibility ? see example below
2) spacing after \cite command in the text is wrong, a space before the number but no space after the bracket, example "Strominger [ 1,2]has proposed ...
3) there is a problem with one equation, line 1256 of the source file, if I comment it out everything runs fine otherwise I get the following error
Copy: cp currentalgebrase4.html currentalgebra-epub3/OEBPS Tidy: currentalgebrase5.html line 827 column 15 - Error: unexpected in
line 828 column 2 - Error: unexpected in
line 838 column 31 - Error: unexpected in
line 846 column 30 - Error: unexpected in
line 847 column 95 - Error: unexpected in
line 847 column 101 - Error: unexpected in
Copy: cp currentalgebrase5.html currentalgebra-epub3/OEBPS
4) there is no spacing after inline equation + text example : $M=0=J$ or appears as M=0=Jor
here is the example:
result: https://dl.dropboxusercontent.com/u/35238591/currentalgebra.epub source file: https://dl.dropboxusercontent.com/u/35238591/currentalgebra.tex command: tex4ebook -c hej -t -f epub3 currentalgebra.tex configuration file: https://dl.dropboxusercontent.com/u/35238591/hej.cfg filter: https://dl.dropboxusercontent.com/u/35238591/currentalgebra.mk4
Best, Glenn