我目前正在制作一个报告模板,其中我使用带有小页面的表格来表示工单及其说明。小页面用于说明,以便工单和第一个说明从同一高度开始。但是,由于小页面不可拆分,项目名称和表格之间留有大量空间,因为由于表格太长,工单及其说明会显示在下一页上。此外,我注意到,如果我有太多说明,它们就会超出页面末尾。
我希望所有东西都能够尽可能节省空间地展示。
如果您想重建:
\documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{geometry}
\usepackage{fancyhdr}
\usepackage{enumitem}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{fontspec}
\usepackage{amsmath}
\usepackage{anyfontsize}
\usepackage[table]{xcolor}
\usepackage{colortbl}
\usepackage{lipsum}
\usepackage{longtable}
\XeTeXinputencoding=ansinew
% Seitenränder einstellen
\geometry{left=2.5cm, right=2.5cm, top=2.5cm, bottom=2.5cm}
\definecolor{companycolor}{RGB}{175,7,57}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[C]{}
\setlength{\headsep}{2cm} % Ändert den Abstand zwischen Header und Textkörper
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
% Dokument beginnt hier
\begin{document}
\noindent % Keine Einrückung für die minipages
\begin{minipage}[t!]{0.5\textwidth}
\begin{flushleft}
\fontsize{8}{10}\selectfont % Schriftgröße für Firmenname
\textbf{\textcolor{companycolor}{companyname GmbH}}
\textbf{street 18a code city}:\vspace*{1.1cm} % Vertikaler Abstand
\\ \textbf{Kundenfirma}
\\ \textbf{Ansprechpartner}
\\ \textbf{Rechnungsanschrift}
\end{flushleft}
\end{minipage}%
%
\begin{minipage}[t!]{0.5\textwidth}
\begin{flushright}
\fontsize{8}{10}\selectfont
\begin{tabular}{l}
Contact$:$ contactname \\
Phone$:$ 0123 4567890 \\
Mail$:$ [email protected] \\
\\
Order no$:$ 4500715194 \\
Offer no$:$ 23-07028 \\
Date$:$ 24.08.2023 \\
\end{tabular}
\end{flushright}
\end{minipage}%
\vspace{2cm}
\section*{\fontsize{20}{24}Activity Report}
\vspace{-0.5cm}
\fontsize{12}{14}Februar 2024 \\
\\
\\
\noindent Random Projectname\\
\vspace{-0.8cm}\\\line(1,0){450}\\\vspace{-1cm}\\\begin{longtable}{@{} >{\bfseries}l p{14cm}@{\hspace{6ex}} l @{}}
General &\begin{minipage}[t]{\linewidth}\begin{itemize}[noitemsep]
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\\
\end{itemize}
\end{minipage} \\
\end{longtable}
\noindent Random Projectname\\
\vspace{-0.8cm}\\\line(1,0){450}\\\vspace{-1cm}\\\begin{longtable}{@{} >{\bfseries}l p{14cm}@{\hspace{6ex}} l @{}}
ticketname &\begin{minipage}[t]{\linewidth}\begin{itemize}[noitemsep]
\item description
\item description
\item description
\item description
\item description
\item description
\\
\end{itemize}
\end{minipage} \\
ticketname &\begin{minipage}[t]{\linewidth}\begin{itemize}[noitemsep]
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\item description
\\
\end{itemize}
\end{minipage} \\
ticketname &\begin{minipage}[t]{\linewidth}\begin{itemize}[noitemsep]
\item description
\item description
\item description
\item description
\item description
\item description
\\
\end{itemize}
\end{minipage} \\
ticketname &\begin{minipage}[t]{\linewidth}\begin{itemize}[noitemsep]
\item description
\item description
\item description
\item description
\item description
\item description
\\
\end{itemize}
\end{minipage} \\
ticketname &\begin{minipage}[t]{\linewidth}\begin{itemize}[noitemsep]
\item description
\item description
\item description
\item description
\item description
\item description
\\
\end{itemize}
\end{minipage} \\
\end{longtable}
\section*{\fontsize{20}{24}Overview - Total hours}
\vspace{-0.5cm}
\line(1,0){450}\\
\begin{tabular}{@{} >{\bfseries}l @{\hspace{40ex}} r @{}}
Category&Number h\\
\end{tabular}
\end{document}