I am trying to prepare a class for my college magazine and articles. I would like to know how to place a black box on the top margin of the first page and write some huge text inside it in white color. Present style of the document looks like this,
% DOCUMENT LAYOUT
\documentclass[10pt, a4paper]{article}
\usepackage[left=5cm,right=2.5cm,top=5cm,bottom=3cm]{geometry}
\usepackage{fontspec}
\usepackage{marvosym}
\usepackage{wasysym}
% DOCUMENT LAYOUT
\setlength\parindent{0cm}
\usepackage[libertine={Ligatures=TeX,Numbers=OldStyle}]{libertineotf}
\setsansfont{Segoe UI}
% FONTS
\usepackage[usenames,dvipsnames]{color}
\usepackage{xunicode}
\usepackage{xltxtra}
\defaultfontfeatures{Mapping=tex-text}
\usepackage{pgfplots}
\usepackage{xcolor}
\usepackage{eso-pic}
% ---- CUSTOM COMMANDS
\chardef\&="E050
\newcommand{\html}[1]{\href{#1}{\scriptsize\textsc{[html]}}}
\newcommand{\pdf}[1]{\href{#1}{\scriptsize\textsc{[pdf]}}}
\newcommand{\doi}[1]{\href{#1}{\scriptsize\textsc{[doi]}}}
% ---- MARGIN YEARS
\usepackage{marginnote}
\newcommand{\amper{}}{\chardef\amper="E0BD }
\newcommand{\sides}[1]{\marginnote{\color{MidnightBlue}\sffamily #1}}
%\newcommand{\years}[1]{\marginnote{\footnotesize #1}}
%\renewcommand*{\raggedleftmarginnote}{}
\setlength{\marginparsep}{0.5cm}
\reversemarginpar
% HEADINGS
\usepackage{sectsty}
\usepackage[normalem]{ulem}
\sectionfont{\mdseries\upshape\Large}
\subsectionfont{\mdseries\scshape\normalsize}
\subsubsectionfont{\mdseries\upshape\large}
\usepackage{lipsum}
\usepackage{tikz}
% PDF SETUP
\usepackage[bookmarks, colorlinks, breaklinks,
pdftitle={Here there},
pdfauthor={My name},
pdfproducer={}
]{hyperref}
\hypersetup{linkcolor=blue,citecolor=blue,filecolor=black,urlcolor=MidnightBlue}
% DOCUMENT
\begin{document}
{\LARGE Effect of aspect ratio and others on others and ourselves}\\[3pt]
\textit{Me myself \& You}. Corr. author : \href{mailto:s.sssss@gmail.com}{\textit{s.sssss@gmail.com}}\\
\textit{Department of Mechanical Engineering.}\\[0.5cm]
{\large \bf Abstract}\\[4pt]
\lipsum[25]
{\section*{Introduction}}
\sides{I am hoping to create some proper paper using this template when i do my masters.}
\lipsum
\sides{How does a para look with this on sides. For a moment i thought it is gone}
\lipsum
%\vspace{1cm}
\vfill{}
%\hrulefill
\end{document}
Can some one suggest how to do this?
I want something like the one on the right.
Best Answer
You have a problem with
xcolor
. You need to use the optiondvipsnames
to use the color MidnightBlue. You don't need to loadcolor
becausexcolor
loadscolor
.pgfplots
loadstikz
and you need to loadxcolor
before pgfplots.You need to compile twice the next code. I used tikz to place a ablack rectangle on the first page.