How to modify the height of the free space from LaTeX?

Hey together,
I am bothered by the height of the displayed LaTeX content. Therefore I would like to modify the height so that the free space above and below the formula is smaller.

I have already tried it with the following custom CSS:

.MathJax { 
	font-size: 1.0 em; 
	height: 1px;
}

The result:

Unfortunately this only removes the free space below the formula.

Is there any way to remove the upper free space as well? Also I would like to center the text. However, I have not been able to find a working solution for this either.

This should work:

mjx-container { 
	margin-top: 0px !important;
	margin-bottom: 0px !important;
}
1 Like

Thanks for the answer!

Although it did not work with the value 0, but with the value -20.

Through the following adjustment, it now works as I wanted it to:

mjx-container { 
	margin-top: -20px !important;
	margin-bottom: -20px !important;
  	text-align: center !important;
}

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.