我使用\addbibresource
主 tex 文件中的命令来添加参考书目,因此我无法使用(搜索后意识到)添加外部bst
样式文件,并且我使用了一个我怀疑是罪魁祸首的自定义文件,但我不知道如何..\bibliographystyle
cls
我想将参考文献中的期刊名称样式改为斜体格式(我正在使用\emph
),如下所示:
@article{Aktipis_2004,
author = {C. Athena Aktipis},
doi = {10.1016/j.jtbi.2004.06.020},
issn = {00225193},
issue = {2},
pages = {249-60},
journal = {\emph{Journal of Theoretical Biology}},
title = {\textit{Know} when to walk away: Contingent movement and the evolution of cooperation},
volume = {231},
year = {2004},
}
但它似乎对生成的pdf文件没有任何影响。
我用来pdflatex
编译 tex 文件,然后biber
执行命令,pdflatex
再执行命令。
这是我的自定义cls
文件:
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ipb}[2017/07/09 base class]
\LoadClass[12pt,twoside]{report}
%% Required packages.
% Line spacing
\RequirePackage{setspace}
\RequirePackage{graphicx}
\RequirePackage[utf8]{inputenc}
\RequirePackage{glossaries}
\RequirePackage[margin=2cm]{geometry}
%https://pt.sharelatex.com/learn/Headers_and_footers
\RequirePackage{fancyhdr}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions\relax
%%%%%
%%%%% SETUP MARGINS AND PENALTIES
%%%%%
% We need 1" margins except on the binding edge, where it is 1 1/2"
% Theses may be either single or double sided
\if@twoside
\setlength\oddsidemargin {0\p@}
\setlength\evensidemargin {0\p@}
\setlength\marginparwidth {40\p@}
\else
\setlength\oddsidemargin {0\p@}
\setlength\evensidemargin {0\p@}
\setlength\marginparwidth {40\p@}
\fi
\marginparsep 10pt
%\oddsidemargin 0.5in \evensidemargin 0in
%\marginparwidth 40pt
\topmargin 0pt
\headsep 1cm
\textheight 22cm
\textwidth 16cm
\footskip 2cm
% Disallow page breaks at hyphens (this will give some underfull vbox's,
% so an alternative is to use \brokenpenalty=100 and manually search
% for and fix such page breaks)
\brokenpenalty=10000
\setstretch{1.5}
%%%%%
%%%%% SETUP COMMANDS
%%%%%
%\RequirePackage{xparse}
%% Departamento
%%\NewDocumentCommand{\dept}{m}{#1}
%% Primeiro autor
%\NewDocumentCommand{\authnum}{m}{#1}
%% Segundo autor
%\NewDocumentCommand{\secauthnum}{m}{#1}
%\NewDocumentCommand{\secondauthor}{m}{#1}
%% Curso
%\NewDocumentCommand{\course}{m}{#1}
%\NewDocumentCommand{\courseyear}{m}{#1}
%% Supervisores
%\NewDocumentCommand{\supervisor}{m}{#1}
%\NewDocumentCommand{\cosupervisor}{m}{#1}
% Departamento
\def\dept#1{\gdef\@dept{#1}}
% Autores
\def\@author{Aluno} % default spelling
\def\authnum#1{\gdef\@authnum{#1}}
\def\secondauthor#1{\gdef\@secondauthor{#1}}
\def\secauthnum#1{\gdef\@secauthnum{#1}}
% Curso
\def\@course{Informatics}
\def\course#1{\gdef\@course{#1}}
\def\@courseyear{\the\year} % default spelling
\def\courseyear#1{\gdef\@courseyear{#1}}
% Supervisors
\def\@supervisor{Orientador} % default spelling
\def\supervisor#1{\gdef\@supervisor{#1}}
\def\cosupervisor#1{\gdef\@cosupervisor{#1}}
% % % conditionals
\newif\ifdd
\newif\iffigurespage
\newif\iftablespage
\ddfalse
\figurespagetrue
\tablespagetrue
\RequirePackage{ifxetex}
\ifxetex
\usepackage{fontspec}
\else
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\fi
\def\coverpage{%
%\thispagestyle{empty}%+++
%\hspace{-4cm}
\begin{center}
\includegraphics[width=0.6\columnwidth, keepaspectratio]{etc/nagoya_university.png}
\end{center}
%\null\vskip1in%
\begin{center}
\vspace{4em}
{\LARGE\expandafter{\bf \@title}}
\vspace{4em}
{\Large\textbf{\\
\@author \ifdefined\@authnum \quad\@authnum \fi\\
}}
%\vfill
\vspace{4em}
Dissertation submitted to the Graduate School of Informatics in partial fulfillment of the requirements for the PhD degree in \@course.\\
\vspace{1em}
Supervisors:\\
\@supervisor\\
\ifdefined\@cosupervisor
\@cosupervisor\\
\fi
\end{center}
\cleardoublepage
}
\def\titlep{%
%\thispagestyle{empty}%+++
}
\def\beforepreface{%
\pagenumbering{roman}
%\pagestyle{plain}%+++
\coverpage
\titlep
%\ifdisclaimer\disclaimerpage\fi
%\signaturepage
%\cleardoublepage
}
\def\prefacesection{\@ifstar\@prefacesection\@@prefacesection}
\def\@prefacesection#1{%
\chapter*{#1}
}
\def\@@prefacesection#1{%
\chapter*{#1}
\addcontentsline{toc}{chapter}{#1}
}
\def\afterpreface{%
\cleardoublepage
\tableofcontents
\iftablespage
\listoftables
\fi
\iffigurespage
%\newpage
%\mbox{}
\listoffigures
\listoftables
\fi
}
\def\bodystart{%
\cleardoublepage
\pagenumbering{arabic}
% \pagestyle{headings}
%https://pt.sharelatex.com/learn/Headers_and_footers
%\pagestyle{fancy}%+++
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhf{}
%\fancyhead[LE,RO]{}
%\fancyhead[RE,LO]{}
%\fancyfoot[CE,CO]{\thepage}
\fancyfoot[LE,RO]{\thepage}
}
% Redefine \thebibliography to go to a new page and put an entry in the
% table of contents
%orig:
\let\@ldthebibliography\thebibliography
\renewcommand{\thebibliography}[1]{\newpage
\@ldthebibliography{#1}%
\addcontentsline{toc}{chapter}{\bibname}}
% Start out normal
%\pagestyle{headings}
\makeatother
提前感谢您的回答。