Jump to content

Recommended Posts

Posted

Hi! I'm working on type setting a copy of Pride and Prejudice in Affinity Publisher 2.0.4. Unfortunately, I was not able to import the text in such a way as to preserve the existing formatting, i.e. italics.

So I went through and did it manually.  Fun fact: there are 467 italicized passages in the text of Pride and Prejudice!

Before I move on, I really want to do a sanity check to make sure I didn't miss anything. I was hoping I could use the find/replace option to search for any italicized passages and get a count of how many there are.  If the count in my Publisher document corresponds to the count in the Gutenberg HTML I'm working from, then at least I know I didn't miss any.

A list of search results appears when I do a Find operation, but I'm not seeing anything that tells you a count of how many things it found.

Also, I can't figure out how to search for italicized text.  I figure it must be a regular expression search for something like .+? combined with a formatting modifier, but so far I haven't been able to figure out the magic combination of settings to make that work.

I'm beginning to think I may have to go through all 467 italic passages again just to double check that everything is correct.  And I'll do that if I have to.  But man, I'm not enthused about another multi-hour slog through a four-hundred-plus page novel checking italics.

Posted

I've done this with a simple page but never 400+

Extend the width of the page and reduce the font size so that paragraphs aren't wrapped otherwise the svg will reflect the line breaks

image.png.cf2882251bb44803cc560065cd1ffc49.png


You may need to apply this approach to the height of the page so that the whole text appears on one page otherwise any italic passages that roll onto the next page will be counted twice

I then opened the svg in Notepad++ and used <ctrl>F to count the instances of
font-style:italic;

It may be useful to use the Replace dialog to change
font-style:italic;
to
font-style:italic;fill:red;

Good luck

CountingItalics.afpub

Microsoft Windows 11 Home, Intel i7-1360P 2.20 GHz, 32 GB RAM, 1TB SSD, Intel Iris Xe
Affinity Photo - 24/05/20, Affinity Publisher - 06/12/20, KTM Superduke - 27/09/10

Posted

@wdmartin

Find and replace all italics with a word not used in your document (e.g. sausages)
File > Print your file to a text file (*.prn file)
Open that file in Notepad or Word and...
Count the sausages

To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time.

Posted
7 hours ago, wdmartin said:

Fun fact: there are 467 italicized passages in the text of Pride and Prejudice!

Great to know. Although now I cannot remember when Thomas Hardy died. Win some lose some.

7 hours ago, wdmartin said:

If the count in my Publisher document corresponds to the count in the Gutenberg HTML I'm working from

If you are using Gutenberg, try using the plain Text Files. In my experience the italicized text is rendered like this _italic words go here_ and now we are back to plain text.

7 hours ago, wdmartin said:

Also, I can't figure out how to search for italicized text.  I figure it must be a regular expression search for something like .+? combined with a formatting modifier, but so far I haven't been able to figure out the magic combination of settings to make that work.

Use the Find and Replace panel. Use the little cog wheel on the upper right of the panel by the Find section. Choose Format and in that dialog choose Font > Italic, leave everything else with the default [No change]. To replace with your home made Italic Character stye choose it from the Character Style section in the little Cog wheel for the Replace section.

699449678_ScreenShot2023-03-21at7_56_21AM.png.4617dc5f16b3632cbcc412ea6deeafaa.png

93444061_ScreenShot2023-03-21at7_56_46AM.png.d12ad7e45350069f4629ef9d5521e724.png

661166464_ScreenShot2023-03-21at7_57_34AM.png.4fc81d9aa3e28514a9719c88e4ca5c0b.png

 

 

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

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

Posted

As others already stated here, the best way maybe to export into some other file format (ideally MD text, HTML, SVG ...) which can be easily searched through. - For searching then through a text or XML etc. based file after the italics, recognize first how the italics font setting is defined there and then search/count it's occurences in the exported file.

Hint: an ideal tool for searching through file contents and counting pattern occurences is some Unix Grep based tool, like Gnu grep!

For PDF output you can try out ...

... and search/count for fonts occurences in the PDF file, fonts that you know to be using a specific italic face. Or which might have an italic attribute in the font definition's header, for/in the most trivial (but very unlikely) case the word “italic” in the font's name. - However grep'ing through textual files is of course much easier here than through PDF files.

☛ 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

Posted

Thanks for all the advice! @Old Bruce 's advice was especially useful. Once I figured out how to find italics reliably, I set up a copy in OpenOffice in my right monitor and kept Affinity Publisher open on the left. Then I searched for italics in both, checking each one in turn.  I found two errors and corrected them.  Whew!  That just leaves the frontmatter, illustrations, sections, table of contents, and then I can run it through an imposer, print it and start binding it.

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.