Showing posts with label OpenOffice. Show all posts
Showing posts with label OpenOffice. Show all posts

Saturday, November 3, 2007

How to create links and export them to create linked PDF documents

I'm going to make a bold statement. If you ever put any documents on the web, you might need only one application in your life: OpenOffice.org.

I'm not talking web design—I'm just saying, if you work for the city government and need to post long pages of forms for people to download, or if you need to publish reports that people can easily find their way around in, or if you're a technical writer and create user manuals with the usual thousands of links within the document and to other documents—you might be good to go with only OpenOffice.org.

What Makes Me Think OpenOffice.org Is Such a Great Publishing Tool?

This is because of three things.

1. In OpenOffice.org, you can create links. You can just type "Click here to go to the web page," select some text, and link it to any web site you want.

Hyperlinkwindow_1You can link any text or graphic to any heading, graphic, table, etc. within your document or within another OpenOffice.org document. (You can link to another PDF document, but not to another bookmark within a PDF document.)

TochyperlinkYou can automatically generate a linked table of contents, so that anyone clicking on an item in the TOC is taken directly to that heading in the document.

Backtotop_1You can put links in headers and footers. Have a link that says "Back to top" that appears in your footer, and you've got great navigation.

Pdficon_32. You can make a PDF document from your OpenOffice.org document. From a Writer text document, Calc spreadsheet, Impress presentation, or Draw drawing, with OpenOffice.org. Just choose File > Export as PDF. Or even easier, just click the PDF icon on your Standard toolbar.

3. In OpenOffice.org 2.0, the links you make in OpenOffice.org transfer over to and work in the PDF.

These are all very important and useful. Put'em together and you have huge power.

What You Need to Do in Your OpenOffice.org Document

Take a look. Here's a document I made using only OpenOffice.org, created the linked TOC automatically and the links between sections manually using only OpenOffice.org, and generated the PDF using only OpenOffice.org. Here's what I did in the document--I didn't do a huge amount of cross-references but I did do enough to demonstrate the power, I hope.

A. There's a table of contents that I generated automatically, and made hotlinked to each section, automatically. Click on a link in the TOC and it goes.

To create a hotlinked table of contents, in your Writer document choose Insert > Indexes and Tables > Indexes and Tables. To make the hotlinks, click the Entries tab of the window, click to the left of the E and click Hyperlink, and click after the E and click Hyperlink again. Click All to put hyperlinks on all levels of the TOC. Click OK.

Click this image to see a larger version.

Tocpostthis

B. At the fine, innovative suggestion of Dave Richards of the City of Largo, I put a link in the footer that says “back to top.” This text is linked to the Table of Contents heading so that clicking that link in the footer takes you to the table of contents. You could also add footers that say and link to "back to whatever you want." You could add headers and link them back to the original Head1. You could add a manual link at the end of any major or minor section to go back to the beginning of that heading.

To turn on the footer, choose Format > Page, click the Footer tab, mark the Footer checkbox, click OK. Then click in the footer text box that appears and click OK.

Click this image to see a larger image if you want.
Linkinfooter_post
Type the text you want in the footer text box.

To link an item in a header, footer, or anything else, see the next point.

C. I added links at the beginning, and to any interesting web sites, throughout the document, using the Hyperlink icon on the Standard toolbar. Links such as "This section covers the following topics" with a bulleted list containing three links.

Click this image to see a larger image if you want.
Linksatbeginning_post

Hyperlinkicon Here's how to create a manual link. Select the text that you want linked. Click the Hyperlink icon on the Standard (top) toolbar.

In the window that appears, think about what kind of link you want to make. To link to a web site, just click the Internet icon on the left, and type the URL. Click Apply.
Hyperlinkwindow_2

To link within the document, click the Document icon on the left side. Then click the round stopsign type icon, and you get the navigator. In the navigator window, you can link to any heading, table, object, etc. in your document, or in any other document. Click Apply, and Close. Then back in the hyperlink window, click Apply again.

Click this image to see a bigger image if you want.

Illustration_linkwindow

With those three attributes, you can make a document that's link-alicious.

Exporting to PDF

The final step, once you do all this in OpenOffice.org, is to export to PDF.

Choose File > Export to PDF. Name the file. In the PDF options window, specify a page range if you want, and make any changes to the graphics quality. (If you can, keep the JPG compression as high as possible.) Then click Export.

Here's the PDF Options window (version 2.0x). Click it to see a larger version if you want. BE SURE TO SELECT THE "TAGGED PDF" OPTION to make the links convert to links in the PDF document.
Pdfoptionswindow

Take that PDF copy of your document and post it to your web site, email it to whoever needs it, or just do whatever needs to be done to distribute it to the folks who need it.

Think Links and Think PDF! It reduces repetitive work, gives you and your organization extra powers, and will make you look very cool when you introduce this slick, labor-saving approach to distributing documents.

Thursday, August 2, 2007

Text Formatting with OpenOffice.org Writer

So, just because I wanted to show off a little, I loaded my diploma thesis, which was then already 130 pages long and took the screenie. I am a moron, I admit it... So, the funny thing was, when that article went live, I got an email from a crazy german who told me that I was not formatting my diploma correctly. He specified various mistakes and, to my amazement, he was right on every single issue he mentioned. O.K., it probably wasn't THAT difficult because I just used no automatic formatting at all, still I just couldn't believe that he could tell all that with nothing more than a simple screenshot. I emailed back, asking some innocent questions and basically got overwhelmed by his long and detailed responses. A few days and emails later, my diploma was a lot easier to work with.

Click for a larger view I was puzzled. I have worked with text processors since 1995 now and even though I have never been interested in the features of Microsoft Word and OpenOffice.org Writer, I thought that I, at least, knew something about them. As it turned out, I was wrong. Now that I am done with my diploma, I feel that all this knowledge should not go to waste. So I decided to write an article about text formatting. This is not really osnews-typical stuff, but I think that there are some people here who can benefit greatly from this article, just as I did. This article is to a great extent based on what Christoph wrote in his emails to me.

Click for a larger view Basically, whenever I wrote something with a text processor in the last decade, I just fired it up, wrote the title, selected the title with the mouse, made it 16 points large and bold, hit enter 2 times, set the text to 12 points and normal weight and started off. This is O.K. for all the small documents, up to, let's say 20 pages or so. Beyond that, this becomes a nightmare. I was struggling throughout my academical career with the same issues over and over:

  • I hated adding a table of content after I was done with my text, hand-editing all the page numbers into it.
  • I hated editing all the headings, losing track if they were 12 or 13 points, bold, underlined or whatever.
  • I hated having to look through my entire document when I changed something, just because everything after my change could be formatted badly again.
    Well, surprise, it's 2004, it does not have to be this way :-)
Click for a larger view So how do we start? Hmm... we open OpenOffice.org Writer and type... STOP. No, this time we're not going to do it this way.

Click for a larger view First of all, we want to give our document a title. Let's call it "Text formatting with OpenOffice.org Writer" :-) We click "File" - "Properties" - "Description". Let's fill in a title here. Why? Because we can do fancy stuff with this information later. Notice that OpenOffice.org now calls the document by its title instead of "Untitled1" in the title bar. Now let's have a look at the Stylist. The Stylist handles all our formatting tasks. With the Stylist we can edit Page Styles, Paragraph Styles, Character Styles and so forth. Think CSS if you are a webdesigner. Yeah, it works exactly the same way. If you aren't a webdesigner and don't know what CSS is: well, basically, instead of highlighting text and assigning “Bitstream Vera Serif”, size “16”, and “Bold” to it, we just “tell” OpenOffice.org Writer, via the Stylist, what kind of text this is: a heading, a quotation, normal text body, whatever. Why do we do this? Because it is far easier to control the layout and design of our document when we use a central layouting device. and that's exactly what the Stylist is!

Click for a larger view Now, we want a real "First Page", and it should later display our documents freshly chosen title and other information. We click "Page Style" in the Stylist and look what is highlighted: it's "Default". Double-click "First Page". Cool, we have just promoted the empty page to being the "First Page" of our document. Now, what comes next? Well, the next thing we definitely want is an index (even though we haven't even written a single word yet!): we click "Insert" - "Manual Break" - (chose style: "Index" and activate "Change Page number", starting with "1") - "Ok". Now we see that our document got another page. We click somewhere on this page and notice that the "Page Style" changes to "Index" in the Stylist. O.K., nice, we add another "Manual Break", now choosing "Default", activating "Change page number" again. Now we got the basic structure of our document: first page, index and space for our actual text.

Click for a larger view Now let's have a look at the properties of our "First Page": we right-click "First Page" in the Stylist and chose "Modify".

Click for a larger view Here we can see that the properties are grouped in eight tabs. "Organizer" tells us in the "Contains"-section all the settings that are chosen. We click on the "Page"-tab to change the paper format, set margins and so forth. Disable/Enable Header and Footer, if we like. You get the basic idea. Everything you change here just applies to the first page of the document. Now let's do "Insert" - "Header" - "All". We notice that OpenOffice.org now lets us choose where to insert the header: on the "First Page", the "Index", "Default" or on all pages. We click somewhere in the header and then "Insert" - "Fields" - "Title". Woah, here it is, our document name. We repeat that for the other two sections. Let's "Insert" - "Footer" only for "Index" and "Default", because we don't want page numbers on the first page. We click into the footer of the index, "Insert" - "Fields" - "Page Number", do the same in the footer for "Default". VoilĂ , here we have page numbers. Now, we'll do some magic: Right-click to modify "Index" in the Stylist, change to the "Page"-tab, and chose roman letters. Our index gets Roman page numbers, and our default text stays at Arabian numbers. Cool, eh?

