manuels / texlive.js

Compiling LaTeX (TeX live) in your browser
http://manuels.github.com/texlive.js/
GNU General Public License v2.0
1.25k stars 140 forks source link

Utf8 #57

Open Rsmid opened 5 years ago

Rsmid commented 5 years ago

Hello there, It seems like utf8 isn't supported well. All of special characters ěščřžýáíéúů (and similar) in czech language aren't interpreted by texlive.js I use \usepackage[utf8]{inputenc} with this error:

Package inputenc Error: Keyboard character used is undefined
(inputenc)                in inputencoding `utf8'.

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                                                                          
l.27 Y~￀�

         ᭩ﻀ�

either usage of latin2 doesn't help much altough few of characters are ok, but not all and similiar error:

! Package inputenc Error: Keyboard character used is undefined
(inputenc)                in inputencoding `latin2'.

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                                                                            
l.26  ^^[
         a

I tried this strace -e open pdflatex yourfile.tex 2>/tmp/required_files mentioned in arabic issue but it exited with 0, without the -e open option the file is quite long and messy for me.

Can anyone help me with utf8 setting?

manuels commented 5 years ago

I tried this strace -e open pdflatex yourfile.tex 2>/tmp/required_files mentioned in arabic issue but it exited with 0

Why do you think this is a problem? 0 means success, doesn't it?

Rsmid commented 5 years ago

I have been trying to recognize which packages I need for my tex file like in https://github.com/manuels/texlive.js/issues/8 but the +++ exited with 0 +++ was the only content of /tmp/required_files, nothing like

open("/lib/x86_64-linux-gnu/libpng12.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
...

in the mentioned issue.

I'm trying to setup utf8 and inputenc to be able to use texlive.js for czech language documents and suppose importance of list of needed packages.

manuels commented 5 years ago

Have you tried using strace -e open -f ...?

Rsmid commented 5 years ago

Now yes, but with the same result. I'm using ubuntu 18.04. I have tried also strace -e trace=file ... and the output file has 795 lines like this:

access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/libpng16.so.16", O_RDONLY|O_CLOEXEC) = 3
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/libpoppler.so.73", O_RDONLY|O_CLOEXEC) = 3
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/libkpathsea.so.6", O_RDONLY|O_CLOEXEC) = 3
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)

Can the whole file help?

algj commented 1 month ago

May help: https://github.com/manuels/texlive.js/issues/68