Journal home page
General information
Submit an item
Download style files
Copyright
Contact us
logo for The PracTeX Journal TUG logo

Ask Nelly:
      How do I adjust the height of the square root sign?
      How do I create inline numbered lists the LaTeX way?

The Editors


tpjlogo

Q: Dear Nelly: I am writing a Mathematics reader for my students, and in one chapter I have an addition of several terms that all contain square roots. Some of these terms have parentheses under the square root sign, and others do not. This results in square root signs of two different heights, which I find ratehr ugly. Can you tell me how to remedy this?

A: This is a problem with one of those answers that can be hard to discover, but is really easy when you knwo how to do it. LaTeX defines the command

	      \mathstrut
	  
which is defined as
	      \vphantom(
	  
for such purposes: this is an emtpy box of width 0 but width the height and depth of a parenthesis. Just put such a strut under all square root signs that do not contain parentheses, and they will all end up being the same height as the square root signs that do contain parentheses.

If need be you can also define other struts of different heights.


The above question was answered by Yuri Robbers, a member of the editorial board of this journal. He can be reached at

tpjlogo

Q: Dear Nelly: I have written a paper in which I use a number of lists. But since those lists have to be inline rather than typeset as an actuallist, I have done them by hand, like this: 1) one; 2) two and 3) three, etc. As I should have expected, I pay the price now that I have to rewrite parts of this paper, and I need to change some lists as well, having to renumber them by hand. Also, I reference list items from the text, so all of that needs to be fixed by hand as well. This does not seem the true LaTeX way to me. Do you know how I can avoid this problem in the future?

A: This can be solved easily using the paralist package, which can be found at http://www.ctan.org/tex-archive/help/Catalogue/entries/paralist.html.

This package has several alternative ways of typesetting list, including one that does precisely what you want:
	      \usepackage{paralist}
	      There are four things to consider, which I will number
	      within this paragraph:
	      \begin{inparaenum}[1)]
	        \item one;
		\item two;
		\item three;
		\item etc.
	      \end{inparaenum}
	  
This will number your items exactly the way you showed in your letter, and as you can see it allows choosing the way the numbering works when starting the environment. In this case it is arabic numbers followed by a parenthesis, beginning at 1, but you could just as easily have chosen "a." for letters followed by a period.

The paralist package has far more options and ways of typesetting lsits, so do read the documentation to see what else it allows you to do!

The above question was answered by Yuri Robbers, a member of the editorial board of this journal. He can be reached at

tpjlogo




Page generated June 9, 2010 ;

TUG home page; webmaster; facebook; twitter; mastodon;   (via DuckDuckGo)