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'm trying to make something similar to http://ww1.microchip.com/downloads/en/appnotes/00734b.pdf I'm using the twocolumn option, and have defined my own \showtitle command:

\newcommand{\showtitle}{
  \parbox[t]{\textwidth}{
  \flushright\textbf{\fontsize{50}{1}\selectfont\gettitle{}}
  \vbox {\vskip3mm\hrule width \hsize height 1.5pt\vskip1mm\hrule width \hsize height 4pt\vskip1mm} 
  \flushleft\textbf{\Huge{\getsubtitle}}
  \vbox {\vskip2mm\hrule width \hsize height 4pt\vskip1mm\hrule width \hsize height     1.5pt\vskip1mm} 
  \normalsize\normalfont}
}

The formatting is OK, however, the second column starts at the top of the column, behind the title... I tried it with minipage as well, not working.

Full code:

\documentclass[a4paper,twocolumn]{scrartcl}
\usepackage{lipsum}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% General information
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\gettitle}{CBus}
\newcommand{\getsubtitle}{Protocol Specification}
\newcommand{\getauthor}{Camil Staps}
\newcommand{\getdate}{\today}

\title{\gettitle}
\subtitle{\getsubtitle}
\author{\getauthor}
\date{\getdate}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% General layout
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\setlength{\columnsep}{6mm}
\setlength{\parindent}{0mm}

\renewcommand{\familydefault}{\sfdefault}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Special functions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\showtitle}{
  \parbox[t]{\textwidth}{
  \flushright\textbf{\fontsize{50}{1}\selectfont\gettitle{}}
  \vbox {\vskip3mm\hrule width \hsize height 1.5pt\vskip1mm\hrule width \hsize height     4pt\vskip1mm} 
  \flushleft\textbf{\Huge{\getsubtitle}}
  \vbox {\vskip2mm\hrule width \hsize height 4pt\vskip1mm\hrule width \hsize height     1.5pt\vskip1mm} 
  \normalsize\normalfont}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The document
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\showtitle{}

\section{Lipsum}
\lipsum[1-5]

\end{document}

How can I solve this?

share|improve this question
1  
You might want to add a % after every { which ends a line to avoid a spurious space there. See What is the use of percent signs (%) at the end of lines? for the details. –  Martin Scharrer Jan 5 '13 at 10:47
    
Done that. It actually worked because of the spurious space in \flushright\textbf{\fontsize{50}{1}\selectfont\gettitle{}}. Now using \flushright\textbf{\fontsize{50}{1}\selectfont\gettitle{}} %. –  Camil Staps Jan 5 '13 at 10:52

1 Answer 1

up vote 2 down vote accepted

the \twocolumn command is your friend

...
\begin{document}
\twocolumn[\showtitle]
...
share|improve this answer

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.