I have defined an exercise
environment which ends with a horizontal rule. I want to have some vertical space between the end of the environment text and the rule.
When I try to insert that, the vertical space ends up after (below) the rule instead of before it.
I have tried both \medskip
at the beginning of the HorzLine command, and \vspace{5\bigskipamount}
before the \HorzLine
at the exercise
environment, and both don't work.
What's going on?
Here is some code:
\documentclass[a4paper,10pt]{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{color}
\definecolor{orange}{rgb}{1,.549,0}
\newcommand{\HorzLine}{\medskip\noindent\textcolor{orange}{\rule{\textwidth}{5pt}}}
\newenvironment{exercise}
{\noindent\small\textbf{Exercise:}}
{\vspace{5\bigskipamount}\HorzLine}
\begin{document}
\begin{exercise}
\blindtext
\end{exercise}
\blindtext
\end{document}
Vertical before horizontal line
?