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

2011-11-26 Thread Philip TAYLOR

MY thanks to all who have offered helpful suggestions
in VIQR.  Unikey looks promising as an IME (I am waiting
for my wife to tell me what the buttons say !), and
a list member has kindly offered off-list to have a go
at creating a TECkit map as and when he has time.  So
let us not expend further effort on this topic for the
time being; it looks as if there are at least two fairly
straightforward solutions.

** Phil.


--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex


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

2011-11-26 Thread Zdenek Wagner
2011/11/26 Vafa Khalighi :
> Sorry, I have not followed this discussion carefully on what others said but
> if all fails, I would use an external program (a per-processor) to do that.
> You can actually can make it automatic by just using the write18 feature of
> TeX. You write your tex document in VQR, then TeX calls your per-processor
> and converts your VQR to unicode and finally compiles your unicode TeX
> document, giving you PDF.
>
I did not follow the discussion because someone has already suggested
TECkit maps and it seemed to tme that the problem has been solved. Do
you need more complex preprocessing than just simple mapping of input
bytes to output bytes? I can imagine that it may be complex and cannot
be done in a simple step. You can look to the xetex-devanagari
package. The Velthuis maps were created by me. Vowels have to be
treated in a special way, viramas have to be inserted in between
consonants, thus I cannot do everything in a single step. Moreovever,
there is just a small difference between Sanskrit and Hindi, therefore
the Sanskrit map is essentially the Hindi map with one more step.
Maybe these samples can help you.

> On Sat, Nov 26, 2011 at 12:26 PM, Bruno Le Floch  wrote:
>>
>> > Bruno Le Floch wrote:
>> >> Is it simply a matter of going through the string and replace various
>> >> characters by TeX accents (and take care of character order), or does
>> >> the result have to be Unicode?
>> >>
>> >> E.g., does it have to be a(a^ → ăâ, or can it be a(a^ → \u{a}\^{a} ?
>> >> If the second one is ok, then it shouldn't be too hard to write the
>> >> conversion in TeX macros. Please provide a list of the necessary
>> >> conversion rules.
>> >
>> > Vietnamese is difficult for TeX, because over a single
>> > character there can be a requirement for both an
>> > accent (to indicate a pronunciation different from
>> > that for the unaccented letter) and a tone marker
>> > (which applies to the whole word, but which has
>> > a canonical placement that may well be on an
>> > already accented letter).  Hàn Thế Thành created
>> > a way of accomplishing this using standard TeX,
>> > but XeTeX can do it natively.  Incidentally,
>> > the "ế" at the end of Thành's middle name demonstrates
>> > exactly the problem : something that TeX cannot
>> > accomplish without special fonts, since it has
>> > no primitive for positioning two diacritics over
>> > a single character.
>>
>> Thanks for the explanation. So we need to produce a Unicode string.
>>
>> Firstly, I should have asked: is it possible to require the Vietnamese
>> VIQR input as an argument of a macro, rather than being typeset
>> directly? e.g., \viqr{a^o' e\.}. I'll assume that it is ok.
>>
>> Then do you have a list of all Vietnamese characters and their VIQR
>> representation? Or some precise reference to what transformation you
>> want to apply? In particular, how many different characters do you
>> expect to get on output (that should be the size of the "alphabet")?
>>
>> Regards,
>> Bruno
>>
>>
>>
>> --
>> Subscriptions, Archive, and List information, etc.:
>>  http://tug.org/mailman/listinfo/xetex
>
>
>
>
> --
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex
>
>



-- 
Zdeněk Wagner
http://hroch486.icpf.cas.cz/wagner/
http://icebearsoft.euweb.cz



--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


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

2011-11-25 Thread Andrew Cunningham
phil, it is possible to type unocode using viqr as Input sequence. If she
can use viqr is is adhort syep to typing. Exactly same key sequences




On Friday, 25 November 2011, Philip TAYLOR  wrote:
>
>
> Ross Moore wrote:
>
>> At least here we have \.   (since '.' has catcode 12, not 11).
>> So it should be possible to modify the definition of \.{ } within
>> the NFSS processing of \.  to assign a special meaning.
>> This is coding that could be easily included within Xunicode.sty ,
>> but applied only optionally, according to encoding or within a
font-switch.
>
> Just to clarify : as always, I am working within a Plain
> regime, so from my perspective a TECkit mapping should
> not assume the existence (and use) of LaTeX adjuncts such
> as Xunicode.sty.
>
> Qyanh Minh Nguyen (阮光明) wrote :
>
>> It might be slightly off topic, but wouldn't it be simpler to enter
>> unicode directly into your tex file?  After all, we're using xetex.
>>
>> I can see the usefulness of creating a mapping for the long term, as a
>> general tool.  It would be of great help if one uses a text editor
>> that doesn't support unicode.  For that matter, doing something
>> similar for TELEX or VNI should be an added goal.
>>
>> But back to Philip's original problem (of typesetting a restaurant
>> menu), I would do that by entering unicode directly.  For example on
>> my mac, I would choose VIQR as an input method and type the
>> multilingual text directly in texworks, texshop, or emacs (aquamacs),
>> and declare an appropriate font in my tex file.
>
> 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.
>
> ** Phil.
>
>
> --
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex
>

-- 
Andrew Cunningham
Senior Project Manager, Research and Development
Vicnet
State Library of Victoria
Australia

andr...@vicnet.net.au
lang.supp...@gmail.com


--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


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

2011-11-25 Thread Vafa Khalighi
Sorry, I have not followed this discussion carefully on what others said
but if all fails, I would use an external program (a per-processor) to do
that. You can actually can make it automatic by just using the write18
feature of TeX. You write your tex document in VQR, then TeX calls your
per-processor and converts your VQR to unicode and finally compiles your
unicode TeX document, giving you PDF.

On Sat, Nov 26, 2011 at 12:26 PM, Bruno Le Floch  wrote:

> > Bruno Le Floch wrote:
> >> Is it simply a matter of going through the string and replace various
> >> characters by TeX accents (and take care of character order), or does
> >> the result have to be Unicode?
> >>
> >> E.g., does it have to be a(a^ → ăâ, or can it be a(a^ → \u{a}\^{a} ?
> >> If the second one is ok, then it shouldn't be too hard to write the
> >> conversion in TeX macros. Please provide a list of the necessary
> >> conversion rules.
> >
> > Vietnamese is difficult for TeX, because over a single
> > character there can be a requirement for both an
> > accent (to indicate a pronunciation different from
> > that for the unaccented letter) and a tone marker
> > (which applies to the whole word, but which has
> > a canonical placement that may well be on an
> > already accented letter).  Hàn Thế Thành created
> > a way of accomplishing this using standard TeX,
> > but XeTeX can do it natively.  Incidentally,
> > the "ế" at the end of Thành's middle name demonstrates
> > exactly the problem : something that TeX cannot
> > accomplish without special fonts, since it has
> > no primitive for positioning two diacritics over
> > a single character.
>
> Thanks for the explanation. So we need to produce a Unicode string.
>
> Firstly, I should have asked: is it possible to require the Vietnamese
> VIQR input as an argument of a macro, rather than being typeset
> directly? e.g., \viqr{a^o' e\.}. I'll assume that it is ok.
>
> Then do you have a list of all Vietnamese characters and their VIQR
> representation? Or some precise reference to what transformation you
> want to apply? In particular, how many different characters do you
> expect to get on output (that should be the size of the "alphabet")?
>
> Regards,
> Bruno
>
>
>
> --
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex
>


--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


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

2011-11-25 Thread Bruno Le Floch
> Bruno Le Floch wrote:
>> Is it simply a matter of going through the string and replace various
>> characters by TeX accents (and take care of character order), or does
>> the result have to be Unicode?
>>
>> E.g., does it have to be a(a^ → ăâ, or can it be a(a^ → \u{a}\^{a} ?
>> If the second one is ok, then it shouldn't be too hard to write the
>> conversion in TeX macros. Please provide a list of the necessary
>> conversion rules.
>
> Vietnamese is difficult for TeX, because over a single
> character there can be a requirement for both an
> accent (to indicate a pronunciation different from
> that for the unaccented letter) and a tone marker
> (which applies to the whole word, but which has
> a canonical placement that may well be on an
> already accented letter).  Hàn Thế Thành created
> a way of accomplishing this using standard TeX,
> but XeTeX can do it natively.  Incidentally,
> the "ế" at the end of Thành's middle name demonstrates
> exactly the problem : something that TeX cannot
> accomplish without special fonts, since it has
> no primitive for positioning two diacritics over
> a single character.

Thanks for the explanation. So we need to produce a Unicode string.

Firstly, I should have asked: is it possible to require the Vietnamese
VIQR input as an argument of a macro, rather than being typeset
directly? e.g., \viqr{a^o' e\.}. I'll assume that it is ok.

Then do you have a list of all Vietnamese characters and their VIQR
representation? Or some precise reference to what transformation you
want to apply? In particular, how many different characters do you
expect to get on output (that should be the size of the "alphabet")?

Regards,
Bruno



--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


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

2011-11-25 Thread Philip TAYLOR



Bruno Le Floch wrote:

Is it simply a matter of going through the string and replace various
characters by TeX accents (and take care of character order), or does
the result have to be Unicode?

E.g., does it have to be a(a^ → ăâ, or can it be a(a^ → \u{a}\^{a} ?
If the second one is ok, then it shouldn't be too hard to write the
conversion in TeX macros. Please provide a list of the necessary
conversion rules.


Vietnamese is difficult for TeX, because over a single
character there can be a requirement for both an
accent (to indicate a pronunciation different from
that for the unaccented letter) and a tone marker
(which applies to the whole word, but which has
a canonical placement that may well be on an
already accented letter).  Hàn Thế Thành created
a way of accomplishing this using standard TeX,
but XeTeX can do it natively.  Incidentally,
the "ế" at the end of Thành's middle name demonstrates
exactly the problem : something that TeX cannot
accomplish without special fonts, since it has
no primitive for positioning two diacritics over
a single character.

Philip Taylor


--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex


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

2011-11-25 Thread Bruno Le Floch
Is it simply a matter of going through the string and replace various
characters by TeX accents (and take care of character order), or does
the result have to be Unicode?

E.g., does it have to be a(a^ → ăâ, or can it be a(a^ → \u{a}\^{a} ?
If the second one is ok, then it shouldn't be too hard to write the
conversion in TeX macros. Please provide a list of the necessary
conversion rules.

Regards,
Bruno



--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


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

2011-11-25 Thread Philip TAYLOR

Cảm ơn, Minh : I have Unikey running -- it is just a question
of getting my wife to translate the buttons for me !

** Phil.

Quang Minh Nguyen ()阮光明 wrote:


On a Windows machine, I think Unikey is the way to go.  You don't need
to install it, it's a stand alone exe, so no need to have admin
privileges.  It's a great system-wide IME for VIQR (and other
Vietnamese keyboard input methods).  I believe there is a way to
toggle to English dialogue boxes.  On top of this, you could use it as
a text expander.

Best,
Minh



--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex


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

2011-11-25 Thread Quang Minh Nguyen
On a Windows machine, I think Unikey is the way to go.  You don't need
to install it, it's a stand alone exe, so no need to have admin
privileges.  It's a great system-wide IME for VIQR (and other
Vietnamese keyboard input methods).  I believe there is a way to
toggle to English dialogue boxes.  On top of this, you could use it as
a text expander.

Best,
Minh
--
Nguyễn Quang Minh || 阮光明


>
> Thank you, John, and thank you, Diederick.  Yes, a macro replacement
> within Word is one possibility, and better still would be a real
> IME for VIQR so she could type VIQR and get Unicode on-screen as
> each sequence is completed.  Unfortunately I have repeatedly
> failed to get WinVNkey to work (missing packages) and although
> Unikey is apparently up and running I shall have to wait for my
> wife to come home to tell me what the dialogue boxes are saying !
>
> My gut feeling is that either a real Windows VIQR IME or a TECkit
> mapping are the optimal solutions, but as a workaround we are using
> Babelpad, which is at least doing the job.
>
> ** Phil.
>



--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


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

2011-11-25 Thread Philip TAYLOR

Thank you, John, and thank you, Diederick.  Yes, a macro replacement
within Word is one possibility, and better still would be a real
IME for VIQR so she could type VIQR and get Unicode on-screen as
each sequence is completed.  Unfortunately I have repeatedly
failed to get WinVNkey to work (missing packages) and although
Unikey is apparently up and running I shall have to wait for my
wife to come home to tell me what the dialogue boxes are saying !

My gut feeling is that either a real Windows VIQR IME or a TECkit
mapping are the optimal solutions, but as a workaround we are using
Babelpad, which is at least doing the job.

** Phil.


--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex


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

2011-11-25 Thread John Was

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" 

To: "Unicode-based TeX for Mac OS X and other platforms" 
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 
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





--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex


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

2011-11-25 Thread Diederick C. Niehorster
I understand, its a pickle.

But do have a look at
http://winvnkey.sourceforge.net/webhelp/winvnkey4.0-english-help.htm#winvnkey_manual/f_how_to_type_characters/how_to_type_vietnamese_letters_.htm
and
http://unikey.org/screen.php

The second seems to include a conversion utility as well from the look
of the screenshot.

Anyway, just some googling, you probably already did that, but hope
its of some use.

Best!
Dee

On Fri, Nov 25, 2011 at 17:08, Philip TAYLOR  wrote:
>
>
> Diederick C. Niehorster wrote:
>>
>> On Fri, Nov 25, 2011 at 16:11, Philip TAYLOR  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
>



--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


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

2011-11-25 Thread Philip TAYLOR



Diederick C. Niehorster wrote:

On Fri, Nov 25, 2011 at 16:11, Philip TAYLOR  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


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

2011-11-25 Thread Diederick C. Niehorster
On Fri, Nov 25, 2011 at 16:11, Philip TAYLOR  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

Best,
Dee



--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


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

2011-11-25 Thread Philip TAYLOR



Ross Moore wrote:


At least here we have \.   (since '.' has catcode 12, not 11).
So it should be possible to modify the definition of \.{ } within
the NFSS processing of \.  to assign a special meaning.
This is coding that could be easily included within Xunicode.sty ,
but applied only optionally, according to encoding or within a font-switch.


Just to clarify : as always, I am working within a Plain
regime, so from my perspective a TECkit mapping should
not assume the existence (and use) of LaTeX adjuncts such
as Xunicode.sty.

Qyanh Minh Nguyen (阮光明) wrote :


It might be slightly off topic, but wouldn't it be simpler to enter
unicode directly into your tex file?  After all, we're using xetex.

I can see the usefulness of creating a mapping for the long term, as a
general tool.  It would be of great help if one uses a text editor
that doesn't support unicode.  For that matter, doing something
similar for TELEX or VNI should be an added goal.

But back to Philip's original problem (of typesetting a restaurant
menu), I would do that by entering unicode directly.  For example on
my mac, I would choose VIQR as an input method and type the
multilingual text directly in texworks, texshop, or emacs (aquamacs),
and declare an appropriate font in my tex file.


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.

** Phil.


--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex


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

2011-11-24 Thread Quang Minh Nguyen
Hi there,

It might be slightly off topic, but wouldn't it be simpler to enter
unicode directly into your tex file?  After all, we're using xetex.

I can see the usefulness of creating a mapping for the long term, as a
general tool.  It would be of great help if one uses a text editor
that doesn't support unicode.  For that matter, doing something
similar for TELEX or VNI should be an added goal.

But back to Philip's original problem (of typesetting a restaurant
menu), I would do that by entering unicode directly.  For example on
my mac, I would choose VIQR as an input method and type the
multilingual text directly in texworks, texshop, or emacs (aquamacs),
and declare an appropriate font in my tex file.

Sorry for not providing insights about the mapping issue.  Best,
Minh
--
Nguyễn Quang Minh || 阮光明




> Date: Fri, 25 Nov 2011 10:11:40 +1100
> From: Ross Moore 
> To: Unicode-based TeX for Mac OS X and other platforms 
> Subject: Re: [XeTeX] VIQR pre-processor wrotten in (Xe)TeX ?
> Message-ID: 
> Content-Type: text/plain; charset=utf-8
>
> Hi Andrew, and Phil,
>
> On 25/11/2011, at 9:38 AM, Andrew Cunningham wrote:
>
>> Word final vowels with punctuation following, e.g. full stop, question mark.
>>
>> the following sentence:
>>
>> T?i y?u ti?ng n??c t?i t? khi m?i ra ??i.
>>
>> is represented in strict VIQR as:
>>
>> To^i ye^u tie^'ng nu+o+'c to^i tu+` khi mo+'i ra ddo+`i\.
>>
>> Notice the escaping of the full stop at the end of the sentence.
>> Without the escaping the full stop would be converted to diacritic
>> below the letter "i".
>
> What a pain for TeX, which already uses  '\.' to put
> a dot-below accent on a character.
>
>
> At least here we have \.  (since '.' has catcode 12, not 11).
> So it should be possible to modify the definition of \.{ } within
> the NFSS processing of \.  to assign a special meaning.
> This is coding that could be easily included within Xunicode.sty ,
> but applied only optionally, according to encoding or within a font-switch.
>
> You would need that user code of  \.  and equivalently \.{ }
> should expand to a sequence of:
>   '\' + '.'  each with catcode 12  followed by a space.
> Then your TecKit .map patterns can be defined to respect this.
>
> There will be problems when \. is meant to be used as a symbolic
> separator for other purposes; e.g. as a decimal point,
> or something like:  \.   (for whatever purpose).
> Or at the end of a block of characters with no trailing space.
>
> An alternative may be to define some other way to get the '\'
> with catcode 12.
>
> Or within environments that want to use VIQR data, the \catcode
> of '\' is set to 12, with some other character ('|' say) becoming
> TeX's category 0  escape-character.
>
> This is probably best, as you'll need to define such environments
> anyway. However, it makes it awkward to pass VIQR strings around
> within the arguments of macros.
>
>
>>
>> or another example:
>>
>> Anh ddi dda^u\?
>>
>> This escaping is part of VIQR and any input system that is based on VIQR.
>
> Offhand I cannot think of any alternative meaning assigned to \? .
> Is there one, in any special language, implemented in (La)TeX ?
>
>
>>
>>
>> Andrew
>> --
>> Andrew Cunningham
>> Senior Project Manager, Research and Development
>> Vicnet
>> State Library of Victoria
>> Australia
>>
>> andr...@vicnet.net.au
>> lang.supp...@gmail.com
>
>
> Hope this helps,
>
>        Ross
>
> 
> Ross Moore                                       ross.mo...@mq.edu.au
> Mathematics Department                           office: E7A-419
> Macquarie University                             tel: +61 (0)2 9850 8955
> Sydney, Australia  2109                          fax: +61 (0)2 9850 8114
> 



--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


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

2011-11-24 Thread Andrew Cunningham
Thanks Ross,

one of the reasons I prefer just using Unicode input rather than transcriptions.

One thought is that the not only would you need to handle  \.
but also \.) , \.' , \." , etc

Also raises the issue of constructs like \' I guess.

Other option is to convert form VIQR to Unicode before it goes into
document. Assuming your source files are in VIQR.

If you are typing document from scratch rather than entering in VIQR
you could use an input method based on VIQR, type it in as Unicode
using VIQR as input system.

On 25 November 2011 10:11, Ross Moore  wrote:
> Hi Andrew, and Phil,
>
> On 25/11/2011, at 9:38 AM, Andrew Cunningham wrote:
>
>> Word final vowels with punctuation following, e.g. full stop, question mark.
>>
>> the following sentence:
>>
>> Tôi yêu tiếng nước tôi từ khi mới ra đời.
>>
>> is represented in strict VIQR as:
>>
>> To^i ye^u tie^'ng nu+o+'c to^i tu+` khi mo+'i ra ddo+`i\.
>>
>> Notice the escaping of the full stop at the end of the sentence.
>> Without the escaping the full stop would be converted to diacritic
>> below the letter "i".
>
> What a pain for TeX, which already uses  '\.' to put
> a dot-below accent on a character.
>
>
> At least here we have \.  (since '.' has catcode 12, not 11).
> So it should be possible to modify the definition of \.{ } within
> the NFSS processing of \.  to assign a special meaning.
> This is coding that could be easily included within Xunicode.sty ,
> but applied only optionally, according to encoding or within a font-switch.
>
> You would need that user code of  \.  and equivalently \.{ }
> should expand to a sequence of:
>   '\' + '.'  each with catcode 12  followed by a space.
> Then your TecKit .map patterns can be defined to respect this.
>
> There will be problems when \. is meant to be used as a symbolic
> separator for other purposes; e.g. as a decimal point,
> or something like:  \.   (for whatever purpose).
> Or at the end of a block of characters with no trailing space.
>
> An alternative may be to define some other way to get the '\'
> with catcode 12.
>
> Or within environments that want to use VIQR data, the \catcode
> of '\' is set to 12, with some other character ('|' say) becoming
> TeX's category 0  escape-character.
>
> This is probably best, as you'll need to define such environments
> anyway. However, it makes it awkward to pass VIQR strings around
> within the arguments of macros.
>
>
>>
>> or another example:
>>
>> Anh ddi dda^u\?
>>
>> This escaping is part of VIQR and any input system that is based on VIQR.
>
> Offhand I cannot think of any alternative meaning assigned to \? .
> Is there one, in any special language, implemented in (La)TeX ?
>
>
>>
>>
>> Andrew
>> --
>> Andrew Cunningham
>> Senior Project Manager, Research and Development
>> Vicnet
>> State Library of Victoria
>> Australia
>>
>> andr...@vicnet.net.au
>> lang.supp...@gmail.com
>
>
> Hope this helps,
>
>        Ross
>
> 
> Ross Moore                                       ross.mo...@mq.edu.au
> Mathematics Department                           office: E7A-419
> Macquarie University                             tel: +61 (0)2 9850 8955
> Sydney, Australia  2109                          fax: +61 (0)2 9850 8114
> 
>
>
>
>
>
>
> --
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex
>



-- 
Andrew Cunningham
Senior Project Manager, Research and Development
Vicnet
State Library of Victoria
Australia

andr...@vicnet.net.au
lang.supp...@gmail.com



--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


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

2011-11-24 Thread Ross Moore
Hi Andrew, and Phil,

On 25/11/2011, at 9:38 AM, Andrew Cunningham wrote:

> Word final vowels with punctuation following, e.g. full stop, question mark.
> 
> the following sentence:
> 
> Tôi yêu tiếng nước tôi từ khi mới ra đời.
> 
> is represented in strict VIQR as:
> 
> To^i ye^u tie^'ng nu+o+'c to^i tu+` khi mo+'i ra ddo+`i\.
> 
> Notice the escaping of the full stop at the end of the sentence.
> Without the escaping the full stop would be converted to diacritic
> below the letter "i".

What a pain for TeX, which already uses  '\.' to put 
a dot-below accent on a character.


At least here we have \.  (since '.' has catcode 12, not 11).
So it should be possible to modify the definition of \.{ } within
the NFSS processing of \.  to assign a special meaning.
This is coding that could be easily included within Xunicode.sty , 
but applied only optionally, according to encoding or within a font-switch.

You would need that user code of  \.  and equivalently \.{ } 
should expand to a sequence of:
   '\' + '.'  each with catcode 12  followed by a space.
Then your TecKit .map patterns can be defined to respect this.

There will be problems when \. is meant to be used as a symbolic
separator for other purposes; e.g. as a decimal point,
or something like:  \.   (for whatever purpose).
Or at the end of a block of characters with no trailing space.

An alternative may be to define some other way to get the '\'
with catcode 12.

Or within environments that want to use VIQR data, the \catcode
of '\' is set to 12, with some other character ('|' say) becoming
TeX's category 0  escape-character.

This is probably best, as you'll need to define such environments
anyway. However, it makes it awkward to pass VIQR strings around 
within the arguments of macros. 


> 
> or another example:
> 
> Anh ddi dda^u\?
> 
> This escaping is part of VIQR and any input system that is based on VIQR.

Offhand I cannot think of any alternative meaning assigned to \? .
Is there one, in any special language, implemented in (La)TeX ?


> 
> 
> Andrew
> -- 
> Andrew Cunningham
> Senior Project Manager, Research and Development
> Vicnet
> State Library of Victoria
> Australia
> 
> andr...@vicnet.net.au
> lang.supp...@gmail.com


Hope this helps,

Ross


Ross Moore   ross.mo...@mq.edu.au 
Mathematics Department   office: E7A-419  
Macquarie University tel: +61 (0)2 9850 8955
Sydney, Australia  2109  fax: +61 (0)2 9850 8114







--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


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

2011-11-24 Thread Philip TAYLOR



Andrew Cunningham wrote:


Word final vowels with punctuation following, e.g. full stop, question mark.


Understood, thank you Andrew.  Yes, some of these
crept into the original version : fortunately
I spotted them before they went to print.

Philip Taylor


--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex


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

2011-11-24 Thread Andrew Cunningham
On 24 November 2011 19:50, Philip TAYLOR  wrote:
> Could you offer an example of ambiguous VIQR input, Andrew ?
> I am not sufficiently familiar with the encoding to envisage
> in what way ambiguity might occur.


Word final vowels with punctuation following, e.g. full stop, question mark.

the following sentence:

Tôi yêu tiếng nước tôi từ khi mới ra đời.

is represented in strict VIQR as:

To^i ye^u tie^'ng nu+o+'c to^i tu+` khi mo+'i ra ddo+`i\.

Notice the escaping of the full stop at the end of the sentence.
Without the escaping the full stop would be converted to diacritic
below the letter "i".

or another example:

Anh ddi dda^u\?

This escaping is part of VIQR and any input system that is based on VIQR.


Andrew
-- 
Andrew Cunningham
Senior Project Manager, Research and Development
Vicnet
State Library of Victoria
Australia

andr...@vicnet.net.au
lang.supp...@gmail.com



--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


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

2011-11-24 Thread Philip TAYLOR

Could you offer an example of ambiguous VIQR input, Andrew ?
I am not sufficiently familiar with the encoding to envisage
in what way ambiguity might occur.

Philip Taylor

Andrew Cunningham wrote:


You will need to make sure that ambiguous VIQR input is escaped as
appropriate, and the mapping file supports these escape sequences.

Andrew



--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex


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

2011-11-23 Thread Andrew Cunningham
You will need to make sure that ambiguous VIQR input is escaped as
appropriate, and the mapping file supports these escape sequences.

Andrew

On 24 November 2011 02:03, Philip TAYLOR  wrote:
> Thank you, Vafa : that looks achievable, so if after a decent
> wait it would appear that one does not exist, I shall have a
> go at creating one.
>
> ** Phil.
> 
> Vafa Khalighi wrote:
>>
>> I do not know if there is one but in case there is none, creating one is
>> easy. I have attached a guide on teckit program to create such mapping and
>> if you have teXLive 2011, in
>> /usr/local/texlive/2011/texmf-dist/fonts/misc/xetex/fontmapping
>>
>> there are some mapping examples that you can see.
>
>
> --
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex
>



-- 
Andrew Cunningham
Senior Project Manager, Research and Development
Vicnet
State Library of Victoria
Australia

andr...@vicnet.net.au
lang.supp...@gmail.com



--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


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

2011-11-23 Thread Philip TAYLOR

Thank you, Vafa : that looks achievable, so if after a decent
wait it would appear that one does not exist, I shall have a
go at creating one.

** Phil.

Vafa Khalighi wrote:

I do not know if there is one but in case there is none, creating one is easy. 
I have attached a guide on teckit program to create such mapping and if you 
have teXLive 2011, in 
/usr/local/texlive/2011/texmf-dist/fonts/misc/xetex/fontmapping

there are some mapping examples that you can see.



--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex


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

2011-11-23 Thread Philip TAYLOR



Vafa Khalighi wrote:

You need to create mapping for that.


Well, "maybe".  If that is the case, then let me re-formulate
my question (since I haven't the slightest idea how to create
a mapping) : has anyone created a VIQR mapping for XeTeX ?

** Phil.


--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex


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

2011-11-23 Thread Vafa Khalighi
You need to create mapping for that.

On Thu, Nov 24, 2011 at 1:32 AM, Philip TAYLOR  wrote:

> Does anyone have (or know of) a VIQR ("Vietnamese Quoted-Readable")
> pre-processor, written in (Xe)TeX, that would allow me to input
> documents of the form :
>
> 1.  Ba’nh pho^`ng to^m | Prawn Crackers (£1.00)
> 2.  Rong bie^?n | Crispy seaweed (£2.50)
>
> and to have these VIQR forms internally converted to Unicode
> such that I get (in the typeset output) :
>
> 1.  Bánh phồng pôm | Prawn Crackers (£1.00)
> 2.  Rong biển | Crispy seaweed (£2.50)
>
> I can perform the conversion externally, of course, but would
> far prefer to perform it within XeTeX.
>
> ** Phil.
>
>
>
> --**
> Subscriptions, Archive, and List information, etc.:
>  
> http://tug.org/mailman/**listinfo/xetex
>


--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


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

2011-11-23 Thread Philip TAYLOR

Does anyone have (or know of) a VIQR ("Vietnamese Quoted-Readable")
pre-processor, written in (Xe)TeX, that would allow me to input
documents of the form :

1.  Ba’nh pho^`ng to^m | Prawn Crackers (£1.00)
2.  Rong bie^?n | Crispy seaweed (£2.50)

and to have these VIQR forms internally converted to Unicode
such that I get (in the typeset output) :

1.  Bánh phồng pôm | Prawn Crackers (£1.00)
2.  Rong biển | Crispy seaweed (£2.50)

I can perform the conversion externally, of course, but would
far prefer to perform it within XeTeX.

** Phil.



--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex