This question is a follow up to verbatim-like environment with optional arguments poorly behaved. Based on David Carlisle's suggestion, I manually looked for an optional argument and employed \scantokens to retokenize the text when there were no arguments found. The only problem that remains is that there is a linefeed after the \scantoken that I need to eliminate
\documentclass{article}
\usepackage{verbatim}
\usepackage{ifthen} \normalsize
\parskip 1ex\parindent 0em
% SEEMS LIKE IT SHOULD WORK, BUT LACK OF OPTIONAL ARGUMENT MAKES 1ST
% ITEM OF ENVIRONMENT GET EXECUTED AS IF IT WERE OPTIONAL ARGUMENT
%\newenvironment{jenv}[1][]{#1\verbatim}{\endverbatim}
% THIS ALMOST FIXES IT, BUT PUTS LINEFEED AFTER \scantokens
\def\jin#1#2#3{\ifthenelse{\equal{#1}{[}}%
{#2\verbatim}%
{\verbatim\scantokens{#1#2#3}}%
}
\newenvironment{jenv}{\jin}{\endverbatim}
\begin{document}
\normalsize
\begin{jenv}[\LARGE]
this is a test
\end{jenv}
\normalsize
\begin{jenv}[\LARGE]
\tiny this is a test
\end{jenv}
\normalsize
\begin{jenv}
this is a test
\end{jenv}
\normalsize
\begin{jenv}
\tiny this is a test
\end{jenv}
\end{document}


#1the optional argument don't you? – David Carlisle Apr 16 '13 at 14:10\def#1 to look for[it will fail completely if the first character is{` – David Carlisle Apr 16 '13 at 14:12