Horizontal spacing around text string in a displayed math environment












1















documentclass{report}
usepackage{amsmath}
newcommandeqtext[1]{hspace{1.0em}text{#1}hspace{1.0em}}
begin{document}
[x = y eqtext{if and only if} y=x.]
end{document}


What should the horizontal spacing be in this situation? In my example it is 1.0em.



This is a stylistic question so I’m not sure if it belongs here.










share|improve this question




















  • 3





    I would simply use text{ if and only if }

    – David Carlisle
    4 hours ago
















1















documentclass{report}
usepackage{amsmath}
newcommandeqtext[1]{hspace{1.0em}text{#1}hspace{1.0em}}
begin{document}
[x = y eqtext{if and only if} y=x.]
end{document}


What should the horizontal spacing be in this situation? In my example it is 1.0em.



This is a stylistic question so I’m not sure if it belongs here.










share|improve this question




















  • 3





    I would simply use text{ if and only if }

    – David Carlisle
    4 hours ago














1












1








1








documentclass{report}
usepackage{amsmath}
newcommandeqtext[1]{hspace{1.0em}text{#1}hspace{1.0em}}
begin{document}
[x = y eqtext{if and only if} y=x.]
end{document}


What should the horizontal spacing be in this situation? In my example it is 1.0em.



This is a stylistic question so I’m not sure if it belongs here.










share|improve this question
















documentclass{report}
usepackage{amsmath}
newcommandeqtext[1]{hspace{1.0em}text{#1}hspace{1.0em}}
begin{document}
[x = y eqtext{if and only if} y=x.]
end{document}


What should the horizontal spacing be in this situation? In my example it is 1.0em.



This is a stylistic question so I’m not sure if it belongs here.







math-mode spacing






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 17 mins ago









Mico

275k30373761




275k30373761










asked 4 hours ago









simple jacksimple jack

134




134








  • 3





    I would simply use text{ if and only if }

    – David Carlisle
    4 hours ago














  • 3





    I would simply use text{ if and only if }

    – David Carlisle
    4 hours ago








3




3





I would simply use text{ if and only if }

– David Carlisle
4 hours ago





I would simply use text{ if and only if }

– David Carlisle
4 hours ago










1 Answer
1






active

oldest

votes


















0














I'd say that the typographically appropriate amount of whitespace around the text string depends both on the contents of the text string as well as on what comes before and after the string.



E.g., if the text string consists of "if and only if" and the material before and after the string is as simple as x=y and y=x, an ordinary interword space is just fine:



x=y text{ if and only if } y=x 
text{$x=y$ if and only if $y=x$} % note: entire line is arg. of text


If, in contrast, the math expressions before and/or after the string are a bit more complex than x=y, a bit more whitespace, say in the amount of quad, may make the material to read. See, e.g., the third line of the following screenshot -- which actually contains two instances of text, with two different amounts of whitespace.



enter image description here



documentclass{report}
usepackage{amsmath}
begin{document}
begin{gather*}
x=y text{ if and only if } y=x \
text{$x=y$ if and only if $y=x$} \
frac{x^2}{y^2}ne0 quadtext{if and only if}quad xne0 text{ and } yne0\
end{gather*}
end{document}





share|improve this answer
























  • Is it possible to edit the command so that it automatically puts a good amount of space?

    – simple jack
    8 mins ago











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


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f470944%2fhorizontal-spacing-around-text-string-in-a-displayed-math-environment%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









0














I'd say that the typographically appropriate amount of whitespace around the text string depends both on the contents of the text string as well as on what comes before and after the string.



E.g., if the text string consists of "if and only if" and the material before and after the string is as simple as x=y and y=x, an ordinary interword space is just fine:



x=y text{ if and only if } y=x 
text{$x=y$ if and only if $y=x$} % note: entire line is arg. of text


If, in contrast, the math expressions before and/or after the string are a bit more complex than x=y, a bit more whitespace, say in the amount of quad, may make the material to read. See, e.g., the third line of the following screenshot -- which actually contains two instances of text, with two different amounts of whitespace.



enter image description here



documentclass{report}
usepackage{amsmath}
begin{document}
begin{gather*}
x=y text{ if and only if } y=x \
text{$x=y$ if and only if $y=x$} \
frac{x^2}{y^2}ne0 quadtext{if and only if}quad xne0 text{ and } yne0\
end{gather*}
end{document}





share|improve this answer
























  • Is it possible to edit the command so that it automatically puts a good amount of space?

    – simple jack
    8 mins ago
















0














I'd say that the typographically appropriate amount of whitespace around the text string depends both on the contents of the text string as well as on what comes before and after the string.



E.g., if the text string consists of "if and only if" and the material before and after the string is as simple as x=y and y=x, an ordinary interword space is just fine:



x=y text{ if and only if } y=x 
text{$x=y$ if and only if $y=x$} % note: entire line is arg. of text


If, in contrast, the math expressions before and/or after the string are a bit more complex than x=y, a bit more whitespace, say in the amount of quad, may make the material to read. See, e.g., the third line of the following screenshot -- which actually contains two instances of text, with two different amounts of whitespace.



enter image description here



documentclass{report}
usepackage{amsmath}
begin{document}
begin{gather*}
x=y text{ if and only if } y=x \
text{$x=y$ if and only if $y=x$} \
frac{x^2}{y^2}ne0 quadtext{if and only if}quad xne0 text{ and } yne0\
end{gather*}
end{document}





share|improve this answer
























  • Is it possible to edit the command so that it automatically puts a good amount of space?

    – simple jack
    8 mins ago














0












0








0







I'd say that the typographically appropriate amount of whitespace around the text string depends both on the contents of the text string as well as on what comes before and after the string.



E.g., if the text string consists of "if and only if" and the material before and after the string is as simple as x=y and y=x, an ordinary interword space is just fine:



x=y text{ if and only if } y=x 
text{$x=y$ if and only if $y=x$} % note: entire line is arg. of text


If, in contrast, the math expressions before and/or after the string are a bit more complex than x=y, a bit more whitespace, say in the amount of quad, may make the material to read. See, e.g., the third line of the following screenshot -- which actually contains two instances of text, with two different amounts of whitespace.



enter image description here



documentclass{report}
usepackage{amsmath}
begin{document}
begin{gather*}
x=y text{ if and only if } y=x \
text{$x=y$ if and only if $y=x$} \
frac{x^2}{y^2}ne0 quadtext{if and only if}quad xne0 text{ and } yne0\
end{gather*}
end{document}





share|improve this answer













I'd say that the typographically appropriate amount of whitespace around the text string depends both on the contents of the text string as well as on what comes before and after the string.



E.g., if the text string consists of "if and only if" and the material before and after the string is as simple as x=y and y=x, an ordinary interword space is just fine:



x=y text{ if and only if } y=x 
text{$x=y$ if and only if $y=x$} % note: entire line is arg. of text


If, in contrast, the math expressions before and/or after the string are a bit more complex than x=y, a bit more whitespace, say in the amount of quad, may make the material to read. See, e.g., the third line of the following screenshot -- which actually contains two instances of text, with two different amounts of whitespace.



enter image description here



documentclass{report}
usepackage{amsmath}
begin{document}
begin{gather*}
x=y text{ if and only if } y=x \
text{$x=y$ if and only if $y=x$} \
frac{x^2}{y^2}ne0 quadtext{if and only if}quad xne0 text{ and } yne0\
end{gather*}
end{document}






share|improve this answer












share|improve this answer



share|improve this answer










answered 10 mins ago









MicoMico

275k30373761




275k30373761













  • Is it possible to edit the command so that it automatically puts a good amount of space?

    – simple jack
    8 mins ago



















  • Is it possible to edit the command so that it automatically puts a good amount of space?

    – simple jack
    8 mins ago

















Is it possible to edit the command so that it automatically puts a good amount of space?

– simple jack
8 mins ago





Is it possible to edit the command so that it automatically puts a good amount of space?

– simple jack
8 mins ago


















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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f470944%2fhorizontal-spacing-around-text-string-in-a-displayed-math-environment%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

Lallio

Futebolista

Jornalista