添加忽略文件;文字高亮配置
This commit is contained in:
parent
edd282ae77
commit
163e367e33
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -15,3 +15,5 @@ org-roam.db
|
|||
server/
|
||||
*~
|
||||
eln-cache/
|
||||
bookmarks
|
||||
.org-id-locations
|
||||
|
|
|
@ -44,6 +44,8 @@
|
|||
"\\documentclass[10pt,a4paper]{article}
|
||||
\\usepackage{fontspec} % 引入 fontspec 包
|
||||
\\usepackage{xeCJK} % 引入 xeCJK 包处理中文
|
||||
\\usepackage{xcolor} % 引入xcolor
|
||||
\\definecolor{hltextcolor}{RGB}{255, 69, 0} % 配置颜色
|
||||
% 设置英文字体
|
||||
\\setmainfont{Consolas}
|
||||
\\setsansfont{Arial}
|
||||
|
@ -86,6 +88,15 @@
|
|||
(while (re-search-forward "hypersetup.*" nil t)
|
||||
(replace-match "")))
|
||||
|
||||
;; 高亮字体
|
||||
(defun org-latex-highlight-texttt (text backend info)
|
||||
"Highlight =text= with \\textcolor{hltextcolor}{\\texttt{}} in LaTeX export."
|
||||
(when (org-export-derived-backend-p backend 'latex)
|
||||
(replace-regexp-in-string "\\\\texttt{\\([^}]+\\)}" "\\\\textcolor{hltextcolor}{\\\\texttt{\\1}}" text)))
|
||||
|
||||
(add-to-list 'org-export-filter-final-output-functions 'org-latex-highlight-texttt)
|
||||
|
||||
|
||||
(add-hook 'org-export-before-processing-hook 'my/org-latex-remove-hypersetup)
|
||||
;; 配置 Org Babel 支持多种编程语言
|
||||
(org-babel-do-load-languages
|
||||
|
|
Loading…
Reference in New Issue
Block a user