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
add comment

1 Answer

Is this what you're after:

\documentclass[twocolumn]{article}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\begin{document}
{\large \textbf{MyClassTitle} \hfill \textit{SomethingHere}}

\lipsum[1-10]
\end{document}

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
add comment

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.