How to use quotation marks in math mode? I need to get \lim
with the quation marks above.
[Tex/LaTex] How to write quotation marks in math environment
math-modepunctuation
Related Solutions
Declare \mlq
and so on as \mathrel
, because TeX doesn't add space between consecutive relation symbols:
\documentclass[varwidth,border=3pt]{standalone}
\usepackage{amsmath}
\DeclareMathSymbol{\mlq}{\mathrel}{operators}{``}
\DeclareMathSymbol{\mrq}{\mathrel}{operators}{`'}
\DeclareMathSymbol{\mlqq}{\mathrel}{operators}{"5C}
\DeclareMathSymbol{\mrqq}{\mathrel}{operators}{`"}
\begin{document}
$Op \mapsto Op \mlq\rightarrow\mrq Op$
$Op \mapsto Op \mlqq\rightarrow\mrqq Op$
Quotation marks close to arrow: ``$\rightarrow$''
\end{document}
If you need quotes around other symbols, you can follow a different path; declare the quotes as ordinary symbols (with \mathord
) and define
\newcommand{\qto}{\mathrel{\mlq}\to\mathrel{\mrq}}
\newcommand{\qqto}{\mathrel{\mlqq}\to\mathrel{\mrqq}}
so you can have something like
$\mlq A\mrq \qqto \mlqq B\mrqq$
without worrying about spacings.
Indeed, the font family name has changed. You can use
\newcommand*\quotefont{\fontfamily{LinuxLibertineT-TLF}} % selects Libertine for quote font
I suggest also to change \kern0pt
into \kern4pt
or something else that avoids the quote bumping in the first character.
Note that \RequirePackage
is not needed: the option to xcolor
can be passed in the \documentclass
line.
\documentclass[xcolor=svgnames]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{libertine} % or any other font package (or none)
\newcommand*\quotefont{\fontfamily{LinuxLibertineT-TLF}} % selects Libertine for quote font
\usepackage{tikz}
\usepackage{framed}
% Make commands for the quotes
\newcommand*{\openquote}{%
\tikz[remember picture,overlay,xshift=-15pt,yshift=-10pt]
\node (OQ) {\quotefont\fontsize{60}{60}\selectfont``};%
\kern4pt
}
\newcommand*{\closequote}{%
\tikz[remember picture,overlay,xshift=15pt,yshift=10pt]
\node (CQ) {\quotefont\fontsize{60}{60}\selectfont''};%
}
% select a colour for the shading
\definecolor{shadecolor}{named}{Maroon}
% wrap everything in its own environment
\newenvironment{shadequote}
{\begin{snugshade}\begin{quote}\openquote}
{\hfill\closequote\end{quote}\end{snugshade}}
%\usetheme{Darmstadt}
\usefonttheme[onlylarge]{structurebold}
\setbeamerfont*{frametitle}{size=\normalsize,series=\bfseries}
\setbeamertemplate{navigation symbols}{}
\setbeamercolor{background canvas}{bg=black}
\setbeamercolor{normal text}{fg=white}
\begin{document}
\begin{frame}
\begin{shadequote}
A common mistake that people make when trying to design something completely
foolproof is to underestimate the ingenuity of complete fools.\par\emph{Douglas Adams}
\end{shadequote}
\end{frame}
\end{document}
Best Answer
If you use
"
, these are no different in text mode, or math mode in terms of how you use them, although the spacing is a slightly different. However, as Mico pointed out is you use the recommended approach of``...''
to obtain the double quotes, then this needs special handing inside math mode.If you desire single quotes you can use the solution from How to get the closing single quote in math mode:
If possible you should put the quotes outside of math mode.
Code: