{"id":5539,"date":"2017-02-08T18:23:04","date_gmt":"2017-02-08T17:23:04","guid":{"rendered":"http:\/\/www.thetawelle.de\/?p=5539"},"modified":"2019-08-17T16:13:41","modified_gmt":"2019-08-17T15:13:41","slug":"adding-emoji-to-your-latex-document","status":"publish","type":"post","link":"https:\/\/www.thetawelle.de\/?p=5539","title":{"rendered":"Adding Emoji to your LaTeX document"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-upload\/globe_emoji.png\" alt=\"\" width=\"281\" height=\"286\" class=\"alignright size-full wp-image-5543\" \/>I found a rather quick way to get emoji in my document. But this is the brute force quick way. The russian way. It always works but is not that elegant. PDF-images.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-upload\/emoji_pdf_files.png\" alt=\"\" width=\"509\" height=\"552\" class=\"aligncenter size-full wp-image-5546\" srcset=\"https:\/\/www.thetawelle.de\/wp-upload\/emoji_pdf_files.png 509w, https:\/\/www.thetawelle.de\/wp-upload\/emoji_pdf_files-277x300.png 277w\" sizes=\"auto, (max-width: 509px) 85vw, 509px\" \/><\/p>\n<h2>How to<\/h2>\n<ol>\n<li>Read this blog post <a href=\"http:\/\/www.alecjacobson.com\/weblog\/?p=4018\">&#8222;Emoji in LaTeX documents&#8220;<\/a><\/li>\n<li>Download the hires emoji-images in <a href=\"https:\/\/github.com\/alecjacobson\/coloremoji.sty\">this github-repo<\/a><\/li>\n<li>Search the <strong>emoji-PDF files<\/strong> you need for your document<\/li>\n<li>Copy them to the folder where your .tex-document resides<\/li>\n<li>Define a <strong>shortcut\/macro<\/strong> to include those emoji-PDF files you need<\/li>\n<li>Include the following code in your .tex-document<\/li>\n<\/ol>\n<pre class=\"brush: latex; gutter: false; title: Source\/Snippet; toolbar: true; notranslate\" title=\"Source\/Snippet\">\r\n\\usepackage{scalerel} % needed package to scale the pdf-images perfectly\r\n\\def\\emojithumbup{\\scalerel*{\\includegraphics{emoji_thumbup_1F44D.pdf}}{O}}\r\n\\def\\emojistar{\\scalerel*{\\includegraphics{emoji_star_2B50.pdf}}{0}}\r\n<\/pre>\n<h2>In your document<\/h2>\n<pre class=\"brush: latex; gutter: false; title: Source\/Snippet; toolbar: true; notranslate\" title=\"Source\/Snippet\">\r\nThis my five star rating\r\n\\emojistar\\emojistar\\emojistar\\emojistar\\emojistar\r\nI would say \\emojithumbup for this easy integration.\r\n<\/pre>\n<p><strong>Update 17.09.2019<\/strong><\/p>\n<p>There is a quite interesting LaTeX Website called <a href=\"http:\/\/texample.net\/tikz\/examples\/city\/\">texample.net<\/a> where you can see and learn lots of stuff about how to draw something in LaTeX. See following example:<\/p>\n<p><a href=\"\/wp-upload\/latex_city.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-upload\/latex_city.png\" alt=\"\" width=\"500\" height=\"422\" class=\"aligncenter size-full wp-image-6178\" srcset=\"https:\/\/www.thetawelle.de\/wp-upload\/latex_city.png 500w, https:\/\/www.thetawelle.de\/wp-upload\/latex_city-300x253.png 300w\" sizes=\"auto, (max-width: 500px) 85vw, 500px\" \/><\/a><\/p>\n<p>Erreicht wurde das Ergebnis mit zwei Zusatzpaketen f\u00fcr TeX:<\/p>\n<blockquote><p>TikZ and PGF are TeX packages for creating graphics programmatically. TikZ is build on top of PGF and allows you to create sophisticated graphics in a rather intuitive and easy manner.<\/p><\/blockquote>\n<h2>TikZ<\/h2>\n<p>Was ist TikZ? Nach dem Lesen der ersten Seiten des Manuals bin ich der Ansicht zumindest &#8222;T&#8220; steht f\u00fcr <strong>Till Tantau<\/strong> den Entwickler. Und <a href=\"https:\/\/en.wikipedia.org\/wiki\/PGF\/TikZ\">bei Wikipedia<\/a> steht, es stehe f\u00fcr &#8222;<strong>T<\/strong>ikZ <strong>i<\/strong>st <strong>k<\/strong>ein <strong>Z<\/strong>eichneprogramm&#8220;. Das das eine Rekursion mit Henne-Ei-Problem ist scheint dem Entwickler egal.<\/p>\n<blockquote><p>With TikZ you get all the advantages of the \u201cTEX-approach to typesetting\u201d for your graphics:<br \/>\nquick creation of simple graphics, precise positioning, the use of macros, often superior typography. You also<br \/>\ninherit all the disadvantages: steep learning curve, no wysiwyg, small changes require a long recompilation<br \/>\ntime, and the code does not really \u201cshow\u201d how things will look like.<br \/>\n[\u2026]<br \/>\nIn practice, TikZ is the only \u201cserious\u201d frontend for pg\n<\/p><\/blockquote>\n<h2>PGF<\/h2>\n<p>Was ist PGF? Jo, ich hab nach dem \u00dcberfliegen des Manuals (<a href=\"\/wp-upload\/pgfmanual_3.0.1a.pdf\">pgfmanual_3.0.1a<\/a>) immer noch keine Ahnung wof\u00fcr die Abk\u00fcrzung steht. Typisch <a href=\"http:\/\/www.tcs.uni-luebeck.de\/mitarbeiter\/tantau\/\"><del datetime=\"2019-08-17T14:32:23+00:00\">Mathematiker<\/del>Informatiker<\/a> mal wieder.<\/p>\n<blockquote><p>It turns out that there are actually two layers below TikZ. [\u2026] most users will only use TikZ and almost no one will use the system layer directly [\u2026]<\/p><\/blockquote>\n<p><small><strong>Why do I blog this?<\/strong> Because when I tried to integrate the <em>coloremoji.sty<\/em> class in my LaTeX document, I got a series of issues with conflicting textinput encodings not matching the one the coloremoji expects. This way your avoid any new encoding issues by directly integrating PDF-images which is what will happen anyway with that class. maybe you need to include <code>\\usepackage[pdftex]{graphicx}<\/code> too.<\/small><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I found a rather quick way to get emoji in my document. But this is the brute force quick way. The russian way. It always works but is not that elegant. PDF-images. How to Read this blog post &#8222;Emoji in LaTeX documents&#8220; Download the hires emoji-images in this github-repo Search the emoji-PDF files you need &hellip; <a href=\"https:\/\/www.thetawelle.de\/?p=5539\" class=\"more-link\"><span class=\"screen-reader-text\">\u201eAdding Emoji to your LaTeX document\u201c <\/span>weiterlesen<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,88,67,4,15],"tags":[],"class_list":["post-5539","post","type-post","status-publish","format-standard","hentry","category-best-practice","category-coding","category-english","category-learning","category-visualisierung"],"_links":{"self":[{"href":"https:\/\/www.thetawelle.de\/index.php?rest_route=\/wp\/v2\/posts\/5539","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thetawelle.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thetawelle.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thetawelle.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thetawelle.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5539"}],"version-history":[{"count":0,"href":"https:\/\/www.thetawelle.de\/index.php?rest_route=\/wp\/v2\/posts\/5539\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.thetawelle.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thetawelle.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thetawelle.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}