我刚刚开始使用 LaTeX 来撰写我的论文。我面临的问题是用希腊语写我的文档,同时保留所有书目条目和引文的英文。这是一个最小的工作示例,其中包含我正在使用的一组软件包:
\documentclass[12pt, a4paper]{report}
\usepackage[english,greek]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{gfsartemisia}
\usepackage{natbib}
\usepackage{setspace}
\onehalfspacing
\usepackage{graphicx}
\widowpenalty=300
\clubpenalty=300
\begin{document}
Το φύλο αυτό των φυκών, αποτελεί επικράτεια των Βακτηρίων\citep{GarciaPichel2009107}
\bibliographystyle{abbrvnat}
\bibliography{bib}
\end{document}
%this is the entry in the bib.bib file
@incollection\{GarciaPichel2009107,
title = "Cyanobacteria ",
editor = "Schaechter, Moselio ",
booktitle = "Encyclopedia of Microbiology (Third Edition) ",
publisher = "Academic Press",
edition = "Third Edition",
address = "Oxford",
year = "2009",
pages = "107 - 124",
isbn = "978-0-12-373944-5",
doi = "http://dx.doi.org/10.1016/B978-012373944-5.00250-9",
url = "http://www.sciencedirect.com/science/article/pii/B9780123739445002509",
author = "F. Garcia-Pichel",
keywords = "benthos",
keywords = "blue-green algae",
keywords = "cell differentiation",
keywords = "chlorophyll",
keywords = "extreme environments",
keywords = "nitrogen fixation",
keywords = "photoautotrophy",
keywords = "photosynthesis",
keywords = "phycobiliproteins",
keywords = "plankton",
keywords = "primary production",
keywords = "symbiosis",
language = "English",
keywords = "toxins "
\}
当我希望它是英文时,这是我得到的输出(相反,所有字符都被“翻译”成希腊语变体):
答案1
您应该使用biblatex
:它具有 natbib 模拟,知道您的主要语言,无论您使用的是 babel 还是 polyglossia(使用 xelatex),并且它langid field
为数据库中的每个条目定义了一个。因此,条目将以其自己的语言和自己的连字规则打印。如果您使用 polyglossia,您还有一个langidopts
管理语言方言的字段(例如 Ποντιακά 或美式英语)。
请参阅文档第 2.2.3 节第 23-24 页。另请参阅第 3.1.2.1 节第 46-47 页,常规前导选项, 关于language=autobib, autocite, auto
。
答案2
我建议对拉丁字母引用使用不同的命令\lcitep
;接下来,向内部命令添加一些代码\bibsection
以告诉 TeX 在参考书目中使用拉丁字母。
我以前article
只获取一页,report
用于您的文档,无需进行任何其他更改。您还可以添加其他命令,例如\lcitet
等,具体取决于您使用的命令。
filecontents*
示例中的环境只是为了方便。使用你的文件.bib
作为 的参数\bibliography
。
\begin{filecontents*}{\jobname.bib}
@incollection{GarciaPichel2009107,
title = "Cyanobacteria ",
editor = "Schaechter, Moselio ",
booktitle = "Encyclopedia of Microbiology (Third Edition) ",
publisher = "Academic Press",
edition = "Third Edition",
address = "Oxford",
year = "2009",
pages = "107 - 124",
isbn = "978-0-12-373944-5",
doi = "http://dx.doi.org/10.1016/B978-012373944-5.00250-9",
url = "http://www.sciencedirect.com/science/article/pii/B9780123739445002509",
author = "F. Garcia-Pichel",
keywords = "benthos",
keywords = "blue-green algae",
keywords = "cell differentiation",
keywords = "chlorophyll",
keywords = "extreme environments",
keywords = "nitrogen fixation",
keywords = "photoautotrophy",
keywords = "photosynthesis",
keywords = "phycobiliproteins",
keywords = "plankton",
keywords = "primary production",
keywords = "symbiosis",
language = "English",
keywords = "toxins "
}
\end{filecontents*}
\documentclass[12pt, a4paper]{article}
\usepackage[english,greek]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{gfsartemisia}
\usepackage{natbib}
\usepackage{setspace}
\onehalfspacing
\usepackage{graphicx}
\widowpenalty=300
\clubpenalty=300
\DeclareRobustCommand{\lcitep}[1]{%
\textlatin{\citep{#1}}%
}
\makeatletter
\g@addto@macro{\bibsection}{\selectlanguage{english}}
\makeatother
\begin{document}
Το φύλο αυτό των φυκών, αποτελεί επικράτεια των Βακτηρίων \lcitep{GarciaPichel2009107}
\bibliographystyle{abbrvnat}
\bibliography{\jobname}
\end{document}
答案3
希腊语文本英语和希腊语书目
我通过这些设置成功做到了
(pdflatex + biber)
....
\usepackage[T1,LGR]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,greek]{babel}
\usepackage{alphabeta}
\usepackage[backend=biber,style=numeric,sorting=ynt,babel=other,bibencoding=auto, language=autobib]{biblatex}
\addbibresource{sample2.bib} %file of biblatex
....
这毕竟使用包
\newcommand{\sw}{\selectlanguage{english}}
并在参考书目部分
\section{Αναφορές - Βιβλιογραφία}
\selectlanguage{english}
\nocite{*}
\printbibliography[title={\textgreek{Αναφορές}}]
希望这能有所帮助。经过一年半的 LaTeX 学习,我终于解决了这个问题!
答案4
使用
\usepackage[utf8]{inputenc}
\usepackage[greek,english]{babel}
\usepackage{alphabeta}
在参考书目部分使用
\bibliographystyle{ieeetr}
\nocite{*}
\bibliography{References}
对我有用。