[英]newcommand latex arguments
just a quick question, I could not find an answer to on Google. 只是一个简单的问题,我在Google上找不到答案。
I need to introduce a secondary citation method for my LaTeX project. 我需要为我的LaTeX项目引入辅助引用方法。 And I cannot get it to work.
我无法使它正常工作。
\newcommand{\sekcite[4]}{
{
(\cite[#1]{#2} qtd. in \cite[#4]{#3})
}
}
I have in my text the following lines for testing purposes: 我的文字中有以下几行用于测试:
\par \textcite[1]{Su2016}
\par \parencite[2]{Spar2014}
\par \sekcite{Su2016}{1}{Spar2014}{2}
The desired outcome should look like this: 预期的结果应如下所示:
CH Su, Fan, and PY Su (2016, p. 1)
Su CH,Fan和PY Su(2016,p.1)
(Sparwelt.de 2014, p. 2)
(Sparwelt.de 2014,第2页)
(CH Su, Fan, and PY Su 2016, p. 1 qtd. in Sparwelt.de 2014, p. 2)
(CH Su,Fan和PY Su 2016,第1卷第1期,Sparwelt.de 2014,第2页)
The problem is, that I get: 问题是,我得到了:
CH Su, Fan, and PY Su (2016, p. 1)
Su CH,Fan和PY Su(2016,p.1)
(Sparwelt.de 2014, p. 2)
(Sparwelt.de 2014,第2页)
(CH Su, Fan, and PY Su 2016, p. 0 qtd. in 1 ) 2
(CH Su,Fan和PY Su 2016,第1页的第0页)2
As I read here: http://www.golatex.de/wiki/%5Cnewcommand 我在这里阅读: http : //www.golatex.de/wiki/%5Cnewcommand
I can create a new command with 我可以创建一个新命令
\newcommand{\NAME}[COUNT]{CODE}
What am I doing wrong? 我究竟做错了什么?
EDIT: What I should have added: I get following warning: 编辑:我应该添加的内容:我收到以下警告:
The following entry could not be found(biblatex) in the database:(biblatex) 1(biblatex) Please verify the spelling and rerun(biblatex) LaTeX afterwards.
在数据库中找不到以下条目(biblatex):(biblatex)1(biblatex)请验证拼写,然后重新运行(biblatex)LaTeX。
And I am using Texmaker 4.5 on MiKTeX in the current stable version on Windows 7 我正在Windows 7的当前稳定版本中的MiKTeX上使用Texmaker 4.5
Try with 试试看
\newcommand{\sekcite}[4]{%
(\cite[#2]{#1} qtd.\ in \cite[#4]{#3})%
}
Note the use of %
. 注意
%
的使用 。 Additionally, the use of \\
after the .
此外,在
\\
之后使用\\
.
ensures you don't have a sentence-ending period space. 确保您没有句尾句号空间。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.