Locating north west corner of text area
up vote
2
down vote
favorite
I would like to locate the exact position of the north west corner of the text area. Using layout
(see image in Notes section), it seems that the required offset from current page.north west
is
xshift=1.0in+hoffset+oddsidemargin,
yshift=-1.0in-voffset-headsep,
Using showframe
package: (as in MWE)
The image below is the north west corner of the text area at 6400% zoom where I have placed a gray +
and a filled in circle. This visually looks like it is pretty close to the correct location. However, to get to this position required an additional tweak of
(-0.35pt,2.35pt)%% Required shift to obtain image below (see MWE)
from the above parameters.
The somewhat related questions listed in the References section mention an issue with inner sep
and parindent
, both of which have been accounted for. (They are actually not needed here, but added them anyway).
Why is this additional tweak required?
Using showframe option to geometry
package:
IF instead of using the showframe
package, I instead use
usepackage[showframe]{geometry}
The tweak required is slightly different:
(-0.1pt,1.8pt)
which yields:
References:
TikZ: Anchor current page north west isn't where expected.
TikZ current page.north west shifted ~4pts?.
Notes:
Using
layout
, we obtain the following picture from which I obtained the parameters to compute the exact location of the north west of the text area.
Code:
documentclass{article}
usepackage{showframe}
usepackage{tikz}
usepackage{layout}
usepackage{geometry}
newcommand*{ShowNorthWestOfTextArea}{%
begin{tikzpicture}[remember picture, overlay]
coordinate (X) at ([
xshift=1.0in+hoffset+oddsidemargin-0.35pt,
yshift=-1.0in-voffset-headsep+2.35pt,
]current page.north west);
draw [draw=red, fill=yellow, text=gray] (X) circle (1pt)
node [inner sep=0pt] {+};
end{tikzpicture}%
}%
begin{document}%layout% <-- uncomment to obtain the layout parameters
noindentShowNorthWestOfTextArea%
end{document}
tikz-pgf tikz-node
|
show 2 more comments
up vote
2
down vote
favorite
I would like to locate the exact position of the north west corner of the text area. Using layout
(see image in Notes section), it seems that the required offset from current page.north west
is
xshift=1.0in+hoffset+oddsidemargin,
yshift=-1.0in-voffset-headsep,
Using showframe
package: (as in MWE)
The image below is the north west corner of the text area at 6400% zoom where I have placed a gray +
and a filled in circle. This visually looks like it is pretty close to the correct location. However, to get to this position required an additional tweak of
(-0.35pt,2.35pt)%% Required shift to obtain image below (see MWE)
from the above parameters.
The somewhat related questions listed in the References section mention an issue with inner sep
and parindent
, both of which have been accounted for. (They are actually not needed here, but added them anyway).
Why is this additional tweak required?
Using showframe option to geometry
package:
IF instead of using the showframe
package, I instead use
usepackage[showframe]{geometry}
The tweak required is slightly different:
(-0.1pt,1.8pt)
which yields:
References:
TikZ: Anchor current page north west isn't where expected.
TikZ current page.north west shifted ~4pts?.
Notes:
Using
layout
, we obtain the following picture from which I obtained the parameters to compute the exact location of the north west of the text area.
Code:
documentclass{article}
usepackage{showframe}
usepackage{tikz}
usepackage{layout}
usepackage{geometry}
newcommand*{ShowNorthWestOfTextArea}{%
begin{tikzpicture}[remember picture, overlay]
coordinate (X) at ([
xshift=1.0in+hoffset+oddsidemargin-0.35pt,
yshift=-1.0in-voffset-headsep+2.35pt,
]current page.north west);
draw [draw=red, fill=yellow, text=gray] (X) circle (1pt)
node [inner sep=0pt] {+};
end{tikzpicture}%
}%
begin{document}%layout% <-- uncomment to obtain the layout parameters
noindentShowNorthWestOfTextArea%
end{document}
tikz-pgf tikz-node
1
Does tikzpagenodes help? Specifically, once it is loaded you can use(current page text area.north west)
.
– Andrew
3 hours ago
Actually, loadingtikzpagenodes
and doingtikz[overlay,remember picture]{ draw [draw=red, fill=yellow, text=gray] (current page text area.north west) circle (1pt) node [inner sep=0pt] {+};}
seems to indicate that the frame is around the text area, meaning that the line is outside and your mark is already a tiny bit outside the text area, precisely by the additional shift.
– marmot
3 hours ago
@Andrew: Yep,tikzpagenodes
seems to do the correct position without any tweaks, so that is definitely the solution to use instead of computing it directly. I'd still be interested in what is going on though. Seems to imply some issue with eithershowframe
package (andshowframe
option togeometry
) or a deficiency with thelayout
package.
– Peter Grill
2 hours ago
@PeterGrill I really think it is the line width. The frame is drawn in such a way that the line is completely outside the text area, but the inner boundary of the frame is the outer boundary of the text area. You place your mark in the middle of the line.
– marmot
2 hours ago
1
@marmot: Agreed. BTW, not sure if you noticed but I updated the question: seems as if you use theshowframe
option to thegeometry
package, the line width is a more reasonable.
– Peter Grill
2 hours ago
|
show 2 more comments
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I would like to locate the exact position of the north west corner of the text area. Using layout
(see image in Notes section), it seems that the required offset from current page.north west
is
xshift=1.0in+hoffset+oddsidemargin,
yshift=-1.0in-voffset-headsep,
Using showframe
package: (as in MWE)
The image below is the north west corner of the text area at 6400% zoom where I have placed a gray +
and a filled in circle. This visually looks like it is pretty close to the correct location. However, to get to this position required an additional tweak of
(-0.35pt,2.35pt)%% Required shift to obtain image below (see MWE)
from the above parameters.
The somewhat related questions listed in the References section mention an issue with inner sep
and parindent
, both of which have been accounted for. (They are actually not needed here, but added them anyway).
Why is this additional tweak required?
Using showframe option to geometry
package:
IF instead of using the showframe
package, I instead use
usepackage[showframe]{geometry}
The tweak required is slightly different:
(-0.1pt,1.8pt)
which yields:
References:
TikZ: Anchor current page north west isn't where expected.
TikZ current page.north west shifted ~4pts?.
Notes:
Using
layout
, we obtain the following picture from which I obtained the parameters to compute the exact location of the north west of the text area.
Code:
documentclass{article}
usepackage{showframe}
usepackage{tikz}
usepackage{layout}
usepackage{geometry}
newcommand*{ShowNorthWestOfTextArea}{%
begin{tikzpicture}[remember picture, overlay]
coordinate (X) at ([
xshift=1.0in+hoffset+oddsidemargin-0.35pt,
yshift=-1.0in-voffset-headsep+2.35pt,
]current page.north west);
draw [draw=red, fill=yellow, text=gray] (X) circle (1pt)
node [inner sep=0pt] {+};
end{tikzpicture}%
}%
begin{document}%layout% <-- uncomment to obtain the layout parameters
noindentShowNorthWestOfTextArea%
end{document}
tikz-pgf tikz-node
I would like to locate the exact position of the north west corner of the text area. Using layout
(see image in Notes section), it seems that the required offset from current page.north west
is
xshift=1.0in+hoffset+oddsidemargin,
yshift=-1.0in-voffset-headsep,
Using showframe
package: (as in MWE)
The image below is the north west corner of the text area at 6400% zoom where I have placed a gray +
and a filled in circle. This visually looks like it is pretty close to the correct location. However, to get to this position required an additional tweak of
(-0.35pt,2.35pt)%% Required shift to obtain image below (see MWE)
from the above parameters.
The somewhat related questions listed in the References section mention an issue with inner sep
and parindent
, both of which have been accounted for. (They are actually not needed here, but added them anyway).
Why is this additional tweak required?
Using showframe option to geometry
package:
IF instead of using the showframe
package, I instead use
usepackage[showframe]{geometry}
The tweak required is slightly different:
(-0.1pt,1.8pt)
which yields:
References:
TikZ: Anchor current page north west isn't where expected.
TikZ current page.north west shifted ~4pts?.
Notes:
Using
layout
, we obtain the following picture from which I obtained the parameters to compute the exact location of the north west of the text area.
Code:
documentclass{article}
usepackage{showframe}
usepackage{tikz}
usepackage{layout}
usepackage{geometry}
newcommand*{ShowNorthWestOfTextArea}{%
begin{tikzpicture}[remember picture, overlay]
coordinate (X) at ([
xshift=1.0in+hoffset+oddsidemargin-0.35pt,
yshift=-1.0in-voffset-headsep+2.35pt,
]current page.north west);
draw [draw=red, fill=yellow, text=gray] (X) circle (1pt)
node [inner sep=0pt] {+};
end{tikzpicture}%
}%
begin{document}%layout% <-- uncomment to obtain the layout parameters
noindentShowNorthWestOfTextArea%
end{document}
tikz-pgf tikz-node
tikz-pgf tikz-node
edited 2 hours ago
asked 3 hours ago
Peter Grill
163k24432742
163k24432742
1
Does tikzpagenodes help? Specifically, once it is loaded you can use(current page text area.north west)
.
– Andrew
3 hours ago
Actually, loadingtikzpagenodes
and doingtikz[overlay,remember picture]{ draw [draw=red, fill=yellow, text=gray] (current page text area.north west) circle (1pt) node [inner sep=0pt] {+};}
seems to indicate that the frame is around the text area, meaning that the line is outside and your mark is already a tiny bit outside the text area, precisely by the additional shift.
– marmot
3 hours ago
@Andrew: Yep,tikzpagenodes
seems to do the correct position without any tweaks, so that is definitely the solution to use instead of computing it directly. I'd still be interested in what is going on though. Seems to imply some issue with eithershowframe
package (andshowframe
option togeometry
) or a deficiency with thelayout
package.
– Peter Grill
2 hours ago
@PeterGrill I really think it is the line width. The frame is drawn in such a way that the line is completely outside the text area, but the inner boundary of the frame is the outer boundary of the text area. You place your mark in the middle of the line.
– marmot
2 hours ago
1
@marmot: Agreed. BTW, not sure if you noticed but I updated the question: seems as if you use theshowframe
option to thegeometry
package, the line width is a more reasonable.
– Peter Grill
2 hours ago
|
show 2 more comments
1
Does tikzpagenodes help? Specifically, once it is loaded you can use(current page text area.north west)
.
– Andrew
3 hours ago
Actually, loadingtikzpagenodes
and doingtikz[overlay,remember picture]{ draw [draw=red, fill=yellow, text=gray] (current page text area.north west) circle (1pt) node [inner sep=0pt] {+};}
seems to indicate that the frame is around the text area, meaning that the line is outside and your mark is already a tiny bit outside the text area, precisely by the additional shift.
– marmot
3 hours ago
@Andrew: Yep,tikzpagenodes
seems to do the correct position without any tweaks, so that is definitely the solution to use instead of computing it directly. I'd still be interested in what is going on though. Seems to imply some issue with eithershowframe
package (andshowframe
option togeometry
) or a deficiency with thelayout
package.
– Peter Grill
2 hours ago
@PeterGrill I really think it is the line width. The frame is drawn in such a way that the line is completely outside the text area, but the inner boundary of the frame is the outer boundary of the text area. You place your mark in the middle of the line.
– marmot
2 hours ago
1
@marmot: Agreed. BTW, not sure if you noticed but I updated the question: seems as if you use theshowframe
option to thegeometry
package, the line width is a more reasonable.
– Peter Grill
2 hours ago
1
1
Does tikzpagenodes help? Specifically, once it is loaded you can use
(current page text area.north west)
.– Andrew
3 hours ago
Does tikzpagenodes help? Specifically, once it is loaded you can use
(current page text area.north west)
.– Andrew
3 hours ago
Actually, loading
tikzpagenodes
and doing tikz[overlay,remember picture]{ draw [draw=red, fill=yellow, text=gray] (current page text area.north west) circle (1pt) node [inner sep=0pt] {+};}
seems to indicate that the frame is around the text area, meaning that the line is outside and your mark is already a tiny bit outside the text area, precisely by the additional shift.– marmot
3 hours ago
Actually, loading
tikzpagenodes
and doing tikz[overlay,remember picture]{ draw [draw=red, fill=yellow, text=gray] (current page text area.north west) circle (1pt) node [inner sep=0pt] {+};}
seems to indicate that the frame is around the text area, meaning that the line is outside and your mark is already a tiny bit outside the text area, precisely by the additional shift.– marmot
3 hours ago
@Andrew: Yep,
tikzpagenodes
seems to do the correct position without any tweaks, so that is definitely the solution to use instead of computing it directly. I'd still be interested in what is going on though. Seems to imply some issue with either showframe
package (and showframe
option to geometry
) or a deficiency with the layout
package.– Peter Grill
2 hours ago
@Andrew: Yep,
tikzpagenodes
seems to do the correct position without any tweaks, so that is definitely the solution to use instead of computing it directly. I'd still be interested in what is going on though. Seems to imply some issue with either showframe
package (and showframe
option to geometry
) or a deficiency with the layout
package.– Peter Grill
2 hours ago
@PeterGrill I really think it is the line width. The frame is drawn in such a way that the line is completely outside the text area, but the inner boundary of the frame is the outer boundary of the text area. You place your mark in the middle of the line.
– marmot
2 hours ago
@PeterGrill I really think it is the line width. The frame is drawn in such a way that the line is completely outside the text area, but the inner boundary of the frame is the outer boundary of the text area. You place your mark in the middle of the line.
– marmot
2 hours ago
1
1
@marmot: Agreed. BTW, not sure if you noticed but I updated the question: seems as if you use the
showframe
option to the geometry
package, the line width is a more reasonable.– Peter Grill
2 hours ago
@marmot: Agreed. BTW, not sure if you noticed but I updated the question: seems as if you use the
showframe
option to the geometry
package, the line width is a more reasonable.– Peter Grill
2 hours ago
|
show 2 more comments
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f463069%2flocating-north-west-corner-of-text-area%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
Does tikzpagenodes help? Specifically, once it is loaded you can use
(current page text area.north west)
.– Andrew
3 hours ago
Actually, loading
tikzpagenodes
and doingtikz[overlay,remember picture]{ draw [draw=red, fill=yellow, text=gray] (current page text area.north west) circle (1pt) node [inner sep=0pt] {+};}
seems to indicate that the frame is around the text area, meaning that the line is outside and your mark is already a tiny bit outside the text area, precisely by the additional shift.– marmot
3 hours ago
@Andrew: Yep,
tikzpagenodes
seems to do the correct position without any tweaks, so that is definitely the solution to use instead of computing it directly. I'd still be interested in what is going on though. Seems to imply some issue with eithershowframe
package (andshowframe
option togeometry
) or a deficiency with thelayout
package.– Peter Grill
2 hours ago
@PeterGrill I really think it is the line width. The frame is drawn in such a way that the line is completely outside the text area, but the inner boundary of the frame is the outer boundary of the text area. You place your mark in the middle of the line.
– marmot
2 hours ago
1
@marmot: Agreed. BTW, not sure if you noticed but I updated the question: seems as if you use the
showframe
option to thegeometry
package, the line width is a more reasonable.– Peter Grill
2 hours ago