[OS X TeX] accents +

Bruno Voisin Bruno.Voisin at hmg.inpg.fr
Thu Apr 18 12:10:59 CEST 2002

>>> functionality though implemented differently. All that, anyway, isn't
>>> necessary in LaTeX 2e, where you just type
>>> \usepackage[applemac]{inputenc}
>>> (possibly accompanied by \usepackage[T1]{fontenc}) to get the same
>>> result.
>>> The latter solution, I think, is also the only one which stills works
>>> should the file be sent to other platforms (provided the applemac 
>>> above
>>> is replaced by the proper name, latin1 for example on UNIX machines).
>> Not exactly
>> if you send a mac tex file to another platform, either with 8bitsdefs,
>> option_key or inputenc, it will compile fine, but you will not be able
>> to edit correctly the file except if the text editor is mac friendly
>> (accented chars will be wrong).
>> If you change the option in inputenc (applemac -> latin1 for example)
>> and send the file to the other platform, you will not be able to 
>> compile
>> the file nor edit it correctly unless you have changed the encoding and
>> probably the line endings too.
> There's another problem too, with that file that Bruno sent.
> It came encoded as UTF8, with many 2-octet combinations starting with
> the A-tilde character.
> So if you use it on a non-UTF8-aware system, these will be read as
> two 8-bit characters, instead of as a single character.
> This will surely kill many of those \def commands.
> I'd be extremely surprised if it compiles at all in TeX, on systems
> other than a Mac with OS X.

Sorry to bother you again with this, just two quick points:

- My explanations were somehow messed up. I meant that when a LaTeX 
input file is written with accents, using 
\usepackage[applemac]{inputenc}, and sent afterwards to another 
platform, then provided the transfer (FTP) has properly been done, with 
accented characters moved to the appropriate 8-bit slots for the new 
system (I think Fetch does this automatically, for example, though I'm 
not absolutely sure), the input file should compile seamlessly on the 
new system, provided "applemac" is replaced by the appropriate value.

- I'm trying again to send option_keys, this time setting explicitly 
"Occidental (Mac Mail)" as the text encoding. If that doesn't work, 
please forget about the whole story.

Hopefully all this will become unnecessary in a simpler world where 
Unicode has become a universal standard and Omega (or some similar 
concept) the new standard TeX.

Bruno Voisin

%%%%  Beginning of option_keys  %%%%

% This document is in the Public Domain.
% It was created by Doug Henderson, Blue Sky Research,
% with modifications suggested by Joseph C. Várilly.
% Added single quotes on 6-4-93.
% option_keys - 6-4-93 (last modification)
% This macro set defines characters found in the Apple Macintosh
% Monaco font. They allow users to simply type the keystroke
% equivalent of the character desired, such as ø, and have Textures™
% typeset it correctly, substituting the TeX macro equivalent
% for the character.
% The reason for the creation of this macro set was to take
% advantage of Knuth's new TeX 3.0 capabilities with 8-bit character
% sets. This functionality has been included in our Textures™ as
% of version 1.3. By typing in nearly any character from the
% Macintosh keyboard, you can typeset with the characters directly
% rather than needing to define macros for these diacritic characters.
% Remember: these just expand single characters. They may not be
% defined in every context or mode.
% There are two sections to the macros; the first contains
% characters which can be rendered by depressing the option key
% and another key or shift and option keys with another key,
% and secondly, a combination of various keystrokes together
% to obtain the desired character. For example,
% to create the ø character, you depress the option and o character
% at the same time; to create the uppercase version of Ø, you
% hold the shift, option key, and o key down, and to create the
% Ñ character, you first depress the option and n characters,
% then next the shift and n characters. The option and n create
% the tilde character, and the shift n produce the N character.
% Math symbols and math operators need special attention.
% When typing in math symbols the same
% rules apply for math mode as before, namely, you must place dollar
% signs or double-dollar signs around these symbols. When typing
% in math operators, such as the square root symbol, TeX expects
% you to supply an argument following it. For example, if you
% would like to take advantage of the definition here for the
% plus-minus sign, ±, and would like to type it directly for use
% in your text, you need to make sure you are in math mode when
% you call for the character, or simply place dollar signs around
% it to print only the plus minus sign thusly, $±$. Similarly,
% you also need to be in math mode when asking for the square root
% symbol, √, and additionally supply an argument to it.
% The following example shows how to use both the plus-minus sign
% and the square root sign in an equation that has been simplified
% for you via these macro definitions.
%      $$-b±√{b^2-4ac}\over{2a}$$

% define the macintosh "option" generated characters

