Jump to content
You must now use your email address to sign in [click for more info] ×

How Do You Format Fractions in Publisher Tables


Recommended Posts

I need some help creating fractions in Tables, preferably using some sort of number style or text style, rather than manually formatting each fraction one-by-one, which is very time consuming. I create a lot of tables for Engineering companies, which include combinations of numbers and fractions. Many columns of data will have integers followed by fractions. Some customers want a hyphen between integer and fraction, and other customers do not want any hyphens, so I need to be able to configure both. For example, the same column may have numbers (with or without hyphen), such as:

1-½ 

35-7/64

18-¼

165-17/32

I need small fractions, not that do not use full sized characters. Some fonts have common fractions pre-built, (e.g., ¼, ½, ¾, etc) but I am often required to create fractions using 16ths, 32nds, 64ths, etc (e.g., 17/64, 3/32, etc). Sometimes the integer before the fraction will have a single digit, two digits, three digits, etc. And sometimes, an integer suffices without any following fraction.

I can manually change a fraction in the Character Panel, but that takes forever with a lot of data. I've been able to create text styles that render the entire table cell as a fraction, but I need an Integer followed by a Fraction. I haven't been able to figure out how to do this in Publisher Tables or even with Character/Paragraph Styles. Can anyone help with this?

Thank you.

2017 15" MacBook Pro, 16 MB RAM, Ventura v13.6.6, Affinity Photo/Designer/Publisher v1 & v2, Adobe CS6 Extended, LightRoom v6, Blender, InkScape, Dell 30" Monitor, Canon PRO-100 Printer, i1 Spectrophotometer, i1Publish

Link to comment
Share on other sites

That's IMO usually something that would be part of common equations editing facilities for technical writings, which APub yet doesn't have build-in. Those are things which TeX/LaTeX and FrameMaker do support in a very comfortable manner. - You may have to look around and use some third party tool for equations writing here, though you ideally want something which keeps text/characters editable then and so not inserted as images/bitmaps here then.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

Depending on the OpenType capabilities supported by your chosen font, you may be able to simply select the fraction text and set the fraction option in the Character panel, under Typography. This is with Arial, for example:

image.png.c623c38bb8d0c722b51faca5cbd06b18.png

 

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

If dealing with just specific fonts here as Walt suggested, there are some fonts which do offer more fractions than usual. - See therefor also ...

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

Thanks v-kyr and Walt. 

Arial doesn't work that way on my MacBook Pro, and most fractions remain full sized, but Myriad Pro works fine. Maybe it's the version of Arial I have loaded. I know I can apply the fraction character style with a font that supports fractions, one by one, just to the fraction component, but that's what I am trying to avoid. It's quite tiring and time consuming if you have hundreds of such entries, which most engineering manuals and brochures do. 

Here's my present workaround, which is a bit of a kludge, but it works for now.

1. I created two narrow table columns, side by side, and set the vertical line divider between them to None, so it looks visually like a single column.

2. I set the left-hand column to be Right Aligned and I'm using that for Integers. I set the Paragraph Style to Integers, which I created expressly for that purpose, to preserve full sized numbers.

3. I set the column to the right of the Integer column to be Left Aligned and I'm using that for my fraction components, when needed. I set this Paragraph Style to Fractions, which I created to give me small sized fraction format.

This allows me to enter data fairly quickly and it looks good when spacing is adjusted properly. I can't center align the "integer-fraction" combination as if it were one entry, but I guess I'll have to live with that. The only other options I have found, so far, is to select each fraction component, and manually apply the fraction from Character Panel. 

If anybody knows of a better way, I'd love to hear it.

Thanks.

2017 15" MacBook Pro, 16 MB RAM, Ventura v13.6.6, Affinity Photo/Designer/Publisher v1 & v2, Adobe CS6 Extended, LightRoom v6, Blender, InkScape, Dell 30" Monitor, Canon PRO-100 Printer, i1 Spectrophotometer, i1Publish

Link to comment
Share on other sites

6 minutes ago, v_kyr said:

If dealing with just specific fonts here as Walt suggested, there are some fonts which do offer more fractions than usual. - See therefor also ...

Thank you...I will definitely check that out. 😀

2017 15" MacBook Pro, 16 MB RAM, Ventura v13.6.6, Affinity Photo/Designer/Publisher v1 & v2, Adobe CS6 Extended, LightRoom v6, Blender, InkScape, Dell 30" Monitor, Canon PRO-100 Printer, i1 Spectrophotometer, i1Publish

Link to comment
Share on other sites

2 hours ago, Ldina said:

Some customers want a hyphen between integer and fraction, and other customers do not want any hyphens, so I need to be able to configure both.

Please try to dissuade those who belong to the first group! I’m sure I’m not the only one who thinks that

18-¼

looks like a subtraction (=17¾).

2 hours ago, Ldina said:

I need small fractions, not that do not use full sized characters.

I suspect there are too many occurrences of the word ‘not’ in there. Anyway, if you’re looking for stacking or ‘nut’ fractions then you need to find a font that includes support for them.

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

You could use Find and Replace, perhaps, with a regular expressiion search for something like \d+?/\d+? and then apply a character text style with the Fraction option set.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

1 hour ago, Ldina said:

If anybody knows of a better way, I'd love to hear it.

IIRC Minion Pro has a way of handling fractions which enables the user to just type, but it requires a particular sequence of characters. IIRC the OpenType fractions feature does not just use the usual ligatures substitutions, but it also uses contextual alternates (so the fraction is triggered by the following space or punctuation). Never did find any documentation of how it is supposed to work. A few other Adobe fonts work the same way.

So you may be able type a 1, then a ZWS or hairspace, and then 3/16, and then space (and the text style has Fractions On by default). Then you can align that text as you wish.

