3

This question already has an answer here:

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?

marked as duplicate by TeXnician, Troy, Sebastiano, Kurt, Stefan Pinnow Dec 16 '18 at 16:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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

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}

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