3

LaTeX complains Limit controls must follow a math operator. \textbf{G} := \parallel\limits about the following snippet.

\documentclass{article}

\usepackage{mathtools}
\begin{document}
    \begin{equation}
        \textbf{G} := \parallel\limits_{\pi \in \mathcal{P}} \textbf{G}^{\pi} 
    \end{equation}
\end{document}

What is a possible workaround to apply \limits to \parallel?

4

Maybe you want a symbol similar to \sum:

\documentclass{article}

\usepackage{mathtools,graphicx}

\makeatletter
\newcommand{\parop}{\DOTSB\parop@\slimits@}
\newcommand{\parop@}{\mathop{\vphantom{\sum}\mathpalette\delimiter@to@op\Vert}}
\newcommand{\delimiter@to@op}[2]{%
  \begingroup
  \sbox\z@{$#1\sum$}%
  \vcenter{\hbox{\resizebox{!}{\ht\z@}{$\m@th#2$}}}%
  \endgroup
}
\makeatother

\begin{document}

\begin{equation}
\textbf{G} \coloneqq \parop_{\pi \in \mathcal{P}} \textbf{G}^{\pi} 
\end{equation}

\begin{equation}
\sum_{\pi \in \mathcal{P}} \parop_{\pi \in \mathcal{P}}
\end{equation}

\begin{equation}
\textstyle \sum_{\pi \in \mathcal{P}} \parop_{\pi \in \mathcal{P}}
\scriptstyle \sum_{\pi \in \mathcal{P}} \parop_{\pi \in \mathcal{P}}
\scriptscriptstyle \sum_{\pi \in \mathcal{P}} \parop_{\pi \in \mathcal{P}}
\end{equation}

\end{document}

enter image description here

| improve this answer | |
2

For a quick and dirty one-time-use solution, make it a math operator.

\documentclass{article}

\usepackage{mathtools}
\begin{document}
    \begin{equation}
        \textbf{G} := \mathop{\parallel}\limits_{\pi \in \mathcal{P}} \textbf{G}^{\pi} 
    \end{equation}
\end{document}
| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.