我有一些丑陋的代码,在 Sections 的左侧产生了一个竖线。一切都很好,直到我在 section 开始后立即引入了多列。这导致第一行出现了不想要的缩进。我该如何补救?
可视化:
\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\\
答案1
使用可选参数multicols
,即替换
\sectionf{Industry Experience}
\begin{multicols}{2}
和
\begin{multicols}{2}[\sectionf{Industry Experience}]