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.

Here is the M.W.E to draw a horizontal line across the page. Now, how do I reduce the space between the name and line. The gap is too high.

\documentclass[letterpaper,11pt]{article}
\pagestyle{empty}
\begin{document}
\begin{flushleft}
\bfseries SUBHAM SONI S.
\end{flushleft}
\makebox[\linewidth]{\rule{\linewidth}{0.4pt}}
\end{document}

enter image description here

share|improve this question
    
put the box inside the environment. Or even use an \hrule –  Johannes_B Apr 23 at 8:34
    
Usually these distances have a certain sense - the distance (as I remember) corresponds to the vertical spacing between two following paragraphs. –  strpeter Apr 23 at 8:44

2 Answers 2

up vote 6 down vote accepted

You don't need a \makebox and you don't need even flushleft.

\documentclass[letterpaper,11pt]{article}
\pagestyle{empty}
\begin{document}
%\begin{flushleft}    %% why do you need this?
\noindent
{\bfseries SUBHAM SONI S.}
\par
\vspace{-0.8\baselineskip}   %% adjust -0.8
\noindent
\rule{\linewidth}{0.4pt}
%\end{flushleft}      %% why do you need this?
\end{document}

enter image description here

share|improve this answer
    
In the resume, to write the content on the left and right side so the flush environments –  subham soni Apr 23 at 9:08
    
@subhamsoni In that case better use minipages and inside them use \raggedleft and \raggedright as you want. –  Harish Kumar Apr 23 at 9:11

Such decorations frequently require lower level commands:

\documentclass[letterpaper,11pt]{article}
\pagestyle{empty}
\begin{document}
\begin{flushleft}
\bfseries SUBHAM SONI S.\\* % no page break
\kern2pt % some space
\hrule % a rule all the text width long
\end{flushleft}
\end{document}

enter image description here

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.