Convince Arara to compile .tikz files
I have recently learned about the package tikzscale and find it to be a great solution to many issues I was having. However, using it requires the file containing the tikz code to have the extension .tikz. Previously all my tikz files would be standalone so i could compile them independently to inspect the output, but with the tikz extension I can't figure out how to compile my standalone tikz pictures using arara directives like usual.
My .tikz files looks like this
% arara: lualatex
% arara: lualatex
documentclass[tikz]{standalone}
begin{document}
begin{tikzpicture}
fill [orange] (0.1, 0.1) rectangle (0.2, 0.3);
end{tikzpicture}
end{document}
I have attempted to modify the araraconfig.yaml file to contain the following:
!config
filetypes:
- extension: tex
- extension: dtx
- extension: ltx
- extension: tikz
pattern: ^(\s)*%\s+
but arara fails, saying ...no directives were found. Is there a way to convince arara to treat a .tikz file as it would a .tex file, or do i need to add a whole new set of rules to my arara rules for the .tikz extension?
tikz-pgf arara tikzscale
add a comment |
I have recently learned about the package tikzscale and find it to be a great solution to many issues I was having. However, using it requires the file containing the tikz code to have the extension .tikz. Previously all my tikz files would be standalone so i could compile them independently to inspect the output, but with the tikz extension I can't figure out how to compile my standalone tikz pictures using arara directives like usual.
My .tikz files looks like this
% arara: lualatex
% arara: lualatex
documentclass[tikz]{standalone}
begin{document}
begin{tikzpicture}
fill [orange] (0.1, 0.1) rectangle (0.2, 0.3);
end{tikzpicture}
end{document}
I have attempted to modify the araraconfig.yaml file to contain the following:
!config
filetypes:
- extension: tex
- extension: dtx
- extension: ltx
- extension: tikz
pattern: ^(\s)*%\s+
but arara fails, saying ...no directives were found. Is there a way to convince arara to treat a .tikz file as it would a .tex file, or do i need to add a whole new set of rules to my arara rules for the .tikz extension?
tikz-pgf arara tikzscale
1
I think the pattern is wrong (don't escape the backslashes). Trypattern: ^(s)*%s+or the default pattern from the manual:^s*%s+
– DG'
Feb 9 at 21:06
add a comment |
I have recently learned about the package tikzscale and find it to be a great solution to many issues I was having. However, using it requires the file containing the tikz code to have the extension .tikz. Previously all my tikz files would be standalone so i could compile them independently to inspect the output, but with the tikz extension I can't figure out how to compile my standalone tikz pictures using arara directives like usual.
My .tikz files looks like this
% arara: lualatex
% arara: lualatex
documentclass[tikz]{standalone}
begin{document}
begin{tikzpicture}
fill [orange] (0.1, 0.1) rectangle (0.2, 0.3);
end{tikzpicture}
end{document}
I have attempted to modify the araraconfig.yaml file to contain the following:
!config
filetypes:
- extension: tex
- extension: dtx
- extension: ltx
- extension: tikz
pattern: ^(\s)*%\s+
but arara fails, saying ...no directives were found. Is there a way to convince arara to treat a .tikz file as it would a .tex file, or do i need to add a whole new set of rules to my arara rules for the .tikz extension?
tikz-pgf arara tikzscale
I have recently learned about the package tikzscale and find it to be a great solution to many issues I was having. However, using it requires the file containing the tikz code to have the extension .tikz. Previously all my tikz files would be standalone so i could compile them independently to inspect the output, but with the tikz extension I can't figure out how to compile my standalone tikz pictures using arara directives like usual.
My .tikz files looks like this
% arara: lualatex
% arara: lualatex
documentclass[tikz]{standalone}
begin{document}
begin{tikzpicture}
fill [orange] (0.1, 0.1) rectangle (0.2, 0.3);
end{tikzpicture}
end{document}
I have attempted to modify the araraconfig.yaml file to contain the following:
!config
filetypes:
- extension: tex
- extension: dtx
- extension: ltx
- extension: tikz
pattern: ^(\s)*%\s+
but arara fails, saying ...no directives were found. Is there a way to convince arara to treat a .tikz file as it would a .tex file, or do i need to add a whole new set of rules to my arara rules for the .tikz extension?
tikz-pgf arara tikzscale
tikz-pgf arara tikzscale
asked Feb 9 at 19:48
anthstsanthsts
1046
1046
1
I think the pattern is wrong (don't escape the backslashes). Trypattern: ^(s)*%s+or the default pattern from the manual:^s*%s+
– DG'
Feb 9 at 21:06
add a comment |
1
I think the pattern is wrong (don't escape the backslashes). Trypattern: ^(s)*%s+or the default pattern from the manual:^s*%s+
– DG'
Feb 9 at 21:06
1
1
I think the pattern is wrong (don't escape the backslashes). Try
pattern: ^(s)*%s+ or the default pattern from the manual: ^s*%s+– DG'
Feb 9 at 21:06
I think the pattern is wrong (don't escape the backslashes). Try
pattern: ^(s)*%s+ or the default pattern from the manual: ^s*%s+– DG'
Feb 9 at 21:06
add a comment |
1 Answer
1
active
oldest
votes
The pattern is wrong. You don't have to escape backslashes.

Try instead: pattern: ^s*%s+.
araraconfig.yaml:
!config
filetypes:
- extension: tex
- extension: dtx
- extension: ltx
- extension: tikz
pattern: ^s*%s+
Running arara succeds:
__ _ _ __ __ _ _ __ __ _
/ _` | '__/ _` | '__/ _` |
| (_| | | | (_| | | | (_| |
__,_|_| __,_|_| __,_|
Processing 'test.tikz' (size: 205 bytes, last modified:
02/09/2019 21:57:14), please wait.
(LuaLaTeX) LuaLaTeX engine .............................. SUCCESS
(LuaLaTeX) LuaLaTeX engine .............................. SUCCESS
Total: 2.31 seconds
Result (zoomed in a bit):

1
Aha! Thank you! I totally missed that warning
– anthsts
Feb 9 at 22:23
2
Well, this applies here too
– DG'
Feb 9 at 22:49
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%2f474103%2fconvince-arara-to-compile-tikz-files%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The pattern is wrong. You don't have to escape backslashes.

Try instead: pattern: ^s*%s+.
araraconfig.yaml:
!config
filetypes:
- extension: tex
- extension: dtx
- extension: ltx
- extension: tikz
pattern: ^s*%s+
Running arara succeds:
__ _ _ __ __ _ _ __ __ _
/ _` | '__/ _` | '__/ _` |
| (_| | | | (_| | | | (_| |
__,_|_| __,_|_| __,_|
Processing 'test.tikz' (size: 205 bytes, last modified:
02/09/2019 21:57:14), please wait.
(LuaLaTeX) LuaLaTeX engine .............................. SUCCESS
(LuaLaTeX) LuaLaTeX engine .............................. SUCCESS
Total: 2.31 seconds
Result (zoomed in a bit):

1
Aha! Thank you! I totally missed that warning
– anthsts
Feb 9 at 22:23
2
Well, this applies here too
– DG'
Feb 9 at 22:49
add a comment |
The pattern is wrong. You don't have to escape backslashes.

Try instead: pattern: ^s*%s+.
araraconfig.yaml:
!config
filetypes:
- extension: tex
- extension: dtx
- extension: ltx
- extension: tikz
pattern: ^s*%s+
Running arara succeds:
__ _ _ __ __ _ _ __ __ _
/ _` | '__/ _` | '__/ _` |
| (_| | | | (_| | | | (_| |
__,_|_| __,_|_| __,_|
Processing 'test.tikz' (size: 205 bytes, last modified:
02/09/2019 21:57:14), please wait.
(LuaLaTeX) LuaLaTeX engine .............................. SUCCESS
(LuaLaTeX) LuaLaTeX engine .............................. SUCCESS
Total: 2.31 seconds
Result (zoomed in a bit):

1
Aha! Thank you! I totally missed that warning
– anthsts
Feb 9 at 22:23
2
Well, this applies here too
– DG'
Feb 9 at 22:49
add a comment |
The pattern is wrong. You don't have to escape backslashes.

Try instead: pattern: ^s*%s+.
araraconfig.yaml:
!config
filetypes:
- extension: tex
- extension: dtx
- extension: ltx
- extension: tikz
pattern: ^s*%s+
Running arara succeds:
__ _ _ __ __ _ _ __ __ _
/ _` | '__/ _` | '__/ _` |
| (_| | | | (_| | | | (_| |
__,_|_| __,_|_| __,_|
Processing 'test.tikz' (size: 205 bytes, last modified:
02/09/2019 21:57:14), please wait.
(LuaLaTeX) LuaLaTeX engine .............................. SUCCESS
(LuaLaTeX) LuaLaTeX engine .............................. SUCCESS
Total: 2.31 seconds
Result (zoomed in a bit):

The pattern is wrong. You don't have to escape backslashes.

Try instead: pattern: ^s*%s+.
araraconfig.yaml:
!config
filetypes:
- extension: tex
- extension: dtx
- extension: ltx
- extension: tikz
pattern: ^s*%s+
Running arara succeds:
__ _ _ __ __ _ _ __ __ _
/ _` | '__/ _` | '__/ _` |
| (_| | | | (_| | | | (_| |
__,_|_| __,_|_| __,_|
Processing 'test.tikz' (size: 205 bytes, last modified:
02/09/2019 21:57:14), please wait.
(LuaLaTeX) LuaLaTeX engine .............................. SUCCESS
(LuaLaTeX) LuaLaTeX engine .............................. SUCCESS
Total: 2.31 seconds
Result (zoomed in a bit):

edited Feb 9 at 21:26
answered Feb 9 at 21:16
DG'DG'
10.3k21843
10.3k21843
1
Aha! Thank you! I totally missed that warning
– anthsts
Feb 9 at 22:23
2
Well, this applies here too
– DG'
Feb 9 at 22:49
add a comment |
1
Aha! Thank you! I totally missed that warning
– anthsts
Feb 9 at 22:23
2
Well, this applies here too
– DG'
Feb 9 at 22:49
1
1
Aha! Thank you! I totally missed that warning
– anthsts
Feb 9 at 22:23
Aha! Thank you! I totally missed that warning
– anthsts
Feb 9 at 22:23
2
2
Well, this applies here too
– DG'
Feb 9 at 22:49
Well, this applies here too
– DG'
Feb 9 at 22:49
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%2f474103%2fconvince-arara-to-compile-tikz-files%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
I think the pattern is wrong (don't escape the backslashes). Try
pattern: ^(s)*%s+or the default pattern from the manual:^s*%s+– DG'
Feb 9 at 21:06