问题:
使用 apacite 的第一个参考文献被正确打印出来,但后续的则不然。
代码在博士论文SU.cls:
%-------------------------- identification ---------------------
%\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{Latex/Classes/PhDthesisSU}[2011/09/23 PhD thesis class]
%:-------------------------- book style -----------------------
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
\ProcessOptions\relax
\LoadClass[pdftex, a4paper]{book}
%:-------------------------- packages for fancy things -----------------------
\usepackage{mathptmx} % Default font for dissertations is Times.
%\usepackage{fourier} % If mathematics don't display well using Times, then use Fourier.
\usepackage{enumitem}
\usepackage{tabularx,ragged2e,booktabs,caption,tabulary}
\usepackage[flushleft]{threeparttable}
%\usepackage{setspace}
\usepackage{geometry}
\usepackage{amssymb}
\usepackage{textcomp}
\usepackage{atbegshi}
\usepackage{amsmath}
\usepackage{amsbsy}
\usepackage[pdftex]{graphicx} % for improved inclusion of graphics
\usepackage{epstopdf} % converts eps figures to pdf
\usepackage[margin=10pt,font=small,labelfont=bf]{caption} % for improved layout of figure captions with extra margin, smaller font than text
\usepackage{fancyhdr} % for better header layout
\usepackage{eucal}
\usepackage[polutonikogreek,english,swedish]{babel}
\usepackage[usenames, dvipsnames]{color}
\usepackage[perpage]{footmisc}
\usepackage{enumerate} % enumerated list for List of Papers
\usepackage{ifthen}
\usepackage{multicol} % for pages with multiple text columns, e.g. References
\setlength{\columnsep}{20pt} % space between columns; default 10pt quite narrow
\usepackage[nottoc]{tocbibind} % correct page numbers for bib in TOC, nottoc suppresses an entry for TOC itself
%\usepackage{nextpage}
\usepackage[T1]{fontenc}
\usepackage{calligra}
\usepackage[ pdftex, plainpages = false, pdfpagelabels,
pdfpagelayout = useoutlines,
bookmarks,
bookmarksopen = true,
bookmarksnumbered = true,
breaklinks = true,
linktocpage,
pagebackref = false,
colorlinks = false, % was true
linkcolor = blue,
urlcolor = blue,
citecolor = red,
anchorcolor = green,
hyperindex = true,
hyperfigures
]{hyperref}
代码在宏文件1:
% This file contains macros that can be called up from connected TeX files
% It helps to summarise repeated code, e.g. figure insertion (see below).
% insert a centered figure with caption and description
% parameters 1:filename, 2:title, 3:description and label
\newcommand{\figuremacro}[3]{
\begin{figure}[htbp]
\centering
\includegraphics[width=1\textwidth]{#1}
\caption[#2]{\textbf{#2} - #3}
\label{#1}
\end{figure}
}
% insert a centered figure with caption and description AND WIDTH
% parameters 1:filename, 2:title, 3:description and label, 4: textwidth
% textwidth 1 means as text, 0.5 means half the width of the text
\newcommand{\figuremacroW}[4]{
\begin{figure}[htbp]
\centering
\includegraphics[width=#4\textwidth]{#1}
\caption[#2]{\textbf{#2} - #3}
\label{#1}
\end{figure}
}
% inserts a figure with wrapped around text; only suitable for NARROW figs
% o is for outside on a double paged document; others: l, r, i(inside)
% text and figure will each be half of the document width
% note: long captions often crash with adjacent content; take care
% in general: above 2 macro produce more reliable layout
\newcommand{\figuremacroN}[3]{
\begin{wrapfigure}{o}{0.5\textwidth}
\centering
\includegraphics[width=0.48\textwidth]{#1}
\caption[#2]{{\small\textbf{#2} - #3}}
\label{#1}
\end{wrapfigure}
}
% predefined commands by Harish
\newcommand{\PdfPsText}[2]{
\ifpdf
#1
\else
#2
\fi
}
\newcommand{\IncludeGraphicsH}[3]{
\PdfPsText{\includegraphics[height=#2]{#1}}{\includegraphics[bb = #3, height=#2]{#1}}
}
\newcommand{\IncludeGraphicsW}[3]{
\PdfPsText{\includegraphics[width=#2]{#1}}{\includegraphics[bb = #3, width=#2]{#1}}
}
\newcommand{\InsertFig}[3]{
\begin{figure}[!htbp]
\begin{center}
\leavevmode
#1
\caption{#2}
\label{#3}
\end{center}
\end{figure}
}
\newcommand\blankpage{%
\null
\thispagestyle{empty}%
\addtocounter{page}{-1}%
\newpage}
代码在论文.tex:
%Default style using S5 paper
%\documentclass[twoside,11pt]{Latex/Classes/PhDthesisSU_A4}
%Use this instead if you need A4 paper.
\documentclass[twoside,11pt]{Latex/Classes/PhDthesisSU}
%: Macro file for Latex
% Macros help you summarize frequently repeated Latex commands.
% Here, they are placed in an external file /Latex/Macros/MacroFile1.tex
% An macro that you may use frequently is the figuremacro
\input{Latex/Macros/MacroFile1}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{pdfpages}
\usepackage{afterpage}
\usepackage{emptypage}
\usepackage{apacite}
...
%: ----------------------- ´Bibliography ------------------------
% The section below defines how references are listed and formatted.
%\begin{multicols}{2} % \begin{multicols}{ # columns}[ header text][ space] %uncomment to have 2 columns
\begin{scriptsize} % tiny(5) < scriptsize(7) < footnotesize(8) < small (9)
%Default style file. Change according to you preferences.
\bibliographystyle{apacite}
% Changes the header from Bibliography to References
\renewcommand{\bibname}{References}
% File containing all references in BibTex format
\bibliography{thesisref}
\end{scriptsize}
代码在引言.tex:
Media have always been an essential element of democracy \cite{load05}. The Internet
as a medium has given individuals the opportunity to integrate, interact, network and
participate in wider communities for various democratic purposes \cite{nau12}. It has
been argued that “the widespread use of the Internet for social networking, blogging,
video-sharing and tweeting has an elective affinity with participatory democracy”
\cite{cast12, mast12}.
BibTex 代码论文参考文献:
@book{load05,
author = {Loader, B. D.},
title = {The governance of cyberspace: Politics, technology and global restructuring},
publisher = {Routledge},
address = {New York},
year = {2005},
type = {Book}
}
@book{nau12,
author = {Naughton, J.},
title = {What you really need to know about the Internet: From Guttenberg to Zuckerberg},
publisher = {Quercus},
address = {London},
year = {2012},
type = {Book}
}
@book{cast12,
author = {Castells, M. and Caraca, J. and Cardoso, G.},
title = {Aftermath: The cultures of the economic crisis.},
publisher = {Oxford University Press},
address = {Oxford},
year = {2012},
type = {Book}
}
@book{mast12,
author = {Mason, P.},
title = {Why it's kicking off everywhere: The new global revolutions},
publisher = {Verso},
address = {London},
year = {2012},
type = {Book}
}
输出在文本中:
所有参考文献均在文本中正确输出。
输出到参考列表(论文结束):
- Castells, M.、Caraca, J. 和 Cardoso, G. (2012)。余波:经济危机的文化。[图书]。牛津:牛津大学出版社。1
- Loader, BD (2005)。网络空间治理:政治、技术和全球重组 [书籍]。纽约:劳特利奇。1
- Mason, P. (2012). 为什么它会在世界各地爆发:新的全球革命 [书]。伦敦:Verso。1
- Naughton, J. (2012). 你真正需要了解的互联网知识:从古腾堡到扎克伯格 [书]。伦敦:Quercus。1
问题:
为什么 apacite 在第一个引用的末尾添加数字 1?
答案1
这第一个问题让 APACite 工作,解决方案是:
% Use package for APA Cite
\usepackage{apacite}
% Default style file. Change according to you preferences.
\bibliographystyle{apacite}
% Changes the header from Bibliography to References
\renewcommand{\bibname}{References}
% File containing all references in BibTex format
\bibliography{thesisref}
这第二个问题是每个引用后面都添加了数字一 (1)。 解决方案是将选项 pagebackref 的值声明为 false,如下所示:
\usepackage[ pdftex, plainpages = false, pdfpagelabels,
pdfpagelayout = useoutlines,
bookmarks,
bookmarksopen = true,
bookmarksnumbered = true,
breaklinks = true,
linktocpage,
pagebackref = false,
colorlinks = false, % was true
linkcolor = blue,
urlcolor = blue,
citecolor = red,
anchorcolor = green,
hyperindex = true,
hyperfigures
]{hyperref}
这第三个问题使用 apacite 时,会从参考文献列表中删除参考文献类型([Book]、[Journal Article] 等)。这是通过从 BibTex 文件中删除它来完成的(如果您从 Endnote 导出它)。
代替:
@book{
author = {Straubhaar, Joseph and Larose, Robert and Davenporta, Lucinda },
title = {Media now: Understanding media, culture, and technology},
publisher = {Cengage Learning},
address = {Boston, MA},
edition = {7},
year = {2012},
type = {**Book**}
}
它应该是:
@book{
author = {Straubhaar, Joseph and Larose, Robert and Davenporta, Lucinda },
title = {Media now: Understanding media, culture, and technology},
publisher = {Cengage Learning},
address = {Boston, MA},
edition = {7},
year = {2012},
type = {}
}
这第四个也是最后一个问题是有些参考文献(例如,当它是书籍章节时),参考文献中添加了单词“In(此处为编辑姓名)”,但单词“In”却以另一种语言显示。解决此问题的方法是删除 .cls 文件中的该语言。在我的情况下,它是瑞典语,并且不太需要它:
代替:
\usepackage[polutonikogreek,english,swedish]{babel}
它应该是:
\usepackage[polutonikogreek,english]{babel}
如果有人需要瑞典字母(åäö),可以通过以下方式轻松实现:
The letter å is \r{a}
The letter ä is \"a
The letter ö is \"o
为了不浪费时间,请用瑞典语书写整个页面,然后使用查找/替换功能以正确的方式快速格式化它。