How to change global style of document in LibreOffice? - libreoffice

I am a web developer and I want to style my libreoffice document like CSS.
I want to have a 1.5 line height everywhere except for list.
All the ul with 1.5 line (default) but the li in single line.
Is there a way to customize styling like that for all my future documents ?

I am not sure if you can create a separate style for libreoffice documents... But you can create a Template document for your future needs. Check out this link:
https://askubuntu.com/questions/94734/what-is-the-templates-folder-in-the-home-directory-for
This is good for creating documents for example inventory list, performance tracker etc .. but can be tuned to have some basic styling changes like change of margin size, general line hight etc.

Related

Microsoft Word: Set default styles

I have created a number of styles that I would like to use for many of my future documents. Thus, I want to create a template or set them as default so that whenever I open Word, they are there. I tried creating a template but my styles are not there. How can I do this?

User selectable widgets in Umbraco 7

We are looking at Umbraco as a possible alternative to our current CMS which was developed in house and which although powerful, is dated now and becoming more difficult to maintain.
One really good feature which we would be loth to lose is the widget feature. Using this, we can build a widget by defining a number of inputs (eg text fields, media picker, links etc) together with the html required to output the results (using placeholders to substitute in the content entered by the web content editors).
On the page, content editors can select which (if any) widget(s) to use, enter content into the inputs defined in the widget, and the page outputs this accordingly.
In other words, without resorting to programming, we can create widgets just by defining inputs and the output html in minutes.
Users can select widgets and their input is controlled and formatted.
Simple and effective.
Is anything like this available in Umbraco without having to develop new C# code for each widget? I have looked into using macros in a rich text field, but I can't see how they can be made editable using complex data entry as described above.
Beside the Macro in richtext,
In Umbraco you can use a picker/list view data type to select some "component/widget items" and for rendering it requires some code if more than one document type is allowed, if document type is x1 do code a1.
Use (Partial view) Macro Files for reuse.
This is the closest to the "widget" function you want.
A other relatively new datatype in Umbraco is the Grid layouts, allow editors to create a Complex data, column structure with multiple data types. I suspect not comparable/useful for your "widget" function.

ActiveReports <LI> tag spacing

I've a rich textbox in activereports detail section. Its assigned with html dyanmicaly. That HTML includes LIST tags too(UL and LI). But the problem I cant change the spacing between each LI tags. I tried all CSS methods on the LI's style property. Like Margin, Padding , Line height. But nothing helped me to solve that issue. But I need some noticeable spacing between each LI tags on the Richtextbox..
This is an emergency requirement from my boss.
Requesting your valuable support..
Thanks in Advance..
There are list of supported HTML elements and CSS style attributes in the ActiveReports documentation. You could look through that reference and try the mentioned style attributes. I'd try the line-height, margin, and padding properties of the LI elements. Or maybe try putting a P element on one of the LI elements? If that doesn't work you should probably contact ActiveReports Support at ComponentOne.
If nothing else, you could try to get some RTF document to look the way you want (i.e. increased spacing between list items) and try importing that RTF document into ActiveReports instead.
Here's what works for me:
The paragraph tag supports the inline style attribute in an ActiveReports RichTextBox. So you can enclose each list item within open/close paragraph tags, and then use margin-top, margin-bottom in the inline paragraph style to get the line spacing how you want it.
I used style='margin-top:0;margin-bottom:5'

How to fusion two content elements? / Does an all in one content element exist?

I need a content element that cointains apsects from the "Textpic" and the "Media" content elements.
Basically I need the whole palette of input masks of the textpic CE (headline, rte text, images) plus the media tab (swf, mp4, mov) from the media content element.
This special requirements for our project comes from the need that we can only use one content element for our specific javascript content slieder. So I can not use like a Textpic and underneath a media CE. No it really has to be just one CE which can handle the textpic + the media CE stuff.
Generally I ask you: Is there already a extension, trick, modification or a framework which I can/should be use to achive that i can "fusionate" content elements? Like an "all-in-one"-content element, a multi content element?
Ps: I do not use Templavoila. My Typo3 version is 4.5
I think this is the tutorial you're looking for:
http://castironcoding.com/resources/our-blog/sp/view/single/post/reason-6-for-choosing-typo3-custom-content-elements-and-extbase-again-part-23.html
Follow step 2 and 3.
You'll also need to add a specific rendering config in Typoscript ie: tt_content._your-ce_
But it can be copied from out of tt_content.textpic and tt_content.media. You can find the expample typoscript of before mentioned CE's in: typo3/sysext/css_styled_content/static/setup.txt. Just don't alter it there, but make a copy and alter in your own file.
As you seem to only talk about reusing already exisiting fields, you really only need to change the backend interface (big keyword: "showitem"). You'll need the database names of the fields (peek into the tt_content table of some records where you know the contents), alternatively visit the module Admin Tools / Configuration, select TCA in top dropdown menu, open tt_content and columns.
Try http://blog.chandanweb.com/typo3/adding-new-fields-to-existing-typo3-tables-at-desired-location, you'll of course have to substitue tt_content for tt_news etc.
You might also want to make a new type (the above recipe is for changing a preexisitent), but I'm sorry, I'm currently out of time for explaining that. It's not very hard, though, and the castiron link by Koopa will help you on your way.
Perhaps you can wrap the content column in another div? You can use that outer div for your content slider. Now you actually use all content elements seperately, but combine then for usage.

Using jQuery how can you select all DOM elements that have a pixel value set in the source HTML?

I'm writing some tests and one of the assertions has to ensure an HTML document only uses px units of measurement where specified. I'm using jQuery but I can't work out the way to select those elements. These elements will be the ones with things like margin and padding specifically set and not just the inherited values or pixel values converted from em etc.
Cheers
I'm not sure exactly what you're dealing with, but if these elements have the pixel values set in the "style" attribute, you could use something like
$([style*='px']);
For all of the elements with a style attribute which contains the letters "px". Otherwise, if they are explicitly set in the "width", "padding", and "margin" attributes, it would be something like
$([padding*='px']);
You can read more about the "contains" selector in the jQuery API here:
http://api.jquery.com/attribute-contains-selector/
If this doesn't answer your question, you'll have to be a little more clear about the structure of your document, and perhaps provide some example code.