How can I execute a LaTeX command then hide the resulting text?
I would like to execute a command which produces text, but not have that text visible anywhere inside the document. Can we put the command inside a box, which clips other text, such as in the middle of the page? Normally, this would look ugly (a box text rendered on top of other text). Can we make the text invisible? That is, have a box smack dab in the middle of the page full of invisible text? Or what if we place the box of text outside of the page margins. That way, the text will be there, but not visible?
boxes
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I would like to execute a command which produces text, but not have that text visible anywhere inside the document. Can we put the command inside a box, which clips other text, such as in the middle of the page? Normally, this would look ugly (a box text rendered on top of other text). Can we make the text invisible? That is, have a box smack dab in the middle of the page full of invisible text? Or what if we place the box of text outside of the page margins. That way, the text will be there, but not visible?
boxes
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Possible duplicate of Hiding part of text leaving blank space
– Andrew Dunning
30 mins ago
See also tex.stackexchange.com/questions/367513/…
– John Kormylo
39 secs ago
add a comment |
I would like to execute a command which produces text, but not have that text visible anywhere inside the document. Can we put the command inside a box, which clips other text, such as in the middle of the page? Normally, this would look ugly (a box text rendered on top of other text). Can we make the text invisible? That is, have a box smack dab in the middle of the page full of invisible text? Or what if we place the box of text outside of the page margins. That way, the text will be there, but not visible?
boxes
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I would like to execute a command which produces text, but not have that text visible anywhere inside the document. Can we put the command inside a box, which clips other text, such as in the middle of the page? Normally, this would look ugly (a box text rendered on top of other text). Can we make the text invisible? That is, have a box smack dab in the middle of the page full of invisible text? Or what if we place the box of text outside of the page margins. That way, the text will be there, but not visible?
boxes
boxes
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 33 mins ago
IdleCustardIdleCustard
1164
1164
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Possible duplicate of Hiding part of text leaving blank space
– Andrew Dunning
30 mins ago
See also tex.stackexchange.com/questions/367513/…
– John Kormylo
39 secs ago
add a comment |
Possible duplicate of Hiding part of text leaving blank space
– Andrew Dunning
30 mins ago
See also tex.stackexchange.com/questions/367513/…
– John Kormylo
39 secs ago
Possible duplicate of Hiding part of text leaving blank space
– Andrew Dunning
30 mins ago
Possible duplicate of Hiding part of text leaving blank space
– Andrew Dunning
30 mins ago
See also tex.stackexchange.com/questions/367513/…
– John Kormylo
39 secs ago
See also tex.stackexchange.com/questions/367513/…
– John Kormylo
39 secs ago
add a comment |
1 Answer
1
active
oldest
votes
The following appears to work:
documentclass{minimal}
usepackage[pscoord]{eso-pic}
newcommand{placetextbox}[3]{
setbox0=hbox{#3}
AddToShipoutPictureFG*{
put(LenToUnit{#1paperwidth},LenToUnit{#2paperheight}){vtop{{null}makebox[0pt][c]{#3}}}%
}
}
begin{document}
This is Some Visible Text
placetextbox{0.5}{0.5}{phantom{INVISIBLE TEXT HERE}}
end{document}
You simply replace INVISIBLE TEXT HERE
with the command you want executed, but do not want the output text from. For example, if you are using bibtex
and you want something in your bibliography without having any in-text citations, then INVISIBLE TEXT HERE
might be something like:
cite{Miller78} cite{Bubba94}
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
});
}
});
IdleCustard is a new contributor. Be nice, and check out our Code of Conduct.
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%2f469642%2fhow-can-i-execute-a-latex-command-then-hide-the-resulting-text%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 following appears to work:
documentclass{minimal}
usepackage[pscoord]{eso-pic}
newcommand{placetextbox}[3]{
setbox0=hbox{#3}
AddToShipoutPictureFG*{
put(LenToUnit{#1paperwidth},LenToUnit{#2paperheight}){vtop{{null}makebox[0pt][c]{#3}}}%
}
}
begin{document}
This is Some Visible Text
placetextbox{0.5}{0.5}{phantom{INVISIBLE TEXT HERE}}
end{document}
You simply replace INVISIBLE TEXT HERE
with the command you want executed, but do not want the output text from. For example, if you are using bibtex
and you want something in your bibliography without having any in-text citations, then INVISIBLE TEXT HERE
might be something like:
cite{Miller78} cite{Bubba94}
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
The following appears to work:
documentclass{minimal}
usepackage[pscoord]{eso-pic}
newcommand{placetextbox}[3]{
setbox0=hbox{#3}
AddToShipoutPictureFG*{
put(LenToUnit{#1paperwidth},LenToUnit{#2paperheight}){vtop{{null}makebox[0pt][c]{#3}}}%
}
}
begin{document}
This is Some Visible Text
placetextbox{0.5}{0.5}{phantom{INVISIBLE TEXT HERE}}
end{document}
You simply replace INVISIBLE TEXT HERE
with the command you want executed, but do not want the output text from. For example, if you are using bibtex
and you want something in your bibliography without having any in-text citations, then INVISIBLE TEXT HERE
might be something like:
cite{Miller78} cite{Bubba94}
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
The following appears to work:
documentclass{minimal}
usepackage[pscoord]{eso-pic}
newcommand{placetextbox}[3]{
setbox0=hbox{#3}
AddToShipoutPictureFG*{
put(LenToUnit{#1paperwidth},LenToUnit{#2paperheight}){vtop{{null}makebox[0pt][c]{#3}}}%
}
}
begin{document}
This is Some Visible Text
placetextbox{0.5}{0.5}{phantom{INVISIBLE TEXT HERE}}
end{document}
You simply replace INVISIBLE TEXT HERE
with the command you want executed, but do not want the output text from. For example, if you are using bibtex
and you want something in your bibliography without having any in-text citations, then INVISIBLE TEXT HERE
might be something like:
cite{Miller78} cite{Bubba94}
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
The following appears to work:
documentclass{minimal}
usepackage[pscoord]{eso-pic}
newcommand{placetextbox}[3]{
setbox0=hbox{#3}
AddToShipoutPictureFG*{
put(LenToUnit{#1paperwidth},LenToUnit{#2paperheight}){vtop{{null}makebox[0pt][c]{#3}}}%
}
}
begin{document}
This is Some Visible Text
placetextbox{0.5}{0.5}{phantom{INVISIBLE TEXT HERE}}
end{document}
You simply replace INVISIBLE TEXT HERE
with the command you want executed, but do not want the output text from. For example, if you are using bibtex
and you want something in your bibliography without having any in-text citations, then INVISIBLE TEXT HERE
might be something like:
cite{Miller78} cite{Bubba94}
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered 3 mins ago
IdleCustardIdleCustard
1164
1164
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
IdleCustard is a new contributor. Be nice, and check out our Code of Conduct.
IdleCustard is a new contributor. Be nice, and check out our Code of Conduct.
IdleCustard is a new contributor. Be nice, and check out our Code of Conduct.
IdleCustard is a new contributor. Be nice, and check out our Code of Conduct.
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%2f469642%2fhow-can-i-execute-a-latex-command-then-hide-the-resulting-text%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
Possible duplicate of Hiding part of text leaving blank space
– Andrew Dunning
30 mins ago
See also tex.stackexchange.com/questions/367513/…
– John Kormylo
39 secs ago