Files
dot-emacs/lisp/init-latex.el

35 lines
997 B
EmacsLisp

;; -*- lexical-binding: nil; -*-
(setopt text-mode-ispell-word-completion nil)
(defface punctuation-error-face
'((t (:foreground "Red")))
"red"
:group 'latex)
(defun tvd-latex-punctuation()
"Highlight german speech punctuation errors. See https://korrektur.de/woertliche-rede-zeichensetzung.
The following errors are highlighted:
- a dot following closing quotes, as: ``done''.
- a dot before the closing quote if followed by a comma, as: ``boo.'', sagte er.
- an uppercase word following an opening quote after a comma, as: ... said, ``Doch.''"
(interactive)
(highlight-regexp "''\\." 'punctuation-error-face)
(highlight-regexp "\\.''," 'punctuation-error-face)
(highlight-regexp ", ``[A-Z]" 'punctuation-error-face))
(use-package latex
:ensure nil
:mode
("\\.tex\\'" . latex-mode))
(add-hook 'latex-mode-hook
(lambda ()
(add-hook 'completion-at-point-functions #'dabbrev-capf 20 t)
(tvd-latex-punctuation)))
(provide 'init-latex)