Rendering PDF from Markdown file with literal emoji characters using Pandoc
I'd like to convert markdown text like:
This is a smile 😀
To a PDF with the emoji on it. To be clear, I want to be able to insert the emoji character itself in the source text, not something like :smile:
.
How can I do this with Pandoc?
markdown pandoc
add a comment |
I'd like to convert markdown text like:
This is a smile 😀
To a PDF with the emoji on it. To be clear, I want to be able to insert the emoji character itself in the source text, not something like :smile:
.
How can I do this with Pandoc?
markdown pandoc
add a comment |
I'd like to convert markdown text like:
This is a smile 😀
To a PDF with the emoji on it. To be clear, I want to be able to insert the emoji character itself in the source text, not something like :smile:
.
How can I do this with Pandoc?
markdown pandoc
I'd like to convert markdown text like:
This is a smile 😀
To a PDF with the emoji on it. To be clear, I want to be able to insert the emoji character itself in the source text, not something like :smile:
.
How can I do this with Pandoc?
markdown pandoc
markdown pandoc
asked Oct 14 at 20:45
hsribei
2,65793130
2,65793130
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Try replacing the :smile:
with HTML like so:
This is a smile <img src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f604.png"/>
1
Thing is I have sources with literal emoji already and I'm specifically trying to not have to replace them with anything, but have the unicode characters be properly rendered directly.
– hsribei
Oct 22 at 23:36
add a comment |
After initially having read the OP too superficially (overlooking his need to NOT use :smile:
& friends in his source Markdown), here is a better answer. Try one of these:
pandoc -o emoji.pdf --pdf-engine=lualatex -V mainfonts="DejaVu Sans"
pandoc -o emoji.pdf --pdf-engine=xelatex -V mainfonts="DejaVu Sans"
If you use the default pdf-engine (pdflatex
), you'll not succeed, but get an error like
! Package inputenc Error: Unicode character 😀 (U+1F600)
(inputenc) not set up for use with LaTeX.
If you do not specify the mainfonts
param, you'll get an warning message of
[WARNING] Missing character: There is no 😄 (U+1F604) in font [lmroman10-regular]:+tlig;
for XeLaTeX and of
[WARNING] Missing character: There is no 😄 in font [lmroman10-regular]:mapping=tex-text;!
for LuaLaTeX. While both will be producing a PDF, they'll have no emoji where you wanted it.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1366748%2frendering-pdf-from-markdown-file-with-literal-emoji-characters-using-pandoc%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try replacing the :smile:
with HTML like so:
This is a smile <img src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f604.png"/>
1
Thing is I have sources with literal emoji already and I'm specifically trying to not have to replace them with anything, but have the unicode characters be properly rendered directly.
– hsribei
Oct 22 at 23:36
add a comment |
Try replacing the :smile:
with HTML like so:
This is a smile <img src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f604.png"/>
1
Thing is I have sources with literal emoji already and I'm specifically trying to not have to replace them with anything, but have the unicode characters be properly rendered directly.
– hsribei
Oct 22 at 23:36
add a comment |
Try replacing the :smile:
with HTML like so:
This is a smile <img src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f604.png"/>
Try replacing the :smile:
with HTML like so:
This is a smile <img src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f604.png"/>
answered Oct 18 at 7:52
Adam J Limbert
171112
171112
1
Thing is I have sources with literal emoji already and I'm specifically trying to not have to replace them with anything, but have the unicode characters be properly rendered directly.
– hsribei
Oct 22 at 23:36
add a comment |
1
Thing is I have sources with literal emoji already and I'm specifically trying to not have to replace them with anything, but have the unicode characters be properly rendered directly.
– hsribei
Oct 22 at 23:36
1
1
Thing is I have sources with literal emoji already and I'm specifically trying to not have to replace them with anything, but have the unicode characters be properly rendered directly.
– hsribei
Oct 22 at 23:36
Thing is I have sources with literal emoji already and I'm specifically trying to not have to replace them with anything, but have the unicode characters be properly rendered directly.
– hsribei
Oct 22 at 23:36
add a comment |
After initially having read the OP too superficially (overlooking his need to NOT use :smile:
& friends in his source Markdown), here is a better answer. Try one of these:
pandoc -o emoji.pdf --pdf-engine=lualatex -V mainfonts="DejaVu Sans"
pandoc -o emoji.pdf --pdf-engine=xelatex -V mainfonts="DejaVu Sans"
If you use the default pdf-engine (pdflatex
), you'll not succeed, but get an error like
! Package inputenc Error: Unicode character 😀 (U+1F600)
(inputenc) not set up for use with LaTeX.
If you do not specify the mainfonts
param, you'll get an warning message of
[WARNING] Missing character: There is no 😄 (U+1F604) in font [lmroman10-regular]:+tlig;
for XeLaTeX and of
[WARNING] Missing character: There is no 😄 in font [lmroman10-regular]:mapping=tex-text;!
for LuaLaTeX. While both will be producing a PDF, they'll have no emoji where you wanted it.
add a comment |
After initially having read the OP too superficially (overlooking his need to NOT use :smile:
& friends in his source Markdown), here is a better answer. Try one of these:
pandoc -o emoji.pdf --pdf-engine=lualatex -V mainfonts="DejaVu Sans"
pandoc -o emoji.pdf --pdf-engine=xelatex -V mainfonts="DejaVu Sans"
If you use the default pdf-engine (pdflatex
), you'll not succeed, but get an error like
! Package inputenc Error: Unicode character 😀 (U+1F600)
(inputenc) not set up for use with LaTeX.
If you do not specify the mainfonts
param, you'll get an warning message of
[WARNING] Missing character: There is no 😄 (U+1F604) in font [lmroman10-regular]:+tlig;
for XeLaTeX and of
[WARNING] Missing character: There is no 😄 in font [lmroman10-regular]:mapping=tex-text;!
for LuaLaTeX. While both will be producing a PDF, they'll have no emoji where you wanted it.
add a comment |
After initially having read the OP too superficially (overlooking his need to NOT use :smile:
& friends in his source Markdown), here is a better answer. Try one of these:
pandoc -o emoji.pdf --pdf-engine=lualatex -V mainfonts="DejaVu Sans"
pandoc -o emoji.pdf --pdf-engine=xelatex -V mainfonts="DejaVu Sans"
If you use the default pdf-engine (pdflatex
), you'll not succeed, but get an error like
! Package inputenc Error: Unicode character 😀 (U+1F600)
(inputenc) not set up for use with LaTeX.
If you do not specify the mainfonts
param, you'll get an warning message of
[WARNING] Missing character: There is no 😄 (U+1F604) in font [lmroman10-regular]:+tlig;
for XeLaTeX and of
[WARNING] Missing character: There is no 😄 in font [lmroman10-regular]:mapping=tex-text;!
for LuaLaTeX. While both will be producing a PDF, they'll have no emoji where you wanted it.
After initially having read the OP too superficially (overlooking his need to NOT use :smile:
& friends in his source Markdown), here is a better answer. Try one of these:
pandoc -o emoji.pdf --pdf-engine=lualatex -V mainfonts="DejaVu Sans"
pandoc -o emoji.pdf --pdf-engine=xelatex -V mainfonts="DejaVu Sans"
If you use the default pdf-engine (pdflatex
), you'll not succeed, but get an error like
! Package inputenc Error: Unicode character 😀 (U+1F600)
(inputenc) not set up for use with LaTeX.
If you do not specify the mainfonts
param, you'll get an warning message of
[WARNING] Missing character: There is no 😄 (U+1F604) in font [lmroman10-regular]:+tlig;
for XeLaTeX and of
[WARNING] Missing character: There is no 😄 in font [lmroman10-regular]:mapping=tex-text;!
for LuaLaTeX. While both will be producing a PDF, they'll have no emoji where you wanted it.
edited Dec 17 at 16:12
answered Dec 14 at 23:30
Kurt Pfeifle
9,18713555
9,18713555
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1366748%2frendering-pdf-from-markdown-file-with-literal-emoji-characters-using-pandoc%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown