m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--definitions.sty20
1 files changed, 11 insertions, 9 deletions
diff --git a/definitions.sty b/definitions.sty
index f6d2e94..f21eb49 100644
--- a/definitions.sty
+++ b/definitions.sty
@@ -1,12 +1,14 @@
-\newtheorem{definition}{Definition}[chapter]
-
-% #1: Name of query problem
-% #2: The structure to preprocess
-% #3: Queries to handle
-\newcommand{\queryproblem}[3]{
- \textsc{#1}
+\usepackage{ifthen}
- \textbf{Given:} #2
+\newtheorem{definition}{Definition}[chapter]
- \textbf{Queries:} #3
+% #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
}