我想更改摘要的文字寬度。現在我有這樣的事情:
\begin{abstract}
\lipsum
\end{abstract}
我嘗試用以下內容換行我的文字
\begin{minipage}{0.85\textwidth}
...
\end{minipage}
但是然後:我不知道這是否是正確的方法+問題在於調整文字大小後將其居中。
編輯
文檔開頭:
\documentclass[a4paper,12pt]{article}
\usepackage{times} % Use the Times font.
\usepackage[T1]{fontenc} % Check that ÖÄÅöäå come out ok!
\usepackage[utf8]{inputenc}
\usepackage{epsfig} % If you embed EPS pictures.
\setlength{\parindent}{0mm} % Do not indent the 1st line of a paragraph.
\setlength{\parskip}{3mm} % Add space between paragraphs.
% Save some paper by stuffing more text on each page:
% A4: 210mm x 297mm, approximately 35 mm margins on every side.
\addtolength{\topmargin}{-18mm}
\addtolength{\textheight}{30mm}
\addtolength{\oddsidemargin}{-6mm}
\addtolength{\textwidth}{14mm}
\begin{document}
...
答案1
標準abstract
環境,當titlepage
沒有給出選項時,只需要一個quotation
環境。
您可以重新定義環境並使用自訂list
環境。
標準定義相當於
\newenvironment{abstract}
{\small
\begin{center}
\bfseries \abstractname\vspace{-.5em}\vspace{0pt}
\end{center}
\quotation}
{\endquotation}
(除非給定twocolumn
或titlepage
選項)。
例如,為了每邊縮排 5 毫米,您可以這樣做
\renewenvironment{abstract}
{\small
\begin{center}
\bfseries \abstractname\vspace{-.5em}\vspace{0pt}
\end{center}
\list{}{%
\setlength{\leftmargin}{5mm}% <---------- CHANGE HERE
\setlength{\rightmargin}{\leftmargin}%
}%
\item\relax}
{\endlist}
這是一個完整的範例,我還更改了您的一些呼叫。
\documentclass[a4paper,12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[margin=35mm]{geometry}% <-------- CHANGE HERE for the global margins
\usepackage{mathptmx} % for Times
\usepackage{graphicx} % for embedding pictures
\usepackage{lipsum} % just for the example
%\setlength{\parindent}{0mm} % Do not indent the 1st line of a paragraph.
%\setlength{\parskip}{3mm} % Add space between paragraphs.
\renewenvironment{abstract}
{\small
\begin{center}
\bfseries \abstractname\vspace{-.5em}\vspace{0pt}
\end{center}
\list{}{
\setlength{\leftmargin}{.5cm}%
\setlength{\rightmargin}{\leftmargin}%
}%
\item\relax}
{\endlist}
\begin{document}
\begin{abstract}
\lipsum*[2]
\end{abstract}
\lipsum[3]
\end{document}
你不應該使用epsfig
, 但是graphicx
.也geometry
比猜測頁面形狀參數更好。透過此設置,紙張每側的寬度為 35 毫米,請根據需要進行變更。可以進行更多自訂,請參閱手冊。
而不是times
(已過時),請調用mathptmx
.為了獲得更好的數學公式結果,組合
\usepackage{newtxtext,newtxmath}
可能是首選(我推薦它,而不是mathptmx
)。
請,不做\setlength{\parindent}{0pt}
並且\setlength{\parskip}{3mm}
;首先,3mm 值是任意的,與字體參數無關。但最重要的方面是,這些設定向每個頁面添加了白色水平條帶,使其變得非常糟糕。而且不太清晰。
答案2
嘗試以下程式碼。
它在環境quotation
內部本地重新定義環境abstract
,並且您可以更改 的數量\leftmargin
,從而更改摘要的邊距。
\documentclass[a4paper,12pt]{article}
\usepackage{lipsum}
\let\oldabstract\abstract
\let\oldendabstract\endabstract
\makeatletter
\renewenvironment{abstract}
{\renewenvironment{quotation}%
{\list{}{\addtolength{\leftmargin}{1em} % change this value to add or remove length to the the default
\listparindent 1.5em%
\itemindent \listparindent%
\rightmargin \leftmargin%
\parsep \z@ \@plus\p@}%
\item\relax}%
{\endlist}%
\oldabstract}
{\oldendabstract}
\makeatother
\begin{document}
\begin{abstract}
\lipsum[1]
\end{abstract}
\lipsum[1]
\end{document}
輸出