Hello,
I tried looking around, but it is very hard because of google keywords confusing what I want semantically ("problem environment input output" etc.)
I want to create/use some existing environment which its output is as follows for example:
Problem 1.
Input: Graph G=(V,E)
Output: n, Number of cycles in graph
That's an example, of course.
It is similar to the header of the algorithm environment, only I want the Problem heading and not have an actual algorithm below that, just the problem definition. Any ideas?
Oh, and I want "input" and "output" to be in bold, if that matters a lot...
Thanks!
Math & Science ⇒ "problem" environment
NEW: TikZ book now 40% off at Amazon.com for a short time.

"problem" environment
Hi,
it all depends on your particular needs. In the following example I defined a really basic new command (\myprob) that could give you some ideas:
it all depends on your particular needs. In the following example I defined a really basic new command (\myprob) that could give you some ideas:
Code: Select all
\documentclass{article}
% creation of a new counter
\newcounter{mycount}
% definition of the command
\newcommand\myprob[2]{%
\stepcounter{mycount}
\par\noindent Problem\ \themycount .\\
{\bfseries Input}: #1\\
{\bfseries Output}: #2\par
}
\begin{document}
\myprob{Graph $G=(V,E)$}{$n$, Number of cycles in graph}
\myprob{another input}{another output}
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...