# Alignment with a symbol within \sqrt

In this MWE I get an error. My aim is that the "6" is appearing directly beneath the "2".

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\sqrt{1 & 2345}= \\
& 6
\end{align*}
\end{document}

• There are a number of ways to achieve this. Do you have a specific goal in mind other than placing one number underneath another? – Werner Nov 8 '18 at 21:14
• @Werner In principle it's only about placing numbers. My goal is typesetting an algorithm similar to divison. I specified my question now in a new case called "Alignment and phantom". (I know about the package xlop but think this does not help here). – Thales Nov 8 '18 at 23:45

You cannot use alignment points (&) inside an \sqrt structure. Instead, here I use \phantom to provide the requested buffer.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\sqrt{1  2345}= \\
6\phantom{345 =}
\end{align*}
\end{document}


If you want the rows closer together, use something like \\[-6pt] as the row separator.