I have defined the following shortcut for some text
\newcommand{\sometext}{text\\text\\text}
Now I would like to use this in some other place but with the linebreaks removed. So is there an easy way to do it (e.g. something like "\remove_linebreaks{\sometext}")?
\\has an optional star and an optional argument. Something like\def\\{\@ifstar {\@gobbleopt}{\@gobbleopt}}\providecommand*\@gobbleopt[1][]{}would handle these too. – Schweinebacke Nov 23 '11 at 13:56
– Frotz Oct 01 '18 at 20:29! LaTeX Error: Missing \begin{document}.See the LaTeX manual or LaTeX Companion for explanation.Type H <return> for immediate help....l.65 ...bbleopt}{\@gobbleopt}}\providecommand*\@gobbleopt[1][]{}?\def\\{ }in egreg's code, but → https://tex.stackexchange.com/questions/8351/what-do-makeatletter-and-makeatother-do or ask a new question. – Schweinebacke Oct 02 '18 at 06:23