hspace by percentage of column width? [closed]












0















How can one space things horizontally, not by a fixed amount but rather than by a percentage of the column width? I want something akin to



$$
Ahspace{20%}Bhspace{20%}C
$$


instead of



$$
Ahspace{1.5in}Bhspace{1.5in}C
$$


(Searched on this and didn't find anything.)



My intended use is MathJax in Google Colab, i.e. web pages that may have variable widths. I suppose in regular LaTeX I could calculate some auxiliary variables, like spacewidth = 0.4*textwidth and then use hspace{spacewidth}, but I haven't been able to get MathJax to calculate auxiliary variables.



...I suppose what I'm doing is akin to a one-row table, so perhaps I could use a table instead of hspace. Same question applies: how to control the width on a percentage basis?



EDIT: For the purposes of reproduction, I created a simple Google Colab notebook to test this out.










share|improve this question















closed as off-topic by Phelype Oleinik, Kurt, Circumscribe, Stefan Pinnow, egreg Feb 8 at 18:29


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – Phelype Oleinik, Kurt, Circumscribe, Stefan Pinnow, egreg

If this question can be reworded to fit the rules in the help center, please edit the question.

















  • hspace{0.2columnwidth}

    – Phelype Oleinik
    Feb 8 at 15:40













  • @PhelypeOleinik Thanks, but that does not render. MathJax just prints the code as is. $$Ahspace{0.2columnwidth}Bhspace{0.2columnwidth}C$$ Also adding "*"'s for the multiplication won't render either.

    – sh37211
    Feb 8 at 15:42











  • Created a Colab notebook for demo: colab.research.google.com/drive/…

    – sh37211
    Feb 8 at 15:44






  • 1





    I fear MathJax is off-topic here. While its syntax looks like TeX, it does not have anything to do with it.

    – campa
    Feb 8 at 15:47






  • 2





    Apparently MathJax doesn't know what a columnwidth is, so it is not possible. From the very little I know of MathJaX, it does not contain a proper “page” which can be used as a reference, so this type of relative measure is not possible. If I put meaningcolumnwidth in that notebook you shared I get it rendered in red, so I guess that it does not exist (neither does meaning). Either way, it's off-topic for the reason campa said. I suggest you use StackOverflow ;)

    – Phelype Oleinik
    Feb 8 at 15:51
















0















How can one space things horizontally, not by a fixed amount but rather than by a percentage of the column width? I want something akin to



$$
Ahspace{20%}Bhspace{20%}C
$$


instead of



$$
Ahspace{1.5in}Bhspace{1.5in}C
$$


(Searched on this and didn't find anything.)



My intended use is MathJax in Google Colab, i.e. web pages that may have variable widths. I suppose in regular LaTeX I could calculate some auxiliary variables, like spacewidth = 0.4*textwidth and then use hspace{spacewidth}, but I haven't been able to get MathJax to calculate auxiliary variables.



...I suppose what I'm doing is akin to a one-row table, so perhaps I could use a table instead of hspace. Same question applies: how to control the width on a percentage basis?



EDIT: For the purposes of reproduction, I created a simple Google Colab notebook to test this out.










share|improve this question















closed as off-topic by Phelype Oleinik, Kurt, Circumscribe, Stefan Pinnow, egreg Feb 8 at 18:29


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – Phelype Oleinik, Kurt, Circumscribe, Stefan Pinnow, egreg

If this question can be reworded to fit the rules in the help center, please edit the question.

















  • hspace{0.2columnwidth}

    – Phelype Oleinik
    Feb 8 at 15:40













  • @PhelypeOleinik Thanks, but that does not render. MathJax just prints the code as is. $$Ahspace{0.2columnwidth}Bhspace{0.2columnwidth}C$$ Also adding "*"'s for the multiplication won't render either.

    – sh37211
    Feb 8 at 15:42











  • Created a Colab notebook for demo: colab.research.google.com/drive/…

    – sh37211
    Feb 8 at 15:44






  • 1





    I fear MathJax is off-topic here. While its syntax looks like TeX, it does not have anything to do with it.

    – campa
    Feb 8 at 15:47






  • 2





    Apparently MathJax doesn't know what a columnwidth is, so it is not possible. From the very little I know of MathJaX, it does not contain a proper “page” which can be used as a reference, so this type of relative measure is not possible. If I put meaningcolumnwidth in that notebook you shared I get it rendered in red, so I guess that it does not exist (neither does meaning). Either way, it's off-topic for the reason campa said. I suggest you use StackOverflow ;)

    – Phelype Oleinik
    Feb 8 at 15:51














0












0








0








How can one space things horizontally, not by a fixed amount but rather than by a percentage of the column width? I want something akin to



$$
Ahspace{20%}Bhspace{20%}C
$$


instead of



$$
Ahspace{1.5in}Bhspace{1.5in}C
$$


