%20%D1%81%20%D0%BA%D0%BE%D0%BC%D0%B0%D0%BD%D0%B4%D0%BE%D0%B9%20RenewDocummentCommand%20%D0%B8%20newdocument.png)
У меня было вот это:
\let\otitle\title
\renewcommand\title[2] {\otitle{#1 \\ \bigskip \large #2\\ \bigskip}}
работало нормально, изменил вот так (xparse):
\RenewDocumentCommand\title{m m} {\otitle{#1 \\ \bigskip \large #2\\ \bigskip}}
Намерен добавить необязательные параметры и другие функции xparse, однако на самом деле возникают ошибки
\title{Notes for Grade 7 Math, 2020}
{
Complied from the 2013 Curriculum Guide
\thanks{Thanks to Gereina Skanes for presentation and formatting review}
}
который работал нормально раньше. Думал, что понял синтаксис RenewDocumentCommand?
решение1
\title
является надежной командой и \let
не копирует такие команды правильно. Вы можете использовать \LetLtxMacro
:
\documentclass{article}
\usepackage{letltxmacro}
\LetLtxMacro\otitle\title
\RenewDocumentCommand\title{m m} {\otitle{#1 \\ \bigskip \large #2\endgraf \bigskip}}
\title{abc}{cde}
\begin{document}
\maketitle
\end{document}
В следующем выпуске LaTeX появится \NewCommandCopy
команда, которую вы также сможете использовать:
\documentclass{article}
\NewCommandCopy\otitle\title %new in the next latex ...
\RenewDocumentCommand\title{m m} {\otitle{#1 \\ \bigskip \large #2\endgraf \bigskip}}
\title{abc}{cde}
\begin{document}
\maketitle
\end{document}