2

Using fontspec and xetex, when in text mode I can define:

\renewcommand{\textsl}[1]{{\fontspec[FakeSlant=0.2]{Neo Euler} #1}}

and I get slanted characters using Neo Euler (to fake the missing italics).

I want to do the same thing with eulervm in math mode, and redefine plain math variables to be slanted. Before even specifying that I want variables to use that format, I can't even get to use fontspec in math mode, e.g.:

\newcommand{\mathsl}[1]{{\fontspec[FakeSlant=0.5]{Neo Euler} #1}}

Does not produce a slanted font when I have $\mathsl{x}$. Any suggestions on how to get slanted text in math mode?

Once that's done, how would I go about requesting that all scalar variables be typeset in that format in math mode? (presumably using \DeclareMathAlphabet, but not sure how)

Thanks!

2
  • 2
    Welcome to TeX.SX! Euler has been designed upright and has no slanted variants.
    – egreg
    Sep 19, 2013 at 7:47
  • Thanks! I realize that there are is no slanted/italic version, but I can fake it in text mode, so presumably I can also fake it in math mode as well, right?
    – user36930
    Sep 19, 2013 at 7:49

2 Answers 2

4

I don't know if I understand correctly. If your math font is Neo Euler, just use unicode-math options:

\documentclass{article}
\usepackage[math-style=upright]{unicode-math}

\setmathfont{Neo Euler}
\setmathfont[range=\mathit,FakeSlant=0.5]{Neo Euler}

\begin{document}
$xyz\ne\mathit{xyz}$
\end{document}

enter image description here

However, the result is really poor: the Euler fonts have specifically been designed as upright and slanting them destroys their beauty.

4
  • Yes, I agree it doesn't look great but representing scalars as slanted helps parse some linear algebra equations faster. It still isn't clear to me though how I make this be the default math mode character style, without having summations and other symbols also be slanted.
    – user36930
    Sep 19, 2013 at 8:54
  • 1
    @user36930 Just remove the math-style=upright option. But I wouldn't use Euler in this case.
    – egreg
    Sep 19, 2013 at 9:01
  • And a small followup, is there a way to exclude \sum from using Neo Euler? (and use the AMS default instead)
    – user36930
    Sep 19, 2013 at 9:39
  • @user36930 \setmathfont[range=\sum]{Latin Modern Math}; you can do multiple range assignment. Consult the documentation of unicode-math.
    – egreg
    Sep 19, 2013 at 9:50
0

Linux fonts Libertine and Biolinum might work as alternates depending on your purpose (although puritans may disagree).

Using package eulervm with option small helps bringing x-height and stroke width closer:

\documentclass{article}

\usepackage{amsmath}
\usepackage[small]{eulervm}

\DeclareMathAlphabet{\mathlib}{OT1}{LinuxLibertineT-OsF}{m}{it}
\DeclareMathAlphabet{\mathbio}{OT1}{LinuxBiolinumT-OsF}{m}{it}

\begin{document}

\begin{align}
xyz &\ne \mathlib{xyz}\\
\mathbio{Euler} &\ne Euler
\end{align}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .