Jump to content
Sign in to follow this  
Anna M

Equations In AFDesigner / Windows

Recommended Posts

Hi, 

I am a scientist and Affinity Designer is my de-facto first choice for making illustrations for papers, posters, etc. Because it's great, and it's affordable. 

But making a scientific poster is a hassle. A true hassle. Because I do need to use equations. How does one import an equation into a Designer? I found several options, none really works for posters -- keep reading: 

1) create a small LaTeX document;

(a) compile into PDF; have hours of "fun" with fonts and import options. 

(b) alternatively, compile into a PostScript, open a file browser, rename PS into EPS, drag-and-drop, if you're lucky, sometimes I managed to make it work. Caveat: if you have many equations, they need to be in individual EPS files, otherwise Designer will not like one EPS file constantly getting changed. (Bonus: open your poster from a year ago with 20 EPS figures in it. Click 20 times on a popup window saying the source has changed because you re-ran the computer simulation which created them. After clicking on one popup, wait for a smooth animation as 19 other popups slide around your screen. Repeat 19 times. Then, you can access your poster. Probably.) 

2) use online converters. The one I know that reliably works is www.codecogs.com . But it does not allow for fonts bigger than 20 pts, and fonts in posters are at least 24 pts. So when I really need to insert an equation I do this: (a) type it in codecogs, (b) download SVG file (copypasting from the browser results in a little black rectangle instead of the equation). So download the file, open the file browser, drag and drop. Not into the poster, that would be too easy. Because then, I'll need to manually resize the image to match my font size. I have devised some templates to insert the file into and either resize to match the size of a sample character, or type in numbers in Designer's "transform" tool, for which I need a calculator at hand (would be nice to download in 12pt and resize in Designer by 200%, but alas - so I use a calculator). 

None of this is a good working solution if you need like 20 equations. 

Is there a working solution? I have heard of LaTeXit, but that won't work in Windows. MS Office has some weird equation editor, but that won't copypaste to Designer.  

Every single time I make a poster, I often spend hours searching for other options online and it gets inexplicably frustrating. Every. Single. Time!  When I need a lot of equations, I make a LaTeX save them all as a PS, then convert to EPS (they still have to fit on one page), then open it in a separate Designer window, then convert to curves, then "Group" curves corresponding to all symbols in a single equation, then resize in bulk, then copypaste. Aaarrrggghhh. 

Has anyone have found any working solution? As I said, the solutions above work if you have one equation, but are a true hassle if you need to put in a dozen. (Unless there is an alternative to codecogs that lets you set large font size and hopefully works as a copypaste?) 

It would be really great for more than just posters, as I often use Designer for illustrations, in which sometimes I need to use equations, too -- that would make me never want to quit the Designer ever. 

Thanks! 

Edited by Anna M
fixed a few typos

Share this post


Link to post
Share on other sites

I am using MathType with Word, and it works flawlessly and effectively in a workflow where inline equations are converted to eps files and replaced with file references which are then converted back with a script to placed eps files within the text in InDesign. I have tried to find a working solution when using Affinity apps but without luck, so far.

Affinity apps do not support embedded fonts so if you want to have your equations in EPS format, they should be converted to curves.

MathType can convert equations (including Word equations) to eps files which do not work because of font embedding issue in Affinity apps, and to Windows Meta Files (.wmf), which Affinity apps, including Designer, happily imports, all elements editable. Affinity Publisher even imports inline MathType equations as part of Word .docx placement. But if you are looking for a free solution, this does not naturally work as both MathType and Word are currenly rent-based software. And Designer does not support Word files, anyway, at the moment.

You might want to test if TeXStudio works for you. It is a massive package with all additional plugins. I have every now and then installed it to get some LaTeX-based stuff imported to InDesign (it typically involves -- ironically -- conversion to Word format), but do not have it installed at the moment so cannot tell if it could produce either eps files converted to curves, or Windows Meta Files, so that you could get them in Affinity Design, but this might well work. 

UPDATE: Forgot to mention that Windows Meta Files come in RGB mode both when imported as image files and when imported as part of Word documents, so this is one additional concern -- not a big thing to convert them to K100 but of course one additional task that needs to be done.

UPDATE2: I installed TeXStudio with MiKTeX and about a dozen additional packages and produced a PDF of text containing LaTeX equations, but the resulting PDF contains multiple embedded Type 1 fonts none of which can be interpreted by Designer, so it seems that LibreOffice is the way to go.

Share this post


Link to post
Share on other sites
19 minutes ago, Joachim_L said:

Have you ever tried the equation editor of LibreOffice? Export the equation to PDF and open in AD. Unfortunately I am not so familiar with equations.

That might work. I tried saving Word equations as PDF file and this would work fine except that when imported to Affinity apps the embedded fonts are lost and you just get lots of question marks...

