Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I use LaTeX to typeset notes and case briefs for law school. So far I have settled for a theorem-style layout for each case using thmtools. Here is a minimal working example:

\documentclass[a4paper]{report} 
\usepackage{amsthm,thmtools}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\theoremstyle{definition}
\newtheorem{case}[theorem]{Case}
\renewcommand{\listtheoremname}{List of cases}

\begin{document}
\listoftheorems[ignoreall,show={case}]
\chapter{1}
\begin{case}[name=Case name]

\textbf{Facts}: foo.

\textbf{Issue}: bar.

\textbf{Rule}: foobar.

\textbf{Analysis}: fob.

\textbf{Conclusion}: bor.
\end{case}
%repeat ad nauseum
\end{document}

Specific issues

  1. Case structured and defined by a LaTeX macro: Typing \textbf{Facts} and the rest is tedious for every case. Is there a way to define a specialized theorem-like environment that will simplify the matter? For example, I am vaguely familiar with the moderncv package and I know that the six braces in the command \cventry{}{}{}{}{}{} can be filled with different information with different formatting. Would it be possible to define some similar theorem-like environment where I could do, for example, \case{Case name}{foo.}{bar.}{foobar.}{fob.}{bor.} and get the same output as in my MWE? If so, how could I define this environment?

  2. Table of cases: If this is possible, would it then be possible to print a list of case names with content from one of the braces appended to each case? Right now I have \listoftheorems[ignoreall,show={case}] which spits out a list of cases. But I'd rather have a list of cases with the foo. from each case appended to it. Might that be possible?

share|improve this question
    
(1) is certainly doable. I don't exactly know what you mean by (2). Could you provide some sample output? –  Werner Apr 17 at 5:39
    
@Werner Let's say I have two cases. Case 1 is called A v. B and has I am a dog in the first set of braces. Case 2 is called C v. D and has I am a cat in the first set of braces. I would like some way to print A v. B: I am a dog and then C v. D: I am a cat with one command. I have the command \listoftheorems[ignoreall,show={case}] so far, but that only does half the work by spitting out the case names. –  longstreth Apr 17 at 5:43

1 Answer 1

up vote 3 down vote accepted

Here is something that you could use as a start:

enter image description here

\documentclass{report}
\usepackage[margin=1in]{geometry}% Just for this example
\makeatletter
\newcommand{\printcases}{\@starttoc{cse}}
\newcommand{\l@case}{\@dottedtocline{1}{0em}{1.5em}}
\makeatother
\newcommand{\case}[6]{%
\addcontentsline{cse}{case}{#1: #2}
\begin{description}
  \item[Case]: #1
  \item[Facts]: #2
  \item[Issue]: #3
  \item[Rule]: #4
  \item[Analysis]: #5
  \item[Conclusion]: #6
\end{description}
}
\begin{document}
\chapter{A chapter}
% \case{<name>}{<facts>}{<issue>}{<rule>}{<analysis>}{<conclusion>}
\case{Case name}{foo.}{bar.}{foobar.}{fob.}{bor.}
\case{Case name}{bar.}{bar.}{foobar.}{fob.}{bor.}
\case{Case name}{baz.}{bar.}{foobar.}{fob.}{bor.}

\printcases
\end{document}

Each case is set using a description (list-like) environment, allowing it to be broken at the page boundary (if needed). Additionally, each case name and page number is written to a ToC-like file (extension .cse) and printed using \printcases.

share|improve this answer
    
This is awesome; thanks! –  longstreth Apr 17 at 12:23
    
is it possible to remove the space between the word and the colon? Right now the output is Case : and I was wondering how I might change that to Case:. –  longstreth Apr 18 at 13:30
1  
@longstreth: Yes; that's the so-called \labelsep of the list description. Add \usepackage{enumitem} to your document preamble and use \begin{description}[labelsep=0pt]. Alternatively, to get a bold colon :, use \item[Case:]. –  Werner Apr 18 at 13:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.