auctex-devel
[Top][All Lists]
Advanced

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

Re: Provide style file for babel support for Brazilian


From: Arash Esbati
Subject: Re: Provide style file for babel support for Brazilian
Date: Sun, 02 May 2021 00:10:37 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50

Hi Gustavo,

Gustavo Barros <gusbrs.2016@gmail.com> writes:

> On Thu, 29 Apr 2021 at 11:50, Arash Esbati <arash@gnu.org> wrote:
>>
>> Can you please elaborate this?  Have you started the process and you
>> don't make progress?
>
> I have literally contacted assign@gnu.org twice, once in 2019, another
> in the past year, trying to sign the papers.  The clerks who answer to
> that email will probably tell you I cannot sign them due to employment
> restrictions.  I see it otherwise.  But I really wouldn't like to make
> an issue out of this, particularly not on the list.  If you feel you
> need more details on that, please write me personally, and I can
> expand.

Thanks for the explanation.  I thought the process was just taking too
long, if you had a discussion with FSF clerk, I think I'm fine.

> Thank you very much for taking up on this!

Thank you for your comments.  The next incarnation looks like this:

--8<---------------cut here---------------start------------->8---
;;; Code:

(require 'tex)
(require 'latex)

;; Silence the compiler:
(declare-function font-latex-add-quotes
                  "font-latex"
                  (quotes))

(declare-function font-latex-add-to-syntax-alist
                  "font-latex"
                  (list))

(defvar LaTeX-brazilian-mode-syntax-table
  (copy-syntax-table LaTeX-mode-syntax-table)
  "Syntax table used in LaTeX mode when using `brazilian' language.")

(modify-syntax-entry ?\" "w" LaTeX-brazilian-mode-syntax-table)

(TeX-add-style-hook
 "brazilian"
 (lambda ()
   (set-syntax-table LaTeX-brazilian-mode-syntax-table)
   (unless (eq (car TeX-quote-language) 'override)
     (setq TeX-quote-language nil))
   (setq LaTeX-babel-hyphen-language "brazilian")
   (TeX-add-symbols
    '("ord"  0)
    '("ro"   0)
    '("orda" 0)
    '("ra"   0))
   ;; Fontification
   (when (and (eq TeX-install-font-lock 'font-latex-setup)
              (featurep 'font-latex))
     (font-latex-add-quotes '("\"<" "\">" french))
     ;; Prevent "| from leading to color bleed.
     (font-latex-add-to-syntax-alist (list (cons ?\" "\\"))))
   (run-hooks 'TeX-language-br-hook))
 TeX-dialect)

;;; brazilian.el ends here
--8<---------------cut here---------------end--------------->8---

Please comment.

>>    (run-hooks 'TeX-language-br-hook))
>
> I have here `TeX-language-pt-BR-hook', and I don't recall why.  Why
> did you go with just "br" there?

All other styles use this pattern, this is the reason why I took it.
Have a look over here[1].

> However, quotation marks practices is not something that babel
> determines.  True, it enables the "< "> guillemots shorthands for all,
> but that's actually not what we use in Brazil.

Thanks, I removed that from the Brazilian style; maybe we change it for
Portugues.

Best, Arash

Footnotes:
[1]  https://www.gnu.org/software/auctex/manual/auctex.html#European




reply via email to

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