ViktorfromCzechRep Posted August 5, 2022 Share Posted August 5, 2022 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 Quote Link to comment Share on other sites More sharing options...
R C-R Posted August 5, 2022 Share Posted August 5, 2022 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. Quote 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 More sharing options...
Old Bruce Posted August 5, 2022 Share Posted August 5, 2022 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. Quote 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 More sharing options...
R C-R Posted August 5, 2022 Share Posted August 5, 2022 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. Quote 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 More sharing options...
GaryLearnTech Posted August 6, 2022 Share Posted August 6, 2022 Hi @ViktorfromCzechRep! If you can accept a small compromise, I think it is possible to do what you're after. 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 Quote —— 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 More sharing options...
v_kyr Posted August 7, 2022 Share Posted August 7, 2022 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. Aka for let's say the text: (1.2) y = m c The reg expr: (\([0-9]+\.[0-9]+\)) (.+) => \2\1 Should yield to: y = m c (1.2) thomaso 1 Quote ☛ 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 More sharing options...
thomaso Posted August 7, 2022 Share Posted August 7, 2022 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 Quote macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1 Link to comment Share on other sites More sharing options...
Recommended Posts
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.