# Group statements without numbering

\documentclass[conference]{IEEEtran}
\IEEEoverridecommandlockouts
\usepackage{cite}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage{xcolor}
\usepackage{colortbl}
\usepackage{lipsum}
\usepackage{tabularx}
\usepackage[noend]{algpseudocode}
\usepackage[linesnumbered,ruled]{algorithm2e}
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}

\title{AlgorithmTemplate}
\usepackage{fullpage}
\usepackage{times}
\usepackage{fancyhdr}
\include{pythonlisting}

\begin{document}

\title{Title}

\author{

}

\maketitle

\begin{abstract}
\end{abstract}

\begin{IEEEkeywords}
Keys
\end{IEEEkeywords}

\section{Introduction}
Ref~\cite{case2016analysis}.

\begin{algorithm}
\SetKwInOut{Input}{Input}
\SetKwInOut{Output}{Output}

\textbf{Data}: \\

\For{$\omega = 1,2, \cdots, N$}{
Vectors $Z_n=(z_{1},\cdots , z_{n})$:
$x = y + z$

\If{$\tau \in \{\chi\}$ in $\sigma$}{
}

}
\Output{Score}
\caption{Algo}
\end{algorithm}

\bibliographystyle{IEEEtran}
\bibliography{Ref}

\end{document}


I have the following problem in the algorithm as I want to group statements under Vectors and I don't want to number the "if" statement as it's part of group under Vectors below,

This is what I want,

• Does this answer your question? How to hide specific line numbers in an algorithm? Apr 14 at 12:30
• There is also tex.stackexchange.com/questions/223353/… which does something very similar to the proposed duplicate. Apr 14 at 12:32
• The answers you've shared hide the lines rather than not count them. The result in OP's case would be lines 1 2 3 7. The last end would be 7 and lines 4 -6 would be hidden. We want the counting to stop and resume on the last end. Also, they are with algorithm2e rather than algorithmicx, So I voted to keep open Apr 14 at 14:46
• UGH just noticed OP was using algorithm2e... Still not the answer he was looking for though Apr 14 at 14:57
• I've tried this answer tex.stackexchange.com/a/153906/90297 , but it also numbers the first end. If you could go with no ends, then that's fine, or find some way to redefine nonl in the end block somehow Apr 14 at 15:59