[XeTeX] VIQR pre-processor wrotten in (Xe)TeX ?

John Was john.was at ntlworld.com
Fri Nov 25 10:29:19 CET 2011


Hi

I've only glanced at this thread and may not have quite got the gist, but 
some time ago I (when moving to XeTeX from an old plain EmTeX installation) 
I managed, with some effort, to convert a collection of early modern Greek 
plays from a rebarbative transliteration system into Unicode polytonic Greek 
using (among other things) Microsoft Word's macro facility.  The macros 
became long and complicated, but, they were essentially multiple 
search-and-replace operations.  In the old pure ASCII files, for example, an 
eta with circumflex accent was {\etacircumflex}, and the portion of the Word 
macro that converted that was:

    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "{\etacircumflex}"
        .Replacement.Text = ChrW(8134)
        .Forward = True
        .Wrap = wdFindContinue
        .Format = True
        .MatchCase = True
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll

(Word's Visual Basic uses decimal:  8134 is hex 1FC6, which is indeed the 
Unicode value for eta with circumflex accent.)

So, could your wife not continue to input in her preferred method in Word, 
after which run a macro on the file to produce true Unicode?   It would be a 
tedious job to construct and tweak the macro, but once done it's done for 
ever...  Basically it would be a whole string of macros on the analogy of 
the one just given.  Things could get somewhat messed up if your wife's 
files also contain other material (not in Vietnamese), though you can have 
conditionals such as 'bold' set to true so that if she typed her Vietnamese 
text in bold (and there was no other bold in the file), then only the italic 
text would be affected when running the macro.  Simplest, of course, if the 
file contains nothing but the Vietnamese text.

But apologies if this is completely on the wrong track!


John


----- Original Message ----- 
From: "Philip TAYLOR" <P.Taylor at Rhul.Ac.Uk>
To: "Unicode-based TeX for Mac OS X and other platforms" <xetex at tug.org>
Sent: 25 November 2011 09:08
Subject: Re: [XeTeX] VIQR pre-processor wrotten in (Xe)TeX ?


>
>
> Diederick C. Niehorster wrote:
>> On Fri, Nov 25, 2011 at 16:11, Philip TAYLOR<P.Taylor at rhul.ac.uk> 
>> wrote:>
>>> The problem is that the Vietnamese text will be entered with my
>>> wife Âu Dương Lệ Khanh, who is a native Vietnamese speaker but who
>>> has no knowledge whatsoever of inputting in Unicode.  She can
>>> easily express the Vietnamese portions of the menu in VIQR;
>>> it would be very hard, and perhaps impossible, for her to do
>>> the same in Unicode.
>>
>> I'm speaking from no experience here, but from i've read in the
>> thread: there is an input method which takes VIQR as keystrokes and
>> puts the right unicode characters. So, if this is about getting the
>> job done, then that would be sufficient. Your wife can use VIQR as
>> she's used to and you get characters that don't have to be converted.
>> If its about the challenge of converting, then go ahead of course :p
>
> If my wife (or I) were able to accomplish that, then of course
> it would be ideal.  But we have not been able to.  She uses
> Microsoft Word as her editor, and neither of us have the
> slightest idea how to configure English Windows (and/or Word)
> to allow VIQR as an input method.  On at least one machine
> on which she might want to do this, she would also not have
> software installation privileges.  Thus direct input of VIQR,
> and saving /as/ VIQR, is, for her, the simplest solution,
> and it then becomes my responsibility to accept her VIQR and
> convert it to Unicode within XeTeX.
>
> Philip Taylor
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex
> 



More information about the XeTeX mailing list