On latest version of MikTeX, following works:
\begin{align*}
\int sinxdx && \texttt{test line 1}\\
\int{sinx}dx && \texttt{test line 2}\\
\end{align*}
But the following gives error:
\begin{align*}
\int sinxdx && \texttt{\int sinxdx}\\
\int{sinx}dx && \texttt{\int{sinx}dx}\\
\end{align*}
The error:
Underfull \hbox (badness 10000) in paragraph at lines 94--102
[2] [3]
Overfull \hbox (40.0189pt too wide) detected at line 168
\OML/cmm/m/it/10.95 a=c \OMS/cmsy/m/n/10.95
When using \verb, the following is also giving a similar error:
\begin{align*}
\int sinxdx && \verb|test line 1|\\
\int{sinx}dx && \verb|test line 2|\\
\end{align*}
Best Answer
To get verbatim content inside the
align*
environments, myverbatimbox
package can help.For the other issue of
\texttt
, try\mathtt
instead, which processes its argument in math mode.ADDENDUM
The OP asks if this can be done without an additional package. Perhaps this would suffice: