LibreWriter: Semitransparent paragraph area with page background

1

How do I make paragraphs that:

  • Have semitransparent area color (e.g. white)
  • Have padding around the text
  • Have visible background image from the page

The result should print like this document prints: Resulting image

Source ODT: https://cloud.prosa.dk/s/JcDJtBYr7BTFepi/download

The formatting in this document is built in a very wrong way (e.g. padding is done with no-break-spaces and with forced linebreaks in a small font size, indention of the bullet list is done with no-break-spaces, transparency only achieved by building part of the document in Microsoft Word and then reading the file in LibreWriter).

I want to know how to build a document that prints the same as this document (so on paper the result should be very similar to printing the above), but in which the formatting is done using conventional LibreWriter formatting tools (e.g. styles), so that changing the text would not require moving no-break-spaces around or other cascading changes in the following parts of the document. In other words: You should be able to insert a paragraph on page 1 without having to check the formatting on page 2-99.

Preferably with a step by step guide from a new, empty document and a .jpg file that should serve as the background image.

Background

I have been using LibreOffice since it was called StarOffice, so I am not a new user. I have typeset a book in LibreOffice, so I know some of the more advanced features that normal users will never get to.

So I had actually assumed it would be easy to make a document with a background image, with text on top that had paragraphs with semitransparent background and 0,5 cm padding around each paragraph. I assumed I could even define a few styles, so another user could alter the text and add paragraphs without having to fiddle too much with formatting (e.g. avoiding using no-break-space to generate padding).

But it turned out to be much harder: The transparency using Area in paragraph formatting would not allow for seeing a background image through, I found no way to do padding around a paragraph.

So if you think this is easy to do, you will either discover (like I did) that this is not easy, or you know a few tricks in LibreOffice that I do not know, and I therefore ask you to please show how you do this.

Ole Tange

Posted 2019-08-08T15:21:52.327

Reputation: 3 034

It appears there's a picture sized to fill the sheet in a layer behind the text, then the text paragraph style is set for 50% transparency. – fixer1234 – 2019-08-08T20:39:51.817

Can you clarify the specific thing you're asking about? "I want to know the right way to do this" -- what is "this"? Are you referring to the graphics aspect? What you think is non-standard text formatting? The image and transparency is totally separate from the text formatting. That's just the two items in my earlier comment. If the document author used non-standard text formatting (or did some stuff manually that could be done using built-in features), we don't know why they may have done that (cont'd) – fixer1234 – 2019-08-09T07:06:03.050

