Yot*_*tam 13 emacs latex org-mode
我正在使用emacs作为我的编辑器,我正在使用org-mode,它看起来非常有用.
我正在以组织模式生成一个表(电子表格),除了垂直线之外,它正确地导出到LaTeX.有没有办法出口它们?我想有办法将一些垂直线定义为可见.
rvf*_*068 20
您可以将格式提供给LaTeX的表格#+attr_latex:
,例如:
#+attr_latex: align=|c|c|c|
|------+-----+-----|
| A | B | C |
|------+-----+-----|
| 2.34 | 2.7 | 8.9 |
| 3.67 | 4.5 | 8.9 |
|------+-----+-----|
Run Code Online (Sandbox Code Playgroud)
|
Latex 中的垂直线由表定义中的字符定义。因此,在运行 Latex 之前,只需将定义中的l
' 和r
' 与|
'分开\tabular
,例如在 Perl 中如下所示:
perl -pe 's/(\\begin{tabular}{)(.*)}/$1 . join("|", split m{}, $2) . "}"/ge' < table.tex
Run Code Online (Sandbox Code Playgroud)
更新:哦,我明白了。根据文档,您应该能够通过以下方式指示列组
| / | < | | | > | <> | < | > |
Run Code Online (Sandbox Code Playgroud)
但是,当我在我的 emacs 版本和 org-mode 中尝试它时,没有任何反应。