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'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

share|improve this question
    
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 '12 at 4:45
    
instead of using {\bfseries (#1)}, use \textbf{(#1)}. –  tecepe Oct 8 '12 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 '12 at 5:52
add comment

migrated from stackoverflow.com Oct 8 '12 at 3:51

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 1 down vote accepted

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}}
share|improve this answer
add comment

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.