From: Hans Hagen <pragma@wxs.nl>
Subject: Re: Chinese in ConTeXt
Date: Tue, 31 May 2005 09:33:55 +0200 [thread overview]
Message-ID: <429C1363.40008@wxs.nl> (raw)
In-Reply-To: <429BF459.5030707@lbapdm.brandenburg.de>
[-- Attachment #1: Type: text/plain, Size: 1577 bytes --]
Lutz Haseloff wrote:
> b.t.w. I think, \dohandleunicodeflowglyph doesn't handle
> some glyphs right. Particularly the glyphs with parenthesis
> {} and Backslash.
>
> ConTeXt complains about my qianziwen-Big5.tex:
>
>
> -------------------------------------------
> ! Use of \dohandleunicodeflowglyph doesn't match its definition.
> <recently read> ¦
>
> \handleunicodeflowglyph ...ttoken \@EA `\string #2
> \relax
> l.18 »\¦
> ¹¨µo¡A¥|¤j¤±`¡C®¥±©Áù¾i¡A°Z´±·´¶Ë¡C
> ?
> -------------------------------------------
>
>
> Attached GBK-file works fine.
>
> Is it possible to make \dohandleunicodeflowglyph more robust
> to handle those big5 glyphs right?
> Or is it my mistake again?
i may be wrong (long ago that i made that-) but those file needs some treatment
(esp when one uses arguments)
tex2uc yourfile
texexec yourfile
uc2tex yourfile
actually, since i have a indirect option in texexec (for xml) i can make this
automatic, e.g. when the first line has something
% preprocess=tex2uc
I must think of it; remind me
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
[-- Attachment #2: uc2tex.pl --]
[-- Type: text/plain, Size: 773 bytes --]
# ConTeXt uc converter / beta version / 2-12-1999 / don't redistribute
$filename = $ARGV[0] ;
$recoded = 0 ;
sub unirecoded
{ print chr($_[1]) ; ++$recoded ; return chr($_[0]).chr($_[1]) }
if ((open(INP,"$filename.tex"))&&(open(OUT,">$filename.tmp")))
{ print "processing file $filename.tex " ;
while (<INP>)
{ s/\\uc\{(\d*)\}\{(\d*)\}/unirecoded($1,$2)/goe ; print OUT $_ }
close(INP) ;
close(OUT) ;
unlink "$filename.tec" ;
rename "$filename.tex", "$filename.tec" ;
rename "$filename.tmp", "$filename.tex" ;
if ($recoded)
{ print " - $recoded glyphs recoded - original saved as $filename.tec\n" }
else
{ print "- no glyphs recoded\n" } }
else
{ print "invalid filename\n" }
[-- Attachment #3: tex2uc.pl --]
[-- Type: text/plain, Size: 1174 bytes --]
# ConTeXt uc converter / beta version / 2-12-1999 / don't redistribute
if ($ARGV[0] ne '')
{ @filenames = @ARGV }
else
{ @filenames = glob "*.tex" }
foreach (@filenames) { s/\.tex$//io }
sub unirecode
{ my ($a,$b) = @_ ;
if ((ord($b)<0x80)&&($b !~ /[a-zA-Z0-9]/))
{ print "$b" ; ++$recoded ;
return "\\uc\{" . ord($a) . "\}\{". ord($b) . "\}" }
else
{ return "$a$b" } }
foreach $filename (@filenames)
{ if (open(INP,"$filename.tex"))
{ $recoded = 0 ;
print "processing file $filename.tex " ;
$/ = "\0777" ;
$_ = <INP> ;
close(INP) ;
s/([\x80-\xFF])(.)/unirecode($1,$2)/mgoe ;
if (($recoded)&&(open(OUT,">$filename.tmp")))
{ print OUT $_ ;
close(OUT) ;
unlink "$filename.tec" ;
rename "$filename.tex", "$filename.tec" ;
rename "$filename.tmp", "$filename.tex" }
if ($recoded)
{ print " - $recoded glyphs recoded - original saved as $filename.tec\n" }
else
{ print "- no glyphs recoded\n" } }
else
{ print "invalid filename\n" } }
[-- Attachment #4: Type: text/plain, Size: 139 bytes --]
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
next prev parent reply other threads:[~2005-05-31 7:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-29 8:49 Xiao Jianfeng
2005-05-29 10:53 ` Michael Hallgren
2005-05-29 18:15 ` Hans Hagen
2005-05-30 1:20 ` Xiao Jianfeng
2005-05-30 4:43 ` Lutz Haseloff
2005-05-30 5:09 ` Xiao Jianfeng
2005-05-30 5:25 ` Xiao Jianfeng
2005-05-31 5:21 ` Lutz Haseloff
2005-05-31 7:33 ` Hans Hagen [this message]
2005-06-06 8:08 ` Xiao Jianfeng
2005-06-08 22:54 ` Henning Hraban Ramm
2005-06-09 7:18 ` modules.pdf luigi.scarso
2005-08-19 14:16 ` modules.pdf luigi.scarso
2005-08-23 6:59 ` modules.pdf luigi.scarso
2005-06-03 7:58 Chinese in ConTeXt 常大鹏
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=429C1363.40008@wxs.nl \
--to=pragma@wxs.nl \
--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).