emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/auctex a71a72d 74/95: Add support for Japanese font com


From: Tassilo Horn
Subject: [elpa] externals/auctex a71a72d 74/95: Add support for Japanese font command
Date: Sun, 16 Apr 2017 01:26:58 -0400 (EDT)

branch: externals/auctex
commit a71a72d9eabb9c947893a21f59e4eaea8b08771f
Author: Ikumi Keita <address@hidden>
Commit: Ikumi Keita <address@hidden>

    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
address@hidden mode buffer.
+
address@hidden @kbd
address@hidden C-c C-f g
address@hidden C-c C-f g
address@hidden @code{\textgt}
+Insert @b{gothic face} font command @address@hidden@address@hidden or
address@hidden@address@hidden@}} depending on the context.
+
address@hidden C-c C-f m
address@hidden C-c C-f m
address@hidden @code{\textmc}
+Insert mincho font command @address@hidden@address@hidden or
address@hidden@address@hidden@}} depending on the context.
+
address@hidden 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))
 
+;; address@hidden&%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$$$,!"address@hidden&!#(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 address@hidden,!"$=$l$O$b$&5$$K$7$J$/address@hidden&!#(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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]