修改书目中的书籍、在线和杂项标题

修改书目中的书籍、在线和杂项标题

我想修改书籍、在线和杂项标题。它们是斜体,但必须是非斜体。我认为(我在文件\APACrefbtitle中找到)就是关于这个的。我尝试了一些替代方案,但没有成功。.bbl%\patchcmd{\APACrefbtitle}{} %book, online, misc title

我认为\patchcmd{\APACjournalVolNumPages}{\Bem}{\uline}{}{}这一行是关于所有期刊、卷、编号和页码的。我仅用它去斜体化和给期刊标题加下划线。此外,我想去斜体化卷码,但我不知道该怎么做。修改这一行会影响期刊、卷、编号和页码。

谢谢。

Image

主文本

\documentclass[12pt]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[main=turkish,english,shorthands=:!]{babel}
\usepackage[a4paper,left=30mm,top=30mm,right=25mm,bottom=25mm]{geometry}
\usepackage{tocloft}
\usepackage{lipsum}
\usepackage{titlesec}


\usepackage{apacite}
\usepackage[normalem]{ulem}
\usepackage{etoolbox}





% BIBLIOGRAPHY
\AtBeginDocument{\urlstyle{APACsame}} % Same fonts for URL
%%% Bibliography line spacing
\usepackage{natbib}
\setlength{\bibsep}{0.0pt}
%%% Removing parentheses around year in bibliography
\AtBeginDocument{
\renewcommand{\BBOP}{}
\renewcommand{\BBCP}{}
\renewcommand{\BCBL}{}
\renewcommand{\BCBL}{}

\renewcommand{\BBAA}{ve}
%\renewcommand{\BBAB}{} %What is?
%\renewcommand{\BAnd}{} %What is?
\renewcommand{\BOthers}{vd}
}



\patchcmd{\APACjournalVolNumPages}{\Bem}{\uline}{}{}
%\patchcmd{\APACrefbtitle}{} %book, online, misc title  

%%% Adding ":" character before page number in citations
\bibpunct[: ]{(}{)}{:}{a}{,}{~}
%........................................






\usepackage[unicode]{hyperref} %son yükle



% BEGIN
\begin{document}

% CHAPTER 1
\chapter{GİRİŞ}
\citep{ferretti2001}, \citep{onlinedeneme}, \citet{frattini2013}, \citet{onlinedeneme}'e göre.
\lipsum[1-1]


% CHAPTER 2
% BIBLIOGRAPHY (Kaynaklar)
\renewcommand*\bibname{KAYNAKLAR}
\nocite{*} % Add all references within the .bib file
\phantomsection
\bibliographystyle{apacite}


\setlength{\bibsep}{1\itemsep}
\bibliography{literature}
\clearpage

\end{document}

文献资料

