
我需要在 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}