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?



enter image description here



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:



enter image description here



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.



    enter image description here



    enter image description here




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}









share|improve this question




















  • 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 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












  • @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 the geometry package, the line width is a more reasonable.
    – Peter Grill
    2 hours ago

















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?



enter image description here



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:



enter image description here



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.



    enter image description here



    enter image description here




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}









share|improve this question




















  • 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 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












  • @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 the geometry package, the line width is a more reasonable.
    – Peter Grill
    2 hours ago















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?



enter image description here



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:



enter image description here



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.



    enter image description here



    enter image description here




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}









share|improve this question















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?



enter image description here



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:



enter image description here



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.



    enter image description here



    enter image description here




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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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, 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












  • @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 the geometry package, the line width is a more reasonable.
    – Peter Grill
    2 hours ago
















  • 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 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












  • @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 the geometry 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

















active

oldest

votes











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',
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
});


}
});














draft saved

draft discarded


















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






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Accessing regular linux commands in Huawei's Dopra Linux

Can't connect RFCOMM socket: Host is down

Kernel panic - not syncing: Fatal Exception in Interrupt