michal-h21 / tex4ebook

Converter from LaTeX to ebook formats (epub, mobi). Using tex4ht and texlua scripts.
312 stars 33 forks source link

attempt to index local 'fontbase' (a nil value) #7

Closed gbarnich closed 11 years ago

gbarnich commented 11 years ago

Hi,

With the old version, I had quite good results when running tex4ebook. Just a couple of errors some of which I could solve just by editing the epub file, https://dl.dropboxusercontent.com/u/35238591/currentalgebra.epub After syncing a couple of days ago in order to be able to run tidy, I get the following error message:

tex4ebook -t -f epub3 currentalgebra.tex ...ich/Library/texmf/tex/latex/tex4ebook/list-fonts.lua:44: attempt to index local 'fontbase' (a nil value)

All help much appreciated ...

michal-h21 commented 11 years ago

Hello, I pushed patch, could you please try it?

gbarnich commented 11 years ago

Hi,

It works again, thanks a lot ! Thanks also for providing this program, it is exactly what I was looking for for some time now. I will continue to play with it and hope I can systematically produce nice epub3 files from my papers and lecture notes.

Best regards,


Glenn Barnich Theoretical and Mathematical Physics Free University Brussels & International Solvay Institutes Campus Plaine C.P. 231 B-1050 Brussels, Belgium

Tel: + 32 2 650 58 01, Fax: + 32 2 650 58 24 E-mail: gbarnich@ulb.ac.be web: http://homepages.ulb.ac.be/~gbarnich/

On 9 Sep 2013, at 14:43, Michal Hoftich wrote:

Hello, I pushed patch, could you please try it?

— Reply to this email directly or view it on GitHub.

michal-h21 commented 11 years ago

Hello, I am happy that it works for you now and that it is useful for you. This bug was caused by my new module for loading fonts. This module depends on luaotfload font database. Did you ever compile some document using opentype fonts and lualatex? Regards, Michal

2013/9/11 gbarnich notifications@github.com

Hi,

It works again, thanks a lot ! Thanks also for providing this program, it is exactly what I was looking for for some time now. I will continue to play with it and hope I can systematically produce nice epub3 files from my papers and lecture notes.

Best regards,


Glenn Barnich Theoretical and Mathematical Physics Free University Brussels & International Solvay Institutes Campus Plaine C.P. 231 B-1050 Brussels, Belgium

Tel: + 32 2 650 58 01, Fax: + 32 2 650 58 24 E-mail: gbarnich@ulb.ac.be web: http://homepages.ulb.ac.be/~gbarnich/

On 9 Sep 2013, at 14:43, Michal Hoftich wrote:

Hello, I pushed patch, could you please try it?

— 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/7#issuecomment-24199715 .

gbarnich commented 11 years ago

Hi Michal,

I just tried lualatex on the document and it runs without troubles, https://dl.dropboxusercontent.com/u/35238591/currentalgebra.log however I do not think I used it with opentypefonts ...

in case you are interested in the type of errors I get: when I run tex4ebook -c hej -t -f epub3 currentalgebra.tex on the file https://dl.dropboxusercontent.com/u/35238591/currentalgebra.tex the log file is https://dl.dropboxusercontent.com/u/35238591/currentalgebra%202.log while the -t option produces the following error messages : https://dl.dropboxusercontent.com/u/35238591/tidyerrors.txt and epubcheck gives https://dl.dropboxusercontent.com/u/35238591/epubcheck.txt (final result https://dl.dropboxusercontent.com/u/35238591/currentalgebra%202.epub )

Regards, Glenn

On 11 Sep 2013, at 10:21, Michal Hoftich wrote:

Hello, I am happy that it works for you now and that it is useful for you. This bug was caused by my new module for loading fonts. This module depends on luaotfload font database. Did you ever compile some document using opentype fonts and lualatex? Regards, Michal

2013/9/11 gbarnich notifications@github.com

Hi,

It works again, thanks a lot ! Thanks also for providing this program, it is exactly what I was looking for for some time now. I will continue to play with it and hope I can systematically produce nice epub3 files from my papers and lecture notes.

Best regards,


