我在节标题的间距方面遇到了问题,其中节号大于标题。第一行和第二行之间有一个相当大的空格。第二行之后的空格是正常的。我无法获得足够好的结果。
\documentclass[11pt,a4paper,twoside]{article}
\usepackage[czech]{babel}
\usepackage[utf8]{inputenc}
\usepackage{color}
\usepackage{fontspec}
\usepackage{titlesec}
\usepackage{fancyhdr}
\usepackage{filecontents}
\usepackage{siunitx}
\usepackage{tabularx}
\usepackage{tikz, pgfplots}
\fancyhf{}
\fancyhead[RO]{\scriptsize{Indikátory udržitelnosti rozvoje hl. m. Prahy }\hspace*{4pt}\vheadline \hspace*{0.72in} \vheadline\hspace*{13pt}\linepagesep\normalsize \thepage }
\fancyfoot[RO]{\textbf{\emph{UAP }}\hskip \vfootline\hskip\linepagesep\textbf{\emph{2016}}}
\renewcommand\headrulewidth{0pt}
\newskip\linepagesep \linepagesep 5pt\relax
\def\vfootline{%ñ
\begingroup\rule[-990pt]{1pt}{1000pt}\endgroup}
\def\vheadline{%
\begingroup\rule[-5pt]{0.5pt}{35pt}\endgroup}
\titleformat{\section}{\vspace*{6pt}\bfseries\fontsize{36}{36}\selectfont\bfseries}{\thesection.}{55 pt}{\Large\bfseries\MakeUppercase}{}
%\titlespacing{\section}{0pt}{50ex plus 2ex}{10pt}
\fancyheadoffset[RO]{0.20in}
\fancyfootoffset[RO]{0.20in}
\usepackage[paperheight=11.14in,paperwidth=7.71in,left=0.55in,right=0.7in,top=0.36in,bottom=1.5cm]{geometry}
\definecolor{gray}{RGB}{165,165,165}
\definecolor{darkgray}{RGB}{125,125,125}
\setmainfont[
Path = C:/Windows/Fonts/,
BoldFont = UnitPro-Medi.otf,
ItalicFont = UnitPro-Ita.otf,
BoldItalicFont = UnitPro-Bold.otf]{UnitPro-Light.otf} % bold italic pouzit jako bold verzi
\pagestyle{fancy}
\pgfplotsset{compat = 1.15,
x axis line style={semithick,gray},
y axis line style= { draw opacity=0 },
every axis label/.append style ={darkgray},
every tick label/.append style={darkgray},
grid style = { semithick,gray}
}
\begin{document}
\newpage
\linespread{1}
\section {Hrubý domácí produkt na obyvatele v paritě kupní síly (EU = 100) zde je dalsi text, ktery se musi zobrazovat s malou mezerou}
\linespread{1.25}
\vskip
\footnotesize{KATEGORIE INDIKÁTORU : }\small\textbf{hlavní}
\newline
\footnotesize{PILÍŘE HOSPODÁŘSKÉHO ROZVOJE (H = hospodářský(ekonomický) / S = sociální / E = environmentální) : }\small\textbf{E}
\newline
\footnotesize{VZTAHUJE SE KE KAPITOLE : }\small\textbf{432 hospodářský podmínka}
\newline
\footnotesize{VZTAHUJE SE K JEVU : }\small\textbf{B037/02}
\newline
\footnotesize{ZDORJ DAT : }\small\textbf{Eurostat, 2016}
\newline
\newline
\footnotesize{POPIS INDIKÁTORU : }\footnotesize\textit{Eurostat, 2016 Eurostat, 2016 Eurostat, 2016 Eurostat, 2016 Eurostat, 2016 Eurostat, 2016 Eurostat, 2016 Eurostat, 2016 Eurostat, 2016 Eurostat, 2016 Eurostat, 2016 Eurostat, 2016 Eurostat, 2016}
\newline
\newline
\newline
\vspace{10pt}
\begin{tikzpicture}
\begin{axis}[%
width=0.95\textwidth,
height=0.3\textheight,
scale only axis,
xmin=1994.5,
xmax=2016.5,
xtick={1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016},
xticklabel style={/pgf/number format/1000 sep=,font=\tiny},
xtick align=outside,
ymin=0,
ymax=4,
ytick={1, 2, 3, 3},
ytick align =center,
ylabel={[jednotka]},
yticklabel style={/pgf/number format/precision=3,font=\tiny},
ytick style ={draw=none},
ymajorgrids,
axis x line*=bottom,
axis y line*=left
]
\addplot [color=black,mark = *,mark size=1,solid,line width=0.5pt,forget plot]
table[row sep=crcr]{
1998 1.3 \\
1999 1.5 \\
};
\end{axis}
\end{tikzpicture}
\newline
\newline
\footnotesize{ŽÁDOUCÍ TREND : }\small\textbf{růst}
\newline
\newline
\footnotesize{DATA [jednotka]: }\\
\begin{tabular}{cS[math-rm=\mathbf,table-format=3.2]@{\hspace{5em}}cS[math-rm=\mathbf,table-format=3.2]@{\hspace{5em}}cS[math-rm=\mathbf,table-format=3.2]}
- & & 2000 & 8 & 2010 & 10 \\
- & & 2001 & 8 & 2011 & 10 \\
- & & 2002 & 8 & 2012 & 10 \\
- & & 2003 & 8 & 2013 & 10 \\
- & & 2004 & 8 & 2014 & 10 \\
1995 & 5 & 2005 & 8 & 2015 & 10 \\
1996 & 6 & 2006 & 9 & 2016 & 12 \\
1997 & 7 & 2007 & 10 & & \\
1998 & 7 & 2008 & 10 & & \\
1999 & 7 & 2009 & 10 & & \\
\end{tabular}
\end{document}
结果是这样的:
感谢您的任何想法。
答案1
更改此行
\titleformat{\section}{\vspace*{6pt}\bfseries\fontsize{36}{36}\selectfont\bfseries}{\thesection.}{55 pt}{\Large\bfseries\MakeUppercase}{}
更改为:
\titleformat{\section}{\vspace*{6pt}\fontsize{36}{\the\baselineskip}\selectfont\bfseries}{\thesection.}{55pt}{\Large\bfseries\MakeUppercase}{}