m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Chrzanowski <mc370754@students.mimuw.edu.pl>2021-09-30 19:43:15 +0200
committerMarcin Chrzanowski <mc370754@students.mimuw.edu.pl>2021-09-30 19:43:15 +0200
commit9d6ddf534b2e6b76ce738c135aa6dafa5f908019 (patch)
treef73ab7e0a560e4f52fd87ce6f64d857ab2f6b1c7
parentedc074ebd0586a7fcf46bc58d9d2a0c256422f26 (diff)
Modify definitions
-rw-r--r--definitions.sty18
1 files changed, 11 insertions, 7 deletions
diff --git a/definitions.sty b/definitions.sty
index 3651d78..0726ee5 100644
--- a/definitions.sty
+++ b/definitions.sty
@@ -1,19 +1,23 @@
\usepackage{ifthen}
-\newtheorem{definition}{Definition}[chapter]
\newtheorem{theorem}{Theorem}[chapter]
-\newtheorem{lemma}{Lemma}[chapter]
-\newtheorem{observation}{observation}[chapter]
+\newtheorem{problem}[theorem]{Problem}
+\newtheorem{definition}[theorem]{Definition}
+\newtheorem{lemma}[theorem]{Lemma}
+\newtheorem{observation}[theorem]{Observation}
% #1 (optional): Fixed parameters of the problem
% #2: Name of query problem
% #3: The structure to preprocess
% #4: Queries to handle
\newcommand{\queryproblem}[4][]{
- \textsc{#2} \\
- \ifthenelse{\equal{#1}{}}{}{\textbf{Fixed:} #1 \\}
- \textbf{Given:} #3 \\
- \textbf{Queries:} #4
+ \begin{problem}
+ \upshape
+ \textsc{#2} \\
+ \ifthenelse{\equal{#1}{}}{}{\textbf{Fixed:} #1 \\}
+ \textbf{Given:} #3 \\
+ \textbf{Queries:} #4
+ \end{problem}
}
\newcommand{\qptime}[2]{$\langle$#1, #2$\rangle$}