No special background for src-blocks and latex!
- change the size and method for latex fragments
This commit is contained in:
parent
1c8bbf965c
commit
8bc85e9074
@ -942,7 +942,7 @@ http://slumpy.org/blog/2017-02-01-automatic-latex-preview-in-org-mode/
|
|||||||
:message "you need to install the programs: pdflatex and imagemagick."
|
:message "you need to install the programs: pdflatex and imagemagick."
|
||||||
:image-input-type "pdf"
|
:image-input-type "pdf"
|
||||||
:image-output-type "png"
|
:image-output-type "png"
|
||||||
:image-size-adjust (0.6 . 0.6)
|
:image-size-adjust (0.4 . 0.4)
|
||||||
:latex-compiler ("pdflatex -interaction nonstopmode -output-directory %o %f")
|
:latex-compiler ("pdflatex -interaction nonstopmode -output-directory %o %f")
|
||||||
:image-converter ("convert -density %D -trim -antialias %f -quality 100 %O"))
|
:image-converter ("convert -density %D -trim -antialias %f -quality 100 %O"))
|
||||||
(dvipng
|
(dvipng
|
||||||
@ -951,7 +951,7 @@ http://slumpy.org/blog/2017-02-01-automatic-latex-preview-in-org-mode/
|
|||||||
:message "you need to install the programs: latex and dvipng."
|
:message "you need to install the programs: latex and dvipng."
|
||||||
:image-input-type "dvi"
|
:image-input-type "dvi"
|
||||||
:image-output-type "png"
|
:image-output-type "png"
|
||||||
:image-size-adjust (0.5 . 0.5)
|
:image-size-adjust (0.4 . 0.4)
|
||||||
:latex-compiler ("latex -interaction nonstopmode -output-directory %o %f")
|
:latex-compiler ("latex -interaction nonstopmode -output-directory %o %f")
|
||||||
:image-converter ("dvipng -D %D -T tight -o %O %f"))
|
:image-converter ("dvipng -D %D -T tight -o %O %f"))
|
||||||
(dvisvgm
|
(dvisvgm
|
||||||
@ -960,13 +960,13 @@ http://slumpy.org/blog/2017-02-01-automatic-latex-preview-in-org-mode/
|
|||||||
:message "you need to install the programs: latex and dvisvgm."
|
:message "you need to install the programs: latex and dvisvgm."
|
||||||
:image-input-type "dvi"
|
:image-input-type "dvi"
|
||||||
:image-output-type "svg"
|
:image-output-type "svg"
|
||||||
:image-size-adjust (0.7 . 0.7)
|
:image-size-adjust (0.6 . 0.6)
|
||||||
:latex-compiler ("latex -interaction nonstopmode -output-directory %o %f")
|
:latex-compiler ("latex -interaction nonstopmode -output-directory %o %f")
|
||||||
:image-converter ("dvisvgm %f -n -b min -c %S -o %O"))
|
:image-converter ("dvisvgm %f -n -b min -c %S -o %O"))
|
||||||
))
|
))
|
||||||
|
|
||||||
;; Use imagemagick/dvisvgm to generate png from pdf
|
;; Use imagemagick/dvisvgm to generate png from pdf
|
||||||
(setq org-preview-latex-default-process 'dvipng)
|
(setq org-preview-latex-default-process 'dvisvgm)
|
||||||
|
|
||||||
;; Colors of latex fragments
|
;; Colors of latex fragments
|
||||||
(setq org-format-latex-options (plist-put org-format-latex-options :foreground 'default))
|
(setq org-format-latex-options (plist-put org-format-latex-options :foreground 'default))
|
||||||
@ -1918,6 +1918,23 @@ Use the current window for C-c ' source editing
|
|||||||
(add-hook 'org-mode-hook #'tdh-org-prettify-symbols)
|
(add-hook 'org-mode-hook #'tdh-org-prettify-symbols)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(after! org
|
||||||
|
(set-face-attribute 'org-block nil :background (face-background 'fringe))
|
||||||
|
(set-face-attribute 'org-block-begin-line nil :background (face-background 'fringe))
|
||||||
|
(set-face-attribute 'org-block-end-line nil :background (face-background 'fringe))
|
||||||
|
)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
If required, it is possible to set custom colors for different source blocks
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
;; (after! org
|
||||||
|
;; (setq org-src-block-faces
|
||||||
|
;; '(("emacs-lisp" (:background (face-background 'org-block)))
|
||||||
|
;; ("matlab" (:background (face-background 'fringe)))))
|
||||||
|
;; )
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Library of Babel
|
** Library of Babel
|
||||||
Add all named source blocks to =org-babel-library-of-babel=.
|
Add all named source blocks to =org-babel-library-of-babel=.
|
||||||
|
|
||||||
@ -2207,10 +2224,9 @@ Actually this tangle the file and then go to the file. Maybe I would like to ign
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Face Attributes
|
** Face Attributes
|
||||||
#+begin_src emacs-lisp :tangle no
|
#+begin_src emacs-lisp
|
||||||
(after! tex
|
(with-eval-after-load 'font-latex
|
||||||
(set-face-attribute 'font-latex-math-face nil :foreground (face-foreground 'default))
|
(set-face-attribute 'font-latex-math-face nil :foreground (face-foreground 'default))
|
||||||
(set-face-attribute 'font-latex-math-face nil :background (face-background 'fringe))
|
|
||||||
)
|
)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user