 Good morning and welcome to my speech. I'll talk about how to create professional templates with a LibreOffice writer I am Gabriele Ponzo and I am a self-employed My company let's say name is GPS. I'm a founder of the Linux user group and also of a LibreItaly Association where I'm actually the vice president I'm a full member and the former chairman of TDF's membership committee and I'm certified LibreOffice professional trainer and migration expert First of all, this is the agenda. So what we are going to talk about and Let's move on to the first point So the importance of the corporate of a corporate template as you can see from the pictures I have included in this slide You can see that these are three different documents and I try to align them the best I could to Let you see how they are different how they look different from each other And this is one of the problems of having of not having a corporate template or at least not using it so in this case you can we can see that regardless to the let's say not proper use of the We're processing so spaces and tops and whatever but the logo for example is every time different as sides at least as position and also as a quality as you can see here this really scaled and compressed so Why this is here here? so these are three different documents from the very same entity which is my municipality and They look so different. This is just because they probably don't have or at least that didn't use our template So this is one of the important points of having a corporate template and obviously to use them Let's say we can talk about uniformity at least so to give always the very same impression the very same Image of the entity of the company or whatever To the general public when you know deploying and delivering documents What should it contain? So? What's the meaning of having a template? Why we already talked about the uniformity? so to give always the very same image of the company of the entity or whatever and But he's also comfortable and useful to have a template just to How to say? Shorten times to produce a document because you can imagine that if you have to produce several documents in a day You can't every time start from scratch and write in a The company name the address and whatever so obviously it is really useful to have a template also for this reason so avoid repeating the the typing of text for example and And and these applies to the the header the footer and also the body of the document Which contain the very same things in time for example for the the same kind of documents So you don't have to write again every time You can prepare customized styles so that you don't have to waste time every time to format the text So you may have styles already Prepared to do this kind of job and then it's useful to know that more than on template can be issued What I mean is that obviously especially big companies or entities or whatever they may have different department for example so in this case is It could be useful to have different templates for our departments But it was to know that it is possible also to have templates from templates So this means that we may want to have a General template let's say with the company name with the stationary data and whatever In the heading and the footer for example, and then we may Create templates from this template for different departments Now let's see what what can we do? How can we create a template for example, and I've Written down something that usually a template has and how to create it so first of all you have to create an empty document and Then we should add a header and a footer And then write the introduction text and so on Let's say that the short and the time I better start from my previous template and I can profit off these you know lecture to translate in in English for example, so this is my company template and As you can see it is in Italian at the moment, so let's translate it in English Wait, okay, so we already have an header and a footer Let's have a check So this is the other and I guess it doesn't need to be translated because you know about telephone fax email So it's international page in this way. It's it could be English as well as Italian While the introduction text so let's translate these but in the meantime we could also introduce the input fields or input lists with control f2 Okay With control f2 we recall this dialogue Which hasn't among the functions, you know the possibility to To recall this kind of Objects so in this case we need input list we may start from you know Person so we could introduce for example miss and Misses Mr. Kind of estimated, I guess to be honest, I'm not so so much prepared on this and Let's stop here because I mean the The the topic is I think is clear so in searching this I will have the opportunity to choose among those Titles now we could also add something like the address here and In this time in this case we will use our input field So reference Insert now it prompts for the default value ink Or LTD, I don't know Okay, so this is a quick, you know demo of Preparing now Here obviously it would be subject then I Would just remove this I I have already this kind of data here But I mean it deserves to be explained how to insert such data I'm talking about the page number and the total count total count of pages. It's really simple You can use it from here insert Field and the most used are here so page number for example slash Insert field Page count those are really common so you can use it here really easily But if you miss something here, you can go here with control F2 again And then like as you can see on the document tab you have several Fields several data and properties of the document itself page page number again and so on and send statistics and whatever In this case, we will just insert the page count again But if we want to for example Insert templates. Yeah, I want to State in the file. I will issue The template name which is something that big companies used to do So for example, I could do something like Fine name here or template name much better insert and This is an automatic field obviously we saw how to Well, I already had the the header, but it's easy to understand how to do that the footer we modified to introduce some Document field and document info we missed a placeholder to be honest It is already there, but I just show you how to do that. So we you go to Functions and you have placeholder and You may specify, you know the kind of placeholder especially usually it is a text And you you can't you know specify if the text will be a date or something like something else But you may specify if it is not a text so table frame image or object This means that if when for example, if you specify an image when you click on the placeholder It just prompts you for the inserting of an image. So it can be useful sometimes Say that in this case, I just specify in the ISO format For example and the reference is dog Date and then I insert it. Okay And This is nothing more than just, you know, a rim Recaller Something to you know, you just have to you could replace the text here But it would stay in this format So to be honest the placeholder just remember that you have to write that particular kind of text But usually you just overwrite it. I will replace in the real document something like, you know And whatever so what I'm going to show you now is how to Introduce a conditional section in this case. So first of all, we have to insert a variable so function no variables, sorry set variable text Name of variable is a project. Let's say project name the value is Alice and then I just hit insert Okay So let's move this away Now what I do here is insert sec where a section section, sorry, okay section Then I just call it Sect Sorry Alice description desk and then I use a condition Here which is Project name I saw that the hyphen was removed so project name equals Ali check or Alice Or to be honest, which what would be better because this is the height condition. So I would write something like The fairs from and then also this this means that I have to show To show this section just and only if the project name is Alice Alice so let's introduce this section then This is ortho text. I don't know if you know it. It's just I wrote a word like which was Lorem and then F3 and This is let's say the section to be shown if the the the value of this Variable is Alice then we could do the very same thing here with Insert section and then let's call it Then hide and then it was project name is not Me okay so insert and Then we can't see it just because the the value of the variable at the moment is not me K so Let's double-click on it as you can see now the The the dialogue prompts for the value of the the new value of the variable. So I just write down me K and Then now we can see these other Section so the the purpose of this kind of you know conditional paragraphs is for example in cases Recently had to prepare our company Template where there was a description of several projects, but Instead of having the user to delete the all the projects Which were not mentioned on that particular issue of the template. So let's say for example it in that case it was an offer or A tender request So there was the description of the project where the tender was you know in in tendon and meant to be implemented So the previous version of the template Contained all the descriptions are all the projects in this case. I kept all those descriptions, but I automatically let the the system hide the the ones which are not Mentioned and not in the subject. So let's say that Okay, this is the description of the make a project. So as you can see Now if I write something like I don't know Something different from the both as you can see no one of that section are displayed as shown But if I match Okay, the name of an existing Section it would be shown so this is really interesting isn't it and the reason to do that as it again is you know to automate as much as possible the Work of the creation of the document. So indeed why and when to automate unlock contents It's really sad to say but most of the user are not skilled I mean, it's not that fault. They have not been been prepared. I've not been, you know trained so they don't know how to use the word processors as They should so at the end it's much better if they don't touch the document too much and Leave it the way it is To avoid, you know messing up with it so in this case you avoid the mess up but also you ease their work and Speed up the work because they just have to choose some field as we so and Automatically the rest of the document is let's say done and We we will also see how to lock our contents because For example, we could also let's say that I could do this Select all this content then I could insert a Section and again and I curl it Had there and then I protect I could protect it with or the password This is the common usage, but I won't because now at the moment is just for demo reason purposes So and then I just okay. It is protected, right? I Go to sections and unprotected and then I just paste all the you know all of these If you do this at the very first moment you can Avoid having this spare paragraph by the way, I just deleted so at the moment and now I'm going to To protect that section Without a password at the moment, but as you can see you can't write inside it. You can't move The logo and also please notice that it is something useful sometimes also for positioning a logo not In the header or not what I mean is that Let me unprotect it and then let's go to the gallery and let's take such as these I would bring it here and Then reduce it this way Okay, and then move it here if I Move the the anchor within Let me do just cut and Paste as you can see now the anchor is within the section. I can move the the object Here which is outside the area of the other section, but when I lock the section again in this way As you can see I can't move I can't resize these but also these one and This is really interesting I've been doing this for very so for our company local, but international company so Let's continue There are some unclear situation here because you've seen that I have to achieve that, you know behavior of hiding sections I inserted a variable, which is fine. It is Something that probably is not the best situation. What I mean is that As you have seen you have to Double-click on it to set the value and then this dialogue is kind of technical dialogue so The common user could be how to say you're somehow Feel lost, you know in such a technical dialogue While I have you have seen that in this case, for example, this is not such a technical This is you know just one choice and then you know there is just this edit button But it is really easy to use so it would be much easier and better to use This one in particular because this is an input field So you have freedom of you know, you have the freedom to to write whatever you want You know, don't have to choose why this is an input list So you have to choose something so I could use this to insert the name of the project and then basing of that name hide the section as we have seen but the problem is that Usually it doesn't create a variable so I don't have a variable to mention in the expression for hiding the section and this is something really particular because There is no time to show you but if you first create a variable and then hide it and then create an input field Mention that variable sometime you You can achieve such a behavior You can see here Where's pointer? Okay? For example, I tried many times, you know the very first input field. There wasn't any variable Connected let's say a related then I declared a variable VATU and then I tried with the input field and I didn't succeed then I declared a third variable I Recalled it as a variable then I Created an input field can let's say connected to somehow to the variable 3 and Then I was you able to recall the value Even if the value the variable value was this while this was a text written in The in the input field so some strange behavior or at least not that clear Even for an experienced user but by the way and anyway there is no no way to Associate let's say a variable to an input list and this is really sad here I Just reported the the code of the document on this document. Okay, so you may see In the XML code generated by LibreOffice writer What happened when I created the first variable when I declared a variable and Sorry the input field the variable and whatever and so far and so forth and here these is a Manual attempt to trick it. Let's say so I just you know try to Recall manually because this text I just wrote manually just copying and pasting obviously but It didn't work as you can see because I after that I modified the the chosen item of the list and Recalling didn't vary just reported the thing written in the code. So this is almost unclear and I would like to How to say to and to improve and to go deeper with the developers possibly Then how so this is what I've just explained Let's say that if you just have to recall an item you could use a trick like these you can set Cross-reference so set cross-reference and this was what was it? title Okay, and then you create a reference Over that and then you may recall it whatever you want here for example Insert reference Reference itself so miss so if I vary here and I choose for example estimated Now you can see estimated, but this is a trick I mean it's a workaround. It doesn't work. It is really dirty just because okay It works just to report the text and it's fine But if you want to base an expression to hide a section for example as like we so before you can't if you have a An input list you can't with the input field you may have a success and I did it But you know it is tricky to to achieve it So finally let's say that we have created more or less a template Let's see how to save it as a template and what's the behavior then so Oops Both Yeah, you have two ways to save it as a As a template the first one is via the menu There is a template and then you you can do this save as a template and it prompts for the category and whatever This is probably the best way especially if you're not so experienced otherwise, you may just do save ours and choose as the Kind of type of document the template this way and let's say GPS and Okay Let's see what happens now the document is saved I close it because this is a template itself if I go to the folder it was document and Okay, I double-click in it as a template what you'll notice is that First of all here The name of the document is untitled because the property of our template is that when you open it It just issues a new document based on the template and as you can see the this a really good feature Is that when you open the template it prompts you for the Fields so the very first thing is was the title But the problem is that the position of the dialogue in this case. I can't see what is that? I mean, yes, I have to choose among miss misses mister and estimated. Okay, but to to place it where? Here the problem is that you know in this case So let's say that I choose estimating and then it prompts you again for the next field Which is really fine, which is really good, but again the the window the dialogue window upset on the on the position where it was before So I have to move it again and so on and now I could write L for example, this is Italian. Okay, and that's it as you can see It didn't prompt for these because this was a variable and not a field Again, so it's very beautiful this feature to prompting the user for the free the fields to fill in But it can't be it could be and should be from my point of view improved and not only about the position of the window, but also for the The highlighting and I show you why Okay, and open Many field examples OTT. Okay. These are prepared in advance Okay, now it prompts for the very first field first of all as you can see as before it is overlapping and is you know hiding the the fields itself, but by the way Now we it is our it is prompting for with or without now it is simple just because there are many but you know With or without you can see this is with but when there are really many of them There is no highlighting. So there is no way to understand. Which is the field you are prompted for So for example, I choose without and then again Move it and filled all lists. Let's say list and again Stays or remains stays and again dialogue I don't know modal window for example, and that's it so I've been able to fill in all the fields and It was really good, but it can't be improved I hope you enjoyed this talk and you learned something and I thank you so much for attending and I'm obviously free to to answer any question in the specific room and See you again