On my phone at the moment so I cannot look inside the font or test (can look later today).

Link to comment
Share on other sites

1 hour ago, walt.farrell said:

You could use Find and Replace, perhaps, with a regular expressiion search for something like \d+?/\d+? and then apply a character text style with the Fraction option set.

Thanks Walt, but I'm not conversant with search and replace expressions or how to use them, or even where to learn how. I pasted your expression into Publisher's F/R to try it and it sort of worked. If the denominator of the fraction had more than one character, it only changed the first digit. The 2nd denominator digit remained full sized. So, using 25-1/64 as an example, the 25 remained full size, 1/6 was converted to small fraction, but the 4 following the 6 in 64 remained full sized. 

Some things in Publisher are very nice, but I'm finding it painful to learn coming from InDesign. Some features are completely opaque and require hours of searching, trial and error and experimentation, and sometimes it still isn't clear. Unfortunately, Affinity's Help files are often inadequate and not very helpful. They need much more detail and lots of good, clear examples, IMO.

2017 15" MacBook Pro, 16 MB RAM, Ventura v13.6.6, Affinity Photo/Designer/Publisher v1 & v2, Adobe CS6 Extended, LightRoom v6, Blender, InkScape, Dell 30" Monitor, Canon PRO-100 Printer, i1 Spectrophotometer, i1Publish

Link to comment
Share on other sites

I think that it is worth investing in a modern OpenType like Helvetica Now, which comes with contextual fractions, and also some intellect as for excluding certain specific glyphs from ones that autotrigger inserting OpenType fraction formatting. This font family has also multiple styles so it works well whenever grotesque type is needed. There are probably serif-style fonts available allowing similar functionality but e.g. Minion Pro [at least the version I have] would also apply integer figures separated by zero-width space or non-breaking dash with fraction formatting, so it could not be applied en masse, similarly as on the clip below, but would require use of the kind of RegEx formatting shown in the video.

Anyway, if there is need to separate an integer figure from the fraction part, this font would allow using e.g. zero-width space or non-breaking dash [or another similar dash] as a separator, and both could be entered while typing by making these glyphs available with a keyboard shortcut. So when using this method, all fractions can be autoformatted both when applying OpenType fraction formatting afterwards (e.g. to whole table), and while typing. If necessary, existing regular dashes or spaces could be find-replaced with versions that will not auto-format to fractions. 

 

 

Note that you should disable the auto-correction feature of the Preferences, that automatically replaces entries like 1/2 or 1/4 with fractional codepoints. OpenType fractions are a completely separate thing so this automatic feature should be disabled when using them.

I am not sure if Google fonts nowadays comes with anything as smart as Helvetica Now -- if anyone knows, please inform!

UPDATE: Meta Serif Pro would be an example of a serif font that has similar OT fraction feature as Helvetica Now. Probably many other FF fonts has, as well (e.g. Signa Serif and Signa Slab Serif do), of all versions. Helvetica Now supports both proportional and tabular figures (including fractions), all Meta fonts support additionally OldStyle and Lining versions. Meta fonts are included in Adobe Fonts. 

Link to comment
Share on other sites

@lacerto

Thanks again. That worked with my installed versions of Myriad Pro and Minion Pro, so I have serif and sans fonts with many styles and weights I can use. It took me a while to get everything right, since I'm new to so many things in Publisher, but I finally got it working. And yes, it will be quite a time saver. Using the Opt-Spacebar shortcut for a non-breaking space between integer and fraction makes it fast and easy. My versions of Helvetica didn't seem to work that well, so perhaps I will check out Helvetica Now. I've attached a screenshot from Font Book showing the Helvetica fonts currently installed on my system. Some are rather old, but I keep them for legacy documents to be sure I am not missing any fonts when I open them.

I can see I need to learn more about RegEx and how to write search functions. 

Lou

Helvetica Fonts.png

2017 15" MacBook Pro, 16 MB RAM, Ventura v13.6.6, Affinity Photo/Designer/Publisher v1 & v2, Adobe CS6 Extended, LightRoom v6, Blender, InkScape, Dell 30" Monitor, Canon PRO-100 Printer, i1 Spectrophotometer, i1Publish

Link to comment
Share on other sites

31 minutes ago, Ldina said:

Thanks again. That worked with my installed versions of Myriad Pro and Minion Pro

You're welcome!

Yes, any fonts that have OpenType fractions can be used with RegEx (or even without RegEx, using find+replace multiple times for different fraction scenarios) and using character formatting to apply fraction formatting (optionally made to character style).

Having additionally the context-sensitive trigger, as in e.g. Helvetica Now and Meta would allow applying formatting selectively (only in selected range or columns), and also in situations where RegEx is not available (e.g. if Publisher is not installed, or when working in apps that do not support RegEx, Find and Replace, or applying formats automatically on found instances; e.g. Designer alone would not support these operations, but still does support OpenType features). As far as I know fonts like Minion Pro, Myriad Pro and Arial (the last mentioned it seems that only on Windows), or Helvetica species other than Helvetica Now, do not support contextual OpenType fractions so fraction formatting would be applied also on the integer part if it is selected.

Needing to perform find and replace selectively (confirming found instances one by one) would make formatting quite ineffective so there might be point in getting a font that has fraction formatting as a contextual feature. As long as Affinity Publisher does not allow limiting the search to a specific or selected range, such font feature would be very useful. 

The clip below demonstrates a situation where fraction formatting cannot be applied globally (because that would also change "fraction" in dates and font/leading markings), and where formatting is then applied selectively (column-wise) first to Minion Pro (does not work because integer part is formatted as well), and then on two fonts that support contextual fractions: Helvetica Now, and Meta Serif Pro.

 

 

 

Link to comment
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

Terms of Use | 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.