
MWE:
\documentclass[12pt,a4paper]{article}
\usepackage{graphicx}
\begin{document}
\section{Some Section}
First (long) paragraph. \\
Second (long) paragraph. \\
\input{some_figure}
Third (long) paragraph. \\
Fourth (long) paragraph.
\end{document}
some_figure.txt
を含む
\begin{figure}[t]
\includegraphics[width=3cm]{example-image}
\end{figure}
次の図に示すように、「2 番目の (長い) 段落」の後の改行\\
により、後続の行「3 番目の (長い) 段落」が自動的にインデントされます。
これらのインデントを(自動的に)回避/無効にする方法はありますか?
この問題を回避するために、私は通常、\input{some_figure}
セクションの最初/最後に移動します。ただし、テキストが大きくなりすぎると、これは実際には選択肢になりません。
答え1
実際の「段落」を意味している場合は、egreg のアドバイスに従ってください (「\\
段落の終了には ではなく、空白行を使用してください」)。ただし、単に改行を強制している場合は、問題はインデントではなく、余分なスペースです。
\documentclass[12pt,a4paper]{article}
\usepackage{graphicx,filecontents}
\begin{filecontents*}{some_figure}
\begin{figure}[t]
\includegraphics[width=3cm]{example-image}
\end{figure}
\end{filecontents*}
\begin{document}
\section{Some Section}
First (long) paragraph. \\
Second (long) paragraph. \\
\input some_figure \unskip
Third (long) paragraph. \\
Fourth (long) paragraph.
\end{document}
あるいは、
\documentclass[12pt,a4paper]{article}
\usepackage{graphicx,filecontents}
\begin{filecontents*}{some_figure}
\begin{figure}[t]
\includegraphics[width=3cm]{example-image}
\end{figure}
\end{filecontents*}
\begin{document}
\section{Some Section}
First (long) paragraph. \\
Second (long) paragraph.
\input some_figure \\
Third (long) paragraph. \\
Fourth (long) paragraph.
\end{document}