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

Publisher how to import structured/styled text?


Recommended Posts

I want to import a lot of text into Publisher. But how can I get Publisher to apply styles automatically, to maintain the text's structure?

Applying them manually isn't enticing. I can't find out which formats would be acceptable and would work.  RTF doesn't maintain styles unfortunately... 

Link to comment
Share on other sites

  • Staff

Publisher supports the placing of .docx, RTF and plain text. In terms of workflow it would be better to import plain text and then use Publisher to apply test styles and to adjust the structure. As on import Publisher may not be able to maintain/recognise styles or structures that have been applied in another app. This may be slightly more time consuming but using Publisher to apply the styles will allow for greater control.

Link to comment
Share on other sites

Thanks for the reply! I spent a happy hour tweaking the styles on a couple of pages to suit their purpose. Then came the job of importing the 100+ pages and applying styles. My current method is to insert style tags (eg <subhead2>) in the incoming text, then use the Find and Replace twice for each style, once to set the styles according to the tag, and then again to delete the tag itself. While this works and I can't complain (:)), it's also very tedious, so it would be great if there was some intermediate tag convention that automatically applied styles. I like control too, but jobs that can be automated should be automated, I think.

Link to comment
Share on other sites

4 minutes ago, daycaster said:

My current method is to insert style tags (eg <subhead2>) in the incoming text, then use the Find and Replace twice for each style, once to set the styles according to the tag, and then again to delete the tag itself.

You shouldn't need two Find/Replace operations. But please explain a bit more about your tagging. Is there an end-tag, too, or just a beginning tag? If only a beginning tag, when does the style end? Paragraph end, or some other place?

The basic idea would be to use a Regular Expression Find/Replace. Assuming the style should end at the end of the paragraph, something like this should work:

  1. Find: <tag>(.*?)X
    where for X you use the dropdown to insert a paragraph break.
  2. Replace: \1
    and also specify the formatting you want

-- 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

@walt.farrell I do a very very similar thing. I first select all the text and just set it to the basic paragraph format I want then I use Find <tag>, Replace the style I want to replace it with, then remove the style I used so the replace is blank and just find <tag> and replace with nothing again.

I should point out that I have one tag at the beginning of the paragraph and nothing at the end. The very nature of the Paragraph style will stop the formatting at the next paragraph.

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

10 minutes ago, daycaster said:

@walt.farrell Ah you can do both jobs in one, that's good to know. (One tag at the beginning, fortunately, to pick up the entire paragraph.) So all I really need is a way to run 20 of these regexes automatically... ! :) Sounds like a job for AppleScript. :85_scream_cat:

I don't use regular expressions at all for this sort of thing. find the tag replace the style, find the tag replace with nothing.

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

2 hours ago, Old Bruce said:

I don't use regular expressions at all for this sort of thing. find the tag replace the style, find the tag replace with nothing.

Why do 2 Find/Replace when you can simply do one?

-- 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

  • 11 months later...

Hello,

I too would like to import .docx files using a main "body copy" paragraph style I have created in our templates instead of having Publisher create a "Normal" paragraph style and applying that to my imported file every time I import a Word doc. Right now, I build 6 newspapers per month (pre COVID I was building 3 per week and we hope to go back to this status at some point) and I import dozens of stories per issue. Since the vast majority of the text in the paper is of a designated body copy of our choosing, I much prefer importing these files to place with that designated body copy and not have to deal with Publisher creating a "Normal" style every time I import a text document. 

So, are you saying there is no way for me to do what I am hoping to do? I find this rather strange and a little frustrating since every file that is imported creates a new "Normal" paragraph style that will never be used in these documents. This means I have to delete these "Normal" styles every time just to keep my documents' paragraph styles clean and organized the way we want them. 

I know it isn't fair to make comparisons, but this is a procedure that InDesign features that seems pretty basic. Maybe I am missing something and I can import text files in Publisher with a designated, consistent style? If so, could you please point me in the direction I need to go to do so?

NOTE: The Word/.docx files I am importing to format for the news pages are written by our reporters/editors and they just use a default font that Word has set. My having to open every Word doc to save them with the body copy I prefer would add too much work to an already very tight work time frame. I simply do not have the time to do this in addition to building 12-24 page newspapers three times per week. If this is the only solution; to have the Word docs preset with the style/font I want to import into Publisher, then I am afraid the idea of our using Publisher on a daily basis will not come to fruition and will leave us stuck with having to use InDesign regularly. A very sad and depressing notion. 

Link to comment
Share on other sites

13 hours ago, Beacon Publishing said:

So, are you saying there is no way for me to do what I am hoping to do? I find this rather strange and a little frustrating since every file that is imported creates a new "Normal" paragraph style that will never be used in these documents. This means I have to delete these "Normal" styles every time just to keep my documents' paragraph styles clean and organized the way we want them.

I just tried a test using a .docx file created by LibreOffice Writer, and the Normal style was used for the imported text. But it was not duplicated if I imported a second file using an identical Normal style.

Are you sure that the documents you're importing all use exactly the same definition for Normal? You can check by importing two documents, and if you get different text styles (Normal, Normal1) then in the Text Styles studio panel:

  • Double-click on Normal to edit it.
  • Take a screenshot of the bottom of the Edit panel, e.g.,
    image.png.5650878555947900da5976f3f238b14a.png
  • Repeat for the other style, and compare the two screenshots.

-- 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

Hello walt,

Actually, you are correct. It only creates one "Normal" file if I don't delete that file. 

But, I would still much prefer to import my .docx files with a designated paragraph style. I sincerely do not want to keep comparing Publisher to InDesign, I am not really in love InDesign. Mainly because Adobe refuses to support older versions and their greed is immoral (IMO). But there are things that InDesign does implement that are brilliant and make the process smooth and seamless, and the simple nature of pre-selecting a particular paragraph style in InDesign, without having any texts blocks selected with the item tool when selecting the desired style, is highly advantageous. All one has to do is select that desired style in the presets, command D (import) and choose the wanted document and the document then places in the inDesign document carrying that pre-selected style. If you want another style, just select another paragraph style and the next .docx comes in with that format.

Please keep in mind that I have not done a complete live build of one of our issues, and I am NOT at all well versed with the nuances of Publisher, so it is possible that I eventually wouldn't mind having the slightly annoying instance of an unwanted paragraph style (normal) creating itself amidst my carefully created styles. I know to designate the copy with the desired style is just a click away. It may appear to be simple complaining, but extra steps of anything not necessary are just an inconvenience. I am sorry if this seems nit-picky. Streamlining has been my life in newspaper and ad production for many years.

That said, I am guessing that what I am looking for doesn't exist?

I thank you very much.

Edited by Beacon Publishing
Link to comment
Share on other sites

34 minutes ago, Beacon Publishing said:

That said, I am guessing that what I am looking for doesn't exist?

Something close to it exists when you use Document > Add Pages from File..., I think. But that doesn't support .docx files.

You could import all your .docx files, then use Find and Replace to find all the text with the Normal text style and replace it with your other style. That should change everything with one operation. Then delete the Normal text style if you want to.

-- 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

Hi walt,

You could import all your .docx files, then use Find and Replace to find all the text with the Normal text style and replace it with your other style. That should change everything with one operation. Then delete the Normal text style if you want to.

Actually, all I need is one main style, then I cut apart headlines, subheads, cutlines etc and designate a different style to those. So, when I import a .docx and the normal style auto-applies, I can just keep the text selected with the item tool then click the Body Copy style that I wanted to begin with. Changes it like that. It's quick enough. It's an extra step but a small one.

The other issues I am running into are bigger inconveniences to be honest. Right now, to be honest, I am little discouraged. But I will soldier on and see how it ultimately pans out. Maybe Affinity will be open to suggestions from users. 

Thanks again!

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.