我正在为 Elsevier 期刊准备一篇使用 elsarticle.cls 的文章。在文档中,我需要重置几何图形。我收到的错误Undefined control sequence. \newgeometry
MWE 如下:
\documentclass[12pt,preprint,authoryear]{elsarticle}
\usepackage[T1]{fontenc}
\usepackage{newtxtext}
\usepackage[latin9]{inputenc}
\usepackage[english]{babel}
\usepackage{natbib}
\journal{ABC Journal}
\begin{document}
\begin{frontmatter}
\title{A Sample Article}
\author{Ahmed Arif}
\address{Lahore}
\maketitle{}
\begin{abstract}
Abstract of the paper is here.
\end{abstract}
\end{frontmatter}
\section{Introduction}
This is introduction.
\newgeometry{top=3cm,left=1cm,right=1cm,bottom=3cm}
\begin{landscape}
I want to place a table here.
\end{landscape}
\restoregeometry
\end{document}
答案1
使用lscape
包
\documentclass[12pt,preprint,authoryear]{elsarticle}
\usepackage[T1]{fontenc}
\usepackage{newtxtext,geometry,lscape}
\usepackage[latin9]{inputenc}
\usepackage[english]{babel}
\usepackage{natbib}
\journal{ABC Journal}
\begin{document}
\begin{frontmatter}
\title{A Sample Article}
\author{Ahmed Arif}
\address{Lahore}
\maketitle{}
\begin{abstract}
Abstract of the paper is here.
\end{abstract}
\end{frontmatter}
\section{Introduction}
This is introduction.
\newgeometry{top=3cm,left=1cm,right=1cm,bottom=3cm}
\begin{landscape}
I want to place a table here.
\end{landscape}
\restoregeometry
\end{document}
一个替代方案是使用rotating
包裹。