GithubHelp home page GithubHelp logo

coloremoji.sty's Introduction

coloremoji.sty

Style package for directly including color emojis in latex documents

Version 1.0
All files subject to the lppl 1.3c license.
Copyright Alec Jacobson, 2018.

Images in the emoji_images/ directory are generated using https://github.com/doraTeX/coloremoji/blob/master/extract_emoji.rb on a machine with the https://en.wikipedia.org/wiki/Apple_Color_Emoji font installed.

Installation

mkdir -p ~/Library/texmf/tex/latex/local
cd ~/Library/texmf/tex/latex/local
git clone [email protected]:alecjacobson/coloremoji.sty.git
texhash coloremoji.sty

Related blog entry

Examples

The following LaTeX code:

\documentclass{article}
\usepackage{coloremoji}
\begin{document}
Hello, 🌎.
\end{document}

produces something like:

Hello, world.

You can even use emojis in math. The following LaTeX code:

\[
🐊^{🐊^{🐊}} = ∫_{πŸŽƒ} πŸ™Š \ dπŸ€
\]

produces something like:

Emojis in math mode.

Known issues

This style sheet creates a PDF where each emoji is actually an embedded image rather than a character using the Apple Color Emoji typeface. This means you won't be able to correctly copy and paste emjois from the resulting .pdf files.

The encoding of the .tex must support emoji's, that is unicode characters. So switch your encoding to something like UTF-8.

coloremoji.sty's People

Contributors

alecjacobson avatar dpdmancul avatar drevicko avatar emichael avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

coloremoji.sty's Issues

Not working on Ubuntu 18.04

This package used to work beautifully on Ubuntu. Thanks for sharing it! However, I'm now experiencing the following problem when I try to compile the hello world example shown in the README:

$ pdflatex test.tex 
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2017-04-15>
Babel <3.18> and hyphenation patterns for 12 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/coloremoji/coloremoji.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def)))
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/stringenc.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdfescape.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty))))
(/usr/share/texlive/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3-code.tex)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3pdfmode.def)))
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3regex.sty
*****************************************************************
** 
** Package l3regex is obsolete and has been removed!
** 
** Its functionality is now only provided as part of the expl3 package.
** 
** The old packages will be removed entirely at the end of 2018.
** 
** Therefore, please replace '\usepackage{l3regex}'
** with '\usepackage{expl3}' in your documents as soon as possible.
** 
*******************************************************************

Package l3regex Warning: This package is obsolete --- use 'expl3' instead on in
put line 42.

) (/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/ucs/utf8x.def))
(/usr/share/texlive/texmf-dist/tex/latex/ucs/ucs.sty
(/usr/share/texlive/texmf-dist/tex/latex/ucs/data/uni-global.def))
(/usr/share/texlive/texmf-dist/tex/latex/adjustbox/adjustbox.sty
(/usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkvutils.tex)))
(/usr/share/texlive/texmf-dist/tex/latex/adjustbox/adjcalc.sty)
(/usr/share/texlive/texmf-dist/tex/latex/adjustbox/trimclip.sty
(/usr/share/texlive/texmf-dist/tex/latex/collectbox/collectbox.sty)
(/usr/share/texlive/texmf-dist/tex/latex/adjustbox/tc-pdftex.def))
(/usr/share/texlive/texmf-dist/tex/latex/ifoddpage/ifoddpage.sty)
(/usr/share/texlive/texmf-dist/tex/latex/varwidth/varwidth.sty))
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty))
Runaway argument?
{
! Forbidden control sequence found while scanning use of \bool_if:nTF.
<inserted text> 
                \par 
l.36 \bool_if:nTF { \xetex_if_engine_p:
                                        || \luatex_if_engine_p: }
? 

Any ideas about what's wrong here and how I can fix this? Thank you!

How did you build the pdfs?

Hi @alecjacobson,

Thanks for making this thing! It helped me a lot. I want to contribute to your repo and add some missing PDFs. Can you provide me with more info on how did you create the PDFs?

Thanks!

Undefined control sequence when building with pdflatex

Hi,

When following instructions (cloning repo in local and setting \usepackage{coloremoji} at top of my .tex file) im getting following error:

[LaTeX] Undefined control sequence \u-document-127920 #1->{\coloremoji
{🎰}} l.151             \end{frame}

I build with pdflatex*2

Thanks!

Use this with xelatex?

Is this supposed to work with xelatex? I see that xetex is mentioned in the source but when IΒ compile I get an error:

l.46 \DeclareUnicodeCharacter
                             {127462}{\coloremoji{πŸ‡¦}}

Sharelatex

Sorry to be such a noob, can you give directions on using ShareLatex https://www.sharelatex.com? I uploaded the coloremoji.sty into a document but then I get this as output:

Hello,[U+FFFD][U+FFFD].

Here is my ShareLatex document. Note I commented out one line since when it was there I only got Hello

Hello, .

\documentclass{article}
%\usepackage[utf8]{inputenc}
\usepackage{coloremoji}
\begin{document}
Hello, 🌎.
\end{document}

Emoji's showing up as ??

Alec: I'm placing this email discussion here for others to find:

Today I was thinking that I wish I could put an emoji in a homework set I was writing in LaTeX, and was very happy to stumble across your coloremoji.sty. I immediately downloaded and tried the example, but I am not getting the image to show up. I have attached my .tex, .log, and .pdf. I got these by running 'pdflatex foo.tex' from the terminal. The log file doesn't seem to show anything informative. Any troubleshooting ideas? Should I use the unicode instead of the world symbol? If so, what would that command be?

I think the problem is the encoding of the foo.tex file. If I just open up your foo.tex I already see Hello, ?? with two question marks. I deleted these and inserted the 🌎 emoji and then it seems to compile correctly.

Could you try downloading my attached .tex file?

What system are you running? I've only really tested on mac os x.

Yes that works! I am in Mac OS X, using the latest TeXShop. So do you use UTF-8 encoding for your tex source files?

I guess I must be by default. I'm just using vim from the terminal. It's saying your original file was dos encoding...

Yup if I switch texshop to use utf-8 by default it works great. I also see that I can drag and drop emojis from the character viewer menu, which is awesome.
Thanks!

Could you please update 3 emojis

Here are the three emojis: "😴", "πŸ€”", "πŸ€—", which are no included in the file. Could you please update the coloremoji.sty with these emojis? I do appreciate it!

missing l3regex

Hi, after running texhash I got this error while compiling:

Latexmk: Missing input file: 'l3regex.sty' from line
'! LaTeX Error: File `l3regex.sty' not found.'

This is using MiKTeX 2.9.7250 on Windows 10.

Subscript requires curly braces

Something like $Q_🌎 \in A_🌎$ should work fine. Instead, the pdflatex complains about the lack of curly braces and wants $Q_{🌎} \in A_{🌎}$.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.