我需要让每个段落都缩进。我还需要让标题左对齐,并且我不想局限于浮动对象。我使用以下文本:
\documentclass[a4paper,14pt,oneside]{book}
\usepackage{indentfirst}
\usepackage[justification=justified,singlelinecheck=false]{caption}
\begin{document}
\captionof{table}{Пример}\label{tabex}
\begin{tabular}{cc}
A&B\\
C&D\\
\end{tabular}
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\end{document}
但第一个captionof
缩进消失后,如何将这两种可能性结合起来?
答案1
您可以\parindent=15pt
在每次之后重置\captionof
,在“表格”周围放置括号,或使用来\begingroup
\endgroup
进行本地更改。
\documentclass[a4paper,14pt,oneside]{book}
\usepackage{indentfirst}
\usepackage[justification=justified,singlelinecheck=false]{caption}
\usepackage{showframe}
\begin{document}
\the\parindent
{\captionof{table}{Пример}\label{tabex}
\the\parindent
\begin{tabular}{cc}
A&B\\
C&D\\
\end{tabular}}
\the\parindent
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\end{document}
答案2
\captionof
期望在框中找到,例如minipage
。您可以通过定义个人环境来避免此问题:
\documentclass[a4paper,oneside]{book}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian]{babel}
\usepackage[justification=justified,singlelinecheck=false]{caption}
\newenvironment{nobox}{\par}{\par}
\begin{document}
\begin{nobox}
\captionof{table}{Пример}\label{tabex}
\begin{tabular}{cc}
A&B\\
C&D\\
\end{tabular}
\end{nobox}
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\end{document}