define tikzpicture size with standalone document class
up vote
3
down vote
favorite
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 |
up vote
3
down vote
favorite
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 at 19:31
I mean use fixed picture size to draw something on it.
– lucky1928
Dec 5 at 19:33
So, you want to draw any picture on a page sized 10x10?
– Sigur
Dec 5 at 19:34
yes, use specific size then draw on it.
– lucky1928
Dec 5 at 19:36
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
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 at 19:05
lucky1928
1,1921716
1,1921716
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 at 19:31
I mean use fixed picture size to draw something on it.
– lucky1928
Dec 5 at 19:33
So, you want to draw any picture on a page sized 10x10?
– Sigur
Dec 5 at 19:34
yes, use specific size then draw on it.
– lucky1928
Dec 5 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 at 19:31
I mean use fixed picture size to draw something on it.
– lucky1928
Dec 5 at 19:33
So, you want to draw any picture on a page sized 10x10?
– Sigur
Dec 5 at 19:34
yes, use specific size then draw on it.
– lucky1928
Dec 5 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 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 at 19:31
I mean use fixed picture size to draw something on it.
– lucky1928
Dec 5 at 19:33
I mean use fixed picture size to draw something on it.
– lucky1928
Dec 5 at 19:33
So, you want to draw any picture on a page sized 10x10?
– Sigur
Dec 5 at 19:34
So, you want to draw any picture on a page sized 10x10?
– Sigur
Dec 5 at 19:34
yes, use specific size then draw on it.
– lucky1928
Dec 5 at 19:36
yes, use specific size then draw on it.
– lucky1928
Dec 5 at 19:36
add a comment |
3 Answers
3
active
oldest
votes
up vote
5
down vote
accepted
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 |
up vote
3
down vote
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 |
up vote
2
down vote
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 at 19:36
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
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 |
up vote
5
down vote
accepted
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 |
up vote
5
down vote
accepted
up vote
5
down vote
accepted
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 at 19:41
answered Dec 5 at 19:33
AlexG
31.8k477141
31.8k477141
add a comment |
add a comment |
up vote
3
down vote
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 |
up vote
3
down vote
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 |
up vote
3
down vote
up vote
3
down vote
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 at 19:36
answered Dec 5 at 19:16
AndréC
6,89711140
6,89711140
add a comment |
add a comment |
up vote
2
down vote
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 at 19:36
add a comment |
up vote
2
down vote
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 at 19:36
add a comment |
up vote
2
down vote
up vote
2
down vote
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 at 19:30
nidhin
2,659926
2,659926
@lucky1928 This comment was for my answer?
– nidhin
Dec 5 at 19:36
add a comment |
@lucky1928 This comment was for my answer?
– nidhin
Dec 5 at 19:36
@lucky1928 This comment was for my answer?
– nidhin
Dec 5 at 19:36
@lucky1928 This comment was for my answer?
– nidhin
Dec 5 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.
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%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 at 19:31
I mean use fixed picture size to draw something on it.
– lucky1928
Dec 5 at 19:33
So, you want to draw any picture on a page sized 10x10?
– Sigur
Dec 5 at 19:34
yes, use specific size then draw on it.
– lucky1928
Dec 5 at 19:36