Advertisement
Guest User

latex.el

a guest
May 11th, 2013
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 11.17 KB | None | 0 0
  1.  
  2. ;; find the correct LaTeX directory
  3. (if (eq window-system 'mac)
  4.    (add-to-list 'exec-path "/usr/local/texlive/2012/bin/universal-darwin")
  5. )
  6.  
  7.  
  8. ;; =============================================================
  9. ;; === LATEX ;==============================================================
  10. (require 'org-latex)
  11. (setq org-latex-listings t)
  12.  
  13.  
  14. (unless (boundp 'org-latex-classes)
  15.   (setq org-latex-classes nil))
  16.  
  17. (add-to-list 'org-latex-classes
  18.   '("ilija"
  19. "\\documentclass[12pt]{article}
  20. \\usepackage{float}
  21. \\usepackage[breaklinks=true,linktocpage,pdftitle={\\@title},pdfauthor={\\@author},xetex]{hyperref}
  22. \\usepackage{algorithm}
  23. \\usepackage{amsmath}
  24. \\usepackage{ifxetex}
  25. \\ifxetex
  26.  \\usepackage{fontspec,xltxtra,xunicode}
  27.  \\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
  28.  \\setromanfont{Adobe Garamond Pro}
  29.  \\setsansfont{Arial}
  30.  \\setmonofont{Courier}
  31. \\else
  32.  \\usepackage[mathletters]{ucs}
  33.  \\usepackage[utf8x]{inputenc}
  34. \\fi
  35. \\usepackage{url}
  36. \\usepackage{graphicx}
  37. \\hypersetup{ colorlinks, citecolor=SteelBlue4,filecolor=SteelBlue4,linkcolor=SteelBlue4,urlcolor=SteelBlue4}
  38. \\usepackage[includeheadfoot,margin=2.2in,hmargin=2.2in,vmargin=1.5in]{geometry}
  39. \\usepackage{calc}
  40.  
  41. \\makeatletter
  42. \\def\\maketitle{
  43.  \\thispagestyle{empty}
  44.    \\vfill
  45.  \\begin{raggedright}
  46.  \\leavevmode
  47.    \\vskip 1cm
  48.    \{\\fontsize{50}{60}\\fontspec[Color=SteelBlue4,Opacity=0.2]{Adobe Garamond Pro}\\textbf{\\@title}\\par}
  49.    \\vskip 1cm
  50.    \\normalfont
  51.    \{\\fontsize{30}{40}{{\\textit{\\@author}\\par}}}
  52.  \\vfill
  53.        \{\\Large Peter Salazar}
  54.    \\newline
  55.          \{\\Large \\href{mailto:cycleofsong@gmail.com}{cycleofsong@gmail.com}}
  56.        \\newline
  57.          \{\\Large \\href{http://insert-site-here.com}{http://insert-site-here.com}}
  58.        \\newline
  59.    \{\\Large \\@date\\par}
  60.   \\end{raggedright}
  61.  \\null
  62.  \\cleardoublepage
  63. \}
  64. \\usepackage{fancyhdr}
  65. \\pagestyle{fancy}
  66. \\renewcommand{\\sectionmark}[1]{\\markboth{#1}{}}
  67. \\lhead{\\href{http://insert-site-here.com}{Peter Salazar}}
  68.  
  69. \\chead{}
  70. \\rhead{{\\@title}: {\\nouppercase{\\leftmark}}}
  71. \\lfoot{}
  72. \\cfoot{\\thepage}
  73. \\rfoot{}
  74. \\usepackage{listings}
  75. \\setlength{\\parindent}{0pt}
  76. \\setlength{\\parskip}{12pt plus 2pt minus 1pt}
  77. \\usepackage{fancyvrb}
  78. \\usepackage{enumerate}
  79. \\usepackage{ctable}
  80. \\setlength{\\paperwidth}{8.5in}
  81. \\setlength{\\paperheight}{11in}
  82.  \\tolerance=1000
  83. \\usepackage{tocloft}
  84. \\renewcommand{\\cftsecleader}{\\cftdotfill{\\cftdotsep}}
  85. \\usepackage[normalem]{ulem}
  86. \\usepackage[hyperref,x11names]{xcolor}
  87.  
  88. \\definecolor{ghostlygrey}{HTML}{000000}
  89. \\definecolor{parchment}{HTML}{FFFFFF}
  90.  
  91.  
  92.  
  93. \\makeatletter
  94. \\newcommand{\\globalcolor}[1]{%
  95.   \\color{#1}\\global\\let\\default@color\\current@color
  96. \}
  97. \\makeatother
  98.  
  99. \\AtBeginDocument{\\globalcolor{ghostlygrey}}
  100.  
  101. \\newcommand{\\textsubscr}[1]{\\ensuremath{_{\\scriptsize\\textrm{#1}}}}
  102.  
  103. \\usepackage{enumitem}
  104. \\setlist{nolistsep}
  105. \\renewcommand{\\labelitemi}{$\\bullet$}
  106. \\renewcommand{\\labelitemii}{$\\bullet$}
  107. \\renewcommand{\\labelitemiii}{$\\bullet$}
  108. \\renewcommand{\\labelitemiv}{$\\bullet$}
  109.  
  110. \\usepackage{titlesec}
  111. \\definecolor{firstcolor}{HTML}{345A8A}
  112. \\definecolor{secondcolor}{HTML}{FF7F00}
  113. \\titleformat*{\\section}{\\normalfont\\Large\\bfseries\\color{firstcolor}}
  114. \\titleformat*{\\subsection}{\\normalfont\\large\\bfseries\\color{secondcolor}}
  115. \\titleformat*{\\subsubsection}{\\normalfont\\normalsize\\bfseries\\color{SteelBlue4}}
  116. \\titleformat*{\\paragraph}{\\normalfont\\normalsize\\bfseries\\color{SteelBlue4}}
  117. \\titleformat*{\\subparagraph}{\\normalfont\\normalsize\\bfseries\\color{SteelBlue4}}
  118.  
  119.       [NO-DEFAULT-PACKAGES]
  120.       [NO-PACKAGES]"
  121.      ("\\section{%s}" . "\\section*{%s}")
  122.      ("\\subsection{%s}" . "\\subsection*{%s}")
  123.      ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
  124.      ("\\paragraph{%s}" . "\\paragraph*{%s}")
  125.      ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
  126.  
  127.  
  128. (setq org-latex-to-pdf-process
  129.   '("xelatex -interaction nonstopmode %f"
  130.      "xelatex -interaction nonstopmode %f")) ;; for multiple passes
  131.  
  132.  
  133.  
  134. (add-to-list 'org-latex-classes
  135.   '("invoice"
  136. "\\documentclass[12pt]{article}
  137. \\usepackage{float}
  138. \\usepackage[breaklinks=true,linktocpage,pdftitle={\\@title},pdfauthor={\\@author},xetex]{hyperref}
  139. \\usepackage{algorithm}
  140. \\usepackage{amsmath}
  141. \\usepackage{ifxetex}
  142. \\ifxetex
  143.  \\usepackage{fontspec,xltxtra,xunicode}
  144.  \\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
  145.  \\setromanfont{Adobe Garamond Pro}
  146.  \\setsansfont{Arial}
  147.  \\setmonofont{Courier}
  148. \\else
  149.  \\usepackage[mathletters]{ucs}
  150.  \\usepackage[utf8x]{inputenc}
  151. \\fi
  152. \\usepackage{url}
  153. \\usepackage{graphicx}
  154. \\hypersetup{ colorlinks, citecolor=SteelBlue4,filecolor=SteelBlue4,linkcolor=SteelBlue4,urlcolor=SteelBlue4}
  155. \\usepackage[includeheadfoot,margin=1in,hmargin=1.8in,vmargin=1in]{geometry}
  156. \\usepackage{calc}
  157.  
  158. \\makeatletter
  159. \\def\\maketitle{
  160.  \\thispagestyle{empty}
  161.    \\vfill
  162.  \\begin{raggedright}
  163.  \\leavevmode
  164.    \\vskip 1cm
  165.    \{\\fontsize{50}{60}\\fontspec[Color=SteelBlue4,Opacity=0.2]{Adobe Garamond Pro}\\textbf{\\@title}\\par}
  166.    \\vskip 1cm
  167.    \\normalfont
  168.    \{\\fontsize{30}{40}{{\\textit{\\@author}\\par}}}
  169.  \\vfill
  170.        \{\\Large Peter Salazar}
  171.    \\newline
  172.          \{\\Large \\href{mailto:cycleofsong@gmail.com}{cycleofsong@gmail.com}}
  173.        \\newline
  174.          \{\\Large \\href{http://insert-site-here.com}{http://insert-site-here.com}}
  175.        \\newline
  176.    \{\\Large \\@date\\par}
  177.   \\end{raggedright}
  178.  \\null
  179.  \\cleardoublepage
  180. \}
  181. \\usepackage{fancyhdr}
  182. \\pagestyle{fancy}
  183. \\renewcommand{\\sectionmark}[1]{\\markboth{#1}{}}
  184. \\lhead{\\href{http://insert-site-here.com}{Peter Salazar}}
  185.  
  186. \\chead{}
  187. \\rhead{{\\@title}: {\\nouppercase{\\leftmark}}}
  188. \\lfoot{}
  189. \\cfoot{\\thepage}
  190. \\rfoot{}
  191. \\usepackage{listings}
  192. \\setlength{\\parindent}{0pt}
  193. \\setlength{\\parskip}{12pt plus 2pt minus 1pt}
  194. \\usepackage{fancyvrb}
  195. \\usepackage{enumerate}
  196. \\usepackage{ctable}
  197. \\setlength{\\paperwidth}{8.5in}
  198. \\setlength{\\paperheight}{11in}
  199.  \\tolerance=1000
  200. \\usepackage{tocloft}
  201. \\renewcommand{\\cftsecleader}{\\cftdotfill{\\cftdotsep}}
  202. \\usepackage[normalem]{ulem}
  203. \\usepackage[hyperref,x11names]{xcolor}
  204.  
  205. \\definecolor{ghostlygrey}{HTML}{000000}
  206. \\definecolor{parchment}{HTML}{F0EDE3}
  207.  
  208.  
  209. \\makeatletter
  210. \\newcommand{\\globalcolor}[1]{%
  211.   \\color{#1}\\global\\let\\default@color\\current@color
  212. \}
  213. \\makeatother
  214.  
  215. \\AtBeginDocument{\\globalcolor{ghostlygrey}}
  216.  
  217. \\newcommand{\\textsubscr}[1]{\\ensuremath{_{\\scriptsize\\textrm{#1}}}}
  218.  
  219. \\usepackage{enumitem}
  220. \\setlist{nolistsep}
  221. \\renewcommand{\\labelitemi}{$\\bullet$}
  222. \\renewcommand{\\labelitemii}{$\\bullet$}
  223. \\renewcommand{\\labelitemiii}{$\\bullet$}
  224. \\renewcommand{\\labelitemiv}{$\\bullet$}
  225.  
  226. \\usepackage{titlesec}
  227. \\definecolor{firstcolor}{HTML}{345A8A}
  228. \\definecolor{secondcolor}{HTML}{FF7F00}
  229. \\titleformat*{\\section}{\\normalfont\\Large\\bfseries\\color{firstcolor}}
  230. \\titleformat*{\\subsection}{\\normalfont\\large\\bfseries\\color{secondcolor}}
  231. \\titleformat*{\\subsubsection}{\\normalfont\\normalsize\\bfseries\\color{SteelBlue4}}
  232. \\titleformat*{\\paragraph}{\\normalfont\\normalsize\\bfseries\\color{SteelBlue4}}
  233. \\titleformat*{\\subparagraph}{\\normalfont\\normalsize\\bfseries\\color{SteelBlue4}}
  234.  
  235.       [NO-DEFAULT-PACKAGES]
  236.       [NO-PACKAGES]"
  237.      ("\\section{%s}" . "\\section*{%s}")
  238.      ("\\subsection{%s}" . "\\subsection*{%s}")
  239.      ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
  240.      ("\\paragraph{%s}" . "\\paragraph*{%s}")
  241.      ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
  242.  
  243.  
  244. (setq org-latex-to-pdf-process
  245.   '("xelatex -interaction nonstopmode %f"
  246.      "xelatex -interaction nonstopmode %f")) ;; for multiple passes
  247.  
  248. (add-to-list 'org-latex-classes
  249.   '("ilija-non"
  250. "\\documentclass[12pt]{article}
  251. \\usepackage{float}
  252. \\usepackage[breaklinks=true,linktocpage,pdftitle={\\@title},pdfauthor={\\@author},xetex]{hyperref}
  253. \\usepackage{algorithm}
  254. \\usepackage{amsmath}
  255. \\usepackage{ifxetex}
  256. \\ifxetex
  257.  \\usepackage{fontspec,xltxtra,xunicode}
  258.  \\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
  259.  \\setromanfont{Adobe Garamond Pro}
  260.  \\setsansfont{Arial}
  261.  \\setmonofont{Courier}
  262. \\else
  263.  \\usepackage[mathletters]{ucs}
  264.  \\usepackage[utf8x]{inputenc}
  265. \\fi
  266. \\usepackage{url}
  267. \\usepackage{graphicx}
  268. \\hypersetup{ colorlinks, citecolor=SteelBlue4,filecolor=SteelBlue4,linkcolor=SteelBlue4,urlcolor=SteelBlue4}
  269. \\usepackage[includeheadfoot,margin=2.2in,hmargin=2.2in,vmargin=1.5in]{geometry}
  270. \\usepackage{calc}
  271.  
  272. \\makeatletter
  273. \\def\\maketitle{
  274.  \\thispagestyle{empty}
  275.    \\vfill
  276.  \\begin{raggedright}
  277.  \\leavevmode
  278.    \\vskip 1cm
  279.    \{\\fontsize{50}{60}\\fontspec[Color=SteelBlue4,Opacity=0.2]{Adobe Garamond Pro}\\textbf{\\@title}\\par}
  280.    \\vskip 1cm
  281.    \\normalfont
  282.    \{\\fontsize{30}{40}{{\\textit{\\@author}\\par}}}
  283.  \\vfill
  284.        \{\\Large Peter Salazar}
  285.    \\newline
  286.          \{\\Large \\href{mailto:cycleofsong@gmail.com}{cycleofsong@gmail.com}}
  287.        \\newline
  288.          \{\\Large \\href{http://insert-site-here.com}{http://insert-site-here.com}}
  289.        \\newline
  290.    \{\\Large \\@date\\par}
  291.   \\end{raggedright}
  292.  \\null
  293.  \\cleardoublepage
  294. \}
  295. \\usepackage{fancyhdr}
  296. \\pagestyle{fancy}
  297. \\renewcommand{\\sectionmark}[1]{\\markboth{#1}{}}
  298. \\lhead{\\href{http://insert-site-here.com}{Peter Salazar}}
  299.  
  300. \\chead{}
  301. \\rhead{{\\@title}: {\\nouppercase{\\leftmark}}}
  302. \\lfoot{}
  303. \\cfoot{\\thepage}
  304. \\rfoot{}
  305. \\usepackage{listings}
  306. \\setlength{\\parindent}{0pt}
  307. \\setlength{\\parskip}{12pt plus 2pt minus 1pt}
  308. \\usepackage{fancyvrb}
  309. \\usepackage{enumerate}
  310. \\usepackage{ctable}
  311. \\setlength{\\paperwidth}{8.5in}
  312. \\setlength{\\paperheight}{11in}
  313.  \\tolerance=1000
  314. \\usepackage{tocloft}
  315. \\renewcommand{\\cftsecleader}{\\cftdotfill{\\cftdotsep}}
  316. \\usepackage[normalem]{ulem}
  317. \\usepackage[hyperref,x11names]{xcolor}
  318.  
  319. \\definecolor{ghostlygrey}{HTML}{45462F}
  320. \\definecolor{parchment}{HTML}{F0EDE3}
  321.  
  322.  
  323. \\makeatletter
  324. \\newcommand{\\globalcolor}[1]{%
  325.   \\color{#1}\\global\\let\\default@color\\current@color
  326. \}
  327. \\makeatother
  328.  
  329. \\AtBeginDocument{\\globalcolor{ghostlygrey}}
  330.  
  331. \\newcommand{\\textsubscr}[1]{\\ensuremath{_{\\scriptsize\\textrm{#1}}}}
  332.  
  333. \\usepackage{enumitem}
  334. \\setlist{nolistsep}
  335. \\renewcommand{\\labelitemi}{$\\bullet$}
  336. \\renewcommand{\\labelitemii}{$\\bullet$}
  337. \\renewcommand{\\labelitemiii}{$\\bullet$}
  338. \\renewcommand{\\labelitemiv}{$\\bullet$}
  339.  
  340. \\usepackage{titlesec}
  341. \\definecolor{firstcolor}{HTML}{345A8A}
  342. \\definecolor{secondcolor}{HTML}{FF7F00}
  343. \\titleformat*{\\section}{\\normalfont\\Large\\bfseries\\color{firstcolor}}
  344. \\titleformat*{\\subsection}{\\normalfont\\large\\bfseries\\color{secondcolor}}
  345. \\titleformat*{\\subsubsection}{\\normalfont\\normalsize\\bfseries\\color{SteelBlue4}}
  346. \\titleformat*{\\paragraph}{\\normalfont\\normalsize\\bfseries\\color{SteelBlue4}}
  347. \\titleformat*{\\subparagraph}{\\normalfont\\normalsize\\bfseries\\color{SteelBlue4}}
  348.  
  349.       [NO-DEFAULT-PACKAGES]
  350.       [NO-PACKAGES]"
  351.      ("\\section{%s}" . "\\section*{%s}")
  352.      ("\\subsection{%s}" . "\\subsection*{%s}")
  353.      ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
  354.      ("\\paragraph{%s}" . "\\paragraph*{%s}")
  355.      ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement