不带连字符的对齐书目

不带连字符的对齐书目

我知道有几个关于非连字符参考书目的问题,但都不是我想要的。

我想 (i) 停止 biblatex 对参考书目条目进行连字处理;以及 (ii) 保持参考书目对齐。使用 sloppy 命令没有任何帮助,而且我不想更改边距。

我知道人们的第一反应可能是这样会显得很丑,但我读过的大多数学术书籍都有对齐的参考书目,没有任何连字符,而且看起来很棒!有没有办法重新创建这个?

以下是 MWE:

\documentclass[12pt]{article}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{MacFarlane2004,
    author = {MacFarlane, John},
    file = {:Users/James/Documents/St Andrews/Philosophy/MPhil/MPhil Thesis/Readings/Normativity/MacFarlane In What Sense is Logic Normative.pdf:pdf},
    journal = {Unpublished Manuscript},
    title = {{In What Sense (If Any) Is Logic Normative for Thought?}},
    year = {2004}
}

@incollection{Kolodny2018,
    address = {Oxford},
    author = {Kolodny, Niko},
    booktitle = {The Oxford Handbook of Reasons and Normativity},
    chapter = {31},
    editor = {Star, Daniel},
    file = {:Users/James/Documents/St Andrews/Philosophy/MPhil/MPhil Thesis/Readings/Normativity/Instrumental Reasons Kolodny.pdf:pdf},
    pages = {731--763},
    publisher = {Oxford University Press},
    title = {{Instrumental Reasons}},
    year = {2018}
}

@article{Cook2010,
    author = {Cook, Roy T.},
    doi = {10.1111/j.1747-9991.2010.00286.x},
    file = {:Users/James/Library/Application Support/Mendeley Desktop/Downloaded/Cook - 2010 - Let a Thousand Flowers Bloom A Tour of Logical Pluralism.pdf:pdf},
    journal = {Philosophy Compass},
    month = {jun},
    number = {6},
    pages = {492--504},
    publisher = {John Wiley {\&} Sons, Ltd (10.1111)},
    title = {{Let a Thousand Flowers Bloom: A Tour of Logical Pluralism}},
    url = {http://doi.wiley.com/10.1111/j.1747-9991.2010.00286.x},
    volume = {5},
    year = {2010}
}

\end{filecontents}

\usepackage[style=apa, natbib=true, doi=false, url=false]{biblatex}
\addbibresource{/Users/James/Documents/MWEs/Bibliography Hyphenation.bib}
\AtEveryBibitem{\clearfield{number}} %gets rid of issue numbers
\AtEveryBibitem{\clearfield{chapter}} %gets rid of chapters
\DeclareFieldFormat{apacase}{#1} %stops capitalisation
\DeclareFieldFormat[article]{volume}{\apanum{#1}} %deitalicises volume numbers
\setlength\bibitemsep{1.5\itemsep} %separates entries

\usepackage[margin=30mm]{geometry} %changes margins


\usepackage{baskervillef} %font
\usepackage[T1]{fontenc} %font

\title{Justified Bibliographies Without Hyphenation}
\date{\vspace{-10mm}}


\begin{document}

\maketitle

\noindent I might want to cite \citet{MacFarlane2004}, \citet{Kolodny2018}, and \citet{Cook2010}. But I would like the bibliography to remain justified, but without the hyphenation. Thanks for the help!

\printbibliography


\end{document}

它的输出如下:

在此处输入图片描述

答案1

理论上,你可以使用hyphenat包中的方法(显然可以追溯到 TeXbook - 并且也被提及芭芭拉·比顿在里面评论\hyphenpenalty=10000\exhyphenpenalty=10000\relax正如我刚刚意识到的那样)通过添加到的定义来抑制连字符\bibsetup

\renewcommand*{\bibsetup}{%
  \interlinepenalty=5000\relax
  \widowpenalty=10000\relax
  \clubpenalty=10000\relax
  \hyphenpenalty=10000\exhyphenpenalty=10000\relax
  \raggedbottom
  \frenchspacing
  \biburlsetup}

但我怀疑你会对结果特别满意。问题是你的两个愿望几乎不相容。

如果您想要对齐,您需要能够将文本的片段从一行移动到另一行。如果您不允许连字符,您可以移动的文本块可能会非常大。如果只能移动非常大的文本块,TeX 找到看起来不错的配置的可能性就会大大降低:除非您选择较大的紧急拉伸值(如下例所示),否则您很可能会得到溢出的框。

\documentclass[12pt]{article}
\usepackage[margin=30mm]{geometry}

\usepackage{baskervillef}
\usepackage[T1]{fontenc}

\usepackage[style=apa, doi=false, url=false]{biblatex}

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \step[fieldset=number, null]
      \step[fieldset=chapter, null]
    }
  }
}

\DeclareFieldFormat{apacase}{#1}
\DeclareFieldFormat[article]{volume}{\apanum{#1}}
\setlength\bibitemsep{1.5\itemsep}

\renewcommand*{\bibsetup}{%
  \interlinepenalty=5000\relax
  \widowpenalty=10000\relax
  \clubpenalty=10000\relax
  % no hyphenation in the bibliography
  \hyphenpenalty=10000\exhyphenpenalty=10000\relax
  % increase allowed stretch to avoid overfull boxes
  \setlength{\emergencystretch}{1em}%
  \raggedbottom
  \frenchspacing
  \biburlsetup}


\begin{filecontents}[force]{\jobname.bib}
@article{MacFarlane2004,
  author  = {MacFarlane, John},
  journal = {Unpublished Manuscript},
  title   = {{In What Sense (If Any) Is Logic Normative for Thought?}},
  year    = {2004},
}
@incollection{Kolodny2018,
  address   = {Oxford},
  author    = {Kolodny, Niko},
  booktitle = {The Oxford Handbook of Reasons and Normativity},
  chapter   = {31},
  editor    = {Star, Daniel},
  pages     = {731--763},
  publisher = {Oxford University Press},
  title     = {{Instrumental Reasons}},
  year      = {2018},
}
@article{Cook2010,
  author    = {Cook, Roy T.},
  doi       = {10.1111/j.1747-9991.2010.00286.x},
  journal   = {Philosophy Compass},
  month     = jun,
  number    = {6},
  pages     = {492--504},
  publisher = {John Wiley {\&} Sons, Ltd (10.1111)},
  title     = {{Let a Thousand Flowers Bloom: A Tour of Logical Pluralism}},
  url       = {http://doi.wiley.com/10.1111/j.1747-9991.2010.00286.x},
  volume    = {5},
  year      = {2010}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
I might want to cite \textcite{MacFarlane2004,Kolodny2018,Cook2010}.
But I would like the bibliography to remain justified, but without the hyphenation.

\printbibliography
\end{document}

两端对齐的参考书目,无换行

你可能想看看如何调整参考书目的断行?探索一些影响参考书目间距的其他选项。

尽管我总体上非常喜欢对齐文本,但如果其他方面都不行,对齐是我在参考书目中首先要放弃的事情之一。条目无论如何看起来都会有点杂乱,因为它们很短,而且最后一行无论如何也不会延伸到边距。

相关内容