0

I have several equations that needs extra space between math symbols. Is there any way to add space between each symbol faster than adding

\,
\:
\quad

etc, to the code?

It takes a lot of time to add the extra space for each equation in each space between symbols

I am using this code to add extra space:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usepackage{multirow}
\usepackage{fancyhdr}
\usepackage{epic}
\usepackage{eepic}
\usepackage{amsmath}
\usepackage{threeparttable}
\usepackage{amscd}
\usepackage{here}
\usepackage{graphicx}
\usepackage{lscape}
\usepackage{tabularx}
\usepackage{longtable}
\usepackage{comment}
\usepackage{subfig}
\begin{document}

\begin{equation}\label{ModeloFactorizandolasK}
\dot{N_1} ={p}_{11}\,r_{1}' \,N_1 ( K_1-p_{11}N_1+p_{21}N_2 )\, + \,p_{12}\,r_2' \,N_1
( K_2\,-\,p_{12}\,N_1\,+\,p_{22}\,N_2 )
\end{equation}

\end{document}
  • 2
    Are you looking for a manual or an automatic solution? Because as far as manual solutions go the two keystrokes of \, \; \: can hardly be beaten (I admit \quad is longer ...). If you want an automatic solution you would have to explain a rule that says where to add what kind of space. – moewe Sep 6 '18 at 14:45
  • 2
    personally I would definitely write \left( K_2\,-\,p_{12}\,N_1\,+\p_{22}\,N_2 \right) as ( K_2-p_{12}N_1+\p_{22}N_2) so no \, and no \left\right – David Carlisle Sep 6 '18 at 15:07
  • 3
    also if you are looking for typing speedups ^\prime can be written as ' – David Carlisle Sep 6 '18 at 15:08
  • @moewe The rule is that always add space between any symbol – JuanMuñoz Sep 6 '18 at 15:36
  • 1
    All of your \, tokens are wrong. They lower the readability of the formula, rather than enhancing it. There is no reason for p_{11}\,r_{1}'\,N_1 at the beginning and p_{11}N_1 inside the parentheses. By the way, ^' is wrong and should be just '. Also, \dot{N_1} should be \dot{N}_1 for best placement of the dot. – egreg Sep 6 '18 at 18:00
3

I think (2) with the default TeX spacing looks best but (3) has automatically added space similar to the space added by the explicit \, in setting (1)

enter image description here

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usepackage{multirow}
\usepackage{fancyhdr}
\usepackage{epic}
\usepackage{eepic}
\usepackage{amsmath}
\usepackage{threeparttable}
\usepackage{amscd}
\usepackage{here}
\usepackage{graphicx}
\usepackage{lscape}
\usepackage{tabularx}
\usepackage{longtable}
\usepackage{comment}
\usepackage{subfig}
\begin{document}


aaa
\begin{equation}
\dot{N_1} ={p}_{11}\,r_{1}' \,N_1 ( K_1-p_{11}N_1+p_{21}N_2 )\, + \,p_{12}\,r_2' \,N_1
( K_2\,-\,p_{12}\,N_1\,+\,p_{22}\,N_2 )
\end{equation}


bbb
\begin{equation}
\dot{N_1} ={p}_{11}r_{1}' N_1 ( K_1-p_{11}N_1+p_{21}N_2 ) + p_{12}r_2' N_1
( K_2-p_{12}N_1+p_{22}N_2 )
\end{equation}


\thinmuskip=4mu
\medmuskip=6mu plus 4mu minus 4mu
\thickmuskip=7mu plus 7mu
\scriptspace=1pt
ccc
\begin{equation}
\dot{N_1} ={p}_{11}r_{1}' N_1 ( K_1-p_{11}N_1+p_{21}N_2 ) + p_{12}r_2' N_1
( K_2-p_{12}N_1+p_{22}N_2 )
\end{equation}

\end{document}
| improve this answer | |
  • Why do yo use in the code \thinmuskip=4mu \medmuskip=6mu plus 4mu minus 4mu \thickmuskip=7mu plus 7mu \scriptspace=1pt ? – JuanMuñoz Sep 12 '18 at 14:36
  • @JuanMuñoz tex adds thin medium or thick space in several places, eg = is a relation so gets thick space on either side, I increased the value of the thick space from its default value of 5mu to 7mu, so you get more space in the equation, as asked. medmuskip similarly changes the space around binary operators like +. – David Carlisle Sep 12 '18 at 14:44
  • the code you presented modify the spaces over the whole document?, if I am right that would be unconvenient for me because I just need it for the specific equation. – JuanMuñoz Sep 12 '18 at 15:33
  • @JuanMuñoz your question explicitly talked of spacing all equations It takes a lot of time to add the extra space for each equation in each space between symbols However it is Ok: you can do either, they are local settings so if you just want to affect one place them in any {...} group or an environment or anything else that keeps settings local. – David Carlisle Sep 12 '18 at 15:59
  • So I should add to the commands \thinmuskip the braquets {...}, to make de modification local? – JuanMuñoz Sep 27 '18 at 22:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.