Keith,

I STRONGLY RECOMMEND that you DO NOT compile a book using a master
document from files with hidden sections. As I have mentioned before,
there is an obscure bug* that causes random x-refs to Figure numbers
to be incorrect in some chapters. IT IS MUCH BETTER to either (1)
manually remove those sections (copyright and TOC) from the chapter
files before using a master doc to combine the files, OR (2) copy and
paste the cover page and the body of each chapter into a file
containing the book's front matter. In either case, you do not need
the MD=1 field.
(*This bug was fixed in LibreOffice a few years ago, but AFAIK it has
NOT been fixed in AOO.)

If you do choose to compile a book using a master document from files
with hidden sections, Francis has described the general method of
inserting the MD field. However, a separate (hidden) section for that
field is not necessary. I put the field on the Copyright page of the
master document. If I don't want the field to be visible, I make the
field itself Hidden (in Step 6); it can also be toggled Visible or
Hidden on the Edit Fields dialog.

Jean

On Fri, Jul 14, 2023 at 4:08 AM F Campos Costero <fjcc.apa...@gmail.com> wrote:
>
> On Wed, Jul 12, 2023 at 4:47 PM Keith N. McKenna <keith.mcke...@comcast.net>
> wrote:
>
> > Jean Weber wrote:
> > > MD is a user-defined variable, which was inserted into the master
> > document
> > > for the book.
> > > Jean
> >
> > Jean;
> >
> > If you could give a a brief rundown on how that variable is inserted
> > into the master document it would be a great help in creating the full
> > book.
> >
> > Regards
> > Keith
> >
> >
> Keith,
> I played with a couple of chapters in a master document and came up with
> the following method.
> 1. I chose the menu item File -> New -> Master Document
> 2. I inserted some dummy text to serve as the front matter of the master
> document.
> 3. I used the Navigator to insert chapters 3 and 4 as sub documents. Their
> individual front matter was visible at this point.
> 4. At the end of the front matter of the master document, I wrote the line
> "Here is MD:"
> 5. WIth the cursor at the end of that line, I chose the menu Insert ->
> Fields -> Other and chose the Variables tab.
> 6. Under Type, I chose Set Variable, in the Name box I wrote MD, and in
> Value I entered 1. I clicked Insert. The front matter within chapters 3 and
> 4 is no longer visible.
> 7. I selected the whole line "Here is MD: 1" (which displays the value set
> for MD) and chose the menu Insert -> Section. On the Sections tab, I set
> the name of the new section to Contains_MD, chose that it be hidden, and
> clicked Insert. The line "Here is MD: 1"is no longer visible and the front
> matter within chapters 3 and 4 remains hidden.
>
> If you want to see the hidden section containing MD, select the menu Format
> -> Sections. Pick Contains_MD from the list on the left and remove the
> checkmark from the Hidden option.
> There may be a more elegant way to do that, but the method seems to work.
>
> Francis

---------------------------------------------------------------------
To unsubscribe, e-mail: doc-unsubscr...@openoffice.apache.org
For additional commands, e-mail: doc-h...@openoffice.apache.org

Reply via email to