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

Styles question on text starting at point


Recommended Posts

I've been learning to use Publisher over the last week. Down loaded a A Christmas Carol from Gutenberg just to play with importing and styling it.

On some of my pages I have misaligned text, not sure what I've left out from my style sheet if anything at all. Is there a way of aligning the text so each line at the same point on each new page like it does in a book. Or do you have to do this manually with line breaks throughout the document.

Here is an image of two pages to show you what I mean. Lower image starts further up the page than first image (top) and the body style I'm using is included. Book size is A5 margins are 10,10,10,20.

Styles Question.jpg

Link to comment
Share on other sites

  • Staff

It looks as though this is happening because there is a line break in above the text that starts lower down. When I remove this the document text all starts at the top level.

Please tag me using @ in your reply so I can be sure to respond ASAP.

Link to comment
Share on other sites

Just gone through the book doing backspace and return just to tidy things up and get the text to line up at top of certain pages about 20/30 of them. Is this normal when doing a book or document or is there a way of getting automated with styles?

This process only took 10 minutes. no biggie. Just wondering if it's my inexperience of setting up the style sheet that caused the problem.

If I may be so bold it, would be a great idea if the guys at Serif/Affinity did a whole video series of putting a book together. I know this is time consuming but would pay big dividends in sales and would a fantastic learning resource. Just a suggestion. Elaine Giles are you listening three hour specials on youtube.

Thanks for the help it's much appreciated.

Edited by Dai777
Link to comment
Share on other sites

Is it normal for Publisher not to be faithful to paragraphs breaks from a text file?

I'm finding that I have a lot of tidying up to do where paragraph breaks have been missed. Small paragraphs have missing paragraph breaks and large paragraphs have paragraph breaks where there is none in the original text file. Is this normal?

Link to comment
Share on other sites

22 minutes ago, Dai777 said:

Is it normal for Publisher not to be faithful to paragraphs breaks from a text file?

No. I have never had a problem with importing .txt files. Other formats may mangle things. I like to deal with text only files.  I am rather busy for the next few days but I would be happy to walk you through some stuff regarding book layout. I took a look at your Christmas Carol file and there are some things which would make your life easier.

As I said busy right now but I'll get back to you.

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

1 hour ago, Dai777 said:

Is it normal for Publisher not to be faithful to paragraphs breaks from a text file?

I'm finding that I have a lot of tidying up to do where paragraph breaks have been missed. Small paragraphs have missing paragraph breaks and large paragraphs have paragraph breaks where there is none in the original text file. Is this normal?

This is what I see in every Gutenberg text file:

Capture_000160.png.f8ca289538ba820c9388e0c49eccc6e6.png

Every line has a paragraph break. At least every text version I have downloaded in the past is this way (and there is a reason for that).

You will need to remove all the unneeded paragraph breaks. I do this in a good text editor, but it may be able to be done using Regular Expressions in the find/replace dialog within APub but I don't have time to test.

You want to end up like so:

Capture_000161.png.40a55ceb318625c7a5781ceab440c4c0.png

Notice the line numbers in my text editor and the gap between them? I have word wrap turn on.

Then the text is ready to actually layout, add styles, etc.

Link to comment
Share on other sites

1 hour ago, MikeW said:

Every line has a paragraph break. At least every text version I have downloaded in the past is this way (and there is a reason for that).

You will need to remove all the unneeded paragraph breaks. I do this in a good text editor, but it may be able to be done using Regular Expressions in the find/replace dialog within APub but I don't have time to test.

Yes, there's a reason that the Project Gutenberg .txt files have paragraph breaks after every line.

And yes, you should be able to clean that up to reflow the paragraphs using Publisher. However, it can be tricky, and for that particular copy of A Christmas Carol it's made harder by the Table of Contents not being formatted quite correctly.

In addition to each line of the TOC ending with a paragraph break, each should also start with a space. That is, rather than the first line of the TOC reading

Quote

Stave   I: Marley's Ghost¶

it should read

Quote

xStave   I: Marley's Ghost¶

where "x" is a single space.

The space at the beginning of the line indicates that the line should not be rewrapped (reflowed) with the prior line.

The approximate general approach, then, using Find/Replace in Publisher would be this:

  1. Handle the title page separately. For the rest, perform all of the following
  2. Search for all ¶ followed by a space, and turn them into something unique, such as %%nowrap%%
  3. Search for all ¶¶¶¶Text, delete the ¶¶¶¶, and assign a Heading 2 paragraph style.
    (I am having a problem with this step, so it needs some kind of modification. When I try to assign a paragraph style only [No Style] is available.)
  4. Search for all ¶¶ and turn them into something unique, such as %%break%%
  5. Search for all ¶ and replace with a single space
  6. Search for all %%break%% and turn them into a ¶
  7. Search for all %%nowrap%% and turn them into a ¶

(Note that one doesn't need to distinguish the cases in step 2 and 4, but if something goes wrong it helps in diagnosing and fixing the issue, so I do them separately that way.)

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

@MikeW I looked at the file in a text editor and libre office last night and saw what you saw and this does seem to present a problem for Publisher.
not sure what to do about it or where to get a better text file. It would seem that this would also be a problem getting files from others such as clients/community groups etc. If like me you're a sloppy  typer then any text file or word file will be riddled with misplaced paragraph marks. I'm certainly guilty of it.

Not sure how to go about the following but will give it a go.

The approximate general approach, then, using Find/Replace in Publisher would be this:

  1. Handle the title page separately. For the rest, perform all of the following
  2. Search for all ¶ followed by a space, and turn them into something unique, such as %%nowrap%%
  3. Search for all ¶¶¶¶Text, delete the ¶¶¶¶, and assign a Heading 2 paragraph style.
    (I am having a problem with this step, so it needs some kind of modification. When I try to assign a paragraph style only [No Style] is available.)
  4. Search for all ¶¶ and turn them into something unique, such as %%break%%
  5. Search for all ¶ and replace with a single space
  6. Search for all %%break%% and turn them into a ¶
  7. Search for all %%nowrap%% and turn them into a ¶

 

@walt.farrell

Link to comment
Share on other sites

@walt.farrell not sure where to get a better text file that would give less problems. Surely there must be a standard way of dealing with text files or word files.
If someone like me were to send a file it would be a nightmare since I'm a very sloppy typer. This is not a criticism of Affinity or anyone else but to put out material just saying do this do that and your file in publisher will be hunky dory is a bit to basic. For people like myself who want to learn how to use Publisher and don't mind following a tutorial or using the help is great but that info needs to be there in the fist place (it maybe, I just haven't found it yet). Not criticising Affinity or anyone on this forum but, I can say this for the vast majority of programs on the internet in general. It's frustrating! Sorry for the rant I do appreciate your help. Just found the find and replace video tutorial shall give it a go and see how I get on. Like I say thank for the help.

Link to comment
Share on other sites

The results you get from text files will depend, of course, on both the quality of the text and the style used by the author, which will depend on the intentions of the author or publisher of the file. Text files from Project Gutenberg have a certain style (format) based on how Project Gutenberg expects their clients to use the files. Text from other sources might be in a different format, where each paragraph is one long line, and the publisher expects the user's application to reflow the paragraph to the width of the user's screen. That kind of text would work much better in Publisher.

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

I see what you mean. At the moment it looks like a line by line replace every line of text with a line break and keeping every paragraph break as is. I tried the other suggestion but must of been doing it wrong the mess I made was worse than this way.

Link to comment
Share on other sites

It's worth playing around with Find and Replace as once you learn that approach it's much faster.

By the way, each place where I showed the paragraph symbol you would use the drop-down in the dialog to insert a paragraph break.

I probably also had the Regular Expression on enabled, but I don't know if that would have made a difference.

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

The whole thing took me about a few minutes to do using expressions. But, that's only because I'm use to dealing with such stuff...

Dai, this type of thing--the cleaning of text--is just part of the fun with even client-provided word processing files when doing layout work. The main thing is to find repeatable patterns one can operate on, like the hard returns between what ought to be a paragraph. 

Link to comment
Share on other sites

You can use the epub file and a program like 7Zip to extract the HTML code, you won't have paragraphs cut to shorter lines (it's not in a file a I opened), but you'll have to do some other search and replace.

In the end, it's the same.

1 hour ago, MikeW said:

this type of thing--the cleaning of text--is just part of the fun with even client-provided word processing files when doing layout work

Yes, and those files are cleaner than most of the files I work with usually.

Link to comment
Share on other sites

@Old Bruce

The problem this way, it won't take in account lines ending with punctuation, like comas, or stanzas, or line ending without punctuation that are part of the credits or informations.

 

@walt.farrell use a logical method that take in account the way the text was split and the indications like space at the beginning.

Link to comment
Share on other sites

On 8/23/2019 at 12:13 AM, MikeW said:

This is what I see in every Gutenberg text file:

Capture_000160.png.f8ca289538ba820c9388e0c49eccc6e6.png

Every line has a paragraph break. At least every text version I have downloaded in the past is this way (and there is a reason for that).

You will need to remove all the unneeded paragraph breaks. I do this in a good text editor, but it may be able to be done using Regular Expressions in the find/replace dialog within APub but I don't have time to test.

You want to end up like so:

Capture_000161.png.40a55ceb318625c7a5781ceab440c4c0.png

Notice the line numbers in my text editor and the gap between them? I have word wrap turn on.

Then the text is ready to actually layout, add styles, etc.

@MikeW Which text editor do you use to do this? I think my big mistake was to apply styles before I edited the paragraph marks. All part of the learning process though.

Link to comment
Share on other sites

36 minutes ago, Dai777 said:

@MikeW Which text editor do you use to do this? I think my big mistake was to apply styles before I edited the paragraph marks. All part of the learning process though.

Hello Dai,

I used UltraEdit.

But I would suggest trying Walt's method within APub--it's something you already have. Do note that for expressions other than returns, etc., you need to configure APub for using regular expressions...

Capture_000167.png.a2e115316bca56b3a212c7dcf5fc358c.png

It's something to try and learn. There are people here that can aid you in the learning process.

Mike

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.