Page LayoutIssue with layouts

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
rubenroy
Posts: 1
Joined: Thu Jul 21, 2016 9:48 pm

Issue with layouts

Post by rubenroy »

I would really appreciate some help with this issue. In the attached example, there is a gap between the header image and the sidebar. This might be very basic, but being new to latex, I havent been able to figure out what's causing this to happen.
Attachments
mwe.zip
(25.8 KiB) Downloaded 161 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Issue with layouts

Post by Johannes_B »

Code: Select all

\documentclass{article}
\usepackage[export]{adjustbox}
\graphicspath{ {./} }
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage[
	bindingoffset=0in,
	top=0in,
	bottom=0in,
	footskip=0in,
	bmargin=0in,
	tmargin=0in,
	rmargin=0in,
	lmargin=0in
]{geometry}
%\usepackage{layout}
\setlength{\marginparwidth}{0pt}
\setlength{\marginparsep}{0pt}
\setlength{\hoffset}{-15pt}
\definecolor{shadecolor}{RGB}{217,216,205}
\pagenumbering{gobble}
\begin{document}
	\clearpage\pagestyle{empty}
	\begin{tikzpicture}
    \node[anchor=south west,inner sep=0] (image) at (0,0)
    {\includegraphics[width=\paperwidth,height=2cm]{example-image-16x9.png}};
    \node[text width=4cm] at (13.6,1) {\fontsize{12pt}{14pt}\selectfont TITLE};
    \end{tikzpicture}

    \vspace{-.5ex}
\fcolorbox{shadecolor}{shadecolor}{%
	\begin{minipage}[t][701pt][t]{0.3\paperwidth}%
	    Sidebar
	\end{minipage}}
	\begin{minipage}[t]{0.7\paperwidth}%
    	\vspace{0.7cm}
		\hspace{1cm}CONTENT
	\end{minipage}
\end{document}
I think i would use tcolorbox here, instead of the very basics that LaTeX provides.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply