![表格后的段落不缩进](https://linux22.com/image/368702/%E8%A1%A8%E6%A0%BC%E5%90%8E%E7%9A%84%E6%AE%B5%E8%90%BD%E4%B8%8D%E7%BC%A9%E8%BF%9B.png)
\documentclass[14pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
% Double Spacing
\usepackage{setspace}
\doublespacing
\usepackage{extsizes} % For size 14 font
\usepackage{tocloft} % For Table of Contents
\usepackage{array} % To allow customization of tables
\usepackage{multicol}
\usepackage{xcolor}
\usepackage{lipsum}
\usepackage{tabu} % Better tabulars (==tabu)
% Indention Settings
\usepackage{indentfirst}
\usepackage{parskip}
\setlength{\parindent}{30pt}
% Hyphens
\tolerance=1
\emergencystretch=\maxdimen
\hyphenpenalty=10000
\hbadness=10000
% Ragged Right Definition, fixes indents
\makeatletter
\newcommand\iraggedright{%
\let\\\@centercr\@rightskip\@flushglue \rightskip\@rightskip
\leftskip\z@skip}
\makeatother
\renewcommand\cftsecleader{\cftdotfill{\cftdotsep}} % Table of Contents x2
使用此前言,所有内容都可以正常缩进,除非先出现表格。如果有表格,缩进就会消失。使用普通的 raggedright 无法解决问题。\par 和 \indent 都不起作用。
以下是代码:
\section{Expositions}
\noindent\fcolorbox{black}{white}{%
\minipage[t]{\dimexpr0.48\linewidth-2\fboxsep-2\fboxrule\relax}
\centering
Latine
\vspace{0.25cm}
\hrule
\vspace{0.25cm}
Adfuit ille quidem, sed nec sollemnia verba\\[5pt]
nec laetos vultus nec felix attulit omen.\\[5pt]
fax quoque, quam tenuit, lacrimoso stridula fumo\\[5pt]
usque fuit nullosque invenit motibus ignes.\\[5pt]
\endminipage}\hfill
\fcolorbox{black}{white}{%
\minipage[t]{\dimexpr0.48\linewidth-2\fboxsep-2\fboxrule\relax}
\centering
In English
\vspace{0.25cm}
\hrule
\vspace{0.25cm}
He was present indeed, but neither solumn words\\[5pt]
nor happy expressions nor a lucky omen did he bring.\\[5pt]
The torch also, which he held, was hissing with tearful smoke\\[5pt]
constantly and found no fires even with movement.\\[5pt]
\endminipage}\\[10pt]
% Citation:
\centering
Ovid, \textit{Metamorphoses} 10.1 4-7
\iraggedright
<text>
<text>
答案1
这里的问题是使用未分组\centering
来排版您的引用,如以下示例所示:
\documentclass{article}
\usepackage{lipsum}
\makeatletter
\newcommand\iraggedright{%
\let\\\@centercr\@rightskip\@flushglue \rightskip\@rightskip
\leftskip\z@skip}
\makeatother
\begin{document}
{\centering First citation \par}
\iraggedright
\lipsum[1]
\centering Second ciation
\iraggedright
\lipsum[1]
\end{document}
请注意,后面First citation
跟着一个有缩进的段落,而Second citation
没有。您的设置类似于Second citation
。
因此,改为使用
{\centering <citation> \par}
或者
\begin{center}
<citation>
\end{center}
答案2
帮自己一个忙,为你的输入定义结构。
\documentclass[14pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
% Double Spacing
\usepackage{setspace}
\doublespacing
\usepackage{extsizes} % For size 14 font
\usepackage{tocloft} % For Table of Contents
\usepackage{array} % To allow customization of tables
\usepackage{multicol}
\usepackage{xcolor}
\usepackage{lipsum}
\usepackage{tabu} % Better tabulars (==tabu)
% Indention Settings
\usepackage{indentfirst}
\usepackage{parskip}
\setlength{\parindent}{30pt}
% Hyphens
\emergencystretch=\maxdimen
\hyphenpenalty=10000
\hbadness=10000
% Ragged Right Definition, fixes indents
\makeatletter
\newcommand\iraggedright{%
\let\\\@centercr\@rightskip\@flushglue \rightskip\@rightskip
\leftskip\z@skip}
\makeatother
\renewcommand\cftsecleader{\cftdotfill{\cftdotsep}} % Table of Contents x2
\newenvironment{exposition}[1]
{\begin{center}\def\expositioncaption{#1}}
{%
\fbox{\usebox{\leftexpositionbox}}%
\hfill
\fbox{\usebox{\rightexpositionbox}}%
\\*[10pt]
\expositioncaption
\end{center}%
}
\newsavebox{\leftexpositionbox}
\newsavebox{\rightexpositionbox}
\newcommand{\leftexposition}[2]{%
\genericexposition{\leftexpositionbox}{#1}{#2}%
}
\newcommand{\rightexposition}[2]{%
\genericexposition{\rightexpositionbox}{#1}{#2}%
}
\newcommand{\genericexposition}[3]{%
\sbox{#1}{%
\begin{minipage}[t]{\dimexpr0.48\linewidth-2\fboxsep-2\fboxrule\relax}
\centering
\strut#2\par\vspace{0.25cm}\hrule\vspace{0.25cm}#3\strut\par
\end{minipage}%
}%
}
\begin{document}
\iraggedright
\section{Expositions}
\begin{exposition}{Ovid, \textit{Metamorphoses} 10.1 4--7}
\leftexposition{Latine}{%
Adfuit ille quidem, sed nec sollemnia verba\\[5pt]
nec laetos vultus nec felix attulit omen.\\[5pt]
fax quoque, quam tenuit, lacrimoso stridula fumo\\[5pt]
usque fuit nullosque invenit motibus ignes.
}
\rightexposition{In English}{%
He was present indeed, but neither solumn words\\[5pt]
nor happy expressions nor a lucky omen did he bring.\\[5pt]
The torch also, which he held, was hissing with tearful smoke\\[5pt]
constantly and found no fires even with movement.
}
\end{exposition}
\lipsum[1-2]
\end{document}
只是为了展示如果你删除所有可怕的设置会发生什么
14pt
\doublespacing
\usepackage{parskip}
一页纸能说完的内容应该绝不浪费两个。
答案3
我找到了问题所在,\noindent 不仅适用于 minipage。修复方法是将 minipage 括起来。
我该删除这个帖子吗?我对此还不熟悉。