On 2018-04-18, Wolfgang Engelmann wrote:
> Am 18.04.2018 um 19:11 schrieb Guenter Milde:
>> On 2018-04-16, Wolfgang Engelmann wrote:
>>> Am 16.04.2018 um 10:06 schrieb Wolfgang Engelmann:

>>>> I select in lyx (2.3.0) in math
>>>> \lambda_{max}=528nm
>>>> but get in the pdf output
>>>>    ̆max = 528nm
>>>> why? (Debian stretch)

>> Can you test with View>Source whether the "mathpazo" package is used?

> I could, however,  not find View>source, to check for mathpazo
> I am using Lyx2.3.0 Debian/TeXlive2017
> perhaps this is what you ment:
> Code-preview pane

Yes, the name was changed.

> it showed

> $\mathrm{\lambda_{max}=528nm}$

Now, if you change in the code preview the "viewport" (second drop-down list
on the left) from [Current Paragraph] to [Complete Source] or [Preamble
only], you will be able to see the LyX-written LaTeX preamble.

With Document>Settings>Fonts as

Roman:  Palatino
Sans    Default
TT      Default
Math:   Automatic

I get the preamble:

\documentclass[english]{article}
\usepackage{mathpazo}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{babel}

i.e. there is no need for

> \usepackage{mathpazo}

in the custom LaTeX preamble (Document>Settings>LaTeX Preamble).

>> You can also try with setting Fonts>Mathematics: Times Roman New TX
> I tried this, but \lambda is not shown


Now found the difference: You put \lambda in \mathrm.

Unfortunately, support for upright Greek letters in mathematics is
limited in traditional TeX. Standard TeX and most mathematical packages
use either italic Greek characters or a text font without Greek letters
with \mathrm. This is why you get an italic lambda with LatinModern or
Times but a wrong (text) character with Palatino.

For background and details, see
http://mirrors.ctan.org/macros/latex/contrib/isomath/isomath.html#oml-font-encoding

Do you really want an *upright* Lambda? This would indicate a
constant value or a physical unit (see, e.g.
http://old.iupac.org/standing/idcns/italic-roman_dec99.pdf).

If you put only the "max" and the unit into \mathrm, everything should be
fine (except for the missing space between value and unit).

Otherwise, see
http://mirrors.ctan.org/macros/latex/contrib/isomath/isomath.html#how-to-get-upright-small-greek-letters
for options to get upright Greek in 8-bit LaTeX maths or use non-TeX fonts
with Xe/LuaTeX.

regards,

Günter

Reply via email to