UPDATE: LibreOffice created PDFs containing LibreOffice equations seem to work fine, but appear to be in RGB mode. But this is probably the best choice available.

From LibreOffice.pdf

Share this post


Link to post
Share on other sites

Further good news: LibreOffice can open Word files containing Word equations and when exported to PDF, Affinity apps can open them, equations included. But as with PDF files in general, editability is not good and the equations are typically composed of multiple elements, even if all text parts are fully editable (using LibreOffice fonts).

So while this solution is not a robust workflow for professional publishing of scientific documents, at least it is a way to get equations as printable objects to be imported in Affinity created documents.

Share this post


Link to post
Share on other sites

If you are fluent with LaTeX and you have Word anyway, then this could be a workflow for you:

1) Write equations using UnicodeMath or LaTeX expressions (or using the visual editor). Save as .docx.

2) Open in LibreOffice and export to PDF.

3) Open PDF in Designer.

Screenshots:

a) Type in the equation (or paste as LaTeX or UnicodeMath):

equation_word.thumb.jpg.54f30ae00e6d5d7559714f5b2ead1c7c.jpg

b) View rendered:

equation_word2.jpg.a13f0a1aecedde7c1e39fedb46589fcc.jpg

c) Once opened in LibreOffice and converted to PDF, open in Designer:

equation_designer.jpg.b54a717eb5d16b1d57e354f6c6cebe71.jpg

The equation is editable (but needs to be converted to K100).

I cannot say why Word-generated PDFs do not directly work in Affinity apps even if fonts are available (installed on the computer where the file is imported). The PDFs themselves look fine and some of the glyphs import fine while some show as question marks (even if correct font like CambriaMath is used). The same PDF files open flawlessly in Illustrator, equations converted to curves, and can be embedded as EPS file in InDesign, and produced without errors as PDFs, equations being still in font format. This will hopefully change in the future and become possible also in Affinity Designer and Publisher, if and when Affinity apps support PDF/EPS passthrough and embedded fonts.

Note that when opened in LibreOffice, the Word fonts will be replaced but this seems to work fine at least with simple test equations I tried.

inline_word_equation_latex_expression.docx

inline_word_equation_latex_expression.pdf

inline_word_equation_latex_expression.afdesign

Share this post


Link to post
Share on other sites

One further note on Word > LibreOffice > Affinity Designer workflow: it also works via Clipboard directly from Word or LibreOffice to Affinity Designer (and also between Word and LibreOffice):

equation_from_word_clipboard_emf.jpg.4471e4119935f7b01d20eaf2ddf8c831.jpg

As for Word, just copy the equation onto the Clipboard, then click Edit > Paste Special in Affinity Designer, and select "Enhanced Windows Metafile". You get editable equation in RGB color mode which you can easily convert to K100 by using the Layers panel which shows all composing parts of the equation in one group.

Btw: the reason Affinity Designer fails to read Word-generated PDFs containing equations is that it seems to read the equations as Windows Metafile data, rather than Enhanced Metafile. If you paste special as "Windows Metafile", you get exactly similar question marks as when placing or opening a PDF containing a Word equation. Perhaps something that could easily be fixed in future versions...

Share this post


Link to post
Share on other sites

Any requirement for Windows Metafile (enhanced or not) makes the technique Windows-specific, I think.


-- Walt

Windows 10 Home, version 1909 (183623.476),
   Desktop: 16GB memory, Intel Core i7-6700K @ 4.00GHz, GeForce GTX 970
   Laptop:  8GB memory, Intel Core i7-3625QM @ 2.30GHz, Intel HD Graphics 4000 or NVIDIA GeForce GT 630M
Affinity Photo 1.7.3.481 and 1.8.0.526 Beta   / Affinity Designer 1.7.3.481 and 1.8.0.526 Beta  / Affinity Publisher 1.7.3.481 and 1.8.0.531 Beta

Share this post


Link to post
Share on other sites
19 minutes ago, walt.farrell said:

Any requirement for Windows Metafile (enhanced or not) makes the technique Windows-specific, I think.

Yes, as far as I know. On the other hand macOS versions might be able to render the equations also using PostScript. Word has the equations on Clipboard also in HTML, MathHTML and Rich Text Format, all of which should be available on macOS (even if Affinity apps basically only support RTF, at the moment; for some reason they cannot use the RTF version of equation, though). (Note that the topic was basically Windows-related...)

EDIT: LibreOffice (Windows version) puts equations on Clipboard in Enhanced Metafile format, but also in GDIMetafile format, which I am not familiar with. It might be OS specific, but it seems this is the format Affinity apps use (rather than Enhanced Metafile). Anyway, it is not necessary to Paste Special when pasting equations from LibreOffice, and I assume this method also works on macOS. macOS version of Word probably also puts Word equations on mac Clipboard using a format that can be read by other macOS apps. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

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.