
Tengo un comando que funciona con esta sintaxis:
\startmycommand[{
nononononononononononon
nononononononononononon
nononononononononononon
}]\endmycommand
Un usuario ha proporcionado una simplificación (excelente) \startmycommand
, como puede ver arriba:
\newcommand\mynewstartcommand{%
\expandafter\startmycommand
\expandafter[%
\expandafter{%
\iffalse}\fi
}%
¿Cómo puedo hacer lo mismo }]\endmycommand
?
Respuesta1
Quizás esté buscando algo como el siguiente ejemplo:
\long\def\mynewstartcommand#1\endmycommand{%
\startcommand[{#1}]\endmycommand
}
\mynewstartcommand
nononononononononononon
nononononononononononon
nononononononononononon
\endmycommand
Pero la pregunta no está muy clara: ¿cuál es el contenido normal del argumento, cuál es el propósito de las líneas vacías en el argumento, cuál es la sintaxis deseada?
Respuesta2
@Heiko Oberdiek, tu respuesta funcionó bien aquí.
Un ejemplo mínimo para ilustrar cómo lo estoy usando, con tu sugerencia:
\documentclass[a4paper, twocolumn, twoside]{article}
\usepackage{lipsum}
\long\def\mynewstartcommand#1\endmycommand{%
\twocolumn[{#1}]\vspace*{10 mm}
}
\begin{document}
\mynewstartcommand
\begin{minipage}{0.795\paperwidth}
\begin{minipage}[t][][b]{0.45\linewidth}
\lipsum[1]
\end{minipage}\qquad~\qquad
\begin{minipage}[t][][b]{0.45\linewidth}
\lipsum[2]
\vspace*{40 mm}
\end{minipage}
\end{minipage}
\lipsum[3]
\endmycommand
\end{document}