答案1
您始终可以构建自己的符号。(如果您希望此类积分也显示为下标,则需要将相应的代码添加到 的最后一个选项中\mathchoice
。)
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\DeclareMathOperator*{\SquareInt}{\mathchoice{\tikz[baseline=0.55em]{%
\draw[line width=0.08em] (-0.2em,0em)
|- (0,-0.2em) -- (0,1.9em) -| (0.2em,1.7em);}}{\tikz[baseline=0.35em]{%
\draw[line width=0.06em] (-0.2em,0em)
|- (0,-0.2em) -- (0,1.2em) -| (0.2em,1em);}}{}{}}
\begin{document}
\[ \SquareInt\limits_a^bf(x)\,\mathrm{d}x\quad\text{vs.}\quad
\int\limits_a^bf(x)\,\mathrm{d}x\]
$\SquareInt\limits_a^bf(x)\,\mathrm{d}x\quad\text{vs.}\quad
\int\limits_a^bf(x)\,\mathrm{d}x$
\end{document}
答案2
您可以使用 s 设计自己的\rule
。此解决方案测量积分的高度和深度以确保准确的尺寸。
以下是代码:
\documentclass{article}
\usepackage{calc} % needed to add lengths
\usepackage{amsmath} % needed for \DeclareMathOperator
\newlength{\hght}
\newlength{\dpth}
\DeclareMathOperator{\sqrint}{\mathchoice%
{\settoheight{\hght}{$\displaystyle{\int}$}\settodepth{\dpth}{$\displaystyle{\int}$}% measures \int
\rule[-\dpth]{.2ex}{.5ex}% lower vert
\rule[-\dpth]{.12em}{.2ex}% lower hor
\rule[-\dpth]{.2ex}{\hght+\dpth}% main vert
\rule[\hght-.2ex]{.12em}{.2ex}% upper hor
\rule[\hght-.5ex]{.2ex}{.5ex}}% upper vert
{\settoheight{\hght}{$\int$}\settodepth{\dpth}{$\int$}%
\rule[-\dpth]{.15ex}{.4ex}%
\rule[-\dpth]{.1em}{.15ex}%
\rule[-\dpth]{.15ex}{\hght+\dpth}%
\rule[\hght-.15ex]{.1em}{.15ex}%
\rule[\hght-.4ex]{.15ex}{.4ex}}%
{\settoheight{\hght}{$\scriptstyle{\int}$}\settodepth{\dpth}{$\scriptstyle{\int}$}%
\rule[-\dpth]{.1ex}{.3ex}%
\rule[-\dpth]{.08em}{.1ex}%
\rule[-\dpth]{.1ex}{\hght+\dpth}%
\rule[\hght-.1ex]{.08em}{.1ex}%
\rule[\hght-.3ex]{.1ex}{.3ex}}%
{}}
\begin{document}
Inline square integral: $\int_0^1\sqrint_0^1$, subscripted: $A_{\int_0^1\sqrint_0^1}$, or a displayed version:
\[
\int_0^1\sqrint_0^1
\]
\end{document}
注意我没有添加scriptscript版本的代码。你可以根据需要调整长度和厚度。