1
0
Fork 0
mirror of https://github.com/lise-henry/crowbook synced 2024-05-26 16:16:11 +02:00

Use tabularx to break lines in tabulars

This commit is contained in:
Elisabeth Henry 2017-01-05 16:24:03 +01:00
parent 070f0f468f
commit 6e6055debb
2 changed files with 4 additions and 4 deletions

View File

@ -424,15 +424,15 @@ impl<'a> Renderer for LatexRenderer<'a> {
Token::Table(n, ref vec) => {
let mut cols = String::new();
for _ in 0..n {
cols.push_str("|c");
cols.push_str("|X");
}
cols.push_str("|");
Ok(format!("\\begin{{center}}
\\begin{{tabular}}{{{}}}
\\begin{{tabularx}}{{\\textwidth}}{{{}}}
\\hline
{}
\\hline
\\end{{tabular}}
\\end{{tabularx}}
\\end{{center}}\n\n",
cols,
self.render_vec(vec)?))

View File

@ -11,7 +11,7 @@
\usepackage[<<&tex_lang>>]{babel}
\usepackage{fancyhdr}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{spverbatim}
\usepackage{graphicx}
\usepackage{color}