3

I've been using this homework template I found online that is pretty light. I am very new to using LaTeX, and although I find writing basic mathematical expressions easy, some of the cooler more complex LaTeX stuff seems way above me. The homework template I found has this in it:

\newcounter{prob}
\newenvironment{problem}[1]
{\begin{sloppypar}\stepcounter{prob}\noindent{\large\bfseries Problem %\arabic{prob}
} {\bfseries (#1)}
\begin{quote}}
{\end{quote}\end{sloppypar}}

and I have been using this in this way:

\begin{problem}{Problem 1}
   ***Problem solution***
\end{problem}

However, when I want to include the problem statement, this code introduces too much space. How can I edit my template so that my final results will look like:

Problem 1: problem statement (not bold)

problem solution

3
  • Welcome to TeX.sx! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question.
    – Werner
    Oct 8, 2012 at 4:45
  • instead of using {\bfseries (#1)}, use \textbf{(#1)}.
    – tcpaiva
    Oct 8, 2012 at 5:19
  • @Benjamin : you should look the page 17 of the documentation of ntheorem (see for example at the ctan web site). It is an easy way to obtain the formatting you want for problems.
    – projetmbc
    Oct 8, 2012 at 5:52

1 Answer 1

1

Got it: I took out the \begin{quote} \end{quote}

\newcounter{prob}
\newenvironment{problem}[1]
{\begin{sloppypar}\stepcounter{prob}\noindent{\large\bfseries Problem} {\bfseries (#1)}}{\end{sloppypar}}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .