mirror of
https://github.com/lise-henry/crowbook
synced 2024-09-26 08:50:39 +02:00
Use tabularx to break lines in tabulars
This commit is contained in:
parent
070f0f468f
commit
6e6055debb
@ -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)?))
|
||||
|
@ -11,7 +11,7 @@
|
||||
\usepackage[<<&tex_lang>>]{babel}
|
||||
|
||||
\usepackage{fancyhdr}
|
||||
\usepackage{booktabs}
|
||||
\usepackage{tabularx}
|
||||
\usepackage{spverbatim}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{color}
|
||||
|
Loading…
Reference in New Issue
Block a user