怎么自定义大型运算符?

发布于 2023-11-20 15:37:47

47b49b6fdc74d5d0ae81a0fefb091e7c.png
如图,如何在公式中实现如图所示的效果

查看更多

关注者
1
被浏览
544
Swit
Swit 2023-11-21
LaTeX nubility!

看这个,和你的需求一模一样

https://tex.stackexchange.com/questions/23432/how-to-create-my-own-math-operator-with-limits


看来光丢个链接还不行?

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}

\makeatletter
\DeclareRobustCommand\bigop[1]{%
  \mathop{\vphantom{\sum}\mathpalette\bigop@{#1}}\slimits@
}
\newcommand{\bigop@}[2]{%
  \vcenter{%
    \sbox\z@{$#1\sum$}%
    \hbox{\resizebox{\ifx#1\displaystyle.9\fi\dimexpr\ht\z@+\dp\z@}{!}{$\m@th#2$}}%
  }%
}
\makeatother

\newcommand{\bigK}{\DOTSB\bigop{\mathrm{K}}}

\begin{document}
\[
\bigK_{N=1}^n \frac{a_N}{b_N}
\quad
\textstyle
\bigK_{N=1}^n \frac{a_N}{b_N}
\quad
\scriptstyle
\bigK_{N=1}^n \frac{a_N}{b_N}
\quad
\scriptscriptstyle
\bigK_{N=1}^n \frac{a_N}{b_N}
\]
\end{document}

image.png

4 个回答
写代码的猫叔
写代码的猫叔 2023-11-21
这家伙很懒,什么也没写!

同问

LaTeXStudio
LaTeXStudio 2023-11-21
这家伙很懒,什么也没写!

代码如下:


\newcommand*\newop{\mathop{\raisebox{-5pt}{\normalfont\Huge K}}}
\begin{equation}
  1 + 1 = 2 \label{eq} \newop_a^b
\end{equation}

效果如下图:
image.png

拿了橘子跑啊
拿了橘子跑啊 2024-01-28
这家伙很懒,什么也没写!

收藏问题了

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览