我想创建一个 pdf,其中有简短的文本和图像。
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\section*{some title}
A text... \\
More text... \\
\includegraphics{example.png}
\newpage
A text... \\
More text... \\
\includegraphics{example.png}
\newpage
A text... \\
More text... \\
\includegraphics{example.png}
\newpage
\section*{some title}
A text... \\
More text... \\
\includegraphics{example.png}
\end{document}
我的问题是 LaTex 会自动缩进“A 文本”。 “更多文本”没有缩进。如果 "A text" 出现在 \section*{} 之后,它也不会缩进。
您可以通过更改
\parindent
来控制缩进的宽度
\documentclass{article}
\usepackage{graphicx}
\setlength{\parindent}{0pt}
\begin{document}
\section*{some title}
A text...
More text...
\includegraphics{example-image-duck}
\newpage
A text...
More text...
\includegraphics{example-image-duck}
\newpage
A text...
More text...
\includegraphics{example-image-duck}
\newpage
\section*{some title}
A text...
More text...
\includegraphics{example-image-duck}
\end{document}
(你不应该滥用
\\
换行,而是留下一个空行)
一个很简单的方法是:
\usepackage{parskip}