0

I'm currently working on a report template where I use a table with minipages to represent tickets along with their descriptions. The minipage is utilized for the descriptions so that the ticket and the first description start at the same height. However, since minipages are not breakable, a significant amount of space is left between the project name and the table, as the tickets with their descriptions are then displayed on the next page due to the table being too long. Additionally, I've noticed that if I have too many descriptions, they simply run off the end of the page.

I would like everything to be displayed as space-efficiently as possible.

enter image description here

If you´d like to rebuild:

\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$:$ a.bcdf@company.com \ \ 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}

Marijn
  • 37,699
  • you would also need to solve https://tex.stackexchange.com/a/83641/36296 – samcarter_is_at_topanswers.xyz Mar 13 '24 at 16:15
  • Are you sure you need a table? – samcarter_is_at_topanswers.xyz Mar 13 '24 at 16:18
  • 1
    you are already in a p column so the minipage is doing nothing useful. you can remove it (but p columns do not break either) but you should use a list not a table. – David Carlisle Mar 13 '24 at 16:26
  • 1
    Unrelated but why on earth are you forcing ansinew encoding? – Ulrike Fischer Mar 13 '24 at 16:41
  • @DavidCarlisle correct me if im wrong but if I dont use the minipage the ticket and the first description wont start in the same row. the only working fix was using the minipage. If there is a better way, please teach me – Immersion Mar 14 '24 at 07:49
  • @UlrikeFischer this allows me to translate german umlauts like 'ö, ä, ü', cause im using xelatex to translate, which ignores {fontspec} – Immersion Mar 14 '24 at 07:54
  • @samcarter_is_at_topanswers.xyz "Are you sure you need a table?" - no im actually a beginner in LaTeX and I have absolutely no idea what im doing. Im searching the internet and get help by chatGPT for my problems in LaTeX. If there are smarter solutions to try , please teach me. – Immersion Mar 14 '24 at 07:57
  • 1
    Sorry but that is nonsense. Umlauts work fine without that. You only must ensure that all your file are utf8 encoded. – Ulrike Fischer Mar 14 '24 at 08:00
  • @UlrikeFischer "Warning inputenc ignored with utf8 based engines." I am using TeXMaker with XeLaTeX + PDF engine. As said if i dont use "\XeTeXinputencoding=ansinew" the umlauts will be displayed as "?". Is it so bad to use ansinew? – Immersion Mar 14 '24 at 08:08
  • 1
    Simply remove the inputenc package, it is unneeded. Remove also fontenc that is not needed for xelatex either. And yes ansinew is the wrong encoding for an unicode engine (and generally nobody should use ansinew nowadays anymore) – Ulrike Fischer Mar 14 '24 at 08:22
  • 1
    the minipage [t] does nothing at all in a p column which is already a \parbox[t] with xetex you can not use inputenc it either does nothing if you specify utf8 or it gives an error if you specify anything else. ansinew can not work at all, and even in pdflatex where it does work it is bad to use a non standard microsoft encoding from the 1980s rather than standard encodings such as utf-8 or latin1 – David Carlisle Mar 14 '24 at 08:42

0 Answers0