How are tab characters displayed in Flare?

This forum is for all Flare issues not related to any of the other categories.
Post Reply
bwofficer
Propeller Head
Posts: 60
Joined: Tue May 12, 2020 2:16 am

How are tab characters displayed in Flare?

Post by bwofficer »

Coming over to Flare from MS Word, I'm used to using tab stops and tab characters to align text. I know that tab stops don't really exist in the web-oriented technologies Flare uses, but I was wondering whether I can at least insert tab characters and what control I have over them.

Am I right in thinking the answers are "yes" (to inserting and displaying tab characters) and "none" (to controlling their width etc.)?

I've found that in the Flare topic editor the tab key has been hijacked and applies a text-indent instead. However I've worked out I can go to the text editor tab and type in the unicode for a tab character there. If I set white-space: pre; in my stylesheet then the tab character displays in the topic as single character a bit wider than a space.

I've failed in my attempts to set the width of the tab, though. I Googled tab width in CSS and it seems that there's a tab-size parameter. Setting tab-size: 1.0cm; in my stylesheet doesn't seem to change how wide the tab character looks in the topic editor or in the built output (which is PDF). Am I doing something wrong, or is this tab-size parameter just not supported in Flare?
robdocsmith
Sr. Propeller Head
Posts: 271
Joined: Thu May 24, 2018 3:11 pm
Location: Queensland, Australia

Re: How are tab characters displayed in Flare?

Post by robdocsmith »

You're right in that the HTML/XML that Flare uses for topics doesn't support tab stops.

What do you need to do with tabs?

I've always been able to find alternate ways to simulate tabs and indents. Either using margins or padding, floats, or in cases of producing a form for a PDF, a table with no borders to manage the alignment. It can be a fiddle sometimes to be sure, but once styles have been set up, they are easy to apply. And in some cases, I've let go of the tight control of certain things in favour of an easier life maintaining the docset.

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

Re: How are tab characters displayed in Flare?

Post by NorthEast »

It should work - but is more fully supported in HTML5 than PDF.
I inserted tabs by pressing Tab in the Text Editor view.
The tab-size value can be specified as the number of spaces or with a length unit. HTML5 output in a browser appears to support both, but PDF only appears to support a value specified as the number of spaces. So for example, if you set a length unit of 5cm or 5mm, it looks like the unit is ignored and it's interpreted as 5 spaces for PDF.

Try:

Code: Select all

p.tab5
{
	tab-size: 5;
	white-space: pre;
}

p.tab10
{
	tab-size: 10;
	white-space: pre;
}
bwofficer
Propeller Head
Posts: 60
Joined: Tue May 12, 2020 2:16 am

Re: How are tab characters displayed in Flare?

Post by bwofficer »

Thanks, Dave. That was a great help.
robdocsmith
Sr. Propeller Head
Posts: 271
Joined: Thu May 24, 2018 3:11 pm
Location: Queensland, Australia

Re: How are tab characters displayed in Flare?

Post by robdocsmith »

Well you learn a new thing every day! Thanks Dave. I may have to reassess how I do some of my styling now :D

Rob
Post Reply