[OS X TeX] Diacritic accents directly in source file

Cyril Niklaus cynik at gmx.co.uk
Thu Nov 7 13:11:56 CET 2002




On Jeudi, novembre 7, 2002, at 07:02 PM, Luis Sequeira wrote:
> I think it is likely that if you use
> \usepackage[applemac]{inputenc}
> then your file will not look well if viewed in another operating
> system but *should* typeset just fine.
Yes indeed it will, but should you need to edit it, you're stuck. 
That's why William Adams' suggestion to use UTF8 is *the* solution to 
this particular problem. Your files are then readable, editable on any 
machine (but here comes the trick) provided its system understands 
Unicode (all modern systems do), and you have a unicode-aware editor 
(on the mac you can use iMacTeX, using this as a first line to your 
files to indicate the file encoding: "%!iTeXMac(charset): UTF-8", 
without the quotes). I personally use emacs since tools I need exist 
for it.

To use Unicode, you then will need to use Omega (included in the LaTeX 
distributions), instead of LaTeX to typeset. The main problem of Omega 
is its lack of documentation, so I can't help you much more 
unfortunately. I found the extensions I needed to use it, and my set-up 
works. I don't have the time now to dwell in it unfortunately and since 
I got it to work...

Here's a  document in transcribed Sanskrit (an example I've already 
used on another list, I know; I'm partial to this book I guess ;) to 
give you an idea:

%!iTeXMac(charset): UTF-8
\documentclass[12pt,a4paper]{article}
\usepackage{t1enc,skt-rm}
\begin{document}
Voilà un example tiré du Kāmasūtra:\\
"śaśo vṛṣo 'śva iti liṅgato nāyaka-viśeṣāḥ nāyikā punar mṛgī baḍavā 
hastinī ceti |" \\
Kāmasūtra 2.1.1
\end{document}

instead of having to type this :

\documentclass[12pt,a4paper]{article}
\usepackage{t1enc} %  used for the danda | a punctation mark.
\begin{document}
voil\`{a} un example tir\'{e} du K\={a}mas\={u}tra: \\
``\'{s}a\'{s}o v\d{r}\d{s}o '\'{s}va iti li\.{n}gato 
n\={a}yakavi\'{s}e\d{s}\={a}\d{h} n\={a}yik\={a} punar m\d{r}g\={\i} 
ba\d{d}av\={a} hastin\={\i} ceti |'' \\
K\={a}mas\={u}tra 2.1.1
\end{document}

all the time, rendering source files hard to read.
The utf package I use is from here (it works fine for normal European 
accentuated letters too)
<http://www.indologie.uni-halle.de/software/utf.htm>, and you don't 
need to install the fonts. Just drop as is in your local texmf tree, 
run texhash, and go.

Good luck
Cyril

-----------------------------------------------------
Mac TeX info, resources, and news can be found at:
<http://www.esm.psu.edu/mac-tex/>
-----------------------------------------------------
List archives can be found at:
<http://www.esm.psu.edu/mac-tex/MacOSX-TeX-Digests/>
-----------------------------------------------------
See message headers for list info.
-----------------------------------------------------




More information about the macostex-archives mailing list