From: Jose Augusto <jasaugusto@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Ruby 1.9.1 and non-ascii char parsing in .tui file
Date: Sat, 8 Aug 2009 20:16:10 +0100 [thread overview]
Message-ID: <1781d7210908081216n46c62018kb3a5f14643afb396@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 2385 bytes --]
Hi all,
A few weeks ago I reported a problem with ruby 1.9.1, which
was solved by removing the offending .tui line (Mojca and Hans
AFAIR). The problem was related with the existence of non-ascii
chars in the .tui file. Sadly it strikes again, now when chars with
accents appear in titles (sections, subsections, etc...).
The parsing of the line signaled below in the end of this message, from a
.tui file,
fails in ruby 1.9.1, but not in ruby 1.8.7. The error which is returned is
also shown.
If I remove the chars with accents from the section title all goes well. I'm
using
Mkii (--context=current).
One of the advantages of ruby 1.8 over 1.8 is tht it is 3 times faster...
However, ruby made lots of changes in string manipulation and storing
when moving from 1.8 to 1.9, and that must be the source of the problem.
I tracked the error to texutil.rb, line 1035:
when /^c (.*)$/o then @plugins.reader('MyCommands', [$1])
but then i got lost in the Classes/Modules jungle :-) in that script.
Perhaps it is this this procedure, in line 403 of texutil.rb, which triggers
the error?
def MyCommands::reader(logger,data)
@@commands.push(data.shift+data.collect do |d| "\{#{d}\}"
end.join)
end
Thx for your support in advance.
If I can help in the solution of the problem please direct me in the task. I
have some
experience with ruby (I started using it when the 1st pickaxe book edition
was
published, around 2001) and with perl. But not with Lua :-)... Although I
read
alraedy quite a lot of Roberto's Lua book, I didn't started coding in Lua
yet :-)
Kind Regards
J. Augusto
############## TUI file and trigered error ###################
## .tui snippet
........
c \mainreference{}{a}{2--0-1-1-0-0-0-0--1}{1}{1.1}
>>>>>> c \listentry{subsection}{3}{1.1.1}{Title with accents:
Ãçê}{2--0-1-1-1-0-0-0--1}{1}
c \mainreference{}{b}{2--0-1-1-1-0-0-0--1}{1}{1.2}
### error
pdfTeX warning: pdftex.exe: no GlyphToUnicode entry has been inserted yet!
Output written on test1.pdf (1 page, 72793 bytes).
Transcript written on test1.log.
TeXUtil | parsing file test1.tui
TeXUtil | fatal error in parsing test1.tui
TeXUtil | check loading of file 'test1', begin/end problem
TeXUtil | shortcuts : 169
TeXUtil | expansions: 308
#############################
[-- Attachment #1.2: Type: text/html, Size: 2607 bytes --]
[-- Attachment #2: Type: text/plain, Size: 487 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next reply other threads:[~2009-08-08 19:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-08 19:16 Jose Augusto [this message]
2009-08-09 19:57 ` Hans Hagen
2009-08-10 3:15 ` Jose Augusto
2009-08-10 13:10 ` Hans Hagen
2009-08-10 15:21 ` Jose Augusto
2009-08-10 16:27 ` Hans Hagen
2009-08-10 17:20 ` Jose Augusto
2009-08-10 17:39 ` Hans Hagen
2009-08-10 18:11 ` Jose Augusto
2009-08-10 18:20 ` Hans Hagen
2009-08-10 15:15 ` Jose Augusto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1781d7210908081216n46c62018kb3a5f14643afb396@mail.gmail.com \
--to=jasaugusto@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).