0

I am trying to reproduce the following without the comments in green and blue :

img1

The LaTeX code I am using is as follows :

\documentclass[11pt, letterpaper]{letter}

\usepackage[includeheadfoot,margin=0.5in]{geometry}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{bm} %for boldface math
\usepackage{braket}
\usepackage[colorlinks,citecolor=red,urlcolor=blue,bookmarks=false,hypertexnames=true]{hyperref}


\usepackage{fancyhdr}
\pagestyle{fancy}
 \fancyhf{}
 \fancyhead[L]{\fontsize{40}{40} \selectfont \textsc{Franklin Lee}}
 \renewcommand\headrule{\vskip-0.7\baselineskip\makebox[\textwidth]{\shadowfill}}
\newcommand\shadowfill{%
  \leavevmode\leaders\hbox{\ooalign{%
  \vrule height 1pt depth 0pt width 1pt\cr%
  \textcolor{cyan}{\vrule height 0pt depth 1pt width 1pt}}%
  }\hskip\fill\kern0pt%
  }

  % Left Header alignment gone wrong 

 \fancyhead[R]{Address Line 1, \\ Address Line 2, \\ Mobile No \\ Email}


\begin{document}

\vspace{2in} % Does not work

Hello 



\end{document}

But this produces :

img2

I would like to adjust the following things :

  1. Put some space between the header text and the header line
  2. Align the left header text as being vertical centre with respect to the right header text
  3. Put some space between the header line and the following text
  4. Extend the header line so that it covers more horizontal space than the following text

Can someone please help me out here?

1 Answer 1

1

For your query 1, 3

enter image description here

\documentclass[11pt, letterpaper]{letter}

\usepackage[includeheadfoot,margin=0.5in]{geometry}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{bm} %for boldface math
\usepackage{braket}
\usepackage[colorlinks,citecolor=red,urlcolor=blue,bookmarks=false,hypertexnames=true]{hyperref}


\usepackage{fancyhdr}
\pagestyle{fancy}
 \fancyhf{}
 \fancyhead[L]{\fontsize{40}{40} \selectfont \textsc{Franklin Lee}}
 \renewcommand\headrule{\vskip-0.1\baselineskip\makebox[\textwidth]{\shadowfill}}
\newcommand\shadowfill{%<----------------------change amount of baseline skip
  \leavevmode\leaders\hbox{\ooalign{%
  \vrule height 1pt depth 0pt width 1pt\cr%
  \textcolor{cyan}{\vrule height 0pt depth 1pt width 1pt}}%
  }\hskip\fill\kern0pt%
  }

  % Left Header alignment gone wrong 

 \fancyhead[R]{Address Line 1, \\ Address Line 2, \\ Mobile No \\ Email}


\begin{document}

\vspace*{2in} % change

Hello 



\end{document}

EDITFor serial no 2

For more space under Franklin Lee add a blank line under it

\fontsize{14}{14} \selectfont \textsc{}

--the size of the blank line is controlled by the fontsize{14}{14}-- you can make it {10}{10} or {20}{20}

MWE

\documentclass[11pt, letterpaper]{letter}
usepackage[includeheadfoot,margin=0.5in]{geometry}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{bm} %for boldface math
\usepackage{braket}
 \usesepackage[colorlinks,citecolor=red,urlcolor=blue,bookmarks=false,hypertexnames=true]{hyperref}


\usepackage{fancyhdr}
\pagestyle{fancy}
 \fancyhf{}
 \fancyhead[L]{\fontsize{40}{40} \selectfont \textsc{Franklin 
  Lee}\\\fontsize{14}{14} \selectfont \textsc{}}
 \renewcommand\headrule{\vskip-0.1\baselineskip\makebox[\textwidth] 
 {\shadowfill}}
  \newcommand\shadowfill{%
  \leavevmode\leaders\hbox{\ooalign{%
  \vrule height 1pt depth 0pt width 1pt\cr%
  \textcolor{cyan}{\vrule height 0pt depth 1pt width 1pt}}%
  }\hskip\fill\kern0pt%
  }

  % Left Header alignment gone wrong 

 \fancyhead[R]{Address Line 1, \\ Address Line 2, \\ Mobile No \\ Email}
\begin{document}
\vspace*{2in} % Does not work
Hello 
\end{document}

enter image description here

Serial No 4

If you want the right side of header line to be increased in length

\hskip\fill\kern0pt%

change the 0pt to -8pt or positive 8pt for shortening the line--this also depends on the margin set in the geometry

5
  • Thank you very much :)
    – Nitin
    May 14, 2020 at 2:14
  • Can you please also tell me how I can change the color of the double header lines? I would like to change the black color of the top line. The bottom line's color I can modify.
    – Nitin
    May 14, 2020 at 14:24
  • \textcolor{cyan}{\vrule height 0pt depth 1pt width 1pt}} you can change cyan -- the other is the \vrule height 1pt depth 0pt width 1pt\cr if you vary height parameter to 0 you can see the reffect on color
    – js bibra
    May 14, 2020 at 14:30
  • 1
    Yes thank again :). I just figured it out and came here to comment.
    – Nitin
    May 14, 2020 at 14:32
  • Although on zooming I see that there are little gaps in the box. Any way to get a solid line there?
    – Nitin
    May 14, 2020 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.