Giter Site home page Giter Site logo

an.emacs.tutorial.for.vim.user's Introduction

Introduction

This file IS NOT the tutorial, and the pdf file in the repo is that.

This file is an introduction to those who want to modify the org file and export it to pdf files on their local environment.

Change log

2015-01-13 update settings about org-mode

My environment

I write this document in Emacs 24.3.1 with org-mode 8.3beta.

According to my experience, there are some changes between org-mode 7.9 and 8.3beta. So I suggest you'd better use org-mode greater than 8.0 to export the org file.

org-mode LaTeX settings

Here is my settings about org-mode

; org-mode export to latex
(require 'ox-latex)
(setq org-export-latex-listings t)
; org-mode source code setup in exporting to latex
(add-to-list 'org-latex-listings '("" "listings"))
(add-to-list 'org-latex-listings '("" "color"))

(add-to-list 'org-latex-packages-alist
             '("" "hyperref" t))
(add-to-list 'org-latex-packages-alist
         '("" "xcolor" t))
(add-to-list 'org-latex-packages-alist
         '("" "listings" t))
(add-to-list 'org-latex-packages-alist
         '("" "fontspec" t))
(add-to-list 'org-latex-packages-alist
         '("" "indentfirst" t))
(add-to-list 'org-latex-packages-alist
         '("" "xunicode" t))
(add-to-list 'org-latex-packages-alist
         '("" "amsmath"))
(add-to-list 'org-latex-packages-alist
         '("" "graphicx" t))

(add-to-list 'org-latex-classes
          '("my-org-book-zh"
"\\documentclass{book}
\\usepackage[slantfont, boldfont]{xeCJK}
% chapter set
\\usepackage[Lenny]{fncychap}
[NO-DEFAULT-PACKAGES]
[PACKAGES]
\\setCJKmainfont{SimSun} % 设置缺省中文字体
\\parindent 2em

\\setmainfont{DejaVu Sans} % 英文衬线字体
\\setsansfont{DejaVu Serif} % 英文无衬线字体
\\setmonofont{DejaVu Sans Mono} % 英文等宽字体
%\\punctstyle{DejaVu Sans} % 开明式标点格式


\\defaultfontfeatures{Mapping=tex-text} %如果没有它,会有一些 tex 特殊字符无法正常使用,比如连字符。

% 中文断行
\\XeTeXlinebreaklocale \"zh\"
\\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt

% 代码设置
\\lstset{numbers=left, 
numberstyle= \\tiny, 
keywordstyle= \\color{ blue!70},commentstyle=\\color{red!50!green!50!blue!50}, 
frame=shadowbox, 
breaklines=true,
rulesepcolor= \\color{ red!20!green!20!blue!20} 
} 

[EXTRA]
"
             ("\\chapter{%s}" . "\\chapter*{%s}")
             ("\\section{%s}" . "\\section*{%s}")
             ("\\subsection{%s}" . "\\subsection*{%s}")
             ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
             ("\\paragraph{%s}" . "\\paragraph*{%s}")
             ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

(setq org-latex-pdf-process
      '("xelatex -interaction nonstopmode %b"
    "xelatex -interaction nonstopmode %b"))

; org-mode babel load languages
(org-babel-do-load-languages
 'org-babel-load-languages
 '((ditaa . t)
   (shell . t)))

an.emacs.tutorial.for.vim.user's People

Contributors

init0xyz avatar w0mtea avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.