[Tex/LaTex] Decorative lines above and left of text

fancyhdrheader-footermdframed

I would like to recreate this decoration, which is being placed at the top of every page:

enter image description here

So a thin line above the text, and a thicker line left of the text. I've been trying to do this using the mdframed package, but I am not able to use a different width for the two lines. My question is: is the mdframed package the right way to go, or should I use something different?

If it's the right way to go, here's my code; how to differentiate between the width of the lines?

\newmdenv[rightline=false,bottomline=false,linewidth=2]{frameit}
...
\begin{frameit}
  Forum
\end{frameit}

I see no information about this in the manual: http://mirrors.ctan.org/macros/latex/contrib/mdframed/mdframed.pdf

Best Answer

To create headers/footers You could use either the titleps or the fancyhdr package; a little example using fancyhdr:

\documentclass{article}
\usepackage[a5paper]{geometry}% just for the example
\usepackage{fancyhdr}
\usepackage{lipsum}

\fancyhf{}
\setlength\headheight{13.7pt}
\renewcommand\headrulewidth{0pt}
\fancyhead[C]{\renewcommand\headrulewidth{.4pt}\headrule}
\fancyhead[L]{\rule[-2pt]{3pt}{10pt}\hspace*{0.5em}\sffamily\footnotesize\bfseries FORUM}
\fancyfoot[C]{\thepage}
\pagestyle{fancy}

\begin{document}

\lipsum[1-12]

\end{document}

enter image description here

Here's another possibility using this time the tikzpagenodes and background packages:

\documentclass{article}
\usepackage[a5paper]{geometry}% just for the example
\usepackage{background}
\usepackage{tikzpagenodes}
\usepackage{lipsum}

\backgroundsetup{
  scale=1,
  angle=0,
  opacity=1,
  color =black,
  contents={\begin{tikzpicture}[remember picture,overlay]
    \draw ([yshift=18pt]current page text area.north west) -- 
      ([yshift=18pt]current page text area.north east);
    \draw[line width=3pt] ([yshift=18pt,xshift=0.5\pgflinewidth]current page text area.north west) -- 
      ++(0pt,-10pt);
    \node[anchor=west] at ([yshift=11pt,xshift=5pt]current page text area.north west) {\sffamily\bfseries\footnotesize FORUM};
    \end{tikzpicture}}
}
\begin{document}

\lipsum[1-12]

\end{document}

enter image description here

Of course, the mdframed package can also be used here, but it seems somehow an overkill:

\documentclass{article}
\usepackage[a5paper]{geometry}% just for the example
\usepackage[framemethod=tikz]{mdframed}
\usepackage{fancyhdr}
\usepackage{lipsum}

\fancyhf{}
\setlength\headheight{29.2pt}
\renewcommand\headrulewidth{0pt}
\fancyhead[C]{\begin{mdframed}[
  skipabove=0pt,
  skipbelow=0pt,
  topline=true,
  leftline=true,
  rightline=false,
  bottomline=false,
  innerbottommargin=0pt,
  singleextra= {\draw[line width=3pt] (P-|O) -- (O);}]
\sffamily\footnotesize\bfseries FORUM
\end{mdframed}}
\fancyfoot[C]{\thepage}
\pagestyle{fancy}

\begin{document}

\lipsum[1-12]

\end{document}

The different width for the framing lines was achieved with the help of the singleextra command.

enter image description here