# [OS X TeX] Equation-like environment

Sat Jul 6 08:29:43 EDT 2002


Le 4/07/02 7:09, « Adrian Heathcote »
<adrian.heathcote at philosophy.usyd.edu.au> a écrit :

> Hi
>
> I need some help from a LateX Wiz.
>
> I want to create a new equation-like environment, called Argt. It is for
> setting arguments like All men are mortal / Socrates is a Man /
> therefore, Socrates is Mortal. (But of course with the lines on separate
> lines, and all lined up.) I want a counter that increments through a
> chapter, so that the first argument is simply labelled (1), hard up
> against the left margin. The text of course (unlike the equation env)
> should be in plain roman text.

Try this... (do you really want *all* lines to be numbrered ?)

\documentclass[a4paper]{book}
\newcounter{syllo}[chapter]
\renewcommand{\thesyllo}{(\arabic{syllo})}
\makeatletter
\def\usecounterWithNoreset#1{\@nmbrlisttrue\def\@listctr{#1}}
\makeatother
\newenvironment{syllogism}{%
\begin{list}{\thesyllo\hfill}{%
\setlength{\leftmargin}{3em}%
\setlength{\itemindent}{0em}%
\setlength{\labelsep}{1em}%
\setlength{\labelwidth}{2em}}%
\usecounterWithNoreset{syllo}
}%
{\end{list}}
\begin{document}
\chapter{Example}
Bla bla bla  bla bla  bla bla  bla bla  bla bla  bla bla  bla bla  bla bla
bla bla  bla bla
\begin{syllogism}
\item All men are mortal
\item\label{foo} Socrates is a Man
\item Therefore, Socrates is Mortal
\end{syllogism}
Bla bla bla  bla bla  bla bla  bla bla  bla bla  bla bla  bla bla  bla bla
bla bla  bla bla  bla bla  bla bla  bla bla  bla bla  bla bla  bla bla
\begin{syllogism}
\item All humans are animals
\item All animals are mortal
\item Therefore, all humans are mortal
\end{syllogism}
As we have seen in \ref{foo}, blah blah  blah blah  blah blah  blah blah
blah blah  blah blah  blah blah.

\end{document}
>
> Now I know I should be able to get this from Kopka and Daly but, though
> they cover creating new list environments there is nothing about
> creating a new equation-like environment that is not in math mode. The
> best I've been able to get is a modification of the description
> environment, but with no counter mechanism.
>
> Could anyone point me in the direction of a solution. Any package on
> CTAN that will make this easier?
>
>
>
>
> -----------------------------------------------------------------
> Threaded list archives can be found at:
> <http://www.masda.vxu.se/~pku/MacOSX_TeX/>
> -----------------------------------------------------------------
> To UNSUBSCRIBE, send email to <info at email.esm.psu.edu> with
> "unsubscribe macosx-tex" (no quotes) in the body.
> For additional HELP, send email to <info at email.esm.psu.edu> with
> "help" (no quotes) in the body.
> -----------------------------------------------------------------

--
Michel Bovani

-----------------------------------------------------------------
Threaded list archives can be found at:
<http://www.masda.vxu.se/~pku/MacOSX_TeX/>
-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <info at email.esm.psu.edu> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <info at email.esm.psu.edu> with
"help" (no quotes) in the body.
-----------------------------------------------------------------