2

I'd like to typeset an equation (in a beamer slide, inside a tikzpicture) in non-italics.

Using the various options recommended (\text, \mbox, \mathrm) works for most part of the equation but not for the \int (integral) symbol. Is there a way to also have this symbol "upright"?

Here follows a minimal example:

\documentclass{beamer} %
\usepackage{tikz}

\begin{document}
\begin{frame}{Example}
  \begin{center}
    \begin{tikzpicture}
      \path
      node {
        $\int f(x) dx$
      }
      ++(0,-2)
      node {
        $\mathrm{\int f(x) dx}$
      };      
    \end{tikzpicture}
  \end{center}
\end{frame}
\end{document}

Thanks for your help!

migrated from stackoverflow.com Nov 16 '15 at 2:03

This question came from our site for professional and enthusiast programmers.

1

There are several ways to do what you ask. One is to use command \intup from boisik package:

\documentclass{beamer}
\usepackage{tikz}
\usepackage{boisik}

\begin{document}
    \begin{frame}{Example}
        \begin{center}
            \begin{tikzpicture}
            \path
            node {
                $\int f(x) dx$
            }
            ++(0,-2)
            node {
                $\intup f(x) dx$
            };
            \end{tikzpicture}
        \end{center}
    \end{frame}
\end{document}

Another package you can look at is stix and its option upint.

These two packages are discussed in The Comprehensive LATEX Symbol List.

  • This solution works, although I would have preferred a "global" option to have equations typeset in non-italics... but possibly this does not exist. – user52366 Nov 15 '15 at 20:48
  • @user52366 Hi, no worries: this is not too elegant - I think - but you can replace \intup f(x) dx with \mathrm{\intup f(x) dx} and see if you like it. Since it compiles with no errors, I advice you set roman fonts (mathrm) as default: tex.stackexchange.com/questions/15058/use-mathrm-by-default. – MattAllegro Nov 16 '15 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.