I've defined a new command called \mysec
like the below:
\documentclass{article}
\newcommand{\mysec}[1]{\section{#1}}
\begin{document}
\mysec[Foo foo]{Bla bla bla}
\end{document}
But in the PDF output, I get:
1 [
Foo foo]Bla bla bla
How to solve this problem?
By the way, I'd prefer to have the solution without using extra packages. Also note that I don't want to redefine the \section
command.
Best Answer
Quoting the UK TeX FAQ:
Using your MWE plus the first FAQ solution: