How do I make the following integral symbols in Latex?
I know how to make an integral and the limit. I don't know how to make it with the lines through it.
How do I make the following integral symbols in Latex?
I know how to make an integral and the limit. I don't know how to make it with the lines through it.
Using the code from the entry The Principal Value Integral symbol (which defines the macro \dashint
) in the UK List of TeX FAQs as a starting point, it is reasonably straightforward to define two new macros, \lowdashint
and \highdashint
, that place a "dash" symbol -- actually, a "minus" symbol -- a bit lower and a bit higher, respectively, than \dashint
does.
In the code below, the macros \lowdashint
and \highdashint
are set up only for display-style and text-style math modes. (I can't imagine they'll occur in expressions in first-level, let alone second-level, subscripts and superscripts. However, please tell me if this assumption is invalid.)
You should, of course, feel free to change the vertical positions of the dashes -- cf the arguments of the \lower
and \raise
commands -- to suit your stylistic preferences.
\documentclass{article}
\usepackage{booktabs,amsmath}
\def\Xint#1{\mathchoice
{\XXint\displaystyle\textstyle{#1}}%
{\XXint\textstyle\scriptstyle{#1}}%
{\XXint\scriptstyle\scriptscriptstyle{#1}}%
{\XXint\scriptscriptstyle\scriptscriptstyle{#1}}%
\!\int}
\def\XXint#1#2#3{{\setbox0=\hbox{$#1{#2#3}{\int}$}
\vcenter{\hbox{$#2#3$}}\kern-.5\wd0}}
\def\dashint{\Xint-}
\def\Yint#1{\mathchoice
{\YYint\displaystyle\textstyle{#1}}%
{\YYYint\textstyle\scriptscriptstyle{#1}}%
{}{}%
\!\int}
\def\YYint#1#2#3{{\setbox0=\hbox{$#1{#2#3}{\int}$}
\lower1ex\hbox{$#2#3$}\kern-.46\wd0}}
\def\YYYint#1#2#3{{\setbox0=\hbox{$#1{#2#3}{\int}$}
\lower0.35ex\hbox{$#2#3$}\kern-.48\wd0}}
\def\lowdashint{\Yint-}
\def\Zint#1{\mathchoice
{\ZZint\displaystyle\textstyle{#1}}%
{\ZZZint\textstyle\scriptscriptstyle{#1}}%
{}{}%
\!\int}
\def\ZZint#1#2#3{{\setbox0=\hbox{$#1{#2#3}{\int}$}
\raise1.15ex\hbox{$#2#3$}\kern-.57\wd0}}
\def\ZZZint#1#2#3{{\setbox0=\hbox{$#1{#2#3}{\int}$}
\raise0.85ex\hbox{$#2#3$}\kern-.53\wd0}}
\def\highdashint{\Zint-}
\begin{document}
$\begin{array}{@{}lccc@{}}
\toprule
\text{Math mode} & \multicolumn{3}{c@{}}{\text{Integral symbol}}\\
\cmidrule(l){2-4}
& \texttt{\string\lowdashint}
& \texttt{\string\highdashint}
& \texttt{\string\dashint} \\
\midrule
\texttt{\string\displaystyle}
& \displaystyle \lowdashint_M f
& \displaystyle \highdashint_M f
& \displaystyle \dashint_M f \\[4ex]
\texttt{\string\textstyle}
& \lowdashint_M f
& \highdashint_M f
& \dashint_M f \\
\bottomrule
\end{array}$
\end{document}
One way of placing bars through math characters is to use \ooalign.
In the two
commands I've defined below, the first number controls how high the bar is on
the integral sign, the second controls the length of the bar, and the third
controls the thickness of the bar.
\documentclass{article}
\newcommand{\stI}{%
\ooalign{\hidewidth $\int$\hidewidth\cr\rule[1.1ex]
{1ex}{.4pt}}}
\newcommand{\stII}{%
\ooalign{\hidewidth $\int$\hidewidth\cr\rule[-0.1ex]
{1ex}{.4pt}}}
\begin{document}
\[\stI_m f\]
\[\stII_m f(x)\]
\end{document}
To get these looking nice, you might also want to read this answer: Big integral sign
m
symbol is placed in the "ordinary" subscript position, rather than much lower near the lower edge of the integral symbol.
– Mico
Oct 4 '14 at 20:22
f
letter than a true integral symbol – user31729 Oct 4 '14 at 18:02