\catcode`\å=\active\defå{{\aa}}       % option a
\catcode`\∫=\active\def∫{\int}        % option b (math mode)
\catcode`\ç=\active\defç{\c c}        % option c
\catcode`\∂=\active\def∂{\partial}    % option d (math mode)
\catcode`\ƒ=\active\defƒ{\oint}       % option f (math mode) ?
\catcode`\∆=\active\def∆{\triangle}   % option j (math mode)
\catcode`\¬=\active\def¬{\neg}        % option l (math mode)
\catcode`\µ=\active\defµ{\mu}         % option m (math mode)
\catcode`\ø=\active\defø{{\o}}        % option o
\catcode`\π=\active\defπ{\pi}         % option p (math mode w/ arg.)
\catcode`\œ=\active\defœ{{\oe}}       % option q
\catcode`\ß=\active\defß{{\ss}}       % option s
\catcode`\†=\active\def†{\dagger}     % option t  (math mode)
\catcode`\√=\active\def√{\sqrt}       % option v (math mode w/ arg.)
\catcode`\∑=\active\def∑{\Sigma}      % option w (math mode)
\catcode`\≈=\active\def≈{\approx}     % option x (math mode)
\catcode`\Ω=\active\defΩ{\Omega}      % option z (math mode)
\catcode`\£=\active\def£{{\it\$}}     % option 3 ($ from italic font)
\catcode`\∞=\active\def∞{\infty}      % option 5 (math mode)
\catcode`\§=\active\def§{{\S}}        % option 6
\catcode`\¶=\active\def¶{{\P}}        % option 7
\catcode`\•=\active\def•{\bullet}     % option 8
\catcode`\ª=\active\defª{\leavevmode\raise.585ex\hbox{\b a}}      % 
option 9
\catcode`\º=\active\defº{\leavevmode\raise.6ex\hbox{\b o}}        % 
option 0
\catcode`\≠=\active\def≠{\not=}       % option = (math mode)
\catcode`\≤=\active\def≤{\leq}        % option , (math mode)
\catcode`\≥=\active\def≥{\geq}        % option . (math mode)
\catcode`\÷=\active\def÷{\div}        % option / (math mode)
\catcode`\…=\active\def…{{\dots}}     % option ;
\catcode`\æ=\active\defæ{{\ae}}       % option '
\catcode`\«=\active\def«{\ll}         % option \ (math mode)
\catcode`\“=\active\def“{``}          % option [
\catcode`\¡=\active\def¡{!`}          % option !
\catcode`\¢=\active\def¢{\rlap/c}     % option 4
\catcode`\‘=\active\def‘{`}           % option ]
\catcode`\’=\active\def’{'}           % shift option ]

% macintosh "shift-option" generated characters

\catcode`\Å=\active\defÅ{{\AA}}       % shift-option A
\catcode`\Ç=\active\defÇ{\c C}        % shift-option C
\catcode`\Ø=\active\defØ{{\O}}        % shift-option O
\catcode`\∏=\active\def∏{\Pi}         % shift-option P (math mode)
\catcode`\Œ=\active\defŒ{{\OE}}       % shift-option Q
\catcode`\Æ=\active\defÆ{{\AE}}       % shift-option '
\catcode`\◊=\active\def◊{\diamond}    % shift-option V (math mode)
\catcode`\°=\active\def°{\accent'27}  % shift-option 8
\catcode`\”=\active\def”{''}          % shift-option [
\catcode`\±=\active\def±{\pm}         % shift-option = (math mode)
\catcode`\»=\active\def»{\gg}         % shift-option \ (math mode)
\catcode`\¿=\active\def¿{?`}          % shift-option /
\catcode`\–=\active\def–{--}          % option - (en-dash)
\catcode`\—=\active\def—{---}         % shift-option - (em-dash)

% define the macintosh "composite" characters

\catcode`\ä=\active\defä{\"a}        % option u, then  a
\catcode`\ë=\active\defë{\"e}        % option u, then  e
\catcode`\ï=\active\defï{\"{\i}}     % option u, then  i
\catcode`\ö=\active\defö{\"o}        % option u, then  o
\catcode`\ü=\active\defü{\"u}        % option u, then  u
\catcode`\ÿ=\active\defÿ{\"y}        % option u, then  y
\catcode`\Ä=\active\defÄ{\"A}        % option u, then  A
\catcode`\Ö=\active\defÖ{\"O}        % option u, then  O
\catcode`\Ü=\active\defÜ{\"U}        % option u, then  U
\catcode`\á=\active\defá{\'a}        % option e, then  a
\catcode`\é=\active\defé{\'e}        % option e, then  e
\catcode`\í=\active\defí{\'{\i}}     % option e, then  i
\catcode`\ó=\active\defó{\'o}        % option e, then  o
\catcode`\ú=\active\defú{\'u}        % option e, then  u
\catcode`\É=\active\defÉ{\'E}        % option e, then  E
\catcode`\à=\active\defà{\`a}        % option `, then  a
\catcode`\è=\active\defè{\`e}        % option `, then  e
\catcode`\ì=\active\defì{\`{\i}}     % option `, then  i
\catcode`\ò=\active\defò{\`o}        % option `, then  o
\catcode`\ù=\active\defù{\`u}        % option `, then  u
\catcode`\À=\active\defÀ{\`A}        % option `, then  A
\catcode`\ã=\active\defã{\~a}        % option n, then  a
\catcode`\ñ=\active\defñ{\~n}        % option n, then  n
\catcode`\õ=\active\defõ{\~o}        % option n, then  o
\catcode`\Ã=\active\defÃ{\~A}        % option n, then  A
\catcode`\Ñ=\active\defÑ{\~N}        % option n, then  N
\catcode`\Õ=\active\defÕ{\~O}        % option n, then  O
\catcode`\â=\active\defâ{\^a}        % option i, then  a
\catcode`\ê=\active\defê{\^e}        % option i, then  e
\catcode`\î=\active\defî{\^{\i}}     % option i, then  i
\catcode`\ô=\active\defô{\^o}        % option i, then  o
\catcode`\û=\active\defû{\^u}        % option i, then  u


To UNSUBSCRIBE, send email to <info at email.esm.psu.edu> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <info at email.esm.psu.edu> with
"help" (no quotes) in the body.

More information about the macostex-archives mailing list