define tikzpicture size with standalone document class
When drawing with standalone document class, the output image will automatically centered. for example, if I draw a circle with 5cm, then the image output will be 5cm. How can I keep 5cm circle in the center but output image size keep to 10cm?
I know the border=5cm option but I wish to use some command to define the picture dimension then I can always get the exact size, say 10cmx10cm.
tikz-pgf
add a comment |
When drawing with standalone document class, the output image will automatically centered. for example, if I draw a circle with 5cm, then the image output will be 5cm. How can I keep 5cm circle in the center but output image size keep to 10cm?
I know the border=5cm option but I wish to use some command to define the picture dimension then I can always get the exact size, say 10cmx10cm.
tikz-pgf
1
What do you mean by picture dimension? Do you want the paper size? You can usegeometry
package to control everything, paper size, margins, and so on.
– Sigur
Dec 5 '18 at 19:31
I mean use fixed picture size to draw something on it.
– lucky1928
Dec 5 '18 at 19:33
So, you want to draw any picture on a page sized 10x10?
– Sigur
Dec 5 '18 at 19:34
yes, use specific size then draw on it.
– lucky1928
Dec 5 '18 at 19:36
add a comment |
When drawing with standalone document class, the output image will automatically centered. for example, if I draw a circle with 5cm, then the image output will be 5cm. How can I keep 5cm circle in the center but output image size keep to 10cm?
I know the border=5cm option but I wish to use some command to define the picture dimension then I can always get the exact size, say 10cmx10cm.
tikz-pgf
When drawing with standalone document class, the output image will automatically centered. for example, if I draw a circle with 5cm, then the image output will be 5cm. How can I keep 5cm circle in the center but output image size keep to 10cm?
I know the border=5cm option but I wish to use some command to define the picture dimension then I can always get the exact size, say 10cmx10cm.
tikz-pgf
tikz-pgf
asked Dec 5 '18 at 19:05
lucky1928lucky1928
1,2091816
1,2091816
1
What do you mean by picture dimension? Do you want the paper size? You can usegeometry
package to control everything, paper size, margins, and so on.
– Sigur
Dec 5 '18 at 19:31
I mean use fixed picture size to draw something on it.
– lucky1928
Dec 5 '18 at 19:33
So, you want to draw any picture on a page sized 10x10?
– Sigur
Dec 5 '18 at 19:34
yes, use specific size then draw on it.
– lucky1928
Dec 5 '18 at 19:36
add a comment |
1
What do you mean by picture dimension? Do you want the paper size? You can usegeometry
package to control everything, paper size, margins, and so on.
– Sigur
Dec 5 '18 at 19:31
I mean use fixed picture size to draw something on it.
– lucky1928
Dec 5 '18 at 19:33
So, you want to draw any picture on a page sized 10x10?
– Sigur
Dec 5 '18 at 19:34
yes, use specific size then draw on it.
– lucky1928
Dec 5 '18 at 19:36
1
1
What do you mean by picture dimension? Do you want the paper size? You can use
geometry
package to control everything, paper size, margins, and so on.– Sigur
Dec 5 '18 at 19:31
What do you mean by picture dimension? Do you want the paper size? You can use
geometry
package to control everything, paper size, margins, and so on.– Sigur
Dec 5 '18 at 19:31
I mean use fixed picture size to draw something on it.
– lucky1928
Dec 5 '18 at 19:33
I mean use fixed picture size to draw something on it.
– lucky1928
Dec 5 '18 at 19:33
So, you want to draw any picture on a page sized 10x10?
– Sigur
Dec 5 '18 at 19:34
So, you want to draw any picture on a page sized 10x10?
– Sigur
Dec 5 '18 at 19:34
yes, use specific size then draw on it.
– lucky1928
Dec 5 '18 at 19:36
yes, use specific size then draw on it.
– lucky1928
Dec 5 '18 at 19:36
add a comment |
3 Answers
3
active
oldest
votes
Add a bounding box to the tikzpicture
. Then you can freely arrange objects therein.
documentclass[tikz]{standalone}
begin{document}
begin{tikzpicture}
useasboundingbox (-5,-5) rectangle (5,5);
filldraw (-5,-5) rectangle ++(1,1);
draw(0,0)circle(2.5);
end{tikzpicture}
end{document}
add a comment |
Add a 2.5 cm
border on each side with the standalone option border=2.5cm
, since 2.5cm+5cm+2.5 cm=10cm
.
documentclass[tikz,border=2.5cm]{standalone}
begin{document}
tikzdraw(0,0)circle(2.5cm);
end{document}
add a comment |
How about this?
documentclass[tikz]{standalone}
begin{document}
begin{tikzpicture}
node[rectangle,minimum size=20cm]{};
draw(0,0)circle(5cm);
end{tikzpicture}
end{document}
@lucky1928 This comment was for my answer?
– nidhin
Dec 5 '18 at 19:36
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%2f463366%2fdefine-tikzpicture-size-with-standalone-document-class%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Add a bounding box to the tikzpicture
. Then you can freely arrange objects therein.
documentclass[tikz]{standalone}
begin{document}
begin{tikzpicture}
useasboundingbox (-5,-5) rectangle (5,5);
filldraw (-5,-5) rectangle ++(1,1);
draw(0,0)circle(2.5);
end{tikzpicture}
end{document}
add a comment |
Add a bounding box to the tikzpicture
. Then you can freely arrange objects therein.
documentclass[tikz]{standalone}
begin{document}
begin{tikzpicture}
useasboundingbox (-5,-5) rectangle (5,5);
filldraw (-5,-5) rectangle ++(1,1);
draw(0,0)circle(2.5);
end{tikzpicture}
end{document}
add a comment |
Add a bounding box to the tikzpicture
. Then you can freely arrange objects therein.
documentclass[tikz]{standalone}
begin{document}
begin{tikzpicture}
useasboundingbox (-5,-5) rectangle (5,5);
filldraw (-5,-5) rectangle ++(1,1);
draw(0,0)circle(2.5);
end{tikzpicture}
end{document}
Add a bounding box to the tikzpicture
. Then you can freely arrange objects therein.
documentclass[tikz]{standalone}
begin{document}
begin{tikzpicture}
useasboundingbox (-5,-5) rectangle (5,5);
filldraw (-5,-5) rectangle ++(1,1);
draw(0,0)circle(2.5);
end{tikzpicture}
end{document}
edited Dec 5 '18 at 19:41
answered Dec 5 '18 at 19:33
AlexGAlexG
32.6k479145
32.6k479145
add a comment |
add a comment |
Add a 2.5 cm
border on each side with the standalone option border=2.5cm
, since 2.5cm+5cm+2.5 cm=10cm
.
documentclass[tikz,border=2.5cm]{standalone}
begin{document}
tikzdraw(0,0)circle(2.5cm);
end{document}
add a comment |
Add a 2.5 cm
border on each side with the standalone option border=2.5cm
, since 2.5cm+5cm+2.5 cm=10cm
.
documentclass[tikz,border=2.5cm]{standalone}
begin{document}
tikzdraw(0,0)circle(2.5cm);
end{document}
add a comment |
Add a 2.5 cm
border on each side with the standalone option border=2.5cm
, since 2.5cm+5cm+2.5 cm=10cm
.
documentclass[tikz,border=2.5cm]{standalone}
begin{document}
tikzdraw(0,0)circle(2.5cm);
end{document}
Add a 2.5 cm
border on each side with the standalone option border=2.5cm
, since 2.5cm+5cm+2.5 cm=10cm
.
documentclass[tikz,border=2.5cm]{standalone}
begin{document}
tikzdraw(0,0)circle(2.5cm);
end{document}
edited Dec 5 '18 at 19:36
answered Dec 5 '18 at 19:16
AndréCAndréC
8,64211447
8,64211447
add a comment |
add a comment |
How about this?
documentclass[tikz]{standalone}
begin{document}
begin{tikzpicture}
node[rectangle,minimum size=20cm]{};
draw(0,0)circle(5cm);
end{tikzpicture}
end{document}
@lucky1928 This comment was for my answer?
– nidhin
Dec 5 '18 at 19:36
add a comment |
How about this?
documentclass[tikz]{standalone}
begin{document}
begin{tikzpicture}
node[rectangle,minimum size=20cm]{};
draw(0,0)circle(5cm);
end{tikzpicture}
end{document}
@lucky1928 This comment was for my answer?
– nidhin
Dec 5 '18 at 19:36
add a comment |
How about this?
documentclass[tikz]{standalone}
begin{document}
begin{tikzpicture}
node[rectangle,minimum size=20cm]{};
draw(0,0)circle(5cm);
end{tikzpicture}
end{document}
How about this?
documentclass[tikz]{standalone}
begin{document}
begin{tikzpicture}
node[rectangle,minimum size=20cm]{};
draw(0,0)circle(5cm);
end{tikzpicture}
end{document}
answered Dec 5 '18 at 19:30
nidhinnidhin
3,352927
3,352927
@lucky1928 This comment was for my answer?
– nidhin
Dec 5 '18 at 19:36
add a comment |
@lucky1928 This comment was for my answer?
– nidhin
Dec 5 '18 at 19:36
@lucky1928 This comment was for my answer?
– nidhin
Dec 5 '18 at 19:36
@lucky1928 This comment was for my answer?
– nidhin
Dec 5 '18 at 19:36
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%2f463366%2fdefine-tikzpicture-size-with-standalone-document-class%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
What do you mean by picture dimension? Do you want the paper size? You can use
geometry
package to control everything, paper size, margins, and so on.– Sigur
Dec 5 '18 at 19:31
I mean use fixed picture size to draw something on it.
– lucky1928
Dec 5 '18 at 19:33
So, you want to draw any picture on a page sized 10x10?
– Sigur
Dec 5 '18 at 19:34
yes, use specific size then draw on it.
– lucky1928
Dec 5 '18 at 19:36