LaTeX“\缩进”创建段落缩进/制表符包要求?

发布于 2024-08-26 07:21:06 字数 532 浏览 5 评论 0原文

下面提供的 LaTeX 代码显示了文档中出现的命令 \indent 的用法,但它不会在文档中产生所需的缩进。是否有与命令 \indent\= 关联的特定包?我要求一种逐步方法,在文档中仅为一个段落生成缩进,无论文档中的位置如何。

\documentclass[12pt]{文章}

\usepackage{graphicx}
\顶边距-3.5cm
\奇数边距-0.04cm
\偶边距-0.04cm
\文字宽度16.59cm

\文字高度21.94cm

\parskip 7.2pt
\家长8pt
\title{物理}

\author{Pareshkumar Brahmbhatt}

\日期{2010 年 3 月 17 日}

\begin{文档}
\maketitle

\indent 现在我们正在进行一场伟大的内战。

\end{文档}

The LaTeX code provided below shows the usage of the command \indent as it appears in the document, but it does not produce the desired indentation within the document. Is there a specific package associated with the command \indent or \=? I´m asking for a step by step method of producing an indentation within a document for only one paragraph, regardless of location within the document.

\documentclass[12pt]{article}

\usepackage{graphicx}
\topmargin -3.5cm
\oddsidemargin -0.04cm
\evensidemargin -0.04cm
\textwidth 16.59cm

\textheight 21.94cm

\parskip 7.2pt
\parindent 8pt
\title{Physics}

\author{Pareshkumar Brahmbhatt}

\date{March 17, 2010}

\begin{document}
\maketitle

\indent Now we are engaged in a great civil war.

\end{document}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

魔法唧唧 2024-09-02 07:21:06

LaTeX 通常不会缩进一节的第一段。这是标准的印刷实践。但是,如果您确实想覆盖此默认设置,请使用包 indentfirst

LaTeX will usually not indent the first paragraph of a section. This is standard typographical practice. However, if you really want to override this default setting, use the package indentfirst available on CTAN.

凹づ凸ル 2024-09-02 07:21:06

默认情况下,段落的第一行是缩进的,因此无论是否有 \indent 都没有什么区别。 \indent\noindent 可用于覆盖默认行为。您可以通过将行替换为以下内容来查看这一点:

Now we are engaged in a great civil war.\\
\indent this is indented\\
this isn't indented


\noindent override default indentation (not indented)\\
asdf 

The first line of a paragraph is indented by default, thus whether or not you have \indent there won't make a difference. \indent and \noindent can be used to override default behavior. You can see this by replacing your line with the following:

Now we are engaged in a great civil war.\\
\indent this is indented\\
this isn't indented


\noindent override default indentation (not indented)\\
asdf 
嗳卜坏 2024-09-02 07:21:06

这是一种黑客攻击,但我发现的最佳解决方案是使用不带 \item 的描述标签。这会导致 Latex 编译器产生错误;但是,该错误不会阻止生成 pdf。

\begin{description} 
     <YOUR TEXT HERE> 
\end{description}
  • 这仅适用于 Windows Latex 编译器

This is kind of a hack but the best solution that I have found is to use a description tag with no \item. This will produce an error from the latex compiler; however, the error does not prevent the pdf from being generated.

\begin{description} 
     <YOUR TEXT HERE> 
\end{description}
  • This only worked on windows latex compiler
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文