如何在横向模式下将文本置于页面的正中央?

如何在横向模式下将文本置于页面的正中央?

我需要在 LaTeX 中在页面文档的中心写一段文字。

我还需要文本足够大(所以我需要一个增加字体尺寸的命令),同时这段文字将是一个数学公式

例如,这张图片就是我需要的原型:

在此处输入图片描述

有人能帮我看一下代码吗?

我已经找到了一种方法来给整个背景着色

\documentclass{article}
\usepackage{pagecolor}
\begin{document}
\pagecolor{green!5!}


\end{document}

但是现在我需要以横向居中的方式,再加上数学公式的喜爱增加(因此不是纯文本,而且我知道通常存在这样的问题[或者更好的是:我过去也遇到过与数学环境相关的字体尺寸问题])。

提前致谢!

答案1

\documentclass[a4paper,landscape,fontsize=50pt]{scrartcl}
\usepackage{lmodern}
\usepackage{xcolor}
\pagestyle{empty}
\begin{document}
\color{red}
\[e^{i\pi} + 1 = 0\]
\end{document}

在此处输入图片描述

或更大:

\documentclass[a4paper,landscape,fontsize=100pt,DIV=50]{scrartcl}
\usepackage{lmodern}
\usepackage{xcolor}
\pagestyle{empty}
\begin{document}
\color{red}
\[e^{i\pi} + 1 = 0\]
\end{document}

在此处输入图片描述

答案2

下面是实现这个事情的代码。

\documentclass{article}
\usepackage{pagecolor}
\pagecolor{green!5!}
\usepackage{amsmath}
\usepackage{graphicx} % \scalebox
\usepackage{environ}
\usepackage{pdflscape}
\pagenumbering{gobble}% Remove page numbers (and reset to 1)
\NewEnviron{myequation}{%
\begin{equation*}
\scalebox{8.5}{$\BODY$}
\end{equation*}
}
\begin{document}
\begin{landscape}
\begin{center}
\vspace*{\fill}
\begin{myequation}
e^{\pi i} + 1 = 0
\end{myequation}
\vspace*{\fill}
\end{center}
\end{landscape}
\end{document}

在此处输入图片描述

相关内容