SCM

Forum: support

Monitor Forum | Start New Thread Start New Thread
RE: tinytex and UTF-8 [ Reply ]
By: Achim Zeileis on 2022-04-05 10:20
[forum:49383]
As described in my response to Francisco from 2021-09-17 16:21: the problem appears to be that if there is a log message with an umlaut, that ISO-8859-1 (latin1) rather than UTF-8 is used. This makes tinytex choke because it tries to read and resolve issues from the .log. It's probably not critical here, though.

RE: tinytex and UTF-8 [ Reply ]
By: Sigbert Klinke on 2022-04-05 09:12
[forum:49382]
Hi,

I have the same problem, but I guess with german umlauts:

In xfun::read_utf8(log) :
The file single1.log is not encoded in UTF-8. These lines contain invalid UTF-8 characters: 801, 802, 808

But the exams2pdf creates a correct PDF.

Best Sigbert

RE: tinytex and UTF-8 [ Reply ]
By: Achim Zeileis on 2021-09-24 16:18
[forum:49137]
I'm not sure either what changed to cause this problem, sorry...

RE: tinytex and UTF-8 [ Reply ]
By: Francisco Goerlich on 2021-09-24 09:28
[forum:49136]
Just an small question.
Is this a tinytex problem or a problem with my Latex distribution?

I didn´t have this messages last lear, so some has change in updating libraries.

Thanks a lot!

RE: tinytex and UTF-8 [ Reply ]
By: Francisco Goerlich on 2021-09-17 14:56
[forum:49135]
Thanks a lot for looking at this!

I checked tha exercises are not affected, but...

RE: tinytex and UTF-8 [ Reply ]
By: Achim Zeileis on 2021-09-17 14:21
[forum:49134]
So what happens is that there is an overfull hbox which prompts LaTeX to write the corresponding text line into the log message. For some reason LaTeX does so using ISO-8859 (aka latin1) encoding, I don't know why. tinytex tries to read the log file (because it wants to help resolving all usepackage issues etc.) and cannot do so because of the latin1 encoding. Hence the warning.

So usually this warning should be non-critical. But I don't know why LaTeX uses latin1 for the log message...

RE: tinytex and UTF-8 [ Reply ]
By: Francisco Goerlich on 2021-09-17 07:02
[forum:49133]

plain8_en1.log (5) downloads
I attach the full "plain8_en1.log" I get file in case it can be of any help.
Thanks

RE: tinytex and UTF-8 [ Reply ]
By: Francisco Goerlich on 2021-09-17 07:00
[forum:49131]
I attached the full "plain8_en1.log" file in case it can be of any help.
Thnaks

RE: tinytex and UTF-8 [ Reply ]
By: Francisco Goerlich on 2021-09-17 06:57
[forum:49130]

plain8_en1.pdf (13) downloads
Thanks for the quick response Achim.

Yes, I´m on Windows. The workaround does not work, since the proble is not with "Soución". In fact I only get this problem with these two exercises.

The problematic lines in the log file:
"The file plain8_en1.log is not encoded in UTF-8. These lines contain invalid UTF-8 characters: 238, 239"

Are these ones:
"[]\T1/aer/m/n/10 ½Falso! Los mod-e-los es-tadís-ti-cos pueden ser clasi-fi-ca-d
os en dos grandes gru-pos, \T1/aer/b/n/10 paramétri-"

but the pdf with the problem is perfect (attached), so I assume that the encoding problem is with the log file only, not with the exams.

Thanks a lot.


RE: tinytex and UTF-8 [ Reply ]
By: Achim Zeileis on 2021-09-17 02:37
[forum:49129]
Hmm, some sort of encoding problem that may occur in non-UTF-8 locales. For me everything runs smoothly, presumably because I'm in UTF-8. Anyone else who can test this on Windows and/or has an idea for what's going on?

For the time being, a quick workaround could be to use "Soluci{\'o}n" instead of "Solución".

RE: tinytex and UTF-8 [ Reply ]
By: Francisco Goerlich on 2021-09-16 17:44
[forum:49128]

repex.zip (4) downloads
Hi Achim,

Many thanks for your quick response. Very helpful indeed!

It is not clear to me what is the problem. Find an attached example.
Using template "plain8_en.text", which is the orginal template that comes with r-exams it appears that the encoding problem relates to the log file only. Not really with the pdf generated.

Using template "plain8.tex", the same as the original one with two more packages and with "Solución" instead of "Solution", give me the same warning, but in this case the log file does not appear.

The curious thing is that I used these problem last year and I had no problem!

Since I use this to send exams to students, I must check that everything is correct, before I do so.

Many thanks in advance

RE: tinytex and UTF-8 [ Reply ]
By: Achim Zeileis on 2021-09-16 15:49
[forum:49127]
Francisco, thanks for your message, encoding issues are always nasty. I haven't seen this specific one yet, though.

What you can do to debug it is setting exams2pdf(..., texdir = "...") to a directory which you can inspect afterwards. Be careful, though, to set this to an empty and otherwise unused directory because previous files may be wiped! The documentation also explains:

texdir: character specifying a directory for running 'texi2dvi' in.
By default this is chosen via 'tempfile' (and deleted again)
but, if specified by the user, the temporary LaTeX files from
the last iteration are preserved and not deleted. This is
intended especially for debugging purposes.

tinytex and UTF-8 [ Reply ]
By: Francisco Goerlich on 2021-09-16 15:13
[forum:49126]
Hi,
Using exams2pdf() a get this warning:

Warning message:
In xfun::read_utf8(log) :
The file mytemplate1.log is not encoded in UTF-8. These lines contain invalid UTF-8 characters: 491, 492, 502, 503

Apparently the pdf created has no problems. May I assume this?
I have not found mytemplate1.log. Where is this located?

Thanks in advance.

Thanks to:
Vienna University of Economics and Business Powered By FusionForge