0

I have an org document in which I inserted fontawesome characters (with the package fontawesome).

When exporting to html, the characters are exported as is instead of being exported in html fontawesome code. For instance, should get exported as:

<i class="fa fa-plus"></i>

I guess I could achieve this with some post-export hook. How would I do ?

Thanks

  • 1
    Maybe you can define your own special symbols by customizing org-entities-user. – Juancho Oct 6 '17 at 16:22
1

Thanks juancho's comment, I came out with a nice setting to set this up.

You can set org-entities-user like this for example.

'(org-entities-user
   (quote
     (("faCogs" "\\faCogs" nil "<i class=\"fa fa-cogs\"></i>" "=cogs=" "=cogs=" "")
     ("faPlus" "\\faPlus" nil "<i class=\"fa fa-plus\"></i>" "+" "+" ""))))

```

The "tofus" are the symbols in fontawesome.

In my orgmode document, I just need to do \faCogs, and with M-x org-toggle-pretty-entities, the fontawesome symbol appears.

1

You can use @@html:...@@, for example:

@@html:<i class="fa fa-plus"></i>@@

ref: Quoting HTML tags

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.