llcc

An amateur in Emacs, but with enthusiastic


Navigation
» Home
» About Me
» Github
» XML Feed

org-mode导出到latex中的图片,表格,字符问题

29 May 2016 »

我通过 org-latex-image-default-width '.7\textwidth 命令将导出的图片宽度统一定义成0.7倍行宽,所以在整个org文件中无需添加 :width 定义图片的大小。同样可以通过该命令特殊指定某个图片的宽度,export将引用自定义width。图片的位置也可以通过 org-latex-default-figure-position '!htbp 进行设置。

科技文献中,表格均为三线表,latex中通过引用booktabs宏包添加toprule,centerrole和bottomrule即可实现该功能。org-mode中更为简单,只需要通过 org-latex-tables-booktabs t 开启booktabs功能即可默认实现该功能,同样不需要在org文件中指定。

由于org-mode可以自动识别_ 与 ^ 可以实现上角和下角的输出,但是不知道什么原因,有时候_ 会造成{\text}的问题,仍未解决。但是为了通过=org-latex-preview-fragment= 实现预览功能,将latex字符包在$ $中比较合适。

上述的问题已经成功解决,主要是因为在int-org.el中将相应功能关闭掉了。打开之后就一切正常了。

1 DONE Exported image width from org-mode to LaTeX

I am using org-mode to typeset my manuscript and reports for almost one year. Because all my writings always contains many figures, determining the width of exported figures seems like a must-do work for me.

Org-mode support three ways to determine the figure width:

  1. Define it in org-latex-image-actual-width globally. Assign a LaTeX like value 0.7\\textwidth to it to make all the figures exported as the corresponding width.
  2. The variable can also be setup specifically for files. Add #+bind: org-latex-image-actual-width '0.7\\textwidth' to any position of your file. It can make all the figures in this file exported by this width.
  3. Add #+latex_attr: 0.7\\textwidth above any figure, this figure will be exported by this width.