5

In Word I am able to include the unicode symbol U+1D53C (write number and press Alt+C) and assign italic formatting:

italic output

How do I get the same result in LaTeX?

I tried:

  1. \mathit{\mathbb{E}}
  2. {\it \mathbb{E}}
  3. \mathit{ \unicode{x1D7D9} \; \unicode{x1D53C}}

I still get non-italic results:

non-italic output

Furthermore, the following examples are all non-italic for blackboard bold fonts:
What are all the font styles I can use in math mode?

How can I slant the content of math mode? Apply some graphical transformation?

I would like to avoid extra definitions in my preamble.

Tonechas
  • 976
Stefan
  • 161
  • 1
    Just found this related question (the solution given there does not seem to work in asciidoctor) https://tex.stackexchange.com/questions/16645/blackboard-italic-font – Stefan Jul 04 '18 at 14:16
  • asciidoctor seems to use MathJax not TeX (https://github.com/asciidoctor/asciidoctor-latex#introduction) – samcarter_is_at_topanswers.xyz Jul 04 '18 at 14:31
  • That's just a geometric transformation performed by the software. Slanting can be done also with TeX, of course. – egreg Jul 04 '18 at 14:39
  • @egreg How can I slant in math mode? – Stefan Jul 04 '18 at 15:00
  • I’m not seeing how a question about a math symbol is off-topic. And I can’t answer unless it’s opened. – Davislor Jul 05 '18 at 04:48
  • Sorry to answer in a comment, but your question was closed. The unicode-math package defines a \mathbbit alphabet, but it covers only ⅅⅆⅇⅈⅉ. If you want the rest of the letters, find a double-struck italic font you like, declare it as \bbitfont, then \newcommand\varbbit[1]{\mathord{\text{\bbitfont {#1}}}}. – Davislor Jul 05 '18 at 05:03
  • I removed the additional information that seems to be off-topic. ;) – Stefan Jul 05 '18 at 07:15
  • 1
    The reason for the off-topic votes is that the question is about asciidoctor and therefore it is about MathJax. Although it is not stated explicitly in the help center, MathJax questions are generally considered off-topic. The reason is that it is a different system than LaTeX, which means that solutions for LaTeX often do not work for MathJax (as you noticed with the related question), making the question out of scope. You could try reposting it at Stack Overflow, make sure you clearly describe the context (use case, asciidoctor, web interface, JavaScript). – Marijn Jul 05 '18 at 08:40
  • 1
    Well, I hoped that there would be an alternative solution that would work both with Tex and MathJax and without extra definitions, e.g. (pseudo code) \transform[slant:30°]{...} or whatever. In my opinion the issue is still valid for Latex. – Stefan Jul 05 '18 at 13:21
  • just out of curiosity, why does the LaTeX mention that is U+1D7D9, but then it does not appear in the result image? – am70 Feb 19 '22 at 11:50

3 Answers3

5

You can do it with XeLaTeX or LuaLaTeX. It can also be done by faking slant also with pdflatex, but this would need a whole set of virtual fonts.

\documentclass{article}
\usepackage{unicode-math}

\setmathfontface{\slantedmath}{Latin Modern Math}[FakeSlant=0.25]

\begin{document}

$ \slantedmath{}$

\end{document}

enter image description here

egreg
  • 1,121,712
4

In pdflatex, borrowing from Shear transform a "box"

\documentclass{article}
\usepackage{amssymb}
\newsavebox{\foobox}
\newcommand{\slantbox}[2][.3]
  {%
    \mbox
      {%
        \sbox{\foobox}{#2}%
        \hskip\wd\foobox
        \pdfsave
        \pdfsetmatrix{1 0 #1 1}%
        \llap{\usebox{\foobox}}%
        \pdfrestore
      }%
  }
\begin{document}
$\slantbox{$\mathbb{E}$} = mc^2$
\end{document}

enter image description here

  • The code is the same… it doesn't double-strike the char – juanfal Mar 06 '24 at 10:37
  • 1
    In the context of the question @juanfal, "double struck" refers to the font type as shown in the letter E in my answer. My code does not double strike the letter, \mathbb{E} is "double struck" to begin with. What my code does is to convert an upright letter into an slanted (faux italic) letter. – Steven B. Segletes Mar 06 '24 at 17:06
3

The command for this in unicode-math is \mathbbit or \symbbit. It only supports the handful of letters defined in Unicode.

Davislor
  • 44,045