我尝试使用 minipage 解决布局标题设计问题。但在 minipage 中我遇到了几个问题:
- 不同的字体大小
- 换行,左对齐
单个单词的行距更大
\documentclass[13pt,a4paper,headlines=6,headinclude=true]{scrartcl} \usepackage[ngerman]{babel} \usepackage[ansinew]{inputenc} \usepackage{graphicx} \usepackage[left=1.5cm,right=1.5cm,top=2cm,bottom=0.5cm,includefoot]{geometry} \usepackage{lipsum} \usepackage{fancyhdr} \pagestyle{fancy} \lhead{Senat} \rhead{Sitzungsprotokoll, Seite \thepage} \renewcommand{\headrulewidth}{0.4pt} \renewcommand{\footrulewidth}{0.4pt} \begin{document} \begin{minipage}{0.5\textwidth} \includegraphics[width=0.9\textwidth]{logo.png} \end{minipage} \hfill \begin{minipage}{0.5\textwidth} TEXT? \end{minipage} \vspace{2cm} \begin{center} \Huge \textbf{Sitzungsprotokoll vom \today} \end{center} \end{document}
如何实现(来自 Word):
所以我目前所拥有的是(LaTEX):
答案1
您需要使用 切换到无衬线字体\sffamily
。在下面的示例中,我选择了 TeX Gyre Adventor(可通过 获得tgadventor
),主要是因为它是我首先想到的。使用\raggedright
,我们得到向左对齐的文本。
\documentclass[fontsize=13pt,a4paper,headlines=1,headinclude=true,headsepline,footsepline]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage[left=1.5cm,right=1.5cm,top=2cm,bottom=0.5cm,includefoot]{geometry}
\usepackage{lmodern}
\usepackage{lipsum}
%\usepackage{showframe}
\usepackage{tgadventor}% choosing a font
\usepackage{scrlayer-scrpage}
\ihead{Senat}
\ohead{Sitzungsprotokoll, Seite \thepage}
\addtokomafont{pagehead}{\upshape\sffamily}
\begin{document}
\noindent\begin{minipage}{0.4\textwidth}
\includegraphics[width=0.9\textwidth,height=.1\textheight]{example-image}
\end{minipage}%
\begin{minipage}{0.6\textwidth}
\sffamily\raggedright
{\Huge FAKULTÄTSRAT\par}
der zahnmedizinischenFakultät\\
Georg August\\
STUDENT COUNCIL\\
some more nonmatching text\\
\rule[.5\baselineskip]{\textwidth}{.4pt}
\end{minipage}
\vspace{2cm}
\begin{center}
\Huge \textbf{Sitzungsprotokoll vom \today}
\end{center}
\end{document}
使用 XeLaTeX(或 LuaLaTeX),我们不必再关心输入编码,utf8 似乎无论如何都会被使用。它还提供了一个不错的界面来声明字体属性。接下来是 Arial 克隆和 Times 克隆,就像...
% arara: xelatex
\documentclass[fontsize=13pt,a4paper,headlines=1,headinclude=true,headsepline,footsepline]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage{graphicx}
\usepackage[left=1.5cm,right=1.5cm,top=2cm,bottom=0.5cm,includefoot]{geometry}
\usepackage{fontspec}
\setmainfont{TeX Gyre Termes}
\setsansfont{TeX Gyre Adventor}
\usepackage{scrlayer-scrpage}
\ihead{Senat}
\ohead{Sitzungsprotokoll, Seite \thepage}
\addtokomafont{pagehead}{\upshape\sffamily}
\begin{document}
\noindent\begin{minipage}{0.4\textwidth}
\includegraphics[width=0.9\textwidth,height=.1\textheight]{example-image}
\end{minipage}%
\begin{minipage}{0.6\textwidth}
\sffamily\raggedright
{\Huge\addfontfeature{ LetterSpace=20 } FAKULTÄTSRAT\par}
der zahnmedizinischen Fakultät\\
Georg August\\
STUDENT COUNCIL\\
some more nonmatching text\par
\rule[.5\baselineskip]{\textwidth}{.4pt}
\end{minipage}
\vspace{2cm}
\begin{center}
\Huge \textbf{Sitzungsprotokoll vom \today}
\end{center}
\end{document}