 Hello, this is Hans van der Krust, senior lecturer at IHG Delft Institute for Water Education. In this video I am going to demonstrate how to use the print layout. The steps that I demonstrate are part of chapter 7 of the book QGIS for Hydrological Applications. In previous videos I have demonstrated the preparation of the data and the styling of the layers. In this video we are going to prepare a map for printing or to save as a figure to include in a document. To create a new print layout we go to Project New Print Layout and there we have to give it a name because we can have multiple stored in the project. This one we call Roar Catchment. Click OK and it opens another screen and this is where we design our map. We see a sheet of paper. When we click right on the paper we can change the page properties such as the page size and the orientation. In this case we keep it at A4 but we are going to change the orientation from landscape to portrait because our catchment fits better with the portrait orientation. Now we are going to add the map to the layout. If we use this button, if you hover over the buttons you can see what they mean. You can also find these things in the menu on top of the screen. We drag a rectangle. We keep a bit of a margin because we are going to place some other elements and here we see the map from the map canvas on the piece of paper. With this button with the arrows we can move the map inside the box. And with the scroll we can make steps. With alt scroll or control scroll we can make smaller steps and with the skill number we can even fine tune. So here we fine tune it now by making it 395,000. And then we can adjust the box to fit the map. Now we are going to add a frame. So there is a nice line around the map, make it a little bit thicker. Now we are going to add a title with this button, it's a label button and we can use that to add any kind of text. So we drag a box and as you see that with the selected items also the item properties menu changes. So now we can type here the text that we want in this field, which is the title of the map. We can change the font, we are going to use Times New Roman, bold and the size of 36. We change the horizontal alignment to center and the vertical alignment to middle. So now we can move it a bit around, we can nudge it with the arrow buttons, we can use the zoom buttons to zoom in on the paper and choose the right position. Next step is to add a legend. We do this with this button, we can drag a box and the legend would be taken into that box. If you want to change the legend we uncheck the auto update button and then we can use the buttons below to remove certain items. Remember that in the legend we only put the things that are not self-explanable, the cities and towns have the labels so we can remove them. And the things that we cannot see on the map, we remove them. We will later make a legend for the elevation model. So we end up with these. With the arrow up button we can move a legend item to the top. With this button we can change the text, so let's make it human readable. So in legends we don't use underscores, we make it really readable. So we change this to Roar Catchment, click OK and we see it's replaced. And we do the same for Roar Channels, so we remove the underscore. And we do the same for the Strahler Orders. By double clicking we can also edit the text. Now we can go to columns and change that the legend is in two columns and split layers then it can also split half way the layers or somewhere in the layers to make it equal. And that looks nice for us. Next step is to add a scale bar. Again we drag a box and in item properties we can change the settings. We keep the scale bar units to kilometers, we keep the segments left to zero and the right to two. We change the style to a line text down. I'm going to change the font to a smaller one, nine points, zoom in on the paper. So it scrolls and make sure that the scale bar is OK. Next we're going to add a north arrow and in this version of QGIS you do that by adding a new picture, like a little box. And then in item properties of this picture we go to the search directories and there we find the north arrows that are installed with QGIS, we'll use this one. You can synchronize the north arrow with the map. So if maps are rotated the north arrow will rotate with the map. We change the resize mode to zoom and resize frame and we see now that the frame snaps around the north arrow. We move it to the right location. We're going to add some text which gives us the data sources and the author. So create another text box and item properties we can then add the text. Let's first mention the data sources. It's a SRTM for the elevation and open street map for the locations. We can add the name of the cartographer. I'll fill that in later and create it on a certain date which we're going to replace that by an expression. With this expression we can generate the current date and put it in the right format. So this reads like concatenate and then we have a string in the single quotes and that needs to be concatenated with the whole function that creates the date. So format date, that's the function that formats the date in months, days, years. And then the dollar now means the current date and we put that in the to date function and then we have to convert it to a string with the to string function. So this makes that there are two strings that go into the format date. It is the whole date string and it is the format of the date which you can see us on the right of the dialogue what choices you have and that's concatenated with the text created on and on the bottom of the screen we see a preview. So now we have our expression and we can we'll modify it a bit, move some white lines besides the box a bit so it fits and the smaller font, move it to the correct position, save it to the project and I go to the other screen to create a variable for the cartographer. If you go to the settings menu, you choose options and go then to the menu for variables. You see here all kinds of variables and we can also create our own so I can create a variable called cartographer and then I can add name of the cartographer such as Gerard is Mercator. Click OK and go back to the other screen and we can insert an expression and we choose their variable and we double click on cartographer and then that will be printed. Now we're going to make a locator map so what we're going to do is create two groups of maps and we use also the map themes for it. So all the layers that we have used now, select them all and we click right and we choose to group the selected and we call the group main map. Click on the eye, we can choose add theme and make kind of a preset for this group and we call this theme main map. On the other screen we make a main map active and we can check under layers follow map theme main map. Now that preset of layers is linked to this main map. Go back to the other screen and in the data folder there is a geopackage and there we have a country boundaries file and I click right and I choose move out of group because I want this one in another group. I'm going to hide all the layers and I'm going to duplicate this boundary because in the end I want this boundary and the country boundaries on top of each other to have the reader of the map with a good orientation. So now we check the layers that we want for the locator map. Now what we're going to do is to group the selected and then we call it locator map. I'm going to style the country boundaries, simple file. For file style we choose no brush and make the stroke 0.46 millimeter. I'm going to add the labels, single labels and I use the name which are the names of the countries. Choose aerial and make it a bit smaller and we use a bold font. I'm going to change the root catchment boundary, change to simple fill and change the color with lighter blue and we make it light blue and then we can use the eye again to add the theme and we call this one the locator map. Here you can see what we can do with these map themes. We can quickly switch between presets of layers and layer combinations. Now we go to the other screen and I'm going to move a bit to the top of the paper and I want to add there the locator map in the upper right because there is enough space outside of our catchment. I draw a box and there I see what I had in the map canvas and I check there in the item properties follow map theme and then I choose the locator map. Change it, the scale, now we're going to add a legend for the elevation. We add a rectangle and change the size with a width 5 and height of 50 and then we go to the colors of the rectangle. We click on simple fill and we change the symbol layer type to gradient fill. We choose there a color ramp and we're going to choose there the same as our DEM to create new color ramp and then we select CPT city and we choose there topography and then I choose the elevation ramp, the same one that I used for the DEM. There it is. The rectangle is nicer with a border around it and therefore we are creating an extra box around it with plus sign and we change it to no brush. Now we have to add some values for the legend with the minimum and maximum value. Let's check the minimum maximum value in the layer in the DEM. You can find that in the information and there we see that the minimum is 9 meters and the maximum is almost 700 meters. In the print layout we can now change the values 9 meter minimum and 700 meters for the maximum. We're going to change a few little things to optimize it. The labels of the countries when they cross a border they're not so nice so we're going to draw a little text buffer around it and I can update preview and there you see the effect. You can also use the refresh button and then we can also add a little frame around our locator map by checking the frame box. Now the final thing we need to do is to export our map to an image. We can choose different file formats here we choose a PNG. If needed we can crop to the content in this case we leave it to the whole thing and when it's done with the conversion it will show a little link here when we click on it it will go to the folder and when we double click we see our final map. We can also export the map to a PDF to be printed. If you want to include the map in a report such as a Word document then we are going to export it as a PNG or as a diff and what is important is in a report that you insert it as a figure. So in that case we don't use the title here we see word catchment as the title but we put that in the caption and insert the map as a figure with the caption that then says word catchment.