I want to align the pspicture
into the top-left corner of the page. Currently it is slightly below the header text when I want those two to be aligned up together.
The table for the Email/Website information is slightly indented so I want to remove that indentation as well.
I also want the "Lorem Ipsum Dolor" section to have no indent but I know how to fix that.
Right so here's what my .tex
file looks like:
% LaTeX CV
\documentclass[final,a4paper,notitlepage,10pt]{report}
%%% Packages %%%
\usepackage[utf8]{inputenc} % inputenc for encoding to utf8
\usepackage{auto-pst-pdf} % auto-pst-pdf converts pst to pdf
\usepackage{pst-barcode} % pst-barcode try implement QR code
\usepackage{multicol} % multicol used for multiple columns
\usepackage[paper=a4paper,left=0.7cm,right=0.7cm,top=0.7cm,bottom=0.7cm,noheadfoot]{geometry} % geometry for margins
\usepackage[hidelinks,breaklinks]{hyperref} % hyperref for linking references for pdf
\usepackage{wrapfig} % wrapfig to wrap text around figures
\usepackage{mdwlist} % mdwlist for compact enumeration/list items
\usepackage[compact]{titlesec} % titlesec for title section layout
\usepackage{mdwlist} % mdwlist for compact enumeration/list items
% Rule settings
\hyphenpenalty=5000
\tolerance=1000
% for mailto command
\newcommand{\mailto}[1]{\href{mailto:#1}{#1}}
% Name and contact information
\newcommand{\name}{FirstName LastName}
\newcommand{\addr}{123 Fake Street, London, XX00 0XX, England}
\newcommand{\phone}{+44 123 456 6789}
\newcommand{\email}{\mailto{email@example.com}}
\newcommand{\website}{\href{http://google.com}{http://google.com}}
% change itemize to be compact
\makecompactlist{compactitemize}{itemize}
% tweak title spacing
\titlespacing{\section}{0pt}{*2}{*0}
\titlespacing{\subsection}{0pt}{*2}{*0}
\titlespacing{\subsubsection}{0pt}{*2}{*0}
% disables chapter, section and subsection numbering
\setcounter{secnumdepth}{-1}
% set paragraph indent to 0
\setlength\parindent{0pt}
% begin actual CV
\begin{document}
\thispagestyle{empty} % this page does not have a header
\begin{wrapfigure}[5]{l}{1.2in}
\begin{pspicture}(1in,1in)
% The MECARD format is used to exchange contact information.
\psbarcode{MECARD:N:LastName,FirstName;EMAIL:email@example.com;URL:http://google.com;}}{}{qrcode}
\end{pspicture}
\end{wrapfigure}
\noindent \textbf{\LARGE \name }\\
\textit{
\begin{tabular}{l l}\\
Email: \email\ & Address: \addr \\
Web: \website\ & Mobile: \phone \\
\end{tabular}
}\\
Objective: Lorem ipsum dolor sit amet, consectetur adipisicing elit.\\
\section{Lorem Ipsum Dolor}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
\end{document}
How can I align the top of the pspicture
with the text? Should I use a minipage
enviroment? Should I use a different tabular package for the table?
The generated PDF document looks similar to:
Best Answer
First a small comment on your example. It is too long for a MWE and did not compile as it had a few issues, such as a closing square bracket when you were loading the
geometry
package.I produced a smaller file to illustrate the technique for aligning the two blocks. You can use minipages to enclose the blocks and to gain more control. We also enclose them with an
fbox
to be able to visualize everything.There are many different ways to alignment the minipages, but the easiest in this case is to insert a small rule and push the text up. (The orange rule at the left of the textblock).
Once everything is aligned, you can zero the rule width and set
\fboxrule0pt
. The final finished header should look like:And here is the MWE: