Table Single Sourcing

This forum is for Single-Sourcing your Flare content to multiple outputs.
Andrew
Propellus Maximus
Posts: 1237
Joined: Fri Feb 10, 2006 5:37 am

Re: Table Single Sourcing

Post by Andrew »

mattman63 wrote:The table is about 1 inch in height and the bottom of it lands .75 inch from the bottom of the paper. I have it working great right now, just no data in it.
Well, if it's working, but lacking data, you could certainly use variables. I'd use variables inside both the page layout (assuming that is how you created the table) and the topics themselves. Then, when the editor / writer changes the files, they must update those values in the target (or, whoever builds the files can do so, though it seems to make more sense for the writer / editor to do it), and next time you build, everything changes, and you only had to change it in one place.
Flare v6.1 | Capture 4.0.0
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: Table Single Sourcing

Post by NorthEast »

I just had a read through this thread. It's quite hard to get an idea of what you're trying to do without seeing an example, but I had a few comments...

I think this is a lot more complicated than it needs to be, as you're trying to include the table in a page layout; which means you can't directly edit the table text - which you seem to need to do on a per topic basis. So, I don't think it makes a lot of sense having the table in the page layout. If you need to edit the table for each topic, then include the table in the topic itself.

You could include the table at the start of each topic. Obviously that means it would appear at the top of the page in a normal layout, so if you want it to appear at the bottom then one possible solution might be to set up a page layout for the first page of the document with two body frames. Position the first frame at the bottom of the page (Body [1]), and have the second frame above it (Body [2]). Provided your tables are always the same size (vertically), then scale Body [1] to match your table size, then the topic text that follows the table would flow into body [2] and appear above it on the page. Just to reiterate a key point, this method is quite dependent on your table being the same size in each topic!

On the subject of variables; I think it's just been mentioned here as a method of shoe-horning information into a page layout. Generally, you'd use them if some of the text in your table is the same between a number topics. For example, if a piece of text it is used in 500 of your topics, and is always going to be the same in those topics, then it'd make sense to define it as a variable.
Andrew
Propellus Maximus
Posts: 1237
Joined: Fri Feb 10, 2006 5:37 am

Re: Table Single Sourcing

Post by Andrew »

Dave Lee wrote:On the subject of variables; I think it's just been mentioned here as a method of shoe-horning information into a page layout. Generally, you'd use them if some of the text in your table is the same between a number topics. For example, if a piece of text it is used in 500 of your topics, and is always going to be the same in those topics, then it'd make sense to define it as a variable.
I agree with the rest of your post -- good idea! -- but I disagree with this. Variables are very much intended for situations where the same "class" of information must be different in different targets (e.g., the title of the book, or a customer name, or a date, or version, etc.).
Flare v6.1 | Capture 4.0.0
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: Table Single Sourcing

Post by NorthEast »

Andrew wrote:
Dave Lee wrote:On the subject of variables; I think it's just been mentioned here as a method of shoe-horning information into a page layout. Generally, you'd use them if some of the text in your table is the same between a number topics. For example, if a piece of text it is used in 500 of your topics, and is always going to be the same in those topics, then it'd make sense to define it as a variable.
I agree with the rest of your post -- good idea! -- but I disagree with this. Variables are very much intended for situations where the same "class" of information must be different in different targets (e.g., the title of the book, or a customer name, or a date, or version, etc.).
Yep, I wasn't saying variables shouldn't be used at all. I wanted to differentiate between when you'd normally use variables, and this situation where you're effectively forced to use them - i.e. by placing the table in a page layout it means you have to use a variable for every piece of information in the table.
Plus, since you'd use variables for data that's unique to each document/target, it would presumably also mean setting up 5000 targets too.
Andrew
Propellus Maximus
Posts: 1237
Joined: Fri Feb 10, 2006 5:37 am

Re: Table Single Sourcing

Post by Andrew »

Dave Lee wrote:Yep, I wasn't saying variables shouldn't be used at all. I wanted to differentiate between when you'd normally use variables, and this situation where you're effectively forced to use them - i.e. by placing the table in a page layout it means you have to use a variable for every piece of information in the table.
Plus, since you'd use variables for data that's unique to each document/target, it would presumably also mean setting up 5000 targets too.
To me, that *is* a normal use of variables. It's very much part of what they were designed for -- so you can have the same spot in a document have different text depending on the target. I do it with document titles all the time -- doc title is in the page layout, using a variable (because I produce more than one manual from one project).

Ah well. I digress. :P
Flare v6.1 | Capture 4.0.0
brerdane
Propeller Head
Posts: 13
Joined: Tue Nov 24, 2009 7:16 am
Location: Rocket City USA

Re: Table Single Sourcing

Post by brerdane »

Is there a way the glossary can be used to do this? Or one of the other features that use a proxy? I use the glossary for my acronym lists since I can create them in XML which is much quicker than typing them in the GUI.

I haven't created a template so far but wondering if a modified glossary template with the additional fields can be created. Then create a page layout using the proxy in a table or formatting columns to look like a table?

The other thought is Javascript. I can't remember the guy's name but he has a blog about all kinds of possibilities using JQuery.

Just throwing this out there as food for thought. Might give someone more experienced an idea for a viable workaround.

Deb
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Table Single Sourcing

Post by LTinker68 »

Dave Lee wrote:... then one possible solution might be to set up a page layout for the first page of the document with two body frames.
Note that unless this has changed in the later versions of Flare, you won't be able to use this option with Word output. Last time I tried it, I got an error saying the page layout couldn't contain two body frames and it tossed out one of the frames. But just for Word output. I'm pretty sure it was fine for PDF output.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
mattman63
Propeller Head
Posts: 63
Joined: Fri Aug 21, 2009 3:50 pm

Re: Table Single Sourcing

Post by mattman63 »

Dave,

I'm new, so I don't know how body frames work on a page layout. If you have two body frames, doesn't the overflow of the first frame flow into the second? If that's the case, then I have to monitor the text flow on 5,000 documents to make sure the text from body frame #1 isn't pushing the table in body frame #2 out of its desired location on the page. That's a headache I don't want.

However, if I can somehow specify that the text in body frame #1 must flow only into body frames of succeeding pages, and never into body frame #2, and if I can somehow specify that the table in the topics is meant only for the body #2 frame on the first page, and all other text is meant for the body #1 frame, then we might have a workable solution. I could put the table in each topic and change it as needed without using variables at all.

Is this at all a possibility? Otherwise, 5,000 page layouts, here I come.
Andrew
Propellus Maximus
Posts: 1237
Joined: Fri Feb 10, 2006 5:37 am

Re: Table Single Sourcing

Post by Andrew »

I might not use a body frame -- I'd try a decoration frame (or, you could even expand a footer frame some, and use that). I think Lisa is right (at least, as of v4.2.1, which I use): you can only have one body frame.
Flare v6.1 | Capture 4.0.0
i-tietz
Propellus Maximus
Posts: 1219
Joined: Wed Oct 24, 2007 4:13 am
Location: Fürth, Germany

Re: Table Single Sourcing

Post by i-tietz »

LTinker68 wrote:So, yes, you have to modify each topic in that you have to convert paragraph tags to heading tags, but you can use regular expressions to find <p>Revision number: xxx</p> and change it to <h3>Revision number: xxx</h3>, without modifying the information represented by xxx. I'm not that familiar with regular expressions, just what they can do, so you'd have to do some research into how to format the regular expression. Just make sure you specify in Flare's find-and-replace pane that you want to search in source code and you want to use regular expressions.
Honestly, I don't think that is going to work. In Flare you can FIND things using regular expressions, but not REPLACE them ... I had to to that in a separate tool ...

And also, I don't think Flare is the right tool for that. You can do a lot with programming, but if you don't want to increment revision numbers manually, you need a trigger that does that for you. What is that supposed to be? Checking in the file? Saving it? I really don't see an appropriate trigger that you can retrieve during the building process to increment revision numbers ... anybody with more imagination than me?
Of course you could always do that "from the outside" - you need to find out for yourself whether you can find somebody who can create that sort of code for you ...

Actually, for that sort of task you need a database driven tool that can generate the dynymic content for you ... but I don't know one in the price category of Flare ...
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: Table Single Sourcing

Post by NorthEast »

As LTinker mentioned, this will only work for PDF - the Word target doesn't support multiple body frames (including v6). So ignore this if you're using Word.
mattman63 wrote:I'm new, so I don't know how body frames work on a page layout. If you have two body frames, doesn't the overflow of the first frame flow into the second? If that's the case, then I have to monitor the text flow on 5,000 documents to make sure the text from body frame #1 isn't pushing the table in body frame #2 out of its desired location on the page. That's a headache I don't want.
Yes, it flows from frame #1 to frame #2; but a key point of my suggestion was that it would work if the table dimensions could be restricted to a fixed size to match the size of frame #1. If the table always fills frame #1, the text that follows it in the topic will always start in frame #2.

To be clear, I'm talking about having the table at the top of the topic (above the headings or text), so the table appears in frame #1 (placed at the bottom), and the topic text that follows it flows into frame #2 (placed at the top).

Anyway, what I'm suggesting should work ok if the table can be contained in a fixed size container - i.e. the table never exceeds a certain size (but can be smaller).
This is possible by using a div tag as a container for the table, where the div size matches the frame size.

I had a quick test, and it works ok for me. What I did...

1) Set up a page layout (first page) with two body frames; the bottom frame #1 flowing into frame #2 above it.
2) I set the height of frame #1 to 4 inches.
3) I added a div class to my stylesheet with the properties:

div.box
{
height: 4 in;
}

4) I added a table at the top of my topic, and placed it inside a div.box tag.

It worked fine for me - the table appeared in frame #1, and the text started in frame #2 above the table.
mattman63
Propeller Head
Posts: 63
Joined: Fri Aug 21, 2009 3:50 pm

Re: Table Single Sourcing

Post by mattman63 »

Ooooh, okay...missed that it was on the top. Yeah, that would work; the table is always the same size. However, no way the "powers that be" are going to agree to move the table from the bottom to the top. Not happening...lol. But I'll remember that little trick if something similar comes up where I have the freedom to change it.
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: Table Single Sourcing

Post by NorthEast »

mattman63 wrote:Ooooh, okay...missed that it was on the top. Yeah, that would work; the table is always the same size. However, no way the "powers that be" are going to agree to move the table from the bottom to the top. Not happening...lol. But I'll remember that little trick if something similar comes up where I have the freedom to change it.
The table is only at the top in the topic in the editor - in the actual output it appears at the bottom of the page, below the topic text. Isn't that what you/they want?
mattman63
Propeller Head
Posts: 63
Joined: Fri Aug 21, 2009 3:50 pm

Re: Table Single Sourcing

Post by mattman63 »

I believe I read previously in this thread that the div solution works only for web output, not for PDF output. Is that true?
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: Table Single Sourcing

Post by NorthEast »

mattman63 wrote:I believe I read previously in this thread that the div solution works only for web output, not for PDF output. Is that true?
No, completely the opposite - I said it was for PDF output; in fact it's only for PDF output.
That's what you said you were using in your first post.

It doesn't work for web outputs - you don't have page layouts in web outputs.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Table Single Sourcing

Post by LTinker68 »

Dave Lee wrote:
mattman63 wrote:I believe I read previously in this thread that the div solution works only for web output, not for PDF output. Is that true?
No, completely the opposite - I said it was for PDF output; in fact it's only for PDF output.
That's what you said you were using in your first post.

It doesn't work for web outputs - you don't have page layouts in web outputs.
Well, he couldn't use the page layout for web output, but he can still use the same DIV, can't he?

So in the print medium, create div.box the way Dave wrote previously. In the default medium, you create the div.box, but you set its position to be absolute, I believe, and set its bottom property (not bottom-margin, but bottom) to be 5px or something like that. However, by doing so, it'll float that DIV's contents over the bottom of the page, so as the user scrolls, text will roll up the page from behind that DIV, which may not be what you want. Or, maybe it is. If it is, then I recommend setting the DIV's width to 100% (the table inside can be smaller) and giving it a solid color background and maybe a top border to separate the DIV from the rest of the topic's contents.

You'll probably need to play with the values in the DIV to get it to work. I know it can be done, because I've done it, although I can't remember if IE6 will support it properly. Newer browsers should be able to deal with it fine.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
wbrisett
Sr. Propeller Head
Posts: 216
Joined: Mon Oct 05, 2009 3:29 pm
Location: Austin, TX

Re: Table Single Sourcing

Post by wbrisett »

mattman63 wrote:Wow...a feature request. ME? Sheesh, I'm just the newest of newbies.
As I've talked with MC support, it's become apparent that those of us newbies are full of ideas that either weren't part of their initial idea or things that have been on their "to-do" list and adding them via feature requests is very helpful.

Wayne
Post Reply