(maybe they didn't know how to do it right, needed to tweak the built-in results, etc.). But the text formatting has nothing to do with the graphics. – fixer1234 – 2019-08-09T07:06:09.787

@fixer1234 I have updated the Q. Does it make it more clear what I am looking for? – Ole Tange – 2019-08-09T07:43:21.563

I initially thought this was a sample document you saw somewhere and wanted to duplicate. Closer examination indicates it is probably your own attempt. You'll always get a better response if you're explicit about what the actual problem is, like before/after images to spotlight the problem. This is also overly broad for the intended scope of a question. A question should focus on one specific issue rather than ask for a tutorial on how to create every feature of a document (just ask a separate question for each issue). That said, some thoughts to get you started. (cont'd) – fixer1234 – 2019-08-09T20:41:26.887

Assuming this is your own document, you've already figured out the graphics. It wasn't obvious what issue you were referring to there. It finally dawned on me that your printer might print this with a white border for the non-print area. There are a few potential solutions. 1. Use a printer capable of edge-to-edge printing (typically offered only on photo-quality printers). 2. Use paper sold for this purpose. It has micro-perf edges so you can easily remove the unprinted border. 3. Use a paper cutter to trim the unprinted border. (cont'd) – fixer1234 – 2019-08-09T20:42:10.247

start="4">

  • If you will need a lot of these pages (500+), Create the graphic page image, including the semi-transparent white overlay covering the text area. Have a printing service print the sheets, which isn't much more expensive than the cost of the paper. Then print on those sheets. It will be cheaper than using your own ink on an inkjet printer. 5. You may find similar ready-to-use preprinted stationery. (cont'd)
  • < – fixer1234 – 2019-08-09T20:42:39.400

    As far as formatting the document text, there's no "right way". LibreOffice (or any app), is just a tool to get to the end result. You can take the time to do things manually, or you can use built-in features to simplify and automate some of the tasks. The tasks you describe can be easily handled by built-in functions. Just select a bullet list from the toolbar, set margins and use full justification, etc. Those features are standard in pretty much every office suite, they work the same way, and there's endless help built-in and online. (cont'd) – fixer1234 – 2019-08-09T20:43:10.483

    If there's a specific issue you're having, or the built-in feature is inadequate, explain that in a dedicated question. – fixer1234 – 2019-08-09T20:43:15.883

    No we are not talking about printing edge to edge. I want to build a document like the attached that prints the same way as the attached document prints. So if I print the attached document, then then new document should print similarly on the same printer. How do I do that without using non-breaking-spaces for padding, and using Microsoft Word to build the transparency part? If you believe you can easily do the tasks described, why not show how to build the document using those built-in functions, instead of simply saying it can be easily handled? – Ole Tange – 2019-08-10T05:42:50.227

    You've offered a bounty, but lack of a bounty isn't the reason this hasn't attracted answers. The problem is that the question isn't clear. You've produced a sample document, so you know how to do what you did. You keep referring in nebulous terms to wanting to produce a similar document, or wanting the document to print in a similar way. I tried to guess at what you mean by "similar" and I clearly had no idea how to interpret your description. Your document probably has on the order of 100 settings and features. It's beyond the intended scope of a question (cont'd) – fixer1234 – 2019-08-11T18:10:29.660

    to ask for a detailed tutorial on how to reproduce every aspect of this example. Just on the transparency issue, your example shows that you've achieved it, the question says you want to reproduce what's in the example, yet the question says it doesn't work. How do we make sense of that? On the text formatting, everything you show is simple, built-in basic features, like a bullet list and setting margins and justification. If you've been using LO forever and typeset a book in it, there's no way you don't know those basics. (cont'd) – fixer1234 – 2019-08-11T18:10:59.887

    Yet you did a bunch of manual stuff with non-break spaces and apparently other strange workarounds. Now you're asking how replicate the layout without that. Well, why did you do that in the first place? The only reason would be if the built-in features were inadequate in some way, and you don't explain what that is, or what you need to achieve beyond what the built-in features do. So readers don't have a clue what the actual problem is. (cont'd) – fixer1234 – 2019-08-11T18:11:20.663

    Finally, each problem -- transparency, bullet list, margins/justification, etc. -- is the intended scope of a question, so this should be a collection of targeted questions, not a request for a custom LibreOffice user manual. You've already invested the bounty so it would be worth improving the question so you have a chance of getting a useful answer. – fixer1234 – 2019-08-11T18:11:28.270

    @fixer1234 I am not sure why you bring margins, justification and bullet lists into the question. That is not what the question is about. The question has not changed. It is a about 3 things and 3 things ONLY: How do I make paragraphs that: Have transparent area color (e.g. white), have padding around the text, have visible background image from the page, and to do this without using no-break-spaces and other workarounds, that will make it hard to maintain. I am not sure why you insist on bringing other irrelevant details into the question. – Ole Tange – 2019-08-11T21:08:19.970

    @fixer1234 If you read the question you can see why I did the workaround in the example: "The transparency using Area in paragraph formatting would not allow for seeing a background image through, I found no way to do padding around a paragraph." If you know how to do that without resorting to use Microsoft Office to build the transparency, please post an answer that shows how to do these two things using only LibreWriter. – Ole Tange – 2019-08-11T21:11:52.700

    @fixer1234 Maybe it will be easier for you if you simply ignore the example. Assume I just want paragraphs with semitransparent area color (such as white), that have 0.5cm padding around each paragraph and through which the background image can be seen. You can ignore everything else, because that not needed to answer the question. It is great, if it is easy for you to create, because then you know some tricks that I do not know. – Ole Tange – 2019-08-11T21:23:09.527

    Your 3 things: 1. text area with semi-transparency: you show how to do it in the example so it isn't clear how what you did is inadequate or what the problem is you're trying to solve. And why do you need a text box for each paragraph rather than one per page? 2. Padding around paragraphs: you have padding on the left without non-break spaces. Why do you need it on the right rather than doing the same as on the left? 3. What's #3? If the question is limited to those things, it still should be separate questions, but the clarification in your comments should be part of the question. (cont'd) – fixer1234 – 2019-08-12T00:38:28.350

    The question may be clear to you, but the wording is extremely ambiguous and it can mean many things besides what's in your own head. My previous comments were from trying to make sense of the question. If they seemed irrelevant, it's because the question is unclear. We're just not communicating on this, so I'm going to move on. Good luck with your question. – fixer1234 – 2019-08-12T00:38:35.283

    Let us continue this discussion in chat.

    – Ole Tange – 2019-08-12T05:29:09.440

    http://i.imgur.com/uD5aRGN.png Forgot about your borders. I didn't try to be precise with the specific dimensions. Transparency is 50% so not a lot of the background shows through (a little more visible viewed at full size), but the semitransparent border is well visible. No special configuration settings or convoluted workarounds. It's all just text, so no need to adjust anything if you add a paragraph or change the amount of text. Just wanted to close the loop so you're aware it can be done. – fixer1234 – 2019-08-16T18:53:52.207

    Answers

    0

    Make page background visible through semitransparent paragraph area

    First we need to have BackgroundParaOverDrawings=true. This is the key to allow paragraph styles to show background through a semitransparent area.

    1. New document
    2. Save as > trans.fodt
    3. Edit the .fodt-file in an editor
    4. Search for 'UseFormerObjectPositioning'
    5. Insert:

      <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">true</config:config-item>
      
    6. Save trans.fodt

    (If you find a way to set this using the GUI please answer LibreWriter: Setting the BackgroundParaOverDrawings config value).

    Now backgrounds in paragraph styles can show the page background through the area. And if you do not want a 0.5cm padding around the text in the paragraph (but simply want the background visible through the area), then you are done.

    Right side padding

    Right side padding is done by putting a long rectangle that spans the right side and forces text to wrap on the left side. The rectangle is put in a header, so it is on all pages.

    1. Open trans.fodt in LibreWriter
    2. Insert > Header and Footer > Header > Default Style
    3. Draw a rectangle at the right side all the way down the page. Make sure the anchor is in the header.
    4. Right click > Wrap > Edit > Settings > Before
    5. Right click > Area > None
    6. Right click > Line > Line Properties > Style > None

    Left side padding

    Left side padding is done by indenting first line by a negative amount (0.5cm) and adding a tabstop at 0cm:

    1. Styles > Edit style >
    2. -> Indents & Spacing > First line > -0.5cm
    3. -> Indents & Spacing > Spacing > Below paragraph > 0.2cm
    4. -> Area > Color > White
    5. -> Transparency > Area Transparency Mode > Transparency > 50%
    6. -> Tabs > Position > 0cm > New (this may not be needed - it seems to be default)

    Do the same style for any heading styles used.

    Top and bottom padding

    Padding above and below a paragraph is done by a paragraph style "Pad" with a font size of 1 with the same settings as above.

    Normal use

    Then write your text using normal formatting - except:

    • Paragraphs always start with a tab
    • Headings cannot start with a tab, so first insert a no-break-space followed by tab: CTRL-SHIFT-space TAB
    • Before and after paragraphs there are paragraphs of style "Pad".

    Finally insert the background image

    1. Move cursor to header if you want the same background image on all pages
    2. Insert Image
    3. Right click > Wrap > In Background

    Benefits

    • By using styles there is no need to mess around with rectangles for each page or for each paragraph, and the style will be consistent all through the document.
    • You can choose to use the Pad style and get break between paragraphs or you can choose to have some paragraphs be kept together in the same "box".
    • Adding and removing text will not cause a lot of work (like adding no-break-space for each line or adjusting sizes of rectangles). This is especially useful if the text spans multiple pages where an edit could cause a cascade of changes on multiple pages.

    Drawbacks

    • It is a lot of setup. Luckily it only has to be done once. Then the formatting can be reused.
    • You still need to do a little adjusting (Starting tabs for each paragraph, padding paragraph before and after each paragraph) This fixup can probably be automated using the Alternative Search-plugin.

    Ole Tange

    Posted 2019-08-08T15:21:52.327

    Reputation: 3 034

    0

    A different crappy solution is:

    • Set the image as background image
    • Use a text box for each paragraph
    • Create a white rectangle that is semitransparent. This will work as Area with padding.
    • Arrange the rectangle so it is behind the text box

    Drawbacks:

    • You need to create a text box every time you create a new paragraph
    • You need to create a rectangle for each text box
    • The rectangle does not automatically adjust to fit if lines in the text box are added/removed
    • Styles cannot be used in text boxes

    These drawbacks make it very labour intensive if addition/removal of lines of the text require text to be moved to/from the following page.

    It is, however, an improvement as you do not need Microsoft Office to get the semitransparency.

    Ole Tange

    Posted 2019-08-08T15:21:52.327

    Reputation: 3 034

    This should be part of the question rather than an answer. – fixer1234 – 2019-08-12T00:22:28.187

    @fixer1234 No, because this actually answers the question. It is better than the work-around (since it does not involve using Microsoft Office), but I hope there are better ways to get the same effect. Maybe the reason why you think this should be part of the question is that you do not understand the question? If so, then hopefully knowing that this answer actually answers the question can help you understand the question. – Ole Tange – 2019-08-12T05:43:31.237