I am writing some project references and I would like to create the following layout:
Now I have been trying around and I got to the following layout:
For the moment I created a table to keep the columns, but I need a way to adjust the text on the left column more towards the left side, so the text does not just start right in the middle of the left column. How can I do that?
My code:
% !TeX program = lualatex
\documentclass[a4paper,12pt]{article}
%font encoding
\usepackage[onehalfspacing]{setspace}
\usepackage{fontspec}
\setmainfont{Arial}
\usepackage[document]{ragged2e}
\usepackage[textwidth=160mm, textheight=240mm]{geometry}
%language
\usepackage[ngerman]{babel}
\usepackage{lipsum}
%table format
\usepackage{tabularx}
\usepackage{float}
%Styles
\usepackage{tikz}
\usepackage{tikzpagenodes}
\usepackage{atbegshi}
\usepackage{fancyhdr}
\usepackage{xcolor}
\usepackage{lipsum}
\pagenumbering{gobble}
\definecolor{bluey}{RGB}{12,3,150}
\newcommand\Sitebar{%
\begin{tikzpicture}[remember picture,overlay]
\fill[lightgray]
(current page.north west) -- ([xshift = 4cm]current page.north west) --
([xshift=7cm]current page.north west) --
([xshift=7cm]current page.south west) --
([xshift=0cm]current page.south west) -- cycle;
\draw [gray, line width = 1.5pt] ([xshift=7cm]current page.north west) --
([xshift=7cm]current page.south west);
\end{tikzpicture}%
}
%header format
\newcommand\HeaderTwo{%
\begin{tikzpicture}[remember picture,overlay]
\fill[bluey]
(current page.north west) -- (current page.north east) --
([yshift=0.5cm]current page.north east|-current page text area.north east) --
([yshift=1.5cm]current page.north west|-current page text area.north west) -- cycle;
\end{tikzpicture}%
}
% left separator
\newcommand\sepLeft{%
\vspace{0.5cm}
\begin{tikzpicture}[remember picture,overlay]
\vspace{1cm}
\draw [black, line width = 2pt] (-1.75,0.5) -- (3.8,0.5);
\draw [bluey, line width = 2pt] (5.2,0.5) -- (17.5,0.5);
\end{tikzpicture}%
}
\begin{document}
\Sitebar
\HeaderTwo
\hspace{5cm} \textbf{\Huge \color{gray} Projektreferenzen}\\
%separator
\sepLeft
\begin{table}[H]
\begin{tabularx}{\linewidth}{ p{4cm} p{0.2cm} p{10cm}}
Very Very long text to see how big this tabular actually is && \lipsum[1]
\end{tabularx}
\end{table}
\end{document}
tabularx
to make the table fit\linewidth
and you've told LaTeX to make it exactly 14.2cm plus the inter-column separation. If you usetabularx
, at least one of your columns should beX
. Also, you shouldn't use\\
to end a line outsidetabular
,array
etc. and you need to end the paragraph to get the line-spacing right with\Huge
.\par
sometimes in a definition, say. (These are equivalent.)