我正在尝试在句子开头定义一个制表符。如果我使用 ,\tab
效果是插入一个新行,并且文本左对齐。如果我使用 ,效果相同\par
。我正在使用定义以下样式表的模板:
\documentclass{thesis.cs.pub.ro}
\makeindex
\usepackage{epigraph,csquotes,natbib} % required for bibliography
\usepackage{tabto}
\usepackage{algorithm,algpseudocode}
\usepackage{multirow,rotating}
\usepackage{listings}
\usepackage[table]{xcolor}% http://ctan.org/pkg/xcolor
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\lstdefinestyle{mystyle}{
backgroundcolor=\color{backcolour},
commentstyle=\color{codegreen},
keywordstyle=\color{magenta},
numberstyle=\tiny\color{codegray},
stringstyle=\color{codepurple},
basicstyle=\footnotesize,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2 }
\lstset{style=mystyle}
\begin{document}
\input{src/global}
\begin{frontmatter} % roman numbering
%\maketitle %\input{template/titlepage.ro} \input{template/titlepage.en}
\begin{acknowledgements} \input{src/base/acknowledgements} \end{acknowledgements}
\begin{abstract} \input{src/base/abstract} \end{abstract}
\input{template/contents.pages}
\printabbrev
\end{frontmatter} % end roman numbering
% 1.5 linespacing for the contents \onehalfspacing
\input{src/main}
%\appendix %\input{src/appendix/index}
\bibliography{src/main} \bibliographystyle{plain}
%\printindex
\end{document}
我认为上述模板中的某些设置导致选项卡无法正常工作。知道哪里出了问题吗?非常感谢
答案1
不需要手动执行此操作,LaTeX 会自动缩进每个段落 - 除非您使用的类明确将此缩进的宽度设置为零。
但这很容易改变。您所要做的就是调整\parindent
,它指定了段落第一行的缩进距离。
\documentclass{thesis.cs.pub.ro}
\setlength{\parindent}{4em}
\begin{document}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, non- ummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium quis, viverra ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Curabitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim rutrum.
\end{document}