[Qgis-user] Labeling with subscript

Andreas Neumann a.neumann at carto.net
Thu Jan 5 05:47:07 PST 2023


Hi Christian,

You probably don't do anything wrong. It is just not supported (yet).

Here is the subset of HTML that should work:

  	* font-color 
(https://www.qgis.org/en/site/forusers/visualchangelog314/index.html#feature-respect-html-colors-in-labels)
  	* font-familiy 
(https://www.qgis.org/en/site/forusers/visualchangelog328/index.html#feature-add-support-for-html-bold-italic-font-size-and-font-family-to-labelling 
)
  	* font-size
  	* bold
  	* italic

This is a really small subset of HTML that is supported until now, 
because many HTML formatting options have an impact on text geometries 
and need to be taken into account in the label engine (e.g for overlap 
tests, etc.)

If you need this implemented, please ask a developer for a quote to get 
it implemented. Nyall Dawson (https://north-road.com/) did most of the 
work here. He could be asked.

Hope this helps,

Andreas

On 2023-01-05 14:32, Bodamer, Christian via QGIS-User wrote:

> 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 [1] +++
> 
> 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 [2]
> _______________________________________________
> 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



Links:
------
[1] https://www.autobahn.de/app
[2] https://www.autobahn.de/datenschutz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20230105/86df9d81/attachment.htm>


More information about the QGIS-User mailing list