Glenn Barnich Theoretical and Mathematical Physics Free University Brussels & International Solvay Institutes Campus Plaine C.P. 231 B-1050 Brussels, Belgium

Tel: + 32 2 650 58 01, Fax: + 32 2 650 58 24 E-mail: gbarnich@ulb.ac.be web: http://homepages.ulb.ac.be/~gbarnich/

On 9 Sep 2013, at 14:43, Michal Hoftich wrote:

Hello, I pushed patch, could you please try it?

— 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/7#issuecomment-24199715 .

— Reply to this email directly or view it on GitHub.

michal-h21 commented 11 years ago

Hi Glenn,

tex4ht doesn't support opentype fonts, even with lualatex op xelatex, you must use type1 or metafont fonts. I have some experimental package for fontspec support, but it probably doesn't support current fontspec version.

But in future, it should be possible to include opentype fonts to epub files, I have only to figure out, how to use luaotfload font database to find font files.

Regarding your example, you should add \title and \author commands to your document, even if you use custom title page instead of \maketitle, because these commands are used to fill some document metadata. You should also use \tableofcontents, it is mandatory (in fact, even simple documents without sections and chapters must use table of contents to conform with epub standard...)

Big problem seems to be citations, every bibitem creates element like .... and this causes epubcheck error as colons are prohibited in id values. Maybe it can be solved, or maybe it will be easier to remove colons form bibliographic references :(

Error with missing mathml tags are caused by \usepackage{pdfsync}, it is incompatible with tex4ht. After commenting this package, only id errors caused by colons in citation keys show up with epubcheck.

Regards, Michal

2013/9/19 gbarnich notifications@github.com

Hi Michal,

I just tried lualatex on the document and it runs without troubles, https://dl.dropboxusercontent.com/u/35238591/currentalgebra.log however I do not think I used it with opentypefonts ...

in case you are interested in the type of errors I get: when I run tex4ebook -c hej -t -f epub3 currentalgebra.tex on the file https://dl.dropboxusercontent.com/u/35238591/currentalgebra.tex the log file is https://dl.dropboxusercontent.com/u/35238591/currentalgebra%202.log while the -t option produces the following error messages : https://dl.dropboxusercontent.com/u/35238591/tidyerrors.txt and epubcheck gives https://dl.dropboxusercontent.com/u/35238591/epubcheck.txt (final result https://dl.dropboxusercontent.com/u/35238591/currentalgebra%202.epub )

Regards, Glenn

On 11 Sep 2013, at 10:21, Michal Hoftich wrote:

Hello, I am happy that it works for you now and that it is useful for you. This bug was caused by my new module for loading fonts. This module depends on luaotfload font database. Did you ever compile some document using opentype fonts and lualatex? Regards, Michal

2013/9/11 gbarnich notifications@github.com

Hi,

It works again, thanks a lot ! Thanks also for providing this program, it is exactly what I was looking for for some time now. I will continue to play with it and hope I can systematically produce nice epub3 files from my papers and lecture notes.

Best regards,


Glenn Barnich Theoretical and Mathematical Physics Free University Brussels & International Solvay Institutes Campus Plaine C.P. 231 B-1050 Brussels, Belgium

Tel: + 32 2 650 58 01, Fax: + 32 2 650 58 24 E-mail: gbarnich@ulb.ac.be web: http://homepages.ulb.ac.be/~gbarnich/

On 9 Sep 2013, at 14:43, Michal Hoftich wrote:

Hello, I pushed patch, could you please try it?

— 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/7#issuecomment-24199715> .

— 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/7#issuecomment-24741244 .

gbarnich commented 11 years ago

Hi Michal,

Thanks for pointing out what to do about the errors. All are gone now, except that at the very end there seems to be one remaining for the tidy option and epubcheck. Unfortunately, this prevents opening with either readium in google chrome or azardi ...

Regards, Glenn


t4ht.c (2010-12-16-08:47 kpathsea) t4ht currentalgebra (tex4ht.env) Entering currentalgebra.lg Entering currentalgebra.css

Entering currentalgebra.tmp

Parse LG OEBPS Tidy: currentalgebra.html Copy: cp currentalgebra.html OEBPS/currentalgebra.html Copy: cp currentalgebra.css OEBPS/currentalgebra.css Mimetype for tmp is not registered Tidy: currentalgebrase1.html Copy: cp currentalgebrase1.html OEBPS/currentalgebrase1.html Tidy: currentalgebrase2.html Copy: cp currentalgebrase2.html OEBPS/currentalgebrase2.html Tidy: currentalgebrase3.html Copy: cp currentalgebrase3.html OEBPS/currentalgebrase3.html Tidy: currentalgebrase4.html Copy: cp currentalgebrase4.html OEBPS/currentalgebrase4.html Tidy: currentalgebrase5.html Copy: cp currentalgebrase5.html OEBPS/currentalgebrase5.html Tidy: currentalgebrase6.html Copy: cp currentalgebrase6.html OEBPS/currentalgebrase6.html Tidy: currentalgebrase7.html Copy: cp currentalgebrase7.html OEBPS/currentalgebrase7.html Copy: cp currentalgebra.ncx OEBPS/currentalgebra.ncx Mimetype for opf is not registered Mimetype for opf is not registered Copy: cp content.opf OEBPS/content.opf Tidy ncx 0 line 19 column 62 - Error: unexpected in dc:creator line 46 column 2 - Error: unexpected in dc:creator Tidy opf 512 Pack mimetype 0 Pack metadir 0 Pack outputdir 0

epubcheck-3.0.1 gbarnich$ java -jar epubcheck-3.0.1.jar currentalgebra.epub Epubcheck Version 3.0.1

EXCEPTION: currentalgebra.epub/OEBPS/content.opf: The processing instruction target matching "[xX][mM][lL]" is not allowed. ERROR: currentalgebra.epub/OEBPS/content.opf: Version not found

Check finished with warnings or errors

On 20 Sep 2013, at 15:50, Michal Hoftich wrote:

Hi Glenn,

tex4ht doesn't support opentype fonts, even with lualatex op xelatex, you must use type1 or metafont fonts. I have some experimental package for fontspec support, but it probably doesn't support current fontspec version.

But in future, it should be possible to include opentype fonts to epub files, I have only to figure out, how to use luaotfload font database to find font files.

Regarding your example, you should add \title and \author commands to your document, even if you use custom title page instead of \maketitle, because these commands are used to fill some document metadata. You should also use \tableofcontents, it is mandatory (in fact, even simple documents without sections and chapters must use table of contents to conform with epub standard...)

Big problem seems to be citations, every bibitem creates element like .... and this causes epubcheck error as colons are prohibited in id values. Maybe it can be solved, or maybe it will be easier to remove colons form bibliographic references :(

Error with missing mathml tags are caused by \usepackage{pdfsync}, it is incompatible with tex4ht. After commenting this package, only id errors caused by colons in citation keys show up with epubcheck.

Regards, Michal

2013/9/19 gbarnich notifications@github.com

Hi Michal,

I just tried lualatex on the document and it runs without troubles, https://dl.dropboxusercontent.com/u/35238591/currentalgebra.log however I do not think I used it with opentypefonts ...

in case you are interested in the type of errors I get: when I run tex4ebook -c hej -t -f epub3 currentalgebra.tex on the file https://dl.dropboxusercontent.com/u/35238591/currentalgebra.tex the log file is https://dl.dropboxusercontent.com/u/35238591/currentalgebra%202.log while the -t option produces the following error messages : https://dl.dropboxusercontent.com/u/35238591/tidyerrors.txt and epubcheck gives https://dl.dropboxusercontent.com/u/35238591/epubcheck.txt (final result https://dl.dropboxusercontent.com/u/35238591/currentalgebra%202.epub )

Regards, Glenn

On 11 Sep 2013, at 10:21, Michal Hoftich wrote:

Hello, I am happy that it works for you now and that it is useful for you. This bug was caused by my new module for loading fonts. This module depends on luaotfload font database. Did you ever compile some document using opentype fonts and lualatex? Regards, Michal

2013/9/11 gbarnich notifications@github.com

Hi,

It works again, thanks a lot ! Thanks also for providing this program, it is exactly what I was looking for for some time now. I will continue to play with it and hope I can systematically produce nice epub3 files from my papers and lecture notes.

Best regards,


Glenn Barnich Theoretical and Mathematical Physics Free University Brussels & International Solvay Institutes Campus Plaine C.P. 231 B-1050 Brussels, Belgium

Tel: + 32 2 650 58 01, Fax: + 32 2 650 58 24 E-mail: gbarnich@ulb.ac.be web: http://homepages.ulb.ac.be/~gbarnich/

On 9 Sep 2013, at 14:43, Michal Hoftich wrote:

Hello, I pushed patch, could you please try it?

— 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/7#issuecomment-24199715> .

— 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/7#issuecomment-24741244 .

— Reply to this email directly or view it on GitHub.

gbarnich commented 11 years ago

Hi Michal,

Giving only one author seems to have solved the last problem as well, at least for the tidy command ... now I just have to figure out the remaining epubcheck errors

Thanks a lot !

G

On 20 Sep 2013, at 15:50, Michal Hoftich wrote:

Hi Glenn,

tex4ht doesn't support opentype fonts, even with lualatex op xelatex, you must use type1 or metafont fonts. I have some experimental package for fontspec support, but it probably doesn't support current fontspec version.

But in future, it should be possible to include opentype fonts to epub files, I have only to figure out, how to use luaotfload font database to find font files.

Regarding your example, you should add \title and \author commands to your document, even if you use custom title page instead of \maketitle, because these commands are used to fill some document metadata. You should also use \tableofcontents, it is mandatory (in fact, even simple documents without sections and chapters must use table of contents to conform with epub standard...)

Big problem seems to be citations, every bibitem creates element like .... and this causes epubcheck error as colons are prohibited in id values. Maybe it can be solved, or maybe it will be easier to remove colons form bibliographic references :(

Error with missing mathml tags are caused by \usepackage{pdfsync}, it is incompatible with tex4ht. After commenting this package, only id errors caused by colons in citation keys show up with epubcheck.

Regards, Michal

2013/9/19 gbarnich notifications@github.com

Hi Michal,

I just tried lualatex on the document and it runs without troubles, https://dl.dropboxusercontent.com/u/35238591/currentalgebra.log however I do not think I used it with opentypefonts ...

in case you are interested in the type of errors I get: when I run tex4ebook -c hej -t -f epub3 currentalgebra.tex on the file https://dl.dropboxusercontent.com/u/35238591/currentalgebra.tex the log file is https://dl.dropboxusercontent.com/u/35238591/currentalgebra%202.log while the -t option produces the following error messages : https://dl.dropboxusercontent.com/u/35238591/tidyerrors.txt and epubcheck gives https://dl.dropboxusercontent.com/u/35238591/epubcheck.txt (final result https://dl.dropboxusercontent.com/u/35238591/currentalgebra%202.epub )

Regards, Glenn

On 11 Sep 2013, at 10:21, Michal Hoftich wrote:

Hello, I am happy that it works for you now and that it is useful for you. This bug was caused by my new module for loading fonts. This module depends on luaotfload font database. Did you ever compile some document using opentype fonts and lualatex? Regards, Michal

2013/9/11 gbarnich notifications@github.com

Hi,

It works again, thanks a lot ! Thanks also for providing this program, it is exactly what I was looking for for some time now. I will continue to play with it and hope I can systematically produce nice epub3 files from my papers and lecture notes.

Best regards,


Glenn Barnich Theoretical and Mathematical Physics Free University Brussels & International Solvay Institutes Campus Plaine C.P. 231 B-1050 Brussels, Belgium

Tel: + 32 2 650 58 01, Fax: + 32 2 650 58 24 E-mail: gbarnich@ulb.ac.be web: http://homepages.ulb.ac.be/~gbarnich/

On 9 Sep 2013, at 14:43, Michal Hoftich wrote:

Hello, I pushed patch, could you please try it?

— 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/7#issuecomment-24199715> .

— 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/7#issuecomment-24741244 .

— Reply to this email directly or view it on GitHub.