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 have some ugly (?) code that produces a vertical bar to the left of Sections. All is well until I introduce multicols right after the section start. That gives me an undesired indent for the first line. How can I remedy this?

Visualization:

enter image description here

\documentclass[11pt]{article}
\usepackage{multicol}
% Set font family to sans serif:
\renewcommand{\rmdefault}{cmss}
% Remove subsection numbering:
\setcounter{secnumdepth}{-1}
% Create PDF bookmarks:
\usepackage[pdftex,bookmarks=true]{hyperref}
% Smaller margins:
\usepackage[hmargin=3cm,vmargin=3cm]{geometry}
% Use symbols for footnotes:
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
% Overload the \section command with left-hanger formatting:
\newcommand{\sectionf}[1]{%
\section[#1]{%
    \rule{-2em}{0em}%
    \rule[-1em]{0.125em}{3em}%
    \rule{1.875em}{0em}%
    #1}
}
% Bullets:
\renewcommand{\labelitemi}{$\cdot$}
\renewcommand{\labelitemii}{$\cdot$}
\renewcommand{\labelitemiii}{$\cdot$}
\renewcommand{\labelitemiv}{$\cdot$}

\begin{document}
\sectionf{Industry Experience}
\begin{multicols}{2}
Health Care\\
Health Insurance\\
Public Health\\
share|improve this question
2  
Add \noindent before the first line. The start of multicols defeats the automatic \noindent after \section. –  egreg Jan 21 '12 at 18:06
    
This works as well and is arguably better code - the intent is clear. –  onk Jan 21 '12 at 18:30
add comment

1 Answer

up vote 4 down vote accepted

Use the optional argument of multicols, i.e., replace

\sectionf{Industry Experience}
\begin{multicols}{2}

with

\begin{multicols}{2}[\sectionf{Industry Experience}]
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.