1

I am trying to create a simple edge border to an a4 sheet using the \rule command

\newgeometry{left=0cm,right=0cm, top=0cm, bottom=0cm}

\hbox{ % Horizontal box

%\hspace*{0.1\textwidth} % Whitespace to the left of the title page
\textcolor{black}{\rule{20mm}{297mm}} % Vertical line
\textcolor{mygray}{\rule{5mm}{297mm}}
\hspace*{4mm}
\textcolor{black}{\rule{1mm}{297mm}}
\hspace*{0.05\textwidth}}

However latex leaves white space before and after each rule as seen in the picture attached enter image description here. I can use [-1mm] to shift the rule downwards but I can't work out how to shift it to the right hand side so the first two rules lie side by side and the first rule is at the extreme RHS of the page. How do I remove this whitespace?

PaulBarr
  • 237
  • 2
  • 9
  • You perhaps need to end each line with a % where you want a space suppressed. – Steven B. Segletes Mar 10 '15 at 19:39
  • 1
  • It probably makes more sense to close the question as a duplicate, citing Werner's link. I shall start that process. – Steven B. Segletes Mar 10 '15 at 19:47
  • I understand that its a duplicate, in the strict sense that the answer is contained within that reference, but personally If I was to have the same problem again and be referred to werners link I dont think I would be able to solve the problem anywhere near as fast – PaulBarr Mar 10 '15 at 19:54
  • 1
    @PaulBarr: This post has been upvoted (by me), implying that it will remain in the bank of question on this site. People who find this question, will see the related comments/discussion as well as the marked duplicate and follow the discussion there. Regardless, there is a very subjective view on what constitutes a duplicate: Does the question have to ask for the same thing? Or, is something a duplicate when it uses an answer as-is from another question? – Werner Mar 10 '15 at 20:03

0 Answers0