參考文獻的垂直未對準

參考文獻的垂直未對準

在我的參考文獻中,每個名字的書寫都出現了奇怪的垂直錯位,例如: 在此輸入影像描述

而且我真的不知道為什麼會發生這種事......

MWE(.cls文件)

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{solutionclass}[2023/03/03 My Custom LaTeX Class for exercise solutions]

\LoadClass[a4paper, twoside, 11pt]{book}

\RequirePackage[portuguese, english]{babel} 
\RequirePackage[utf8]{inputenc} 
\RequirePackage[T1]{fontenc} 
\RequirePackage[backend    = biber, 
            style      = ext-authoryear-comp,
            sorting    = nyvt, 
            backref    = false,
            articlein  = false,
            uniquename = true,
            doi        = true, 
            dashed     = false]{biblatex}
\addbibresource{bib.bib}
\DeclareFieldFormat[article,periodical]{volume}{\mkbibbold{#1}}

\AtEndDocument{%
    \clearpage
    \pagestyle{fancy}
    \markboth{\textsc{References}}{\textsc{References}}
    \printbibliography[heading=bibintoc, title=References]
} 

MWE(.bib文件)

@book{Choquet-BruhatGR,
    title = {General Relativity and the Einstein Equations},
    author = {Choquet-Bruhat, Yvonne},
    date = {2009},
    volume = {I},
    publisher = {Oxford University Press},
    location = {Oxford}
}

@book{Choquet-BruhatGR2,
    title = {Introduction to general relativity, black holes, and cosmology},
    author = {Choquet-Bruhat, Yvonne},
    date = {2015},
    volume = {I},
    publisher = {Oxford University Press},
    location = {Oxford}
}

答案1

假設標準設置,您的參考書目排版為合理的文本- 就像文件其餘部分中的普通文字一樣。這意味著 TeX 試圖使所有行在右邊距上均勻地相遇。這與左對齊文字相反,在左對齊文字中,文字在右側邊距上不均勻地相遇,並且具有更“參差不齊”的外觀。

對齊主要是透過稍微擴大或壓縮行中空格的寬度來實現的。這正是您在螢幕截圖中顯示的效果。由於這些行中排版的文字不同且具有不同的自然寬度,TeX 必須壓縮/放大空格以補償不同的寬度並使行端很好地接合。

\documentclass[a4paper, 11pt, british]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[backend=biber, style=authoryear, dashed=false]{biblatex}

\begin{filecontents}{\jobname.bib}
@book{Choquet-BruhatGR,
  title     = {General Relativity and the {Einstein} Equations},
  author    = {Choquet-Bruhat, Yvonne},
  date      = {2009},
  volume    = {I},
  publisher = {Oxford University Press},
  location  = {Oxford},
}
@book{Choquet-BruhatGR2,
  title     = {Introduction to General Relativity, Black Holes, and Cosmology},
  author    = {Choquet-Bruhat, Yvonne},
  date      = {2015},
  volume    = {I},
  publisher = {Oxford University Press},
  location  = {Oxford},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \autocite{sigfridsson,Choquet-BruhatGR,Choquet-BruhatGR2}

\printbibliography
\end{document}

合理的參考書目

如果你放棄理由,你也可以獲得相同的空間。但當然,這樣你就不再有右邊緣了。在參考書目中,這實際上可能還不錯,因為大多數條目都沒有那麼長。

\documentclass[a4paper, 11pt, british]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage{ragged2e}
\usepackage[backend=biber, style=authoryear, dashed=false]{biblatex}

\begin{filecontents}{\jobname.bib}
@book{Choquet-BruhatGR,
  title     = {General Relativity and the {Einstein} Equations},
  author    = {Choquet-Bruhat, Yvonne},
  date      = {2009},
  volume    = {I},
  publisher = {Oxford University Press},
  location  = {Oxford},
}
@book{Choquet-BruhatGR2,
  title     = {Introduction to General Relativity, Black Holes, and Cosmology},
  author    = {Choquet-Bruhat, Yvonne},
  date      = {2015},
  volume    = {I},
  publisher = {Oxford University Press},
  location  = {Oxford},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \autocite{sigfridsson,Choquet-BruhatGR,Choquet-BruhatGR2}

\begingroup
\RaggedRight
\printbibliography
\endgroup
\end{document}

拉格右參考書目

相關內容