
これ答え\S を使用して段落の番号付けを実現する方法を示します。
以下の例で、§1 の上のテキストの行間隔を変えずに、§1 と §2 の間隔を §1 の上のテキストの行間隔と同じにするにはどうすればよいでしょうか。また、§1 と上のテキストの間隔を同じ間隔にするにはどうすればよいでしょうか。
次のコードのうち 2 番目は、受け入れられた回答に基づいて私が使用するソリューションです。
\documentclass[12pt]{article}
\usepackage{chngcntr}
\counterwithout{paragraph}{subsubsection}
\renewcommand{\theparagraph}{\S\arabic{paragraph}}
\setcounter{secnumdepth}{4}
\begin{document}
Here are just some words to show the normal spacing between lines in the main document.
\paragraph{} 1st paragraph
\paragraph{} 2nd paragraph
\end{document}
\documentclass{article}
\usepackage{chngcntr,titlesec}
\counterwithout{paragraph}{subsubsection}
\renewcommand{\theparagraph}{\S\arabic{paragraph}}
\setcounter{secnumdepth}{4}
\titlespacing{\paragraph}
{15pt}{0pt}{-8pt}
\usepackage{showframe}
\begin{document}
Here are just some words to show the normal spacing between lines in the main document.
\paragraph{} 1st paragraph
\paragraph{} 2nd paragraph
\end{document}```
答え1
あなたの投稿から、タグの前の垂直方向の間隔を変更する必要があることがわかりましたが\paragraph
、私の理解が正しい場合は、以下を使用してくださいMWE
。
\documentclass{article}
\usepackage{chngcntr,titlesec}
\counterwithout{paragraph}{subsubsection}
\renewcommand{\theparagraph}{\S\arabic{paragraph}}
\setcounter{secnumdepth}{4}
\makeatletter
\titlespacing{\paragraph}
{0pc}{3.5ex \@plus -1ex \@minus -.2ex}{10pt}
\makeatother
\begin{document}
Here are just some words to show the normal spacing between lines in the main document.
\paragraph{} 1st paragraph
\paragraph{} 2nd paragraph
\end{document}
注: コメントでarticle
クラス ファイルを使用していると述べられているため、最初のレベルの見出しの上部の垂直スペースも同じままにしました\paragraph
...
受け入れられた回答に基づいて私が使用する解決策は次のとおりです。
\documentclass{article}
\usepackage{chngcntr,titlesec}
\counterwithout{paragraph}{subsubsection}
\renewcommand{\theparagraph}{\S\arabic{paragraph}}
\setcounter{secnumdepth}{4}
\titlespacing{\paragraph}
{15pt}{0pt}{-8pt}
\usepackage{showframe}
\begin{document}
Here are just some words to show the normal spacing between lines in the main document.
\paragraph{} 1st paragraph
\paragraph{} 2nd paragraph
\end{document}