Message Boards Message Boards


Superscripts and corrupted layout of .pdf files

Posted 2 months ago
5 Replies
2 Total Likes

I’ve been using Mathematica for several years on OS X 10.9.6. Not infrequently I would find that the text in my notebooks would become corrupted, often first noticed after printing them as a .pdf file. This seemed to correlate with the complexity of the math entries. Often I could fix it by quitting Mathematica and reopening the notebook. I recently switched to Catalina (10.15.7) and downloaded Mathematica 12.1.1. I thought that certainly by now someone else would have noticed this problem and it would be fixed, but if anything it seems to be worse. In particular, I have seen the problem when entering exponents in text (not input) as superscripts. The small exponent becomes widely spaced from its character and when sent to print as .pdf, some text after the exponent disappears, as does the exponent itself. Often, the text jump scrolls a few lines back, so that one must go looking for the point of entry. One can see the spacing here in the second line of text.

enter image description here

It shows up in the notebook after reopening and it persists when the notebook is closed and reopened. It happens when a superscript is entered with SHIFT-CNTL-^ as well as when it is entered by selecting it from the palette. Of course, I am hoping someone knows of a solution, or at least that someone is working on a solution.

5 Replies

You are not using the default fonts, and there is a mixture of italics and roman characters. How are you typing these formulas? Are these formulas inside an inline cell?

With version 12.2 we will be able to enter formulas with TeX syntax.

Posted 2 months ago

The font is Times, which I use because it is perhaps the most common serif font face. It is size 16 because smaller sizes become too difficult to read on a 27" screen. I don't know what you mean by "inline", but the lines are in a text cell, that is, a cell created by selecting "Plain text" from the little dropdown menu tab on the left side which displays after placing the cursor between cells. The mix of italics and roman characters is unintentional. I think the italics creep in when one creates the superscripts. I usually go through afterwards and convert the italics to roman where necessary.

I just deleted all of the notebook cells prior to and following the example and was unable to reproduce the error on the very same text in my example. I conclude that something about the context created the problem, but I have no idea what. The notebook has only three cells, and is less than two pages in length. This was the second cell in the notebook. The text that I deleted was similar to that shown. I still see the abrupt scroll back when I enter a superscript frame. This in itself is very distracting.

I'm sure it will be useful at times to be able to enter formulas with TeX syntax, but isn't that a step backwards? One of the great advantages of Mathematica is the ability to quickly and fairly naturally enter math symbols in Plain text cells and intersperse them with input cells.

I will try switching to the default font. One loses a bit of legibility, but perhaps I have been asking too much of what is first and foremost a math program.

As in TeX we use \ $...\$ to enter or exit math mode, with Mathematica we are supposed to use control-( and control-) to enter "inline cell", as explained in Insert Inline Math in Text

The "inline cell" is signaled visually by a pinkish color that appears as background when the insertion bar is inside the cell. The "inline cell" is also triggered automatically by typing exponents. However, you may end up with a mixture: the exponent in math mode and the base outside the math mode. I wonder if something like this has happened to you, which may explain the strange spacings and the italic-roman font fluctuations. Move the pointer around to reveal the extents of the inline cells.

Posted 2 months ago

I had to laugh at myself when I read this, as I have entered math expressions in text cells for years without knowing this rule. I realize now that my "math" expressions are mostly a mix of text and inline math according to Mathematica's definition. I'm not sure I'm breaking any rules that would break the software, because the instruction says one can enter math mode by entering a math character. I would leave math mode by using an arrow key to leave the colored box or placing the cursor elsewhere. Perhaps that is a destructive action. I think knowing this and staying closer to the default font settings will probably solve my problems. Thanks.

The inline cells are very poorly documented. For example, they are barely mentioned in the guide on Mathematical Typesetting. You are excused if you had never heard about them.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract