<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:879125825;
        mso-list-type:hybrid;
        mso-list-template-ids:-2025929368 403243023 403243033 403243035 403243023 403243033 403243035 403243023 403243033 403243035;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-IE" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hi I have one possible solution, or work around…<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="color:#1F497D"><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span style="color:#1F497D">Use your Layer to display the first part
<b>Name</b><o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="color:#1F497D"><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span style="color:#1F497D">Duplicate the layer and set it to not display symbols (Properties – Symbology – No Symbols)<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="color:#1F497D"><span style="mso-list:Ignore">3.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span style="color:#1F497D">Label the duplicate with the “Second Half” of your Label, the Brackets and
<b>Number</b>. <o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="color:#1F497D"><span style="mso-list:Ignore">4.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span style="color:#1F497D">Now under placement you can position the “Second half” of your Label to line up with the first.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I have not tried it, but it’s the only solution I can come up with at the moment.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Richard.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<table style="FONT-SIZE: 9pt; FONT-FAMILY: Arial, sans-serif; WIDTH: 420px; LINE-HEIGHT: 15px" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="FONT-SIZE: 9pt; FONT-FAMILY: Arial,sans-serif; WIDTH: 420px; COLOR: #004d44; PADDING-BOTTOM: 6px">
<span style="FONT-FAMILY: Arial, sans-serif; FONT-WEIGHT: bold; COLOR: #004d44"><br>
——</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; FONT-WEIGHT: bold; COLOR: #004d44">Richard McDonnell MSc GIS, FME Certified Professional</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44"><i>FRM Data Management</i></span><br>
<br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44">——</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; FONT-WEIGHT: bold; COLOR: #004d44">Oifig na nOibreacha Poiblí</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44">Office of Public Works</span><br>
<br>
<span style="FONT-FAMILY: Arial, sans-serif; FONT-WEIGHT: bold; COLOR: #565148">Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #565148">Jonathan Swift Street, Trim, Co Meath, C15 NX36</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #565148">——</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #565148">M +353 87 688 5964 T +353 1 647 6543</span><br>
<font color="#565148"><a href="https://www.opw.ie">https://www.opw.ie</a></font><br>
<br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44">——<br>
To send me files larger than 30MB, please use the link below https://filetransfer.opw.ie/filedrop/richard.mcdonnell@opw.ie<br>
</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44">Email Disclaimer: <a href="https://www.opw.ie/en/disclaimer/">
https://www.opw.ie/en/disclaimer/</a></span> </td>
</tr>
</tbody>
</table>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:EN-IE">From:</span></b><span lang="EN-US" style="mso-fareast-language:EN-IE"> Qgis-user <qgis-user-bounces@lists.osgeo.org>
<b>On Behalf Of </b>Grün, Michael<br>
<b>Sent:</b> 27 August 2020 14:28<br>
<b>To:</b> qgis-user@lists.osgeo.org<br>
<b>Subject:</b> [Qgis-user] label layer with attributes in different styles<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="DE">Hi all,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE">Very simple example:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE">I have a point layer and I want to label it with 2 attributes (name, number) and differ them within their styles.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE">Cologne (10)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE">Hamburg (14)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE">name || ' ' || '(' ||  "number"  || ')'<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="DE">Now I just want for more difference the number (and brackets) in another colour (or style, bold e.g.).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE">Cologne <b><span style="color:red">(10)</span></b><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE">Hamburg <b><span style="color:red">(14)</span></b><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="DE">I tried it with the button „data devided override“ – but changes always for both attributes, no difference within.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE">I tried rule-based labeling – without result.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE">Allow HTML formatting <b>number</b>, but how?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE">Actually I thought this would be very simple…any hints?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE">Thanx a lot…kindly regards, Michael</span><span lang="DE" style="color:#2E74B5;mso-fareast-language:DE"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE"><o:p> </o:p></span></p>
</div>
</body>
</html>