I'm working on a LaTex Class for script-writing. I've come into a problem when declaring a Dialog environment.
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{exampleclass}[2014/08/16 Example LaTeX class]
\newcommand{\headlinecolor}{\normalcolor}
\LoadClass[twocolumn]{article}
\documentclass{article}
\usepackage{amsmath}
\RequirePackage{xcolor}
\definecolor{slcolor}{HTML}{882B21}
% needed for its \numberwithin command
\newcounter{panelctr}
\renewenvironment{boxed}[1]
{\begin{center}
#1\\[1ex]
\begin{tabular}{|p{0.9\textwidth}|}
\hline\\
}
{
\\\\\hline
\end{tabular}
\end{center}
}
\newenvironment{panel}{% define a custom environment
\bigskip\noindent% create a vertical offset to previous material
\refstepcounter{panelctr}% increment the environment's counter
\textsc{Panel \thepanelctr}% or \textbf, \textit, ...
\newline%
}{\par\bigskip} % create a vertical offset to following material
\numberwithin{panelctr}{section}
\newenvironment{character}[1]
{%
\vfill
\hfill
\textbf{#1}\\
}
{
\hfill
\vfill
}%
%--------------------------------------------------
\begin{document}
Below this line a boxed environment is used
\begin{boxed}{Title of the Box}
This is the text formatted by the boxed environment
\end{boxed}
This text is again outside the environment
\section{First section}
Some text before the first algorithm environment \ldots
\begin{panel}
Some thoughts
\begin{character}{Character1}
Hello, This text is again outside the environment
\end{character}
\begin{character}{Character2}
test dialog
\end{character}
\end{panel}
\begin{panel}
More thoughts
\end{panel}
\end{document}
Currently the actual dialog doesn't seem to be centered while the characters name is centered. My idea formatting:
It was also be great if there is a way to get the Parenthetical's to align either left or right to the center of the dialog
\\
to break lines outside of special contexts (tabular
,array
etc.). (3) Please always post minimal, but complete, code we can copy-paste-compile. (4) Please upload your image in the editor rather than relying on an external link.\documentclass{article} \usepackage{amsmath}
inside a class file?!? In case you are requiring theamsmath
package just to use the\numberwithin
command, forget it and simply say\newcounter{panelctr}[section]
.