Changing “language” settings used by Pandoc for generated output [Pandoc template variables]
This is not directly a LaTeX question since I use Markdown to format my text but this subpart of "stack" seems the most correct place to ask my question.
I generate my PDF with Pandoc from markdown using the command:
pandoc myDoc.md --chapters -o result.pdf
Where it generates chapters from my markdown. This is nice, however it calls the chapters "Chapter 1", "Chapter 2" and so on and so forth (See http://cl.ly/PfRJ ). For English documents this would be okay. However my documents are in Dutch.
Is there any way I can change this? I think there is a template somewhere where it stores these things? But I can't seem to find it.
chapters pandoc markdown
add a comment |
This is not directly a LaTeX question since I use Markdown to format my text but this subpart of "stack" seems the most correct place to ask my question.
I generate my PDF with Pandoc from markdown using the command:
pandoc myDoc.md --chapters -o result.pdf
Where it generates chapters from my markdown. This is nice, however it calls the chapters "Chapter 1", "Chapter 2" and so on and so forth (See http://cl.ly/PfRJ ). For English documents this would be okay. However my documents are in Dutch.
Is there any way I can change this? I think there is a template somewhere where it stores these things? But I can't seem to find it.
chapters pandoc markdown
1
Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you.
– Kurt
Jun 14 '13 at 10:56
add a comment |
This is not directly a LaTeX question since I use Markdown to format my text but this subpart of "stack" seems the most correct place to ask my question.
I generate my PDF with Pandoc from markdown using the command:
pandoc myDoc.md --chapters -o result.pdf
Where it generates chapters from my markdown. This is nice, however it calls the chapters "Chapter 1", "Chapter 2" and so on and so forth (See http://cl.ly/PfRJ ). For English documents this would be okay. However my documents are in Dutch.
Is there any way I can change this? I think there is a template somewhere where it stores these things? But I can't seem to find it.
chapters pandoc markdown
This is not directly a LaTeX question since I use Markdown to format my text but this subpart of "stack" seems the most correct place to ask my question.
I generate my PDF with Pandoc from markdown using the command:
pandoc myDoc.md --chapters -o result.pdf
Where it generates chapters from my markdown. This is nice, however it calls the chapters "Chapter 1", "Chapter 2" and so on and so forth (See http://cl.ly/PfRJ ). For English documents this would be okay. However my documents are in Dutch.
Is there any way I can change this? I think there is a template somewhere where it stores these things? But I can't seem to find it.
chapters pandoc markdown
chapters pandoc markdown
edited May 27 '15 at 9:50
Andrew
30.6k34381
30.6k34381
asked Jun 14 '13 at 10:22
MatthijnMatthijn
19015
19015
1
Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you.
– Kurt
Jun 14 '13 at 10:56
add a comment |
1
Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you.
– Kurt
Jun 14 '13 at 10:56
1
1
Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you.
– Kurt
Jun 14 '13 at 10:56
Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you.
– Kurt
Jun 14 '13 at 10:56
add a comment |
4 Answers
4
active
oldest
votes
You can pass the lang option to the template using -V which passes it further to the babel package.
pandoc -V lang=dutch somefile.markdown
This is translated to the following LaTeX code which should result in dutch chapter headings.
usepackage[dutch]{babel}
Awesome, I don't even need to change any templates which I thought was needed. Thanks for the solution.
– Matthijn
Jun 14 '13 at 11:33
This is right, however for some purposes i.e. bibliographies with pandoc-citeproc you will need to set the language as metadata (use-Mrather than-V). This will also set the variable. This is explained here: pandoc.org/README.html#reader-options
– twsh
Mar 2 '16 at 21:16
3
Can you write 'dutch'? I thought you needed to use a code like 'nl'.
– twsh
Mar 2 '16 at 21:19
add a comment |
It's quite simple. You have to pass the following parameter to the pandoc call.
-V lang=de
You'll have to use language parameters according to BCP 47 (like en-GB, fr, de...)
The exact behavior is described here: http://pandoc.org/README.html#language-variables
add a comment |
@Marco already answered your main question. However, this one is still open:
" I think there is somewhere a template where it stores these things? But I can't seem to find it."
If you do not refer a specific template on the Pandoc command line with --template=my-latex-template.tex, then Pandoc will use an internally available template.
Pandoc has such templates for (almost) all output formats it can generate.
You can print that template for LaTeX with the following command:
pandoc -D latex | tee pandoc-default-template.latex
If you open that template in a text editor, you'll see where it uses variables:
- These variables look like
$varname$-- that is, they are enclosed in$characters. - You can see what the variable names are.
- You can see how you can influence the outcome of the generated document by using the command line switch:
-V varname="some value"or--variable=varname:"some value".
add a comment |
You can also use YAML metadata to store the language settings.
---
lang: nl
---
Add this at the top of your markdown file. You don't need to modify your pandoc command.
Welcome to TeX.SE! Can you please add an complete example or can you add an screenshot of your solution for a fast proof?
– Kurt
Jan 20 at 22:58
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2ftex.stackexchange.com%2fquestions%2f119132%2fchanging-language-settings-used-by-pandoc-for-generated-output-pandoc-templat%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can pass the lang option to the template using -V which passes it further to the babel package.
pandoc -V lang=dutch somefile.markdown
This is translated to the following LaTeX code which should result in dutch chapter headings.
usepackage[dutch]{babel}
Awesome, I don't even need to change any templates which I thought was needed. Thanks for the solution.
– Matthijn
Jun 14 '13 at 11:33
This is right, however for some purposes i.e. bibliographies with pandoc-citeproc you will need to set the language as metadata (use-Mrather than-V). This will also set the variable. This is explained here: pandoc.org/README.html#reader-options
– twsh
Mar 2 '16 at 21:16
3
Can you write 'dutch'? I thought you needed to use a code like 'nl'.
– twsh
Mar 2 '16 at 21:19
add a comment |
You can pass the lang option to the template using -V which passes it further to the babel package.
pandoc -V lang=dutch somefile.markdown
This is translated to the following LaTeX code which should result in dutch chapter headings.
usepackage[dutch]{babel}
Awesome, I don't even need to change any templates which I thought was needed. Thanks for the solution.
– Matthijn
Jun 14 '13 at 11:33
This is right, however for some purposes i.e. bibliographies with pandoc-citeproc you will need to set the language as metadata (use-Mrather than-V). This will also set the variable. This is explained here: pandoc.org/README.html#reader-options
– twsh
Mar 2 '16 at 21:16
3
Can you write 'dutch'? I thought you needed to use a code like 'nl'.
– twsh
Mar 2 '16 at 21:19
add a comment |
You can pass the lang option to the template using -V which passes it further to the babel package.
pandoc -V lang=dutch somefile.markdown
This is translated to the following LaTeX code which should result in dutch chapter headings.
usepackage[dutch]{babel}
You can pass the lang option to the template using -V which passes it further to the babel package.
pandoc -V lang=dutch somefile.markdown
This is translated to the following LaTeX code which should result in dutch chapter headings.
usepackage[dutch]{babel}
answered Jun 14 '13 at 10:40
MarcoMarco
24.1k26999
24.1k26999
Awesome, I don't even need to change any templates which I thought was needed. Thanks for the solution.
– Matthijn
Jun 14 '13 at 11:33
This is right, however for some purposes i.e. bibliographies with pandoc-citeproc you will need to set the language as metadata (use-Mrather than-V). This will also set the variable. This is explained here: pandoc.org/README.html#reader-options
– twsh
Mar 2 '16 at 21:16
3
Can you write 'dutch'? I thought you needed to use a code like 'nl'.
– twsh
Mar 2 '16 at 21:19
add a comment |
Awesome, I don't even need to change any templates which I thought was needed. Thanks for the solution.
– Matthijn
Jun 14 '13 at 11:33
This is right, however for some purposes i.e. bibliographies with pandoc-citeproc you will need to set the language as metadata (use-Mrather than-V). This will also set the variable. This is explained here: pandoc.org/README.html#reader-options
– twsh
Mar 2 '16 at 21:16
3
Can you write 'dutch'? I thought you needed to use a code like 'nl'.
– twsh
Mar 2 '16 at 21:19
Awesome, I don't even need to change any templates which I thought was needed. Thanks for the solution.
– Matthijn
Jun 14 '13 at 11:33
Awesome, I don't even need to change any templates which I thought was needed. Thanks for the solution.
– Matthijn
Jun 14 '13 at 11:33
This is right, however for some purposes i.e. bibliographies with pandoc-citeproc you will need to set the language as metadata (use
-M rather than -V). This will also set the variable. This is explained here: pandoc.org/README.html#reader-options– twsh
Mar 2 '16 at 21:16
This is right, however for some purposes i.e. bibliographies with pandoc-citeproc you will need to set the language as metadata (use
-M rather than -V). This will also set the variable. This is explained here: pandoc.org/README.html#reader-options– twsh
Mar 2 '16 at 21:16
3
3
Can you write 'dutch'? I thought you needed to use a code like 'nl'.
– twsh
Mar 2 '16 at 21:19
Can you write 'dutch'? I thought you needed to use a code like 'nl'.
– twsh
Mar 2 '16 at 21:19
add a comment |
It's quite simple. You have to pass the following parameter to the pandoc call.
-V lang=de
You'll have to use language parameters according to BCP 47 (like en-GB, fr, de...)
The exact behavior is described here: http://pandoc.org/README.html#language-variables
add a comment |
It's quite simple. You have to pass the following parameter to the pandoc call.
-V lang=de
You'll have to use language parameters according to BCP 47 (like en-GB, fr, de...)
The exact behavior is described here: http://pandoc.org/README.html#language-variables
add a comment |
It's quite simple. You have to pass the following parameter to the pandoc call.
-V lang=de
You'll have to use language parameters according to BCP 47 (like en-GB, fr, de...)
The exact behavior is described here: http://pandoc.org/README.html#language-variables
It's quite simple. You have to pass the following parameter to the pandoc call.
-V lang=de
You'll have to use language parameters according to BCP 47 (like en-GB, fr, de...)
The exact behavior is described here: http://pandoc.org/README.html#language-variables
answered May 27 '16 at 9:18
aronadaalaronadaal
339115
339115
add a comment |
add a comment |
@Marco already answered your main question. However, this one is still open:
" I think there is somewhere a template where it stores these things? But I can't seem to find it."
If you do not refer a specific template on the Pandoc command line with --template=my-latex-template.tex, then Pandoc will use an internally available template.
Pandoc has such templates for (almost) all output formats it can generate.
You can print that template for LaTeX with the following command:
pandoc -D latex | tee pandoc-default-template.latex
If you open that template in a text editor, you'll see where it uses variables:
- These variables look like
$varname$-- that is, they are enclosed in$characters. - You can see what the variable names are.
- You can see how you can influence the outcome of the generated document by using the command line switch:
-V varname="some value"or--variable=varname:"some value".
add a comment |
@Marco already answered your main question. However, this one is still open:
" I think there is somewhere a template where it stores these things? But I can't seem to find it."
If you do not refer a specific template on the Pandoc command line with --template=my-latex-template.tex, then Pandoc will use an internally available template.
Pandoc has such templates for (almost) all output formats it can generate.
You can print that template for LaTeX with the following command:
pandoc -D latex | tee pandoc-default-template.latex
If you open that template in a text editor, you'll see where it uses variables:
- These variables look like
$varname$-- that is, they are enclosed in$characters. - You can see what the variable names are.
- You can see how you can influence the outcome of the generated document by using the command line switch:
-V varname="some value"or--variable=varname:"some value".
add a comment |
@Marco already answered your main question. However, this one is still open:
" I think there is somewhere a template where it stores these things? But I can't seem to find it."
If you do not refer a specific template on the Pandoc command line with --template=my-latex-template.tex, then Pandoc will use an internally available template.
Pandoc has such templates for (almost) all output formats it can generate.
You can print that template for LaTeX with the following command:
pandoc -D latex | tee pandoc-default-template.latex
If you open that template in a text editor, you'll see where it uses variables:
- These variables look like
$varname$-- that is, they are enclosed in$characters. - You can see what the variable names are.
- You can see how you can influence the outcome of the generated document by using the command line switch:
-V varname="some value"or--variable=varname:"some value".
@Marco already answered your main question. However, this one is still open:
" I think there is somewhere a template where it stores these things? But I can't seem to find it."
If you do not refer a specific template on the Pandoc command line with --template=my-latex-template.tex, then Pandoc will use an internally available template.
Pandoc has such templates for (almost) all output formats it can generate.
You can print that template for LaTeX with the following command:
pandoc -D latex | tee pandoc-default-template.latex
If you open that template in a text editor, you'll see where it uses variables:
- These variables look like
$varname$-- that is, they are enclosed in$characters. - You can see what the variable names are.
- You can see how you can influence the outcome of the generated document by using the command line switch:
-V varname="some value"or--variable=varname:"some value".
answered May 25 '15 at 18:20
Kurt PfeifleKurt Pfeifle
2,50421730
2,50421730
add a comment |
add a comment |
You can also use YAML metadata to store the language settings.
---
lang: nl
---
Add this at the top of your markdown file. You don't need to modify your pandoc command.
Welcome to TeX.SE! Can you please add an complete example or can you add an screenshot of your solution for a fast proof?
– Kurt
Jan 20 at 22:58
add a comment |
You can also use YAML metadata to store the language settings.
---
lang: nl
---
Add this at the top of your markdown file. You don't need to modify your pandoc command.
Welcome to TeX.SE! Can you please add an complete example or can you add an screenshot of your solution for a fast proof?
– Kurt
Jan 20 at 22:58
add a comment |
You can also use YAML metadata to store the language settings.
---
lang: nl
---
Add this at the top of your markdown file. You don't need to modify your pandoc command.
You can also use YAML metadata to store the language settings.
---
lang: nl
---
Add this at the top of your markdown file. You don't need to modify your pandoc command.
answered Jan 20 at 21:39
Maciej StanekMaciej Stanek
11
11
Welcome to TeX.SE! Can you please add an complete example or can you add an screenshot of your solution for a fast proof?
– Kurt
Jan 20 at 22:58
add a comment |
Welcome to TeX.SE! Can you please add an complete example or can you add an screenshot of your solution for a fast proof?
– Kurt
Jan 20 at 22:58
Welcome to TeX.SE! Can you please add an complete example or can you add an screenshot of your solution for a fast proof?
– Kurt
Jan 20 at 22:58
Welcome to TeX.SE! Can you please add an complete example or can you add an screenshot of your solution for a fast proof?
– Kurt
Jan 20 at 22:58
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- 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%2ftex.stackexchange.com%2fquestions%2f119132%2fchanging-language-settings-used-by-pandoc-for-generated-output-pandoc-templat%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
1
Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you.
– Kurt
Jun 14 '13 at 10:56