You may try with the following code:
\documentclass{article}
\usepackage{mathtools}
\newcommand{\Rint}{\mathop{\mathrlap{\pushR}}\!\int}
\newcommand{\pushR}{\mathchoice
{\mkern2.5mu R}
{\scriptstyle R}
{\scriptscriptstyle R}
{\scriptscriptstyle R}
}
\begin{document}
\[
\left|\Rint_a^b f\right|\textstyle\left|\Rint_a^b f\right|_{\left|\Rint_a^b f\right|}
\]
\end{document}
The absolute value is only for demonstration purpose.
The main problem here is to adapt the R to the various formula styles, so we use \mathchoice
. With \mathrlap
we can build a zero width box that will not contribute to the width of the formula. Since \int
is an operator, we put this zero width formula into a \mathop
, then \!
is used to remove the space that TeX inserts between two consecutive Operator atoms.
Next we define \pushR
, that's simply a space in display style, followed by a normal size R. In text and lower styles we simply put a reduced size R. Probably the result will not be nice in \scriptscriptstyle
, but it doesn't seem so important.
The same idea can be used for the principal value integral:
\newcommand{\pvint}{\mathop{\mathrlap{\pushpv}}\!\int}
\newcommand{\pushpv}{\mathchoice
{\mkern5mu\rule[.6ex]{.5em}{1pt}}
{\mkern2.8mu\rule[.5ex]{.35em}{.8pt}}
{\mkern2.5mu\rule[.29ex]{.3em}{.7pt}}
{\mkern2mu\rule[.2ex]{.2em}{.5pt}}
}
The example defines \eexists
and \fforall
with the additional lines as requested in the question.
\eexists
: The symbol \eexists
is composed of \exists
and the vertical line |
to get a line with a matching line thickness. The vertical line is scaled to the right
height. This vertical scaling does not change the horizontal line width. Finally the line is moved to the right position.
\fforall
: The trick with the vertical line cannot be uses, because the angle is
not known exactly. Also the angle depends on the font size. The angle can be estimated from the width and height of the symbol.
For this symbol TikZ
is used and the line width is guessed from the width of \forall
.
Update:
- Decreased distance between the two lines.
- I have removed the case for
\scriptscriptstyle
, because the symbols have larger
side bearings that would need to be compensated. But probably the symbols are not needed at such sizes anyway.
- Of course, the "magic numbers" depend on the used font. A different font might need different settings.
Example file:
\documentclass{article}
\usepackage{graphicx}
\usepackage{tikz}
\makeatletter
\newcommand*{\eexists}{%
{\mathpalette\eexistsAux{}}%
}
\newcommand*{\eexistsAux}[2]{%
\exists
\sbox0{$\m@th#1\exists$}%
\sbox2{\raisebox{\depth}{$\m@th#1|$}}%
\kern-.5\wd2 %
\resizebox{\width}{\ht0}{\copy2}%
\kern-.25\wd2 %
}
\newcommand*{\fforall}{%
{\mathpalette\fforallAux{}}%
}
\newcommand*{\fforallAuxx}[1]{%
\sbox0{$\m@th#1\forall$}%
\sbox2{%
\rlap{%
\raisebox{\depth}{$\m@th#1\backslash$}%
}%
\kern\ht0 %
}%
\sbox2{\resizebox{\ht2}{\height}{\copy2}}%
\sbox2{\resizebox{!}{\ht0}{\copy2}}%
\wd2=0pt %
\copy2
\forall
}
\newsavebox\forallBox
\newdimen\forallLineWidth
\newdimen\forallSep
\newcommand*{\fforallAux}[1]{%
\sbox\forallBox{$\m@th#1\forall$}%
\setlength{\forallLineWidth}{.06\wd\forallBox}%
\setlength{\forallSep}{.09\wd\forallBox}%
\tikz[
inner sep=0pt,
line cap=round,
line width=\forallLineWidth,
]
\draw
(0,0) node (A) {\copy\forallBox}
(A.south) ++(-\forallSep-\forallLineWidth,.4\forallLineWidth)
coordinate (A1)
(A.north west) ++(-\forallSep,-\forallLineWidth)
coordinate (A2)
(A1) -- (A2)
;%
}
\makeatother
\begin{document}
\setlength{\fboxsep}{0pt}
\renewcommand*{\arraystretch}{1.5}
\begin{tabular}{cc}
\fbox{$\forall$} & \fbox{$\exists$}\\
\fbox{$\fforall$} & \fbox{$\eexists$}\\
$\forall^\forall$ & $\exists^\exists$ \\
$\fforall^\fforall$ & $\eexists^\eexists$\\
\end{tabular}
\end{document}
Best Answer
this does not exist as a "precomposed" symbol. however,
amsmath
provides a mechanism for creating combinations of this sort --\overset
:when
\overset
is applied to a single symbol, the proper class of that symbol (e.g.,\mathrel
,\mathbin
) is recognized automatically, so there is no need to specify it.of course, if the compound symbol is to be used more than once, it's a good idea to define a command to access it.