[Qgis-user] Labeling with subscript

Andrew Harfoot ajph at geodata.soton.ac.uk
Fri Jan 6 05:17:11 PST 2023


Hi Christian,

If the subscript data is just numbers you can have a look at this post:
https://gis.stackexchange.com/questions/181287/achieving-super-or-subscript-graticule-labels-in-qgis-composer-windows

As this is a custom expression function it is applicable to labels as well.

Cheers,

Andy


On 05/01/2023 13:32, Bodamer, Christian via QGIS-User wrote:
> *CAUTION:* This e-mail originated outside the University of Southampton.
>
> Hello list,
>
> wish you a happy NEW YEAR!
>
> I like to label with two columns. The secound column sholud be 
> subscript. I activate HTML Formating and use the following code in the 
> Value field:
>
> format(
>
> '<span>%1</span> Sub<span style="vertical-align:sub">%2</span>',
>
>    "column1" ,
>
>    "column2"
>
> )
>
> The text of column2 is displayed but not subscript. Also <sub>%2</sub> 
> doesn't work.
>
> Changing the color with style="color:red" works. I don't see the mistake.
>
> Does someone has an idea?
>
> Christian
>
> +++ Verkehrsmeldungen und alles rund um die Autobahn finden Sie in 
> unserer App:Autobahn.de/app 
> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.autobahn.de%2Fapp&data=05%7C01%7Cajph%40geodata.soton.ac.uk%7Cd433e8a3fcfa43b7963608daef2151a5%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638085223627527396%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=E3Xni3ibeIJjLSsmQQ9kbbAzgpDC5V7CTzGDKEbXlGU%3D&reserved=0> 
> +++
>
> Die Autobahn GmbH des Bundes
> Rechtsform GmbH
> Sitz Heidestraße 15 · 10557 Berlin · AG Charlottenburg · HRB 200131 B
> Geschäftsführung Stephan Krenz, Gunther Adler, Anne Rethmann
> Aufsichtsratsvorsitzender Oliver Luksic
>
> Vertraulichkeitshinweis
> Diese Nachricht und jeder etwaig uebermittelte Anhang beinhalten 
> vertrauliche Informationen und sind nur fuer die Personen oder 
> Unternehmen bestimmt, an welche sie tatsaechlich gerichtet sind. 
> Sollten Sie nicht der bestimmungsgemaesse Empfaenger sein, weisen wir 
> Sie darauf hin, dass die Verbreitung, das (auch teilweise) Kopieren 
> sowie der Gebrauch der empfangenen E-Mail und der darin enthaltenen 
> Informationen verboten sind und gegebenenfalls Schadensersatzpflichten 
> ausloesen können. Sollten Sie diese Nachricht aufgrund eines 
> Uebermittlungsfehlers erhalten haben, bitten wir Sie, den Absender 
> unverzueglich hiervon in Kenntnis zu setzen.
> Sicherheitswarnung: Bitte beachten Sie, dass das Internet kein 
> sicheres Kommunikationsmedium ist. Obwohl wir im Rahmen unseres 
> Qualitaetsmanagements und der gebotenen Sorgfalt Schritte eingeleitet 
> haben, um einen Computervirenbefall weitestgehend zu verhindern, 
> koennen wir wegen der Natur des Internet das Risiko eines 
> Computervirenbefalls dieser E-Mail nicht ausschliessen.
>
> Confidentiality note
> This notice and any attachments which are transmitted contain 
> confidential information and are intended only for the persons or 
> companies to whom they are actually addressed. If you are not the 
> intended recipient, please note that the distribution, copying (even 
> partial) and use of the received e-mail and the information contained 
> in the e-mail are prohibited and may result in a possible liability 
> for damages. Should you have received this message due to a 
> transmission error, we ask you to inform the sender immediately.
> Safety warning: Please note that the Internet is not a safe means of 
> communication or form of media. Although we are continuously 
> increasing our due care of preventing virus attacks as a part of our 
> Quality Management, we are not able to fully prevent virus attacks as 
> a result of the nature of the Internet.
>
> Hinweis zur Datenverarbeitung / Link to data protection policy: 
> https://www.autobahn.de/datenschutz 
> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.autobahn.de%2Fdatenschutz&data=05%7C01%7Cajph%40geodata.soton.ac.uk%7Cd433e8a3fcfa43b7963608daef2151a5%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638085223627527396%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=SHrZeCqxy4d8KoW7O4c9OOiWUFDsErImQ7%2FObQmiZTw%3D&reserved=0>
>
>
> _______________________________________________
> QGIS-User mailing list
> QGIS-User at lists.osgeo.org
> List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user


-- 
Andy Harfoot

Skype: gdi_ajph
Teams:ajph at soton.ac.uk

GeoData Institute
University of Southampton
Southampton
SO17 1BJ

www.geodata.soton.ac.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20230106/711a24a7/attachment.htm>


More information about the QGIS-User mailing list