(Searched on this and didn't find anything.)



My intended use is MathJax in Google Colab, i.e. web pages that may have variable widths. I suppose in regular LaTeX I could calculate some auxiliary variables, like spacewidth = 0.4*textwidth and then use hspace{spacewidth}, but I haven't been able to get MathJax to calculate auxiliary variables.



...I suppose what I'm doing is akin to a one-row table, so perhaps I could use a table instead of hspace. Same question applies: how to control the width on a percentage basis?



EDIT: For the purposes of reproduction, I created a simple Google Colab notebook to test this out.










share|improve this question
















How can one space things horizontally, not by a fixed amount but rather than by a percentage of the column width? I want something akin to



$$
Ahspace{20%}Bhspace{20%}C
$$


instead of



$$
Ahspace{1.5in}Bhspace{1.5in}C
$$


(Searched on this and didn't find anything.)



My intended use is MathJax in Google Colab, i.e. web pages that may have variable widths. I suppose in regular LaTeX I could calculate some auxiliary variables, like spacewidth = 0.4*textwidth and then use hspace{spacewidth}, but I haven't been able to get MathJax to calculate auxiliary variables.



...I suppose what I'm doing is akin to a one-row table, so perhaps I could use a table instead of hspace. Same question applies: how to control the width on a percentage basis?



EDIT: For the purposes of reproduction, I created a simple Google Colab notebook to test this out.







spacing equations mathjax






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 8 at 15:46







sh37211

















asked Feb 8 at 15:39









sh37211sh37211

305




305




closed as off-topic by Phelype Oleinik, Kurt, Circumscribe, Stefan Pinnow, egreg Feb 8 at 18:29


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – Phelype Oleinik, Kurt, Circumscribe, Stefan Pinnow, egreg

If this question can be reworded to fit the rules in the help center, please edit the question.







closed as off-topic by Phelype Oleinik, Kurt, Circumscribe, Stefan Pinnow, egreg Feb 8 at 18:29


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – Phelype Oleinik, Kurt, Circumscribe, Stefan Pinnow, egreg

If this question can be reworded to fit the rules in the help center, please edit the question.













  • hspace{0.2columnwidth}

    – Phelype Oleinik
    Feb 8 at 15:40













  • @PhelypeOleinik Thanks, but that does not render. MathJax just prints the code as is. $$Ahspace{0.2columnwidth}Bhspace{0.2columnwidth}C$$ Also adding "*"'s for the multiplication won't render either.

    – sh37211
    Feb 8 at 15:42











  • Created a Colab notebook for demo: colab.research.google.com/drive/…

    – sh37211
    Feb 8 at 15:44






  • 1





    I fear MathJax is off-topic here. While its syntax looks like TeX, it does not have anything to do with it.

    – campa
    Feb 8 at 15:47






  • 2





    Apparently MathJax doesn't know what a columnwidth is, so it is not possible. From the very little I know of MathJaX, it does not contain a proper “page” which can be used as a reference, so this type of relative measure is not possible. If I put meaningcolumnwidth in that notebook you shared I get it rendered in red, so I guess that it does not exist (neither does meaning). Either way, it's off-topic for the reason campa said. I suggest you use StackOverflow ;)

    – Phelype Oleinik
    Feb 8 at 15:51



















  • hspace{0.2columnwidth}

    – Phelype Oleinik
    Feb 8 at 15:40













  • @PhelypeOleinik Thanks, but that does not render. MathJax just prints the code as is. $$Ahspace{0.2columnwidth}Bhspace{0.2columnwidth}C$$ Also adding "*"'s for the multiplication won't render either.

    – sh37211
    Feb 8 at 15:42











  • Created a Colab notebook for demo: colab.research.google.com/drive/…

    – sh37211
    Feb 8 at 15:44






  • 1





    I fear MathJax is off-topic here. While its syntax looks like TeX, it does not have anything to do with it.

    – campa
    Feb 8 at 15:47






  • 2





    Apparently MathJax doesn't know what a columnwidth is, so it is not possible. From the very little I know of MathJaX, it does not contain a proper “page” which can be used as a reference, so this type of relative measure is not possible. If I put meaningcolumnwidth in that notebook you shared I get it rendered in red, so I guess that it does not exist (neither does meaning). Either way, it's off-topic for the reason campa said. I suggest you use StackOverflow ;)

    – Phelype Oleinik
    Feb 8 at 15:51

















hspace{0.2columnwidth}

– Phelype Oleinik
Feb 8 at 15:40







hspace{0.2columnwidth}

– Phelype Oleinik
Feb 8 at 15:40















@PhelypeOleinik Thanks, but that does not render. MathJax just prints the code as is. $$Ahspace{0.2columnwidth}Bhspace{0.2columnwidth}C$$ Also adding "*"'s for the multiplication won't render either.

– sh37211
Feb 8 at 15:42





@PhelypeOleinik Thanks, but that does not render. MathJax just prints the code as is. $$Ahspace{0.2columnwidth}Bhspace{0.2columnwidth}C$$ Also adding "*"'s for the multiplication won't render either.

– sh37211
Feb 8 at 15:42













Created a Colab notebook for demo: colab.research.google.com/drive/…

– sh37211
Feb 8 at 15:44





Created a Colab notebook for demo: colab.research.google.com/drive/…

– sh37211
Feb 8 at 15:44




1




1





I fear MathJax is off-topic here. While its syntax looks like TeX, it does not have anything to do with it.

– campa
Feb 8 at 15:47





I fear MathJax is off-topic here. While its syntax looks like TeX, it does not have anything to do with it.

– campa
Feb 8 at 15:47




2




2





Apparently MathJax doesn't know what a columnwidth is, so it is not possible. From the very little I know of MathJaX, it does not contain a proper “page” which can be used as a reference, so this type of relative measure is not possible. If I put meaningcolumnwidth in that notebook you shared I get it rendered in red, so I guess that it does not exist (neither does meaning). Either way, it's off-topic for the reason campa said. I suggest you use StackOverflow ;)

– Phelype Oleinik
Feb 8 at 15:51





Apparently MathJax doesn't know what a columnwidth is, so it is not possible. From the very little I know of MathJaX, it does not contain a proper “page” which can be used as a reference, so this type of relative measure is not possible. If I put meaningcolumnwidth in that notebook you shared I get it rendered in red, so I guess that it does not exist (neither does meaning). Either way, it's off-topic for the reason campa said. I suggest you use StackOverflow ;)

– Phelype Oleinik
Feb 8 at 15:51










0






active

oldest

votes

















0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents