
我有一個 Moderncv 格式的函數,我需要超過 9 個參數。如果我使用“\foocontinued”如何定義具有 9 個以上參數的命令我有以下問題。
如果我將
\foocontinued
其放入專案中,\cvitem{}{\foocontinued}
則會出現以下錯誤:“\foocontinued 的參數有一個額外的 }”如果我將其放在
\foocontinued
cvitem 外部但在命令 foo 內部,則第十個參數將出現在一行上,如下面的 MWE 所示。
\documentclass[letterpaper]{moderncv}
\moderncvstyle{classic}
\usepackage[maxbibnames=99,backend=biber,defernumbers=true,sorting=ydnt,url = false]{biblatex}
\firstname{Author}
\familyname{}
\title{Curriculum Vitae}
\newcommand\foo[9]{%
\cvitem{[#1]}{
#2
#3
#4
#5
#6
#7
#8
#9 .The end of the normal function. Item 10 should follow this but instead in on a new line. } \foocontinued }
\newcommand\foocontinued[1]{
This is item #1
}
% build the document
\begin{document}
\makecvtitle
\foo{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}
\end{document}
如何在 cvitem 中獲得第 10 個參數?
答案1
就這樣,但它應該可以工作:
\newcommand\foo[9]{\foocontinued{#1}{#2 #3 #4 #5 #6 #7 #8 #9}}
\newcommand\foocontinued[3]{\cvitem{[#1]}{#2 This is item #3}}