
Ich habe einen Befehl, der mit dieser Syntax funktioniert:
\startmycommand[{
nononononononononononon
nononononononononononon
nononononononononononon
}]\endmycommand
Ein Benutzer hat eine (ausgezeichnete) Vereinfachung für bereitgestellt \startmycommand
, wie Sie oben sehen können:
\newcommand\mynewstartcommand{%
\expandafter\startmycommand
\expandafter[%
\expandafter{%
\iffalse}\fi
}%
Wie kann ich dasselbe für tun }]\endmycommand
?
Antwort1
Vielleicht suchen Sie nach etwas wie dem folgenden Beispiel:
\long\def\mynewstartcommand#1\endmycommand{%
\startcommand[{#1}]\endmycommand
}
\mynewstartcommand
nononononononononononon
nononononononononononon
nononononononononononon
\endmycommand
Allerdings ist die Frage nicht ganz klar: Was ist der reguläre Inhalt des Arguments, was ist der Zweck der Leerzeilen im Argument, was ist die gewünschte Syntax?
Antwort2
@Heiko Oberdiek, deine Antwort hat hier gut geklappt.
Ein Minimalbeispiel zur Veranschaulichung meiner Verwendung – mit Ihrem Vorschlag:
\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}