>> From: Reinhard Borek <[EMAIL PROTECTED]>
>> To: "Jean-Pierre.Chretien" <[EMAIL PROTECTED]>
>> Subject: Re: multi-line text and {\"a} in formulas
>> Date: Wed, 18 Aug 1999 10:54:48 +0200
>> 
>> at Wed, 18 Aug 1999 Jean-Pierre.Chretien wrote:
>> > >> From: Reinhard Borek <[EMAIL PROTECTED]>
>> > >> how I can write multi-line text and chars like {\"a} in formulas?
>> > >> When I try to put 'ä' in text mode in a formula, it does not occur
>> > >> anything. When I try to put {\"a} in LaTex-mode in a formula, it does
>> > >> not work. 
>> > 
>> > Trying to type in accented characters in math mode is not correct.
>> > In plain LaTeX, you must get back to text mode with a \mbox{}.
>> > 
>> > In Lyx, the plain text in math mode should be typed in math text mode (M-m 
m).
>> > What do you mean by « it does not occur anything » when you do so ?
>> In a formula I put 'M-m m' (math text mode), then I put a accented
>> char like 'ä'  (in LaTex {\"a}), but this char does not appear in
>> the formula in Lyx or in the ps-output.

OK, this is because you have a problem to enter accented characters
in math-mode: here I type in accented characters using programmed keys
by xmodmap when in normal LyX text, but this doesn't work in math mode
(I don't understand why). I'm lucky because the Compose key
(which is specific to Sun keyboards) works both in normal LyX text mode
and math text mode.

>> Also I put '\mbox{}' in a formula in Lyx, but when I put '"' and '\'
>> to write '{\"a}', these chars do not appear.

That's due to the fact that mathed (the math editor) is not re-entering
LaTeX text mode in a \mbox, as you can see that the typed characters
in the \mbox remain in blue (instead of going black as in math text mode), so
the \' is eaten by mathed.
This is a deep difference IMHO with (La)TeX where the alternation of 
$...$ and \mbox{} allows to indefinitely go in and out from the math mode
(well ... indefinitely means up to the TeX buffer size).
So typing \mbox{é} in LyX (if you can enter the é, which I do here
only with the compose key) simply makes an roman accented e in math mode,
which is no good because the letter is italicized. The same command in LaTeX
works fine.

So you must find a way to enter accented characters, otherwise the
only workaround I can imagine is to hack the LaTeX code, or use
TeX macros: for exmaple, define in the preamble
\newcommand{\aumlaut}{ä}
or 
\newcommand{\aumlaut}{\"a}
then in math mode, you may type in \mbox{\aumlaut} without problems.

To be more precise, I wrote a short LyX file with various solutions
that is attached. 
You may check that the \mbox solution with accented characters does not
work (if you try to export to LaTeX and compile, you get an error because
\ddot and \acute can only be used in math mode), and if you want to be
particular about typography, the encoding of the é is not correct
in math text mode as $\acute{\textrm{e}}$ differs from $\mbox{é}$.

Sorry if I drove you too much into LaTeX details which should not be noticed
if you use LyX as is. You really should manage to get diacritics in math mode.

Regards

-- 
Jean-Pierre



#This file was created by <chretien> Wed Aug 18 16:25:36 1999
#LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team
\lyxformat 2.15
\textclass article
\begin_preamble
\newcommand{\eacute}{é}
\newcommand{\aumlaut}{\"a}
\end_preamble
\language default
\inputencoding default
\fontscheme default
\graphics default
\paperfontsize default
\spacing single 
\papersize Default
\paperpackage a4
\use_geometry 0
\use_amsmath 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default

\layout Standard
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
multicol5
5 2 0 0 -1 -1 -1 -1
1 1 0 0
1 0 0 0
1 0 0 0
1 1 0 0
1 1 0 0
8 1 0 "" ""
8 1 1 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""

Umlaut in LyX
\newline 
ä
\newline 
Umlaut in math text mode
\newline 

\begin_inset Formula \( \ddot{\textrm{a}} \)
\end_inset 


\newline 
Umlaut in 
\family typewriter 

\backslash 
mbox
\family default 

\newline 

\begin_inset Formula \( \mbox {\ddot{a}} \)
\end_inset 


\newline 
Umlaut created with 
\family typewriter 

\backslash 
aumlaut
\family default 

\newline 

\begin_inset Formula \( \mbox {\aumlaut } \)
\end_inset 


\newline 
Umlaut in 
\family typewriter 

\backslash 
mbox
\family default 
 (
\latex latex 

\backslash 
LaTeX
\latex default 
)
\newline 

\latex latex 
$
\backslash 
mbox{ä}$
\layout Standard
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
multicol5
5 2 0 0 -1 -1 -1 -1
1 1 0 0
1 0 0 0
1 0 0 0
1 1 0 0
1 1 0 0
8 1 0 "" ""
8 1 1 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""

Accent in LyX
\newline 
é
\newline 
Accent in math text mode
\newline 

\begin_inset Formula \( \acute{\textrm{e}} \)
\end_inset 


\newline 
Accent in 
\family typewriter 

\backslash 
mbox
\family default 

\newline 

\begin_inset Formula \( \mbox {\acute{e}} \)
\end_inset 


\newline 
Accent created with 
\family typewriter 

\backslash 

\family default 
eacute
\newline 

\begin_inset Formula \( \mbox {\eacute } \)
\end_inset 


\newline 
Umlaut in 
\family typewriter 

\backslash 
mbox
\family default 
 (
\latex latex 

\backslash 
LaTeX
\latex default 
)
\newline 

\latex latex 
$
\backslash 
mbox{é}$
\the_end

Reply via email to