Table positioning in diff outputs

This forum is for all Flare issues not related to any of the other categories.
Post Reply
KHupp
Propeller Head
Posts: 22
Joined: Fri Feb 07, 2014 6:23 am

Table positioning in diff outputs

Post by KHupp »

I want to be able to have a table show up centered in PDF/Doc outputs but show up Left Justified in HTML/Web based outputs. How do I accomplish this?

This is what I have attempted so far:
Tried mediums by setting the default medium and then going to the tables properties and setting "Alignment" to Center. Then changing the medium to "non-print" and then set the table prop to left, but that seems to reset all mediums to left. It won't let me set the mediums independent of each other...
How do I set up my tables to react the way I want?
pdf/word - center
html - left

Thanks

Keith
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Table positioning in diff outputs

Post by Nita Beck »

Use the "default" medium, rather than the "non-print" medium, to align the table left for online. Actually, I'd think that left alignment is probably the default in the "default" medium (no pun intended), and you should have to only mess around with the "print" medium.

BTW, the original purpose of the "print" medium was to control how online content would look when printed. Say there's an image that is 10" wide in a topic in a Help system. If the user chose to print the topic, assuming 8.5x11" paper, the image would bleed off the page. So we could use the "print" medium to say that, for print, images would have a maximum width of, say, 7". The 10"-wide image would be reduced to 7" to fit the confines of the paper.

My (and other Flare users') habit is to use the "print" medium for how topics will look when printed from a Help system and a "printPDF" medium for how the topics will look in a generated PDF.

The subject of mediums comes up fairly often on the forums. Here are a couple of discussions that you might find useful:
-- http://forums.madcapsoftware.com/viewto ... =9&t=17354 -- in which the much-revered LTinker68 speaks about the purpose of the "print" medium.
-- http://forums.madcapsoftware.com/viewto ... =6&t=14822 -- in which wclass offers a lengthy description of how she and her colleagues use mediums, including using the "print" medium only for printing webhelp pages and using custom mediums for generating PDF or Word.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
KHupp
Propeller Head
Posts: 22
Joined: Fri Feb 07, 2014 6:23 am

Re: Table positioning in diff outputs

Post by KHupp »

Thanks for your reply, but what I need is how to set up the table to display Left Justify in web and Center in print.

I did what you said but when I change the table alignment in print medium, they all change. So if mediums are not the way to accomplish this, then that is fine, the question then becomes, "What is the best way to accomplish this?"

Now I can "manually" change it ever time I want to publish to what ever output, but that is ridiculous considering the cost and supposed power this program has.

Yes, I am getting frustrated with this program.

Keith
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Table positioning in diff outputs

Post by NorthEast »

KHupp wrote:Thanks for your reply, but what I need is how to set up the table to display Left Justify in web and Center in print.

I did what you said but when I change the table alignment in print medium, they all change. So if mediums are not the way to accomplish this, then that is fine, the question then becomes, "What is the best way to accomplish this?"

Now I can "manually" change it ever time I want to publish to what ever output, but that is ridiculous considering the cost and supposed power this program has.

Yes, I am getting frustrated with this program.

Keith
I don't understand how you're setting a table's alignment for a specific medium, as I don't think you can't actually do that using Flare.

If you're setting the alignment in the table properties, that'll set the table alignment as an inline style, which is applied irrespective of whatever medium is used.

Note that changing the medium in the XML editor toolbar will just change the medium in which you view the topic, it doesn't mean the table properties are being applied to a specific medium.


If you wanted to set the alignment of all tables, you could set this up in your stylesheet.
For example, if your table stylesheet is called YourTableName, use :

Code: Select all

@media print
{
	table.TableStyle-YourTableName
	{
		margin-left: auto; 
		margin-right: auto;
	}
}

@media non-print
{
	table.TableStyle-YourTableName
	{
		margin-left: 0; 
		margin-right: auto;
	}
}
The table will be left-aligned in the non-print medium (left margin fixed to 0, right is automatic), and centred in print (both margins automatic, so they're equal).

The tables would need to be set to (default) alignment in table properties, as any inline settings will override the stylesheet.
KHupp
Propeller Head
Posts: 22
Joined: Fri Feb 07, 2014 6:23 am

Re: Table positioning in diff outputs

Post by KHupp »

So I set the table position to "default" under the "Align" section of the table properties.
Copied code into the Table style sheet (Doc_control.css) and saved...

Note: edited the table style sheet in "Internal Text Editor"

Code: Select all

@media non-print
{
	table.TableStyle-Doc_control.css
    {
        margin-left: 0; 
        margin-right: auto;
    }
	
    mcTableStyle
	{
		background-color: #708090;
	}

    mcTableColumnStyle
	{
		
	}

	mcTableBodyStyle
	{
		
	}

	mcTableBodyStyle
	{
		
	}
}

@media print
{
	table.TableStyle-Doc_control.css
    {
        margin-left: auto; 
        margin-right: auto;
    }
   
   	mcTableStyle
	{
		background-color: #b0e0e6;
	}

    mcTableColumnStyle
	{
		
	}

	mcTableBodyStyle
	{
		
	}

	mcTableBodyStyle
	{
		
	}
}
saved everything and re-generated the PDF and HTML...

Still the same results...

Table property is set to use this style sheet for control and I know it is by all the other settings I did...

What am I missing?
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Table positioning in diff outputs

Post by NorthEast »

1) The styles should be copied into your main stylesheet used by topics, not the table stylesheet. Table stylesheets are generated by Flare, so it's best not to touch them.

2) The table style class name is just table.TableStyle-Doc_control, without the .css.
KHupp
Propeller Head
Posts: 22
Joined: Fri Feb 07, 2014 6:23 am

Re: Table positioning in diff outputs

Post by KHupp »

Ok that worked for displaying the table position correctly in HTML (left) and PDF (centered), but not in Word.
Considering all the "issues" between Flare & Word, I am satisfied with the results. Most (98%) of the outputs will be HTML & PDF and for the few DOC's I do, I can change...

Thank you for your help...

Keith
Post Reply