Typography in Calculus Textbooks (or math textbooks in general) My question is about typography in Calculus textbooks. I've scanned through numerous Calculus texts.  I find that sometimes authors vary their use of "traditional" form in textbooks.  For example... (I apologize for being verbose but needed to illustrate the question I have)...
They may write the math notation in the middle of a paragraph like the example in the next sentence. It may look something like this $dy/dx$. Notice that the notation is written from left to right (which is bad thing to me), and also notice that there is no awkward line spacing in this paragraph (which is good thing to me).  Everything looks clean.
But then occasionally I'll see notation written the middle of a paragraph like the example in the next sentence.   Something like this, $\frac{dy}{dx}$.  Note that the notation is written in "traditional" notation (which is a good thing to me). Also notice that this creates an awkward line spacing in this paragraph between the lines 1,2 and 3(which is a bad thing to me).  You can see it in this paragraph.  It doesn't look good to me at all. 
My question to you... Is there a standard practice on when to use each type of notation?  In general, are there rules on typography for math texts somewhere or a guide that you know of?  How do textbook authors know what to do to make there textbook look as professional as possible? 
I'm attempting to create professionally written lectures and want them to look as textbook like as possible. 
 A: A good place to look for these rules are the author guidelines for math journals. Typically, inline formulas should go on the same line. It is uncommon to write $\frac{dx}{dy}$ since it is not esthetic. Math text books may be an exception since they do not want students to be confused about notation.
For example, https://www.elsevier.com/journals/journal-of-combinatorial-theory-series-b/0095-8956/guide-for-authors#25000 mentions:

Present simple formulae in line with normal text where possible and use the solidus (/) instead of a horizontal line for small fractional terms, e.g., X/Y.

A: I generally agree that inline fractions should be written with a $/$, but that's not the only way to avoid ugly spacing. For instance, $\smash{\frac{\smash{dy}}{\smash{dx}}}$ is produced by the code \smash{\frac{\smash{dy}}{\smash{dx}}}, which to me looks alright (albeit a bit cramped). If the expression is complicated enough to warrant usage of \frac, I'd be inclined to put it on its own line.
A: I think it's more of a matter of house style than a general convention.  I'm an author, and my editors make notes that are inconsistent with those in other books.
If you really want to be careful about style like, use plenty of semantic macros.  For instance, you can write a \D macro that will set \D{y}{x} as $\frac{dy}{dx}$ in display mode or $dy/dx$ inline.  Then if you want to change the way it looks, you change one line of code instead of hundreds or thousands.
