Closed juanfal closed 12 years ago
It seems that the problem with utf-8 in the path to the tex file occurs just from the very beginning in the latex-compilation process:
The file is: [Compiling /Users/me/Desktop/años/pepe.tex]
although it appears in the message window as:
[Compiling /Users/me/Desktop/an~os/pepe.tex]
In parsing the log file there seems also to be problems:
Parsing log file Unable to auto detect encoding, using fallback encoding Western (Windows 1252)
The problem appears to be in the line jumpToPDF.py:19 where
print "!TEX root = ", root
crashes the run process. (don't ask me why)
Great catch! Thanks. On Sep 30, 2012 9:24 AM, "juanfal" notifications@github.com wrote:
It seems that the problem with utf-8 in the path to the tex file occurs just from the very beginning in the latex-compilation process:
The file is: [Compiling /Users/me/Desktop/años/pepe.tex]
although it appears in the message window as:
[Compiling /Users/me/Desktop/an~os/pepe.tex]
In parsing the log file there seems also to be problems:
Parsing log file Unable to auto detect encoding, using fallback encoding Western (Windows 1252)
The problem appears to be in the line jumpToPDF.py:19 where
print "!TEX root = ", root
crashes the run process. (don't ask me why)
— Reply to this email directly or view it on GitHubhttps://github.com/SublimeText/LaTeXTools/issues/81#issuecomment-9014050.
I just pushed a commit that should fix the issue. Closing for now.
humm! Now it fails in makePDF.py:320… it seems that
self.caller.tex_base
with utf chars breaks that call
It didn't occur before.
Hmmm... I checked again, and it doesn't seem to happen on my machine (running OS X Lion). To test, I created a directory called "años" (yeah, copied from your message!) and a simple tex file inside it. I was able to compile the file, and Skim was invoked. No error message appears in the Console.
Is this a multifile document? Just wondering what might be going wrong.
On Mon, Oct 1, 2012 at 2:43 AM, juanfal notifications@github.com wrote:
humm! Now it fails in makePDF.py:320… it seems that
self.caller.tex_base
with utf chars breaks that call
It didn't occur before.
— Reply to this email directly or view it on GitHubhttps://github.com/SublimeText/LaTeXTools/issues/81#issuecomment-9023839.
Marciano Siniscalchi Economics Department, Northwestern University http://faculty.wcas.northwestern.edu/~msi661
Humm!
please watch the problem here…
If you save a simple tex file inside a folder año it fails
https://www.dropbox.com/s/8mv8ha70ddcpnvc/texBuildutfproblem.mov
the same file without utfs does fine.
The problem appears just in makePDF.py:320. I have found it putting a sublime.error_message("Hi") around and it displays only if I put it just in the line before that.
El 02/10/2012, a las 03:27, msiniscalchi notifications@github.com escribió:
Hmmm... I checked again, and it doesn't seem to happen on my machine (running OS X Lion). To test, I created a directory called "años" (yeah, copied from your message!) and a simple tex file inside it. I was able to compile the file, and Skim was invoked. No error message appears in the Console.
Is this a multifile document? Just wondering what might be going wrong.
On Mon, Oct 1, 2012 at 2:43 AM, juanfal notifications@github.com wrote:
humm! Now it fails in makePDF.py:320… it seems that
self.caller.tex_base
with utf chars breaks that call
It didn't occur before.
— Reply to this email directly or view it on GitHubhttps://github.com/SublimeText/LaTeXTools/issues/81#issuecomment-9023839.
Marciano Siniscalchi Economics Department, Northwestern University http://faculty.wcas.northwestern.edu/~msi661 — Reply to this email directly or view it on GitHub.
Of course I believe you... it's just that I can't reproduce the issue on my machine. Which version of OS X and Texlive are you running? Just trying to figure out what might be causing the issue for you.
On Tue, Oct 2, 2012 at 5:31 AM, juanfal notifications@github.com wrote:
Humm!
please watch the problem here…
If you save a simple tex file inside a folder año it fails
https://www.dropbox.com/s/8mv8ha70ddcpnvc/texBuildutfproblem.mov
the same file without utfs does fine.
The problem appears just in makePDF.py:320. I have found it putting a sublime.error_message("Hi") around and it displays only if I put it just in the line before that.
El 02/10/2012, a las 03:27, msiniscalchi notifications@github.com escribió:
Hmmm... I checked again, and it doesn't seem to happen on my machine (running OS X Lion). To test, I created a directory called "años" (yeah, copied from your message!) and a simple tex file inside it. I was able to compile the file, and Skim was invoked. No error message appears in the Console.
Is this a multifile document? Just wondering what might be going wrong.
On Mon, Oct 1, 2012 at 2:43 AM, juanfal notifications@github.com wrote:
humm! Now it fails in makePDF.py:320… it seems that
self.caller.tex_base
with utf chars breaks that call
It didn't occur before.
— Reply to this email directly or view it on GitHub< https://github.com/SublimeText/LaTeXTools/issues/81#issuecomment-9023839>.
Marciano Siniscalchi Economics Department, Northwestern University http://faculty.wcas.northwestern.edu/~msi661 — Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/SublimeText/LaTeXTools/issues/81#issuecomment-9066733.
Marciano Siniscalchi Economics Department, Northwestern University http://faculty.wcas.northwestern.edu/~msi661
The failure appears just in that line makePDF.py:320 when calling
data = open(self.caller.tex_base + ".log", 'r') \
.read().decode(self.caller.encoding, 'ignore') \
.encode(sublime_plugin.sys.getdefaultencoding(), 'ignore').splitlines()
I don't know what to do here
El 03/10/2012, a las 17:21, msiniscalchi notifications@github.com escribió:
Of course I believe you... it's just that I can't reproduce the issue on my machine. Which version of OS X and Texlive are you running? Just trying to figure out what might be causing the issue for you.
On Tue, Oct 2, 2012 at 5:31 AM, juanfal notifications@github.com wrote:
Humm!
please watch the problem here…
If you save a simple tex file inside a folder año it fails
https://www.dropbox.com/s/8mv8ha70ddcpnvc/texBuildutfproblem.mov
the same file without utfs does fine.
The problem appears just in makePDF.py:320. I have found it putting a sublime.error_message("Hi") around and it displays only if I put it just in the line before that.
El 02/10/2012, a las 03:27, msiniscalchi notifications@github.com escribió:
Hmmm... I checked again, and it doesn't seem to happen on my machine (running OS X Lion). To test, I created a directory called "años" (yeah, copied from your message!) and a simple tex file inside it. I was able to compile the file, and Skim was invoked. No error message appears in the Console.
Is this a multifile document? Just wondering what might be going wrong.
On Mon, Oct 1, 2012 at 2:43 AM, juanfal notifications@github.com wrote:
humm! Now it fails in makePDF.py:320… it seems that
self.caller.tex_base
with utf chars breaks that call
It didn't occur before.
— Reply to this email directly or view it on GitHub< https://github.com/SublimeText/LaTeXTools/issues/81#issuecomment-9023839>.
Marciano Siniscalchi Economics Department, Northwestern University http://faculty.wcas.northwestern.edu/~msi661 — Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/SublimeText/LaTeXTools/issues/81#issuecomment-9066733.
Marciano Siniscalchi Economics Department, Northwestern University http://faculty.wcas.northwestern.edu/~msi661 — Reply to this email directly or view it on GitHub.
I'm really sorry about this, but I'm not sure what to do. That piece of code is supposed to handle the encoding; the only assumption it makes is that the tex log file uses the system's default encoding, which is UTF-8 on OS X. I guess this may be failing for you. It's weird, because it's working for me, but then again, you probably have a Spanish (just guessing) locale, whereas I have a US locale. Maybe that makes a difference.
I also found this thread, having to do with TeXlive more than any editor in particular. The bottom line is that non-ASCII path and file names are not really supported (the original poster complains that including a file with a German umlaut in the name fails).
http://macosx-tex.576846.n2.nabble.com/path-names-with-umlauts-td7388698.html
THere may not be much I can do about this. Is there any way you can check
the encoding of the tex log file? I don't think ST2 gives you that
information, but you can use "file -i
http://stackoverflow.com/questions/539294/how-do-i-determine-file-encoding-in-osx
M
On Sun, Oct 7, 2012 at 6:51 AM, juanfal notifications@github.com wrote:
The failure appears just in that line makePDF.py:320 when calling
data = open(self.caller.tex_base + ".log", 'r') \ .read().decode(self.caller.encoding, 'ignore') \ .encode(sublime_plugin.sys.getdefaultencoding(), 'ignore').splitlines()
I don't know what to do here
El 03/10/2012, a las 17:21, msiniscalchi notifications@github.com escribió:
Of course I believe you... it's just that I can't reproduce the issue on my machine. Which version of OS X and Texlive are you running? Just trying to figure out what might be causing the issue for you.
On Tue, Oct 2, 2012 at 5:31 AM, juanfal notifications@github.com wrote:
Humm!
please watch the problem here…
If you save a simple tex file inside a folder año it fails
https://www.dropbox.com/s/8mv8ha70ddcpnvc/texBuildutfproblem.mov
the same file without utfs does fine.
The problem appears just in makePDF.py:320. I have found it putting a sublime.error_message("Hi") around and it displays only if I put it just in the line before that.
El 02/10/2012, a las 03:27, msiniscalchi notifications@github.com escribió:
Hmmm... I checked again, and it doesn't seem to happen on my machine (running OS X Lion). To test, I created a directory called "años" (yeah, copied from your message!) and a simple tex file inside it. I was able to compile the file, and Skim was invoked. No error message appears in the Console.
Is this a multifile document? Just wondering what might be going wrong.
On Mon, Oct 1, 2012 at 2:43 AM, juanfal notifications@github.com wrote:
humm! Now it fails in makePDF.py:320… it seems that
self.caller.tex_base
with utf chars breaks that call
It didn't occur before.
— Reply to this email directly or view it on GitHub<
https://github.com/SublimeText/LaTeXTools/issues/81#issuecomment-9023839>.
Marciano Siniscalchi Economics Department, Northwestern University http://faculty.wcas.northwestern.edu/~msi661 — Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHub< https://github.com/SublimeText/LaTeXTools/issues/81#issuecomment-9066733>.
Marciano Siniscalchi Economics Department, Northwestern University http://faculty.wcas.northwestern.edu/~msi661 — Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/SublimeText/LaTeXTools/issues/81#issuecomment-9207292.
Marciano Siniscalchi Economics Department, Northwestern University http://faculty.wcas.northwestern.edu/~msi661
You are absolutely right…
$ file -I texput.log texput.log: text/plain; charset=us-ascii $ cat texput.log This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012) (format=pdflatexs12 2012.9.6) 7 OCT 2012 13:45 restricted \write18 enabled. %&-line parsing enabled. **/Users/juanfc/Desktop/an^^cc^^83o/hola.tex
! Emergency stop.
FIXED!!!
As I found last tries, latexmk works as a charm when inside the problematic directory (that with utf8 chars), and then, only prepending "cd", "$project_path", seems to fix the problem!!!
"cmd": ["cd", "$project_path","latexmk",
"-e", "\\$pdflatex = 'pdflatex %O -interaction=nonstopmode -synctex=1 %S'",
//"-silent",
"-f", "-pdf"],
:) Juan Falgueras
El 07/10/2012, a las 16:12, msiniscalchi notifications@github.com escribió:
I'm really sorry about this, but I'm not sure what to do. That piece of code is supposed to handle the encoding; the only assumption it makes is that the tex log file uses the system's default encoding, which is UTF-8 on OS X. I guess this may be failing for you. It's weird, because it's working for me, but then again, you probably have a Spanish (just guessing) locale, whereas I have a US locale. Maybe that makes a difference.
I also found this thread, having to do with TeXlive more than any editor in particular. The bottom line is that non-ASCII path and file names are not really supported (the original poster complains that including a file with a German umlaut in the name fails).
http://macosx-tex.576846.n2.nabble.com/path-names-with-umlauts-td7388698.html
THere may not be much I can do about this. Is there any way you can check the encoding of the tex log file? I don't think ST2 gives you that information, but you can use "file -i
" or "file -I " in the Terminal. See here: http://stackoverflow.com/questions/539294/how-do-i-determine-file-encoding-in-osx
M
On Sun, Oct 7, 2012 at 6:51 AM, juanfal notifications@github.com wrote:
The failure appears just in that line makePDF.py:320 when calling
data = open(self.caller.tex_base + ".log", 'r') \ .read().decode(self.caller.encoding, 'ignore') \ .encode(sublime_plugin.sys.getdefaultencoding(), 'ignore').splitlines()
I don't know what to do here
El 03/10/2012, a las 17:21, msiniscalchi notifications@github.com escribió:
Of course I believe you... it's just that I can't reproduce the issue on my machine. Which version of OS X and Texlive are you running? Just trying to figure out what might be causing the issue for you.
On Tue, Oct 2, 2012 at 5:31 AM, juanfal notifications@github.com wrote:
Humm!
please watch the problem here…
If you save a simple tex file inside a folder año it fails
https://www.dropbox.com/s/8mv8ha70ddcpnvc/texBuildutfproblem.mov
the same file without utfs does fine.
The problem appears just in makePDF.py:320. I have found it putting a sublime.error_message("Hi") around and it displays only if I put it just in the line before that.
El 02/10/2012, a las 03:27, msiniscalchi notifications@github.com escribió:
Hmmm... I checked again, and it doesn't seem to happen on my machine (running OS X Lion). To test, I created a directory called "años" (yeah, copied from your message!) and a simple tex file inside it. I was able to compile the file, and Skim was invoked. No error message appears in the Console.
Is this a multifile document? Just wondering what might be going wrong.
On Mon, Oct 1, 2012 at 2:43 AM, juanfal notifications@github.com wrote:
humm! Now it fails in makePDF.py:320… it seems that
self.caller.tex_base
with utf chars breaks that call
It didn't occur before.
— Reply to this email directly or view it on GitHub<
https://github.com/SublimeText/LaTeXTools/issues/81#issuecomment-9023839>.
Marciano Siniscalchi Economics Department, Northwestern University http://faculty.wcas.northwestern.edu/~msi661 — Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHub< https://github.com/SublimeText/LaTeXTools/issues/81#issuecomment-9066733>.
Marciano Siniscalchi Economics Department, Northwestern University http://faculty.wcas.northwestern.edu/~msi661 — Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/SublimeText/LaTeXTools/issues/81#issuecomment-9207292.
Marciano Siniscalchi Economics Department, Northwestern University http://faculty.wcas.northwestern.edu/~msi661 — Reply to this email directly or view it on GitHub.
Sorry, forget about my last fix… not well tested, although the idea was correct, the way latexmk is a bit cumbersome, the final fix is:
"cmd": ["latexmk", "-cd",
"-e", "\\$pdflatex = 'pdflatex %O -interaction=nonstopmode -synctex=1 `basename %S`'",
"-silent",
"-f", "-pdf"],
It only includes a -cd option to latexmk
Hope this helps
Thanks for your great, useful and really well supported tools
Sincerely Juan F.
FIXED!!!
As I found last tries, latexmk works as a charm when inside the problematic directory (that with utf8 chars), and then, only prepending "cd", "$project_path", seems to fix the problem!!!
"cmd": ["cd", "$project_path","latexmk",
"-e", "\\$pdflatex = 'pdflatex %O -interaction=nonstopmode -synctex=1 %S'",
//"-silent",
"-f", "-pdf"],
:) Juan Falgueras
El 07/10/2012, a las 16:12, msiniscalchi notifications@github.com escribió:
I'm really sorry about this, but I'm not sure what to do. That piece of code is supposed to handle the encoding; the only assumption it makes is that the tex log file uses the system's default encoding, which is UTF-8 on OS X. I guess this may be failing for you. It's weird, because it's working for me, but then again, you probably have a Spanish (just guessing) locale, whereas I have a US locale. Maybe that makes a difference.
I also found this thread, having to do with TeXlive more than any editor in particular. The bottom line is that non-ASCII path and file names are not really supported (the original poster complains that including a file with a German umlaut in the name fails).
http://macosx-tex.576846.n2.nabble.com/path-names-with-umlauts-td7388698.html
THere may not be much I can do about this. Is there any way you can check the encoding of the tex log file? I don't think ST2 gives you that information, but you can use "file -i
" or "file -I " in the Terminal. See here: http://stackoverflow.com/questions/539294/how-do-i-determine-file-encoding-in-osx
M
On Sun, Oct 7, 2012 at 6:51 AM, juanfal notifications@github.com wrote:
The failure appears just in that line makePDF.py:320 when calling
data = open(self.caller.tex_base + ".log", 'r') \ .read().decode(self.caller.encoding, 'ignore') \ .encode(sublime_plugin.sys.getdefaultencoding(), 'ignore').splitlines()
I don't know what to do here
El 03/10/2012, a las 17:21, msiniscalchi notifications@github.com escribió:
Of course I believe you... it's just that I can't reproduce the issue on my machine. Which version of OS X and Texlive are you running? Just trying to figure out what might be causing the issue for you.
On Tue, Oct 2, 2012 at 5:31 AM, juanfal notifications@github.com wrote:
Humm!
please watch the problem here…
If you save a simple tex file inside a folder año it fails
https://www.dropbox.com/s/8mv8ha70ddcpnvc/texBuildutfproblem.mov
the same file without utfs does fine.
The problem appears just in makePDF.py:320. I have found it putting a sublime.error_message("Hi") around and it displays only if I put it just in the line before that.
El 02/10/2012, a las 03:27, msiniscalchi notifications@github.com escribió:
Hmmm... I checked again, and it doesn't seem to happen on my machine (running OS X Lion). To test, I created a directory called "años" (yeah, copied from your message!) and a simple tex file inside it. I was able to compile the file, and Skim was invoked. No error message appears in the Console.
Is this a multifile document? Just wondering what might be going wrong.
On Mon, Oct 1, 2012 at 2:43 AM, juanfal notifications@github.com wrote:
humm! Now it fails in makePDF.py:320… it seems that
self.caller.tex_base
with utf chars breaks that call
It didn't occur before.
— Reply to this email directly or view it on GitHub<
https://github.com/SublimeText/LaTeXTools/issues/81#issuecomment-9023839>.
Marciano Siniscalchi Economics Department, Northwestern University http://faculty.wcas.northwestern.edu/~msi661 — Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHub< https://github.com/SublimeText/LaTeXTools/issues/81#issuecomment-9066733>.
Marciano Siniscalchi Economics Department, Northwestern University http://faculty.wcas.northwestern.edu/~msi661 — Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/SublimeText/LaTeXTools/issues/81#issuecomment-9207292.
Marciano Siniscalchi Economics Department, Northwestern University http://faculty.wcas.northwestern.edu/~msi661 — Reply to this email directly or view it on GitHub.
OK, this seems innocuous enough to add :-)
I have one other user who has the same problem on Windows, where I don't use latexmk. I could simply change to the directory where the master file lives. That might be more robust / cross-platform. It won't solve the problem completely for multi-file projects though---what if you have some included files in a directory with non-ASCII chars? I think that will pose a problem...
Unfortunately tex, deep down, is not Unicode-friendly. We just have to deal with that :-(
OK, sorry for the morning rant, and thanks for the suggestion. I'll do something about it as soon as I have some time (should be soon).
On Mon, Oct 8, 2012 at 3:11 AM, juanfal notifications@github.com wrote:
Sorry, forget about my last fix… not well tested, although the idea was correct, the way latexmk is a bit cumbersome, the final fix is:
"cmd": ["latexmk", "-cd", "-e", "\$pdflatex = 'pdflatex %O -interaction=nonstopmode -synctex=1
basename %S
'", "-silent", "-f", "-pdf"],It only includes a -cd option to latexmk
Hope this helps
Thanks for your great, useful and really well supported tools
Sincerely Juan F.
FIXED!!!
As I found last tries, latexmk works as a charm when inside the problematic directory (that with utf8 chars), and then, only prepending "cd", "$project_path", seems to fix the problem!!!
"cmd": ["cd", "$project_path","latexmk", "-e", "\$pdflatex = 'pdflatex %O -interaction=nonstopmode -synctex=1 %S'", //"-silent", "-f", "-pdf"],
:) Juan Falgueras
El 07/10/2012, a las 16:12, msiniscalchi notifications@github.com escribió:
I'm really sorry about this, but I'm not sure what to do. That piece of code is supposed to handle the encoding; the only assumption it makes is that the tex log file uses the system's default encoding, which is UTF-8 on OS X. I guess this may be failing for you. It's weird, because it's working for me, but then again, you probably have a Spanish (just guessing) locale, whereas I have a US locale. Maybe that makes a difference.
I also found this thread, having to do with TeXlive more than any editor in particular. The bottom line is that non-ASCII path and file names are not really supported (the original poster complains that including a file with a German umlaut in the name fails).
http://macosx-tex.576846.n2.nabble.com/path-names-with-umlauts-td7388698.html
THere may not be much I can do about this. Is there any way you can check the encoding of the tex log file? I don't think ST2 gives you that information, but you can use "file -i
" or "file -I " in the Terminal. See here: http://stackoverflow.com/questions/539294/how-do-i-determine-file-encoding-in-osx
M
On Sun, Oct 7, 2012 at 6:51 AM, juanfal notifications@github.com wrote:
The failure appears just in that line makePDF.py:320 when calling
data = open(self.caller.tex_base + ".log", 'r') \ .read().decode(self.caller.encoding, 'ignore') \ .encode(sublime_plugin.sys.getdefaultencoding(), 'ignore').splitlines()
I don't know what to do here
El 03/10/2012, a las 17:21, msiniscalchi notifications@github.com escribió:
Of course I believe you... it's just that I can't reproduce the issue on my machine. Which version of OS X and Texlive are you running? Just trying to figure out what might be causing the issue for you.
On Tue, Oct 2, 2012 at 5:31 AM, juanfal notifications@github.com wrote:
Humm!
please watch the problem here…
If you save a simple tex file inside a folder año it fails
https://www.dropbox.com/s/8mv8ha70ddcpnvc/texBuildutfproblem.mov
the same file without utfs does fine.
The problem appears just in makePDF.py:320. I have found it putting a sublime.error_message("Hi") around and it displays only if I put it just in the line before that.
El 02/10/2012, a las 03:27, msiniscalchi notifications@github.com
escribió:
Hmmm... I checked again, and it doesn't seem to happen on my machine (running OS X Lion). To test, I created a directory called "años" (yeah, copied from your message!) and a simple tex file inside it. I was able to compile the file, and Skim was invoked. No error message appears in the Console.
Is this a multifile document? Just wondering what might be going wrong.
On Mon, Oct 1, 2012 at 2:43 AM, juanfal < notifications@github.com> wrote:
humm! Now it fails in makePDF.py:320… it seems that
self.caller.tex_base
with utf chars breaks that call
It didn't occur before.
— Reply to this email directly or view it on GitHub<
https://github.com/SublimeText/LaTeXTools/issues/81#issuecomment-9023839>.
Marciano Siniscalchi Economics Department, Northwestern University http://faculty.wcas.northwestern.edu/~msi661 — Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHub<
https://github.com/SublimeText/LaTeXTools/issues/81#issuecomment-9066733>.
Marciano Siniscalchi Economics Department, Northwestern University http://faculty.wcas.northwestern.edu/~msi661 — Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHub< https://github.com/SublimeText/LaTeXTools/issues/81#issuecomment-9207292>.
Marciano Siniscalchi Economics Department, Northwestern University http://faculty.wcas.northwestern.edu/~msi661 — Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/SublimeText/LaTeXTools/issues/81#issuecomment-9218876.
Marciano Siniscalchi Economics Department, Northwestern University http://faculty.wcas.northwestern.edu/~msi661
El 08/10/2012, a las 15:15, msiniscalchi notifications@github.com escribió:
OK, this seems innocuous enough to add :-)
I have one other user who has the same problem on Windows, where I don't use latexmk. I could simply change to the directory where the master file lives. That might be more robust / cross-platform. It won't solve the problem completely for multi-file projects though---what if you have some included files in a directory with non-ASCII chars? I think that will pose a problem...
Unfortunately tex, deep down, is not Unicode-friendly. We just have to deal with that :-(
OK, sorry for the morning rant, and thanks for the suggestion. I'll do something about it as soon as I have some time (should be soon).
I have tried a multifile contrived document
%!TEX root = Prueba.tex
%&pdflatexs12
\begin{document} A ver
\input{otro.tex}
All inside a folder with utf8 chars…
Everything has worked perfectly.
OK, I looked into this. It turns out that my code already changes into the working directory (otherwise latexmk would, by default, place all output in the root directory!). Now, you pass a "-cd" option to latexmk, but I am not sure it does much for you. What does help instead is the fact that you pass basename $S
to pdflatex---the file name without the path name.
Can you try to see what happens if you remove the -cd, but leave the basename
bit? If so, I can simply pass the file name of the (master) tex file to latexmk, since we should already be in the right directory. Thanks!
El 09/10/2012, a las 06:15, msiniscalchi notifications@github.com escribió:
OK, I looked into this. It turns out that my code already changes into the working directory (otherwise latexmk would, by default, place all output in the root directory!). Now, you pass a "-cd" option to latexmk, but I am not sure it does much for you. What does help instead is the fact that you pass basename $S to pdflatex---the file name without the path name.
You only need to add the "-cd" option to latexmk parameters in order to avoid it reading those badly encoded auxiliary files and then it works!!!
I am sending attached a screencast:
A folder ññññ with utfs in its name Inside the folder two files of a multifile latex project. otro.tex depends on Prueba.tex (%!TEX root = Prueba.tex) I try ⌘-B without "-cd" in Build… it fails I add "-cd" to the latexmk build command: it works.
Can you try to see what happens if you remove the -cd, but leave the basename bit? If so, I can simply pass the file name of the (master) tex file to latexmk, since we should already be in the right directory. Thanks!
So, -cd without the basename %S
trick? Sorry but I don't have a Mac handy right now
El 09/10/2012, a las 16:05, msiniscalchi notifications@github.com escribió:
So, -cd without the basename %S trick? Sorry but I don't have a Mac handy right now
Exactly, you only need to add the argument "-cd" to latexmk in your build conf file. It does all the needed magic. I think what happens here is once the reference path is internally changed in the perl script latexmk, it doesn't need to analyze or read any bad formed utf path… and works using ./ as path… Thats an opinion only, but what it's true is that it works!
OK, done! I just committed the change. One further advantage is that the file name in the output panel is obviously much shorter, which allows you to actually see the error/warning messages without scrolling sidewise.
Hope this doesn't break anything else :-)
Thanks!
I'm using windows 8 and I can't compile projects that are in folder with portugues chars like ç, á, ã... In my particular case, I have a tex file placed in
"E:\Dropbox\USP\Mestrado\2º Semestre\Visualização Computacional\Trabalho"
I read this thread and started working on a solution... I know it's already closed but can be a problem related to this thread.. (sorry if I'm wrong)
I did the same approach as Juan (juanfal) suggested... Tried to go into the folder and compile the latex file from there. For that i changed the Latex.sublime-build for this
"cmd": ["cd /D", "$file_path &", "texify", "-b", "-p", "--tex-option=\"-synctex=1\"", "$file_name" ],
I did this to get something like this:
cd /D E:\Dropbox\USP\Mestrado\2º Semestre\Visualização Computacional\Trabalho & texify -b -p --tex-option="-synctex=1" app.tex
First of all, I tested this command in my cmd and it works. The thing is that ST2 still concatenating the hole file path and name in the end of the command. To avoid it I changed makePDF.py on line 43 for this:
cmd = self.caller.make_cmd
I know it is not the correct way to do this thing, but i was trying to make a kind of "work around" to check if it's gonna work. Thing is that i didn't get success on it. =(
I don't have much knowing on the LatexTool code and, to complicate things, I don't know how to program python.
Thanks, I'll take a look. I think the long-term solution will be to switch from texify to latexmk, so MikTeX can be handled just like TeXLive & friends. Please reopen this issue (if you haven't done so already).
On Fri, Nov 30, 2012 at 3:40 PM, Felipe Simões Lage Gomes Duarte < notifications@github.com> wrote:
I'm using windows 8 and I can't compile projects that are in folder with portugues chars like ç, á, ã... In my particular case, I have a tex file placed in
"E:\Dropbox\USP\Mestrado\2º Semestre\Visualização Computacional\Trabalho"
I read this thread and started working on a solution... I know it's already closed but can be a problem related to this thread.. (sorry if I'm wrong)
I did the same approach as Juan (juanfal) suggested... Tried to go into the folder and compile the latex file from there. For that i changed the
Latex.sublime-build for this
"cmd": ["cd /D", "$file_path &", "texify", "-b", "-p", "--tex-option=\"-synctex=1\"", "$file_name" ],
I did this to get something like this:
cd /D E:\Dropbox\USP\Mestrado\2º Semestre\Visualização Computacional\Trabalho & texify -b -p --tex-option="-synctex=1" app.tex
First of all, I tested this command in my cmd and it works. The thing is that ST2 still concatenating the hole file path and name in the end of the
command. To avoid it I changed makePDF.py on line 43 for this:
cmd = self.caller.make_cmd
I know it is not the correct way to do this thing, but i was trying to make a kind of "work around" to check if it's gonna work. Thing is that i didn't get success on it. =(
I don't have much knowing on the LatexTool code and, to complicate things, I don't know how to program python.
— Reply to this email directly or view it on GitHubhttps://github.com/SublimeText/LaTeXTools/issues/81#issuecomment-10905049.
Marciano Siniscalchi Economics Department, Northwestern University http://faculty.wcas.northwestern.edu/~msi661
I don't think i have permission to reopen this. I searched somewhere to reopen and I didn't found anything. Any ways, i will also try the approach that you have suggested.
OK, I'll take care of it.
On Fri, Nov 30, 2012 at 5:01 PM, Felipe Simões Lage Gomes Duarte < notifications@github.com> wrote:
I don't think i have permission to reopen this. I searched somewhere to reopen and I didn't found anything. Any ways, i will also try the approach that you have suggested.
— Reply to this email directly or view it on GitHubhttps://github.com/SublimeText/LaTeXTools/issues/81#issuecomment-10907594.
Marciano Siniscalchi Economics Department, Northwestern University http://faculty.wcas.northwestern.edu/~msi661
When building a file.tex inside a path with spaces and utf8 chars, LTT fails opening the file with Skim. If you move to a safer path the same file, it opens the pdf file with Skim without any problems.