Custom styles are the answer. Just define a named character style "Awesome", or perhaps "Emoji" in case you change fonts with the right font in the right size[^1] in your reference-doc, and then in your markdown source: [๐Ÿ‘]{custom-style=Emoji} [^1]: This is assuming that your "word processor" can handle color fonts. If not Symbola is a good b/w alternative. If you do this a lot a Lua filter can save you some typing: ``````lua function Span (span) if span.classes:includes"emoji" then span.attributes['custom-style'] = "Emoji" return span end -- else return nil end `````` Now you can just type `[๐Ÿ‘]{.emoji}` and run pandoc with this filter. It works the same with divs and character styles. Den sรถn 23 jan. 2022 06:57Nandakumar Chandrasekhar skrev: > Dear Folks, > > Is there a way to change the font for a particular part of a DOCX word > document? > > I am using Source Sans Pro as the main font for my document but I am using > font awesome icons in some parts of the text for which I would like to > change the font to font-awesome so that they come up with right icons > instead of just squares. > > Is there a way to do this with a lua filter so that I do not have to go > into the and do some post processing? I will also like to change the font > color of these icons as well. > > I am able to achiever this in the PDF and HTML by writing some raw latex > and HTML respectively but I am not sure how to do this for DOCX. > > I am using a reference DOCX with some minor customizations for Font and > font size. > > I hope someone can lend me some insight. > > Thanks in advance, > Nanda > > -- > You received this message because you are subscribed to the Google Groups > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/073af144-65b8-488d-abca-08c77d84a764n%40googlegroups.com > > . > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhAguaj8X%3DzMAxS6M_BEKpTH1SrfMCcpVwf_gUyCfkgQcw%40mail.gmail.com.