Created
April 6, 2017 16:41
-
-
Save 9999years/87f9c603be356de3156c48d7d5bb3ecc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% usage: \unicode[font]{codepoint}, e.g. \unicode[\emojifont]{1F60E} or \unicode{1F47D} | |
% requires --shell-escape be enabled (to use \write18) and curl to be in the path | |
% prints something like U+XXXX § SECTION SIGN | |
% note that the codepoint MUST be in all-caps, due to how \symbol works | |
\newcommand{\unicode}[2][] | |
{\immediate\write18{curl https://codepoints.net/api/v1/name/#2 -o .cp#2.txt} | |
\texttt{U+#2} {#1\symbol{"#2}} | |
\texttt{\input{.cp#2.txt}}\immediate\write18{del .cp#2.txt}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment