I'm editing a book. What I want is a sectioning command like \section
, \subsection
, and friends, to typeset a exercises section at the end of each section of the book. This exercises are in some list environments, and I don't want any additional features to the exercises itself.
I don't want to redefine some of the mentioned commands because I need to use all of them along the edition of the book. So, what I have tried
\documentclass[12pt,letterpaper]{book}\usepackage[latin1]{inputenc}\usepackage[spanish]{babel}\usepackage{amsmath,amsfonts,amssymb,amsthm}\usepackage{fancyhdr}\pagestyle{fancy}\fancyhf{}\renewcommand\headrulewidth{0pt}\renewcommand{\chaptermark}[1]{\markboth{#1}{}} \renewcommand{\sectionmark}[1]{\markright{#1}{}}\fancyhead[LO]{\small\textsl{\leftmark}} \fancyhead[RE]{\small\textsl{\rightmark}} \fancyhead[LE,RO]{\thepage} \newenvironment{ejercicios}{\newpage\vspace{0.5cm}\rule{\textwidth}{0.5pt}\makebox[\textwidth][r]{\Large Ejercicios \thesection. \rightmark}\rule{\textwidth}{0.5pt}\vspace{0.5cm}}{\newpage}
The problem is that the space between the rules and the text are distinct. I've tried to use \parbox
and try to adjust the spaces between the rules and the text, but this never work because I need (on request to me) the following:
\makeatletter \renewcommand\paragraph{\@startsection{paragraph}{3}{0cm} {0cm} {3mm} {\bf}} \makeatother
It is to break the line after each paragraph header, I suspect that this affect the use of \parbox
.
Whatever, my attempt to solution this is inelegant. I want something like \newsectioncommand
that be independent of the behavior of the \paragraph
command.
That I want is something that produce
a new page
5mm
rule
3mm
aligned right Ejercicios "section number". "section name"
3mm
rule
5mm