我有一个引文,其标题溢出到了右边距。有什么办法可以让它不溢出到右边距吗?
以下是我的想法:
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{leonard_crystal_1993,
title = {Crystal and molecular structure of d({CGTAGATCTACG}) at 2.25 {{\AA}} resolution.},
% title = {Crystal and molecular structure of d({CGTAG ATCTACG}) at 2.25 {{\AA}} resolution.}, % hack method
volume = {234},
issn = {0022-2836},
url = {http://www.pdb.org/pdb/explore/explore.do?structureId=119D},
doi = {10.1006/jmbi.1993.1574},
timestamp = {2015-09-02T12:35:06Z},
urldate = {2015-08-31},
journal = {{J}.{Mol}.{Biol}.},
author = {Leonard, {G}. {A}. and {Hunter}, {W}. {N}.},
month = apr,
year = {1993},
pages = {198--208},
file = {PDB Snapshot:/myZotero/storage/A56WV6CM/explore.html:;Protein Data Bank .pdb File:/myZotero/storage/GI65SRAF/Leonard and Hunter - 1993 - Crystal and molecular structure of d(CGTAGATCTACG).pdb:},
pmid = {8230199}
}
\end{filecontents*}
\documentclass[12pt]{article}
\usepackage[top=1in, bottom=1in, left=1.25in, right=1.25in]{geometry}
\usepackage[
style=ieee, % includes title, [square brackets], yes DOI, citestyle is weird
citestyle=numeric-comp,
natbib=true,
sorting=none,
url=false,
doi=true,
isbn=false,
backend=biber
]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
Lorem ipsum dolor sit amet \cite{leonard_crystal_1993}.
\printbibliography
\end{document}
这是不令人满意的结果。请注意 CGTAGATCTACG 如何进入右侧 1.25 英寸的边距。
我考虑过简单地在 DNA 序列中添加一个空格来给它一个可以换行的地方,但我认为 LaTeX 应该能够处理这个问题。
答案1
如果组成 12 个字母“单词”的四个字母A
、C
、G
和T
指的是 DNA 链中的碱基分子,我会同意 (a) 只允许在四个字母的组后换行,以及 (b) 不在换行处使用连字符。因此,我会写
CGTA\hspace{0pt}GATC\hspace{0pt}TACG
这些\hspace{0pt}
指令允许换行,但如果不需要换行,则它们将不可见。如果您确实希望在换行点使用连字符,请改写单词 as CGTA\-GATC\-TACG
。
关于埃符号:我认为处理此问题的最佳方法是使用包\SI
的宏siunitx
并将数量/单位组合写为
{\relax \SI{2.25}{\angstrom}}
这样,数量和单位之间的间距就保证了合适。这个\relax
部分是为了避免biber
抱怨biblatex
不存在的小写字母问题。
\RequirePackage{filecontents}
\begin{filecontents}{xyz.bib}
@article{leonard_crystal_1993,
title = {Crystal and molecular structure of d({CGTA\hspace{0pt}GATC\hspace{0pt}TACG})
at {\relax \SI{2.25}{\angstrom}} resolution},
volume = {234},
issn = {0022-2836},
url = {http://www.pdb.org/pdb/explore/explore.do?structureId=119D},
doi = {10.1006/jmbi.1993.1574},
timestamp = {2015-09-02T12:35:06Z},
urldate = {2015-08-31},
journal = {J.Mol.Biol.},
author = {Leonard, G. A. and Hunter, W. N.},
month = apr,
year = {1993},
pages = {198--208},
pmid = {8230199}
}
\end{filecontents}
\documentclass[12pt]{article}
\usepackage[tmargin=1in, hmargin=1.25in]{geometry}
\usepackage[
style=ieee,
citestyle=numeric-comp,
natbib=true,
sorting=none,
url=false,
doi=true,
isbn=false,
]{biblatex}
\addbibresource{xyz.bib}
\usepackage{siunitx} % for "\SI" macro
\usepackage[T1]{fontenc}
\begin{document}
\cite{leonard_crystal_1993}
\printbibliography
\end{document}