I need to use a form of a verbatim environment, so that after the closing of the environment, there immediately follows another command. In particular I need something like the following - assuming moreverb package - but the problem is not specific to moreverb:
... stuff ...
Most verbatim-facilitating packages (moreverb, fancyvrb, etc.) either discard whatever characters follow the closing environment tag (moreverb), or result in an error (fancyvrb).
Is there a solution to this? Note, dividing the last line into two is not an option!
Would it be an option to "fool" TeX to think there actually is EOL character, while there is none (e.g., using \scancodes) and at the same time preserve compatibility with some implementation of verbatim functionality? Alternatively, could you point me to an (re-)implementation of the "verbatimwrite" functionality, which would allow characters after the closing tag?
To explain why dividing the last line is not an option: I need to integrate my package with LyX and it allows only single-line TeX snippets in its layout style definitions (Command/Environment). Wrapping the end of environment together with the \somecommand in a new command wouldn't work due to the verbatim implemenation and multi-line solution is not allowed in LyX layout format.