2

I didn't use LaTeX for the past two years and now I want to use it again, so I downloaded TexLive and Texmaker and istalled them. Now I have tried to open and compile one of my old dokuments. I had to change some packages and also tried some fixes but the last problem I can't fix and I don't know what to do anymore... So maybe one of you can help me :)

\documentclass[11pt,a4paper,twoside, parskip]{scrreprt}

% UTF8 Encoding
\usepackage[utf8]{inputenc}
\setlength{\parskip}{0pt}

% Schriftart
\usepackage{tgheros}
\renewcommand\familydefault{\sfdefault}

% Zeichensatz mit Umlauten
\usepackage[T1]{fontenc}

% neue deutsche Rechtschreibung
\usepackage[ngerman]{babel}
\usepackage{geometry,lmodern}

% Tabellen
\usepackage{tabularx}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{multirow}

\newcommand{\mcr}[1]{\multicolumn{1}{l}{#1}}

\newcolumntype{L}[0]{{\endgraf\vspace*{-\baselineskip}}l}

%Aufzählung
\usepackage{enumitem}

% Kopf- & Fußzeile
\pagestyle{headings}

\begin{document}
\begin{longtable}{l|L|L}
\toprule
\textbf{Name} & \textbf{Aussehen} & \textbf{Eigenschaften}\\
\midrule

\textbf{Elisabeth Jung} &
\begin{itemize}[nosep]
\item schlank
\item schulterlanges braunes Haar
\item eisblaue Augen
\end{itemize} &
\begin{itemize}[nosep]
\item stur
\end{itemize}\\
\hline

\textbf{Kriminalhauptkommissar Bernd Steiger} &
\begin{itemize}[nosep]
\item s
\end{itemize} &
\begin{itemize}[nosep]
\item s
\end{itemize}\\

\end{longtable}
\end{document}

Thank you for any help!

  • Are you sure this ever worked? – user31729 Mar 1 '18 at 12:47
  • 1
    \newcolumntype{L}[0]{{\endgraf\vspace*{-\baselineskip}}l} can never have worked Hard to guess what was intended but if you change it to \newcolumntype{L}{p{5cm}} it will at least make a valid table. – David Carlisle Mar 1 '18 at 12:48
1

I doubt that \newcolumntype{L}[0]{{\endgraf\vspace*{-\baselineskip}}l} successful at all in earlier times.

I've changed the L columntype to a standard type

\newcolumntype{L}[1]{>{\raggedright}p{#1}}

\newcolumntype{B}[1]{>{\raggedright\bfseries}p{#1}}

and provided B as Bold column type for the first column.

Please note that the several \item do not appear on the same line in general.

\documentclass[11pt,a4paper,twoside, parskip]{scrreprt}

% UTF8 Encoding
\usepackage[utf8]{inputenc}
\setlength{\parskip}{0pt}

% Schriftart
\usepackage{tgheros}
\renewcommand\familydefault{\sfdefault}

% Zeichensatz mit Umlauten
\usepackage[T1]{fontenc}

% neue deutsche Rechtschreibung
\usepackage[ngerman]{babel}
\usepackage{geometry,lmodern}

% Tabellen
\usepackage{tabularx}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{multirow}

\newcommand{\mcr}[1]{\multicolumn{1}{l}{#1}}

\newcolumntype{L}[1]{>{\raggedright}p{#1}}

\newcolumntype{B}[1]{>{\raggedright\bfseries}p{#1}}

%\endgraf\vspace*{-\baselineskip}

%Aufzählung
\usepackage{enumitem}

% Kopf- & Fußzeile
\pagestyle{headings}

\begin{document}
\begin{longtable}{B{6cm}|*{2}{L{5cm}|}}
  Name & \textbf{Aussehen} & \textbf{Eigenschaften}\tabularnewline
Elisabeth Jung &
\begin{itemize}[nosep]
\item schlank
\item schulterlanges braunes Haar
\item eisblaue Augen
\end{itemize} &
\begin{itemize}[nosep]
\item stur
\end{itemize}\tabularnewline

Kriminalhauptkommissar Bernd Steiger &
\begin{itemize}[nosep]
\item s
\end{itemize} &
\begin{itemize}[nosep]
\item s
\end{itemize}


\end{longtable}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.