@article{ferretti2001,
  title     = {Permanent Scatterers in SAR Interferometry},
  author    = {Alessandro Ferretti and Claudio Prati and Fabio Rocca},
  journal   = {IEEE Transactions on Geoscience and Remote Sensing},
  number    = {1},
  volume    = {39},
  pages     = {8--20},
  year      = {2001},
  publisher = {IEEE-INST Electrical Electronics Engineers Inc},
  doi       = {10.1109/36.898661},
}
@article{frattini2013,
  title     = {Damage to Buildings in Large Slope Rock Instabilities
Monitored with the PSInSAR™ Technique},
  author    = {Paolo Frattini and Giovanni B. Crosta and Jacopo Allievi},
  journal   = {Remote Sensing},
  volume    = {5},
  pages     = {4753--4773},
  year      = {2013},
  publisher = {MDPI AG},
  doi       = {10.3390/rs5104753}, 
}
@online{onlinedeneme,
  title     = {Deneme Başlığı},
  author    = {Yazar Zadı and Iyazar Isoyad},
  year      = {2009},
  url       = {http://www.nytimes.com/},
  urldate   = {28 Ocak 2018}
}
@book{pye2010trashculture,
  author    = {John Doe},
  publisher = {Book Company},
  series    = {Cultural Interactions},
  title     = {Cultures of Amazons},
  year      = {2015},
}

答案1

normalem您的问题来自包选项ulem和之间的副作用patchcmd。命令\APACjournalVolNumPages包含调用\Bem

\meaning\APACjournalVolNumPages

印刷:

\long macro:#1#2#3#4->\Bem {#1}\ifx \@empty #2\@empty \else \unskip , \Bem
{#2}\fi \ifx \@empty #3\@empty \else \unskip ({#3})\fi \ifx \@empty #4\@empty\else \unskip , {#4}\fi

\Bem -> \protect\emph

因此:

  • \usepackage{ulem}所有的都会\emph被 默默替换 \uline。这样,即使没有 ,\patchcmd你也会得到: enter image description here
  • 使用\usepackage[normalem]{ulem},然后是:

\patchcmd{\APACjournalVolNumPages}{\Bem}{\uline}{\typeout{patch success}}{\typeout{patch failed}}

只有第一的 \Bem被替换为\uline(我不知道为什么)并且你会得到不想要的结果: enter image description here

解决方案如下:

  • 或者不使用该normalem选项,但所有内容\emph都会变成下划线。
  • 或者保留normalem但重复\patchmd替换第二个\Bem。在这种情况下,您还必须修补\APACrefbtitle和可能的其他修补。

您的 MWEB(带有参考书目的最小工作示例)将如下所示:

\RequirePackage{filecontents}

\begin{filecontents}{literat.bib}
@article{ferretti2001,
  title     = {Permanent Scatterers in {SAR} Interferometry},
  author    = {Alessandro Ferretti and Claudio Prati and Fabio Rocca},
  journal   = {IEEE Transactions on Geoscience and Remote Sensing},
  number    = {1},
  volume    = {39},
  pages     = {8--20},
  year      = {2001},
  publisher = {IEEE-INST Electrical Electronics Engineers Inc},
  doi       = {10.1109/36.898661},
}
@book{pye2010trashculture,
  author    = {Doe, John},
  publisher = {Book Company},
  series    = {Cultural Interactions},
  title     = {Cultures of {A}mazons},
  year      = {2015},
}
\end{filecontents}

\documentclass[12pt]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[main=turkish,english,shorthands=:!]{babel}
\usepackage[a4paper,left=30mm,top=30mm,right=25mm,bottom=25mm]{geometry}
\usepackage[normalem]{ulem}
\usepackage{etoolbox}

% BIBLIOGRAPHY
\usepackage{apacite}
\usepackage{natbib}

\AtBeginDocument{
\bibliographystyle{apacite}
\patchcmd{\APACjournalVolNumPages}{\Bem}{\uline}{\typeout{**patch success**}}{\typeout{**patch failed**}}
\patchcmd{\APACjournalVolNumPages}{\Bem}{\textnormal}{\typeout{**patch2 success**}}{\typeout{**patch2 failed**}}
\patchcmd{\APACrefbtitle}{\Bem}{\textnormal}{\typeout{**patch3 success**}}{\typeout{**patch3 failed**}}
\renewcommand{\BBAA}{ve}
\renewcommand{\BOthers}{vd}
% Removing parentheses around year in bibliography
\renewcommand{\BBOP}{}
\renewcommand{\BBCP}{}
\renewcommand{\BCBL}{}
\renewcommand{\BCBL}{}
\urlstyle{APACsame}
% Adding ":" character before page number in citations
\bibpunct[: ]{(}{)}{:}{a}{,}{~}
% Bibliography line spacing
\setlength{\bibsep}{1\itemsep}
}
\usepackage[unicode]{hyperref} %son yükle

\begin{document}
\chapter{GİRİŞ}
\citep{ferretti2001}, \citep{pye2010trashculture}
 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\renewcommand*\bibname{KAYNAKLAR}
\bibliography{literat}
\end{document}

顺便一提,下划线是从打字机时代继承下来的一个丑陋的坏习惯,如果不是强制性的,就避免它!

相关内容