将具体序言从 pdfLatex 更改为 Lua(la)tex

将具体序言从 pdfLatex 更改为 Lua(la)tex

我得到了一个为 pdflatex 编写的示例讲义,但由于我使用 lualatex,所以我很确定我必须对序言做一些修改。

从那里经常加载的包:pdfLaTeX 和 XeLaTeX 之间的区别我已经知道我必须改变

\usepackage[utf8]{inputenc}

\usepackage{fontspec}

以及来自

\usepackage[german]{babel}

\usepackage{polyglossia}
\setdefaultlanguage{german}

但一旦踢出输入,它就会从中删除“ä”和“ü”

{\sstenbx Fakultät für } \\[-1mm]

在最终输出中。我认为这是因为

\font\ssten=cmss10
\font\sstenbx=cmssbx10

仅在 inputenc 使用 utf-8 加载时才有效?除标题部分外,其他地方这些字符都没有问题……

我面临的另一个问题是,根据链接我必须用 替换amssymb但是unicode-math一旦我这样做就找不到定义的环境了......所以我假设定理定义的任何部分都依赖于 amssymb......

我现在的具体问题是,为了实现相同的输出,在从inputencfontspec、从babelpolyglossia以及从amssymb到移动时,我到底需要改变什么?unicode-math

定理.sty

\usepackage[framed,amsmath,thmmarks,hyperref]{ntheorem}
\usepackage{framed}

\theorembodyfont{\normalfont}

\theoremstyle{nonumberbreak}
\theoremseparator{:}

\newframedtheorem{satz}{Satz}
\newframedtheorem{lemma}{Lemma}
\newframedtheorem{krl}{Korollar}
\newtheorem{defn}{Definition}
\newtheorem{bsp}{Beispiel}
\newtheorem{bem}{Bemerkung}

\theoremsymbol{\ensuremath{_\blacksquare}}
\newtheorem{bew}{Beweis}

讲义.tex

\documentclass[12pt]{article}

% useful packages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[german]{babel}
\usepackage{epsfig}
\usepackage[utf8]{inputenc}
\usepackage{microtype}
\usepackage{theorems}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% layout
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\voffset=-2cm
\hoffset=-0.75cm
\textheight=22cm
\textwidth=15cm
\footskip=1.5cm
% w/o page numbers
\pagestyle{empty}
% w/ page numbers
% \pagestyle{plain}
\unitlength1cm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% different font style for the upper box
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\font\ssten=cmss10
\font\sstenbx=cmssbx10
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{document}

% page head with pic
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\parskip0pt
\parindent0pt
\hspace*{0.1cm}

\begin{picture}(4,2)
\put(0,0){\includegraphics[width=4cm]{pic}}
\end{picture}
\hspace{6cm}\begin{minipage}{7cm}
\vspace*{-16mm}
\begin{tabular}{l}
{\sstenbx Fakultät für } \\[-1mm]
{\sstenbx Institute of } \\
{\ssten Name} \\
{\ssten Date}
\end{tabular}
\end{minipage}
\normalsize
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Headings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vskip1cm
\begin{center}
{\bf\large Topic \\ 
\vskip0.4cm Lecture title}
\end{center}
\vskip0.4cm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% given environments, examples
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Normal text

\begin{defn}
definitions
\end{defn}

\begin{lemma}
lemmas
\end{lemma}

\begin{bsp}
examples
\begin{itemize}
\item first
\item 2nd
\end{itemize}
\end{bsp}

\begin{satz}
Sätze(theorem)
\end{satz}

\begin{bew}
proof
\end{bew}

\begin{krl}
corollary
\end{krl}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{document}

答案1

您当前文档中有一些内容在 TeX 或 LaTeX2.09 中有效,但在当前 LaTeX、LaTeX2e 中已过时。

按照使用当前 KOMA 脚本设置文档的示例。由于这看起来像是某种讲义,并且旨在具有相同的外观,因此建议编写一个简短的包装类。

rapusCurrentDocLuatex

这是输出的标题,我们可以看到作者和日期将被打印两次。这可以在包装类中处理。

在无法使用 LuaLaTeX 的文档中,使用了旧的 TeX-font 命令,而 LuaTeX 使用的是完全不同的字体处理系统。边距是手动设置的。在下面的示例中,使用包的功能设置了(相对较窄的)边距typearea。如果需要特定的边距,包geometry可以提供帮助。

我基本没有改动定理的内容,但将文件名改为结尾tex,并使用常规input来读取文件。

\begin{filecontents}{\jobname-theorems.tex}
    \usepackage[framed,amsmath,thmmarks,hyperref]{ntheorem}
    \usepackage{framed}

    \theorembodyfont{\normalfont}

    \theoremstyle{nonumberbreak}
    \theoremseparator{:}

    \newframedtheorem{satz}{Satz}
    \newframedtheorem{lemma}{Lemma}
    \newframedtheorem{krl}{Korollar}
    \newtheorem{defn}{Definition}
    \newtheorem{bsp}{Beispiel}
    \newtheorem{bem}{Bemerkung}

%   \theoremsymbol{\ensuremath{_\blacksquare}}
    \newtheorem{bew}{Beweis}
\end{filecontents}
\documentclass[12pt,headlines=5,headinclude,DIV=18]{scrartcl}

\usepackage{mwe}%for this mwe
\usepackage{fontspec}
\usepackage{mathtools}
\usepackage{amsfonts}
\usepackage{scrlayer-scrpage}
\addtokomafont{pageheadfoot}{\upshape\sffamily}
\ihead[{\includegraphics[height=4.5\baselineskip]{example-image}}]{}
\ohead*{Fakultät für Sonnenschein\\Institute of rainbows\\Name \\ Date}
\usepackage[ngerman]{babel}
\usepackage{microtype}
\input{\jobname-theorems}


\title{This lectures topic}
\author{rapus}

\begin{document}
\maketitle

Normal text \blindtext

\begin{defn}
    definitions
\end{defn}

\begin{lemma}
    lemmas
\end{lemma}

\begin{bsp}
    examples
    \begin{itemize}
        \item first
        \item 2nd
    \end{itemize}
\end{bsp}

\begin{satz}
    Sätze(theorem)
\end{satz}

\begin{bew}
    proof
\end{bew}

\begin{krl}
    corollary
\end{krl}

\end{document}

相关内容