## Ignore empty environment

The following code ignores an empty IDBsource environment as long as there is not extra line between the begin and end commands. However, the SWP Item Tag I created always includes a blank line:
\begin{source}

\end{source}
Does anyone see a way around this? My existing code follows.
\newenvironment{IDBSource}{\@ifnextchar\end{\relax}{\IDBSformat}}{}
\def\IDBSformat{\noindent\footnotesize\textit{Source: }}%
\def\IDBSourceCont{%
\ifx\@tmptok\end\let\idb@next\relax\else
\ifx\@tmptok\space\let\idb@next\relax\else
\let\idb@next\IDBSformat\fi\fi
\idb@next}

### Try to end the first two

Try to end the first two lines with a %

### Thanks for the suggestion.

Thanks for the suggestion. The editor uses a cst file to control the environment, which, I think, adds the extra line. I do not see a way to add a %. I added some code below.
\newenvironment{IDBSource}{\@ifnextchar\end{\relax}{\IDBSformat}}{}
\def\IDBSformat{\noindent\footnotesize\textit{Source: }}%
\def\IDBSourceCont{%
\ifx\@tmptok\end\let\idb@next\relax\else
\ifx\@tmptok\space\let\idb@next\relax\else
\let\idb@next\IDBSformat\fi\fi
\idb@next}

The following code is part of the cst file.
[FILTER]
\newenvironment{error}{}{}
\newenvironment{proof}{}{}
\newenvironment{IDBSource}{}{}

### Try to get a as small example

Try to get a as small example as possible and put a \tracingall (in a tex-field)just before. Then look at the log file (it will be very verbose). If you can not figure out was is wrong send the logfile to me and I will give it a try.

Mikael

### Thank you. I set up a

Thank you. I set up a self-contained MWE (attached) as you suggested but I could not determine what is causing the problem.

### When compiling your example I

When compiling your example I got something like Price and Story misaligned. This has to do with \and which is defined in latex.ltx as
\def\and{% % \begin{tabular}
\end{tabular}%
\hskip 1em \@plus.17fil%
\begin{tabular}[t]{c}}% % \end{tabular}

If you put a % before \hskip 1em \@plus.17fil% then they will align.
So the remedy is to put the code
\def\and{% % \begin{tabular}
\end{tabular}%
% \hskip 1em \@plus.17fil%
\begin{tabular}[t]{c}}% % \end{tabular}

Just before your \makeatother. If I understood you correctly then all is OK. If not we can continue at a higher level of understanding.

### Thank you, again! The

Thank you, again! The modification works well except (I should have mentioned this was a problem) the authors align but are not side-by-side:
Price
Story
As opposed to
Price Story
They should be side-by-side until forced by the text width to begin a new line.

### Why do you not write Author:

Why do you not write
Author: gname1 fname1, gname2 fname2 ?
Author: gname1 fname1
Author: gname2 fname2
You can in this case also set