Hello I am writing a fictional story in latex and i'm having trouble with dialogue boxes. When a character says something their name and dialogue are put together in a borderless box. However i am having trouble keeping the names and their corresponding dialogue together. The issue that is arising is presented in image below at the transition between page one an page two:
I want the name at the bottom of the page one to stick with the dialogue on the top of the page two. The code i used to generate this is given below. It's the new environment called "dial" that i am having issue with.
\documentclass[envcountsame,envcountchap]{article}
%used to make margins one left and right side of text
\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
\let\endchangemargin=\endlist
%Used to create the dialogue boxes
\newenvironment{dial}[1]
{
\begin{center}
\vspace{0.3cm}
\normalsize{\textbf{#1\\[1ex]}}
\begin{small}
\begin{changemargin}{2cm}{2cm}
}
{
\end{changemargin}
\end{small}
\end{center}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{dial}{Abbott}
hey
\end{dial}
\begin{dial}{Costello}
hey
\end{dial}
\begin{dial}{Abbott}
hey
\end{dial}
\begin{dial}{Costello}
hey
\end{dial}
\begin{dial}{Abbott}
hey
\end{dial}
\begin{dial}{Costello}
hey
\end{dial}
\begin{dial}{Abbott}
hey
\end{dial}
\begin{dial}{Costello}
hey
\end{dial}
\begin{dial}{Abbott}
hey
\end{dial}
\begin{dial}{Costello}
hey
\end{dial}
\begin{dial}{Abbott}
hey
\end{dial}
\begin{dial}{Costello}
This is the Problem right here. This is the Problem right here. This is the Problem right here. This is the Problem right here. This is the Problem right here. This is the Problem right here. This is the Problem right here. This is the Problem right here. This is the Problem right here. This is the Problem right here.
\end{dial}
\begin{dial}{Abbott}
hey
\end{dial}
\begin{dial}{Costello}
hey
\end{dial}
\end{document}
\begin{dial}{Costello}
hey
\end{dial}
\end{document}
I hope this is enough information to convey my issue. Bye and hope to here from you awesomnauts soon :D
envcountsame
andenvcountschap
are strange options ;-)\item[]
)dramatist
package is more of use here?\normalsize
is not a command with argument; make\begin{small}
into\small
and remove\end{small}
; it should be\textbf{#1}\\[1ex]
.