Now, we click on "Paragraph Styles" in the Stylist, search for "Footer" (that the text in the footer uses pre-defined), right-click to modify it, and set "Alignment" to "Right" or "Centered", wherever we want to see the page numbers. We do the same to move the title in the header to, let's say, centered position. (Right-click "Header" in the "Paragraph Styles", "Alignment" - "Center"). Easy, huh? Now, we'll take a closer look at the "Paragraph Styles". Just like "Page Styles" does with the page layout, this helps you to format all possible kinds of headings, titles, subtitles, the header and footer, the "normal" text body, and so on. Now, let's have a close look on my diploma. I used 21 different styles. This may sound like a lot, but really it isn't: I heavily used and customized only 4 styles myself, “Heading 1”, “Heading 2”, “Text Body” and “Quotations”. The rest was either automatically set by OpenOffice.org, or touched once, like “Title”, “Header” and “Footer”.

Click for a larger view We click on the first page, "Insert" - "Fields" - "Title". The title displays at the upper left edge of the page. Now we look at the Paragraph Styles: "Default" is still highlighted. So we search through the Paragraph Styles until we find "Title" and double-click it. Whoa, it's centered and the font is bigger now! How that? Well, you probably guessed it, "Title" uses different settings than "Default". We modify the "Title"-style and we see that we can do almost anything with your title. Ah, yeah, and if it is not clear yet: if you ever want to change the document's title, just do that in "File" - "Properties" - "Description" and all the title-fields you have inserted into your document are automatically updated. You can add a subject (or subtitle) easily by writing it into the "Comments"-section there and doing "Insert" - "Fields" – “Subject”. Also your name? “Insert” - “Fields” - “Author”. Notice that you have to add your name in “Tools” - “Options” - “User Data” before!

Click for a larger view Now, we'll jump down to our "Default"-section, where the actual text will be located. Let's type a first heading. Afterwards, we select it, search for "Heading 1" in the Paragraph Styles, and double-click that. We adjust the heading by modifying "Heading 1", again not by changing it directly, because we want all the "Heading 1"-class headings of our document appear in the same way. Now we hit "Enter", double-click "Heading 2" and type your first subheading (or type it first, select it and assign "Heading 2", as we did before). Notice that we are not adding any outline numbers, OpenOffice.org will do that for us later. Now, we'll hit "Enter" again and type some text. Watch out, the text should not be "Default", but "Text Body". Assign that if needed, modify as you wish. One nice example: we modify "Text body" - "Indents & Spacing" - "First Line" from 0,00 to 0,50.

Click for a larger view This gives all our paragraphs a nice indent. Now we'll add another Heading, two Subheadings and some more text. Now we definitely need outline numbers for our headings. Easy enough: "Tools" - "Outline Numbering". Select "1-10", "Number" = "1,2,3,..." and we add a separator after the numbering (I used [.space] in my screenshot). Wow, all my headings are numbered now, with the scheme "1. Heading Class 1", "1.1. Heading Class 2", "2. Heading Class 1", "2.1. Heading Class 2", "2.2. Heading Class 2". This is really starting to shape up nicely! Of course, we can add headings later as we wish, everything gets updated automatically.

Click for a larger view Time for some magic again: we go up to our index, click "Insert" - "Indexes and Tables" - "Ok". Now, this one is nice. No more cruel hand-adding an index after writing a document. It just works automatically, if you have properly declared your headings via the Stylist! Now, modify "Heading 1" again, we "Enable" a "Page Break" in "Text Flow". All our headings (class 1 only) move to the start of the next page. We can also do that for our headings class 2 of course. Notice that you have to click into your automatically created table of contents, right-click it and chose "Update Index/Table" if we change the order or position of something inthe document, because the table of contents is not updated automatically. Or do you want to update everything in the whole document? Choose “Tools” - “Update” - “Update all”.

Click for a larger view So, that's the basics for editing long documents. Now let's have a short look on another useful tool in OpenOffice.org, a tool that really helps editing really large documents. The Navigator! As the name already assumes, this serves a totally different purpose than the Stylist. Don't mix it up with the Stylist, you can open the Navigator by pressing F5 or via "Edit" - "Navigator". It is accessible in the "Function Bar", on the left of the icon for the Stylist. If we assigned the appropriate Paragraph Styles to our headings, it is much easier to navigate through our document. Just double-click the entry (heading, table, note, graphic, whatever...) and the cursor automatically jumps there. Really nice when you have more than 100 pages, believe me. The Navigator gives you a really nice feeling of complete control over your document. Its usefulness increases literally exponentially with the size of your document.

Click for a larger view So, that was our small introduction into the wonders of OpenOffice.org Writer. I hope you enjoyed it and got something out of it. I certainly did...

Information in the web:

  • OpenOffice.org project: www.openoffice.org
  • OpenOffice.org information and support: support.openoffice.org
  • Wednesday, August 1, 2007

    OpenOffice.org Calc: Pivot tables by another name