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 am new to LaTeX and I'm creating a template for handins for school work. I am using the article document class with the twoclumn option. In the beginning of the template I am making a header with name of class and title for exercise. I would like to be able to, on a line in the header, write something at the beginning of the line and then on the same line flush something to the right margin but in the first column. Sketch:

MyClassTitle ___________space_____________ SomethingHere || Right column

where || denotes the boundary between the two columns. I have been trying with flushright and raggedleft but can not make it work.

share|improve this question

1 Answer 1

Is this what you're after:

\usepackage{lipsum}% http://ctan.org/pkg/lipsum
{\large \textbf{MyClassTitle} \hfill \textit{SomethingHere}}


Title/header in two-column article

In the above code the lipsum package is used merely to fill the document with dummy text. Also, you'll notice that the title (just like all the other paragraphs) have an indent. If you want to remove this indent, add \noindent on the same line just before the heading. I've formatted the heading using \large (to increase the font size), \textbf (for bold face font), and \textit (for italics font).

share|improve this answer

Your Answer


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.