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

Recommended Posts

Hello, 

I have a big request. I have run into a problem with the automatic numbering of equations in Affinity Pubhlisher. 

I would need to create an automatic numbering for math equations so that the first number corresponds to the chapter number in which the equation is located. I am attaching an image for visualization. 

Thank you in advance for all the advice!

Viktor

EqNum_2.png

Link to comment
Share on other sites

At first I thought this would be easy to do using the Fields panel, but annoyingly enough while there is a Section name field, there is no Chapter field, so I have no idea how this could be done.

I hope someone else knows of a way to do this.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

40 minutes ago, R C-R said:

At first I thought this would be easy to do using the Fields panel, but annoyingly enough while there is a Section name field, there is no Chapter field, so I have no idea how this could be done.

Make and name the sections at the chapter starts and then name them 1., 2., 3. ... X. Include the dot/full stop/period in the name

But there is no way to automatically add the numbers after the section (chapter) names.

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

4 minutes ago, Old Bruce said:

Make and name the sections at the chapter starts and then name them 1., 2., 3. ... X. Include the dot/full stop/period in the name

That would work if there was no need to name the sections to something other than the chapter number; otherwise not.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

Hi @ViktorfromCzechRep!  If you can accept a small compromise, I think it is possible to do what you're after.  

2022-08-07_00-00-39.png.ad8705fd72d85e8370173b47f2aa76f6.png

In this example, the chapter numbers and the equation numbers are automatically generated.  The compromise is that I don't think there's a way to have the equation numbers placed to the right - but if you can accept them on the left and then followed by the equation, then you’re in business.

(This is a slightly simplified demo - an earlier trial version was more complex but went beyond demonstrating the basic principle, so I simplified it for now.)

You need two paragraph styles: one for the chapters and one for the equations.  As well as regular formatting they use multi-level numbering/lists.  Have a look at the "Chapter Title" and "Equation" paragraph styles in the attached sample file.  In particular, take a look at the Bullets and Numbering section of each of those two styles.

In this simplified example, set any empty paragraph to use the "Chapter Title" paragraphstyle.  Set your equations to use "Equation".  (Making your equations red is strictly optional!  I just did that to make them stand out. 😀)

Does that help?  (If the numbers must be on the right, I do have half an idea, but it's after midnight here so I'm stopping for today.)

multi-level numbering.afpub

—— Gary ——

Photo/Designer/Publisher: Affinity Store, v2.4.n release

Mac mini (M1, 2020), 16GB/2TB, macOS Ventura 13.4.1(c) • MacBook Pro (Intel), macOS Ventura • Windows 10 via VMware Fusion • iOS: current release

Link to comment
Share on other sites

1 hour ago, GaryLearnTech said:

The compromise is that I don't think there's a way to have the equation numbers placed to the right - but if you can accept them on the left and then followed by the equation, then you’re in business.

Maybe a regular expression based search/match/replace run will do the job afterwards for the equations.

  1. Aka for let's say the text:   (1.2)  y = m c
  2. The reg expr:                       (\([0-9]+\.[0-9]+\)) (.+)  => \2\1
  3. Should yield to:                  y = m c  (1.2)

 

☛ 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

51 minutes ago, v_kyr said:

(\([0-9]+\.[0-9]+\)) (.+)  => \2\1

Nice:) To achieve the initially requested layout, how about adding a tab between the two result groups:

\2\t\1

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

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.