我有这个:
\documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[greek,english]{babel}
\usepackage{lmodern}
\begin{document}
Hello \textgreek{κόσμος}.
\end{document}
但是,它给了我这个错误:
! Package babel Error: Unknown option `greek'. Either you misspelled it
(babel) or the language definition file greek.ldf was not found.
所以我看了 大约它说尝试安装 texlive 包。但是,所有说明都是针对 Linux 的。所以我在 Mac 上尝试了,但找不到包:
$ sudo tlmgr install texlive-lang-greek
tlmgr: package repository http://ctan.math.illinois.edu/systems/texlive/tlnet (verified)
tlmgr install: package texlive-lang-greek not present in repository.
tlmgr: action install returned an error; continuing.
tlmgr: An error has occurred. See above messages. Exiting.
我怎样才能让它工作?
答案1
答案2
在我的 Mac 上,我使用了以下序言,如下所示,但删除了个人信息和大多数评论,用于包含希腊语和希伯来语的多语言文档。经过多次尝试,我还是无法让 babel 为我工作,你会看到我改用 polyglossia。这在 TexShop 版本 3.51 上使用 XeLaTeX 排版时有效。
\documentclass[12pt, a4paper, twoside, openright]{extbook}
\usepackage{amssymb}
\usepackage{titlesec}
\usepackage{caption}
\usepackage{paracol}
\usepackage{wrapfig,graphicx,lipsum}
\usepackage{environ,longtable,threeparttablex,booktabs,multirow,array,adjustbox,supertabular}% table adjustment packages
\newcolumntype{L}[1]{>{\raggedright\let\newline\\arraybackslash\hspace{0pt}}p{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\arraybackslash\hspace{0pt}}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\arraybackslash\hspace{0pt}}p{#1}}
\usepackage{setspace}
\usepackage{geometry}
\geometry{a4paper, total={210mm,297mm}, left=30mm,top=20mm, footskip=30pt, headsep=15pt, textwidth=160mm, textheight=250mm}
\usepackage{fancyhdr}
\usepackage{afterpage}
\usepackage{extramarks}
\pagestyle{fancy}
\titleformat{\chapter}[display]{\center\normalfont\bfseries}{}{0pt}{\Huge}
\titlespacing*{\chapter}{0pt}{-35pt}{20pt}
\renewcommand{\chaptermark}[1]{ \markboth{#1}{} }
\usepackage[toc]{multitoc}
\renewcommand{\contentsname}{Table of Contents}
\title{Names in the Bible}
\author{Compiler: (REDACTED)}
\setlength{\parskip}{0pt}
\raggedbottom
\usepackage{indentfirst}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{greek}
\newfontfamily\greekfont[Script=Greek, Renderer=AAT]{Gentium Plus}
\setotherlanguage{hebrew}
\newfontfamily\hebrewfont[Script=Hebrew, Renderer=AAT]{Ezra SIL}
\setlength{\headheight}{16pt}
\setlength{\columnsep}{2.5em}
\setlength{\parindent}{0pt} % Default is 15pt.
\setlength{\baselineskip}{1.0em} %single spacing
\setlength{\oddsidemargin}{.3in} % left margin is 1.3in on right pages
\setlength{\evensidemargin}{-0.4in} % .6in left margin for even pages, 2-sided document
\setlength{\parskip}{5pt plus 1fil minus 6pt}
\setcolumnwidth{4cm,11cm}[2pt]
\setstretch{1.0}
\widowpenalty=10000
\clubpenalty=10000
\singlespacing
\newcommand{\mystrut}{\rule{0pt}{12pt}}
\begin{document}
在文档本身中,我有指定文本语言的条目,如下所示:
\extramarks{Aaron}{Aaron}\lhead{\firstxmark}\rhead{\lastxmark}\parbox[t][][t]{4cm}{\textbf{Aaron} \\ \hspace*{1.5cm}\footnotesize{H175}} & \parbox[t][][t]{12cm}{\textbf{\texthebrew{אַהֲרוֹן} ʼAhărôwn, a-har-one'; of uncertain derivation; Aharon, the brother of Moses:--Aaron.}} \\
\footnotesize{ } & \footnotesize{ } \\
\extramarks{Aaron}{Aaron}\lhead{\firstxmark}\rhead{\lastxmark}\parbox[t][][t]{4cm}{\textbf{Aaron} \\ \hspace*{1.5cm}\footnotesize{G2}} & \parbox[t][][t]{12cm}{\textbf{\textgreek{Ἀαρών} Aarṓn, ah-ar-ohn'; of Hebrew origin (H175); Aaron, the brother of Moses:--Aaron.}} \\
\footnotesize{ } & \footnotesize{ } \\