branch: externals/auctex commit a71a72d9eabb9c947893a21f59e4eaea8b08771f Author: Ikumi Keita <ik...@ikumi.que.jp> Commit: Ikumi Keita <ik...@ikumi.que.jp>
Add support for Japanese font command * tex-jp.el (): Append entries for mincho and gothic font commands to `LaTeX-font-list'. (japanese-latex-mode-initialization): Add font lock support to \textgt, \mathgt and \gtfamily commands for displaying with bold font in Emacs buffer. * doc/auctex.texi (Japanese): Mention new font commands and add indexes for them. --- doc/auctex.texi | 21 +++++++++++++++++++++ tex-jp.el | 15 +++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/doc/auctex.texi b/doc/auctex.texi index f414535..6ca2049 100644 --- a/doc/auctex.texi +++ b/doc/auctex.texi @@ -4685,6 +4685,27 @@ Also, the option @code{japanese-TeX-command-list} is considered as semi-obsolete. It still functions as before, but in theory, it is not required anymore in normal use. +The following two additional font commands are available in +@LaTeX{} mode buffer. + +@table @kbd +@item C-c C-f g +@kindex C-c C-f g +@cindex @code{\textgt} +Insert @b{gothic face} font command @samp{\textbf@{@point{}@}} or +@samp{\mathbf@{@point{}@}} depending on the context. + +@item C-c C-f m +@kindex C-c C-f m +@cindex @code{\textmc} +Insert mincho font command @samp{\textmc@{@point{}@}} or +@samp{\mathmc@{@point{}@}} depending on the context. + +@end table + +Although they are meaningful only with @samp{ptex} and @samp{uptex} +engines, it won't matter in buffers with other engines. + See @file{tex-jp.el} for more information. @node Automatic diff --git a/tex-jp.el b/tex-jp.el index dc70e27..4677dae 100644 --- a/tex-jp.el +++ b/tex-jp.el @@ -304,6 +304,13 @@ See also a user custom option `TeX-japanese-process-input-coding-system'." (setq LaTeX-style-list (append japanese-LaTeX-style-list LaTeX-style-list)) +;; text$B!A7O$NL@D+BN!&%4%7%C%/BN;XDj%3%^%s%I$O(B jLaTeX $B$K$O$J$$$h$&$G!"(B +;; (u)pLaTeX $B$G$7$+;H$($J$$$,!"LdBj$K$J$k$3$H$O$J$$$@$m$&!#(B +(setq LaTeX-font-list + (append '((?m "\\textmc{" "}" "\\mathmc{" "}") + (?g "\\textgt{" "}" "\\mathgt{" "}")) + LaTeX-font-list)) + ;;; Coding system (defun japanese-TeX-set-process-coding-system (process) @@ -511,6 +518,14 @@ Set `japanese-TeX-mode' to t, and enter `TeX-latex-mode'." ; (if (and (eq TeX-engine 'ptex) (executable-find "pbibtex")) ; "pBibTeX" "jBibTeX")) + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + ;; jLaTeX $B$K$O$J$$%3%^%s%I$@$,!"$=$l$O$b$&5$$K$7$J$/$F$$$$$@$m$&!#(B + (font-latex-add-keywords '(("textgt" "{") ("mathgt" "{")) + 'bold-command) + (font-latex-add-keywords '("gtfamily") + 'bold-declaration)) + ;; The value of `major-mode' should be `latex-mode', not ;; `japanese-latex-mode', because the name `latex-mode' is hard ;; coded in several places of AUCTeX like "(eq major-mode