sphinx-contrib / emojicodes

An extension to use emoji codes in your Sphinx documentation! 😍
https://sphinxemojicodes.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
50 stars 15 forks source link

Output in Latex #21

Closed sdelquin closed 3 years ago

sdelquin commented 4 years ago

Is it difficult to avoid writing out emojis when using pdflatex builder?

With pdflatex an error is issued. With xelatex a "question mark" is shown instead of the emoji. I have googled a bit and it's quite complicated to print out emojis using Latex.

I know the only directive at Sphinx, but it is mainly targeted for text blocks, not for inline text. Furthermore it makes documentation more verbose.

It would be fine to use your package if it would ignore emojies when using latex builders.

Peque commented 4 years ago

Thanks for reporting this issue! :blush:

It is probably not hard to ignore them for PDF output, pull requests are welcome. :stuck_out_tongue_winking_eye:

Although I would prefer aiming at actually printing them in the PDF documentation too. Emojis have a meaning and it would be better to maintain them in the PDF if possible.

sdelquin commented 4 years ago

Sure! Printing emojis also in PDF documentation would be the right way, but it seems too difficult to achieve due to the Latex builders 🙁

Peque commented 4 years ago

I don't know, I have not looked into it, but I would happily accept a PR just removing them from the PDF output if it is currently broken. Opening a new issue to maybe support them in the future somehow. :blush:

Peque commented 3 years ago

@sdelquin Can you try this and see if it works for you? https://github.com/sphinx-contrib/emojicodes/pull/22

It should, at least, display some emojis correctly. Still just in black and white and still no support for modifiers, but I guess it is better than nothing... :shrug:

sdelquin commented 3 years ago

I am not able to install Symbola font to work with Latex on MacOSX. It's quite difficult 😕

Peque commented 3 years ago

@sdelquin Can't help you with that, I am afraid. I will wait before merging to see if someone can try it and verify it works okay for them too. :blush:

sdelquin commented 3 years ago

Hi Peque! I'm very sorry because I got wrong with the installation of the Symbola font. It's as easy as a regular font installation on the system. I was checking this and because of that, it was so difficult.

Anyway, I tested #22 and it works! Emojis are printed out in black & white thought (it doesn't matter) 👍

Peque commented 3 years ago

Good news! :blush:

I merged https://github.com/sphinx-contrib/emojicodes/pull/22, and created https://github.com/sphinx-contrib/emojicodes/issues/25 to maybe enhance the current situation some day in the future. :stuck_out_tongue_winking_eye: