Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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:

enter image description here

share|improve this question

1 Answer 1

up vote 4 down vote accepted

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.

enter image description here

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:

enter image description here

And here is the MWE:

\documentclass[final,a4paper,notitlepage,10pt]{report}
\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[paper=a4paper,left=0.7cm,right=0.7cm,top=0.7cm,bottom=0.7cm,noheadfoot] {geometry}   % geometry for margins
% 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}}
\setlength\parindent{0pt}
\fboxsep0pt
\fboxrule0pt
\usepackage{hyperref}
\begin{document}
\thispagestyle{empty}   % this page does not have a header

\fbox{\begin{minipage}[t]{\textwidth}
\fbox{\begin{minipage}{1.378in}
\begin{pspicture}(1.378in, 1.5in)
    \psbarcode[]{2}{height=1.378 width=1.378}{qrcode}
    {\color{white}2}
\end{pspicture}
\end{minipage}}\hspace{0.3cm}% adjust for horizontal spacing
\fbox{\begin{minipage}{0.7\textwidth}
\textbf{\LARGE \name }\\
\textit{%
\begin{tabular}{l l}\\
Email: \email\ & Address: \addr \\
Web: \website\ & Mobile: \phone \\
\end{tabular}
}
{\color{orange}\rule{3pt}{39pt}}
\end{minipage}}
\end{minipage}}
\end{document}
share|improve this answer
    
@doncherry Thanks - added it. –  Yiannis Lazarides Feb 27 '12 at 15:34
    
Ah the missing bracket was due to while I was trying to add the quad spaces for each line so it shows up in code for SE, I made a mistake between the geometry package and it's options and clearly deleted one too many characters, fixed now. :) Cheers! First time posting here, I simply copied the top of my .tex document, I'll know next time to post a minimal working example (MWE). –  dan2k3k4 Feb 27 '12 at 18:05
    
@Dan2k3k4 Thanks for the explanation and welcome to the site. –  Yiannis Lazarides Feb 27 '12 at 18:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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