emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] allow italic quote marks? org-emphasis-regexp-components


From: Rasmus
Subject: Re: [O] allow italic quote marks? org-emphasis-regexp-components
Date: Thu, 18 Jun 2015 20:58:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Marcin Borkowski <address@hidden> writes:

> On 2015-06-18, at 18:02, Kaushal <address@hidden> wrote:
>
>> A quick google search comes up this these:
>>
>> http://tex.stackexchange.com/questions/83440/inputenc-error-unicode-char-u8-not-set-up-for-use-with-latex
>> http://tex.stackexchange.com/questions/4268/inputenc-error-unicode-char-u8-error-while-trying-to-write-a-degree-symbol
>>
>> Based on those solutions, may be you can add
>>
>> \DeclareUnicodeCharacter{200b}{}
>>
>> I haven't tried it, so cannot guarantee if that will work.
>
> Thanks, I'll check it in my Spare Time™.

I use something like this:

  (defcustom rasmus/org-latex-unicode-to-tex  '((" " "~")
                                              (" " "\\,")
                                              ("​" ""))
    "list of re rep pairs which are replaced during latex export")
  
  (defun rasmus/org-latex-unicode-to-tex (text backend info)
    "Replace unicode strings with their TeX equivalents.

Currently:  ' ' (no break space) to '~'
            ' ' (thin space) to '\,'
            '​'  (zero width space) to ''."
    (when (org-export-derived-backend-p backend 'latex)
      (cl-loop for (re rep) in rasmus/org-latex-unicode-to-tex do
               (setq text (replace-regexp-in-string re rep text t t)))
      text))
  
  (add-to-list 'org-export-filter-final-output-functions
               'rasmus/org-latex-unicode-to-tex)



-- 
Sådan en god dansk lagereddike kan man slet ikke bruge mere




reply via email to

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