Jump to content

Recommended Posts

I'm working with an old PDF file which has a lot of mathematics in it, and I'm running into problems with the symbol font. For instance, the following equation:

image.png.70678234a6e5d3024c3628992d74f6f5.png

Is being imported as:

image.png.a9f98c333738d2dc050baf2763122e8b.png

As you can see, most of it comes through properly but for some reason the the parentheses in the Symbol font do not. (The other parentheses are in Times, and they're fine.) Is there a fix for this other than manual correction of each formula? At least a way to search for these unsupported characters?

Share this post


Link to post
Share on other sites

Have you tried copy pasting a squared parenthese in the Find box to see if the glyph can be searched? (In InDesign replaced glyphs are typically shown with a marker that still has the codepoint of the non-existing glyph so that it can be replaced, but I cannot check now how this is done in Publisher). On the other hand, it may be that an equation is composed in a way where replacing a single glyph breaks the composition so that spacing needs to be readjusted. This may become a very tedious job.

If there are lots of these kinds of equations, one possibility would be converting all text to curves using Adobe Acrobat Pro, Ghostscript, or macOS Preview Print to PS feature. This way you could take the equations from the version where fonts have been converted to curves (and discarding everything else), and discard the equations from the version with text that is used as the main document. 

Share this post


Link to post
Share on other sites

In fact it seems these can be copied and located with "find," so I now have a tedious but plausible way of dealing with them. I would much prefer not converting the whole thing to curves - the book is 700 pages long!

Affinity? I think this may be a bug, or at least an obscure feature.

Share this post


Link to post
Share on other sites

Sure, here's the whole page with that equation I dragged out of the document with Preview (I am using a Mac.) However, the page by itself looks correct when I open it in Affinity Publisher. I wonder what goes wrong when I import the whole book. I suspect that part of the problem is how very old the original file is; it probably dates from the early 2000s.

RwR, p495.pdf

Share this post


Link to post
Share on other sites

On Windows the page looks even worse, perhaps due to the fact, that I do not have the original fonts installed. But there seems to be a problem, because the Font Manager is telling me that Unsupported characters are used with SymbolPS. Additionally weird tracking values are used on this equation. So I fear you have to do some extra work.

Share this post


Link to post
Share on other sites

Joachim L: I think so. Thanks for looking into it.

v_kyr: The book's mathematics is set in a mix of Times and Symbol; the book's text is set in Adobe Garamond Pro. I am hoping to replace Times with Garamond, but I am not sure I can and wonder if I even ought to try; even with modern tools mathematical typesetting has many pitfalls.

The Symbol font is 35 years old, long predating Unicode. It has its own character encoding. Apple has its own Symbol font which uses a slightly different encoding. So, confusion for the developers of a layout program which came along much later.

Share this post


Link to post
Share on other sites

Very few apps [that can open a PDF file for editing] can render embedded fonts correctly. Two that I know are both Windows apps:

Xara Designer Pro:

equations_xara.jpg.821f9a5d2d56b667d48ca4d10be3da41.jpg

 

...and the other is PDF-XChange Pro:

equations_pdfx-change.jpg.75424a44e84cb6fa6adadc08de1a25cc.jpg

Both would allow you to make modifications with embedded fonts but laying out the complete document with different fonts would be a totally different thing so if the fonts were changed, the equation spacings etc. would break. Often PDF exported equations are also rendered in groups which would make their editing very painful. PDF-XChange however allows editing the equations like it would be regular text, so here I have replaced all glyphs typeset in Times with Adobe Garamond Pro:

equations_pdfx-change2.jpg.4464862f93fa9635e26d84a609f72f6f.jpg

It is basically just commas, other punctuation marks, the plus symbol, etc. so something that very few would notice.

Which app was used to create the equations of the document initially?

 

Share this post


Link to post
Share on other sites
Posted (edited)

Have you checked TeX math packages? It is very possible the original document is not Unicode compliant.

It is also probable if it's very old it was generated with a version of TeX.

An older TeX font might fix the problem.

Or try one of these.

https://ctan.org/pkg/unicode-math?lang=en

You might also try the old Adobe 256 glyph Symbol font. If you can find an old Windows Acrobat 5 Reader installation package, it includes a type 1 postscript version of the original symbol with its original mapping and glyph names.

Edited by speters33w
Additional stuff

Share this post


Link to post
Share on other sites

The original equations were probably set with eqn and troff, though I'm not sure which versions of those decades-old programs were used. The equations are mostly set in a combination of Times and Symbol. I am hoping to substitute Garamond for Times to save on fonts, but we'll see. Right now I am just clearing up the problems with Symbol.

As you say, resetting the whole document would be a lot of work!

The PDF import tends to scatter the mathematics through multiple text frames. One thing that would help would be operations that allowed one to combine and split text frames, but I have yet to find them. Have I missed them?

Share this post


Link to post
Share on other sites
7 hours ago, Randolph said:

The PDF import tends to scatter the mathematics through multiple text frames. One thing that would help would be operations that allowed one to combine and split text frames, but I have yet to find them. Have I missed them?

Yes, it is odd, and it at least appears to be up to rendering, as I cannot understand why e.g. PDF-XChange allows purely linear editing of equations set by mixing Symbol, Times and Adobe Garamond, while most other apps (actually all other that I tried) group the parts as per font, and then space them in a way that makes editing virtually impossible.

This happens also with MathType-created equations (latest non-rental version) and already when exported to EPS and opened e.g. in Illustrator. 

Share this post


Link to post
Share on other sites

I have worked out some answers. I'm going to give them here, and in separate posts. I would like to see these incorporated in the FAQ.

  1. The "locate" function of the font manager will locate unsupported characters, which may then be replaced. Unsupported characters may not be what you expect, they may look normal, but the font manager will find them for you.
  2. When importing PDF files with significant mathematical content, turn off  "Favor editable text over fidelity" and "Group lines of text into text frames." This much reduces your chances of getting scrambled mathematics. If you have a document that contains extensive text you need to edit as well as mathematics, consider doing both imports, and then moving pages from the less scrambled one into the one with editable text.
  3. Also, when importing mathematics, it sometimes helps to import single pages by themselves. I am not sure why. It may be an obscurity in the PDF conversion process, or an actual bug.

Share this post


Link to post
Share on other sites

Followup: the macOS "preview" app, which is among other things a PDF viewer, will correctly read and export the mathematics in my document, and Publisher imports the resulting document without fuss. Unfortunately, its export leaves me with the pages all 8½ × 11 inches in size, and these would have to be cut down in Publisher. So I'm doing individual pages when I need to.

So with this, and the information in my previous comments, my problem is solved. Thank you all for the advice and encouragement.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

Please note the Annual Company Closure section in the Terms of Use. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.