【问题标题】:Export a table to LaTeX and respect ^:nil将表格导出到 LaTeX 并尊重 ^:nil
【发布时间】:2013-06-05 03:28:57
【问题描述】:

我有一个 org 文件没有按照我想要的方式导出到 LaTeX。我正在编写一个测验来测试求职者使用关系数据的专业知识。为清楚起见,我决定将列名结构为 foo_bar。我的示例(如下)包括一个名为 Columns 的部分和一个明显是表格的部分。下划线在 Columns 下工作正常,但它们在表格中显示为下标。为什么?

#+title: Relational Data
#+options: ^:nil toc:nil num:nil author:nil timestamp:nil

* tRemovalEpisodes
  A "removal" is a discrete event blah blah blah. This is all fine. 

  _Columns_
  - removal_id (int) is a Primary Key
  - child_id (int) is a Foreign Key
  - removal_date (date)
  - exit_date (date)
  - primary_removal_reason (int)

 | removal_id | child_id | removal_date |  exit_date | primary_removal_reason |
 |------------+----------+--------------+------------+------------------------|
 |          / |       <> |           <> |         <> |                     <> |
 |          1 |    12345 |   2012-01-01 | 2012-04-13 |                     13 |
 |          2 |    12346 |   2012-01-03 | 2013-02-14 |                     22 |
 |          3 |    12347 |   2012-04-02 |            |                     12 |
 |          4 |    12348 |   2012-09-05 | 2013-02-28 |                     13 |
 |          5 |    12349 |   2013-01-02 | 2013-04-12 |                     56 |
 |          6 |    12350 |   2013-03-01 |            |                     13 |
 |          7 |    12350 |   2012-01-01 | 2012-04-13 |                     14 |
 |          8 |    12351 |   2012-01-03 | 2013-02-14 |                     10 |
 |          9 |    12352 |   2012-04-02 |            |                     11 |
 |         10 |    12353 |   2012-09-05 | 2013-02-28 |                     11 |
 |         11 |    12345 |   2013-01-02 | 2013-04-12 |                     12 |
 |         12 |    12355 |   2013-03-01 |            |                     29 |
 |            |          |              |            |                        |

#+begin_latex
  \pagebreak
#+end_latex

【问题讨论】:

  • 你运行的是什么版本的组织模式?
  • 7.9.2,Ubuntu 13.04 中的默认版本。
  • 我发现了这个 SO 讨论,但不同之处在于 OP 不知道如何获得这种影响。我只是不知道为什么它只在部分时间工作。 stackoverflow.com/questions/698562/…

标签: emacs latex org-mode


【解决方案1】:

我让它在Org 8.0.3下成功导出。

导出

\section*{tRemovalEpisodes}
\label{sec-1}
A "removal" is a discrete event blah blah blah. This is all fine. 

\underline{Columns}
\begin{itemize}
\item removal\_id (int) is a Primary Key
\item child\_id (int) is a Foreign Key
\item removal\_date (date)
\item exit\_date (date)
\item primary\_removal\_reason (int)
\end{itemize}

\begin{center}
\begin{tabular}{r|r|r|r|r|}
removal\_id & child\_id & removal\_date & exit\_date & primary\_removal\_reason\\
\hline
1 & 12345 & 2012-01-01 & 2012-04-13 & 13\\
2 & 12346 & 2012-01-03 & 2013-02-14 & 22\\
3 & 12347 & 2012-04-02 &  & 12\\
4 & 12348 & 2012-09-05 & 2013-02-28 & 13\\
5 & 12349 & 2013-01-02 & 2013-04-12 & 56\\
6 & 12350 & 2013-03-01 &  & 13\\
7 & 12350 & 2012-01-01 & 2012-04-13 & 14\\
8 & 12351 & 2012-01-03 & 2013-02-14 & 10\\
9 & 12352 & 2012-04-02 &  & 11\\
10 & 12353 & 2012-09-05 & 2013-02-28 & 11\\
11 & 12345 & 2013-01-02 & 2013-04-12 & 12\\
12 & 12355 & 2013-03-01 &  & 29\\
 &  &  &  & \\
\end{tabular}
\end{center}

更新中

要升级到更新版本的组织模式,您可以按照Org FAQ 中的说明进行操作。

  1. 下载版本ziptarballhere
  2. 使用 git 保持最新状态:git clone git://www.orgmode.org/org-mode.git
  3. 使用ELPA 安装更新的版本。

【讨论】:

  • 嗯。谢谢。我今晚升级 org-mode 看看我得到了什么。我发现维护 Emacs 等工具的插件变得越来越复杂。试图保持一个安装工作​​,其中一些部分通过 apt-get 安装,一些通过 git 安装变得很麻烦。但是,这已经是我跟上 Solarized 主题的方式了,所以我想它并没有那么不同。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-07-01
  • 2023-03-16
相关资源
最近更新 更多