summaryrefslogtreecommitdiffstats
path: root/src/latexgen.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/latexgen.h')
-rw-r--r--src/latexgen.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/latexgen.h b/src/latexgen.h
index 5d5eab8..ac6a68b 100644
--- a/src/latexgen.h
+++ b/src/latexgen.h
@@ -160,10 +160,26 @@ class LatexGenerator : public OutputGenerator
void endSubscript() { t << "}}$"; }
void startSuperscript() { t << "$^{\\mbox{"; }
void endSuperscript() { t << "}}$"; }
- void startTable(int c) { t << "\\begin{TabularC}{" << c
- << "}\n\\hline\n";
+ void startTable(bool hasCaption,int c)
+ {
+ if (hasCaption) t << "\\begin{table}[h]";
+ t << "\\begin{TabularC}{" << c << "}\n\\hline\n";
}
- void endTable() { t << "\\\\\\hline\n\\end{TabularC}\n"; }
+ void endTable(bool hasCaption)
+ {
+ if (hasCaption)
+ {
+ t << "\\end{table}\n";
+ }
+ else
+ {
+ t << "\\\\\\hline\n\\end{TabularC}\n";
+ }
+ }
+ void startCaption() { t << "\\\\\\hline\n\\end{TabularC}\n"
+ "\\centering\n\\caption{";
+ }
+ void endCaption() { t << "}\n"; }
void nextTableRow() {}
void endTableRow() { t << "\\\\\\hline\n"; }
void nextTableColumn() { t << "&"; }