3

I want to create labels like a fraction using data from two columns. I have tried to use:

"Field" || '\n' || '――' || '\n' || "Field2" 

but it doesn't look good. How can I do it using other method?

Here I have added the pictureenter image description here

  • 1
    Is it really a fraction? In which case maybe you need to present it as a percentage. If its one thing over another (like a blood pressure as 120/80) then maybe slashes like that? Typesetting fractions is probably beyond the labelling engine... – Spacedman Sep 1 '14 at 12:19
  • Data from one field must be under data from other field. And they must be separated by horizontal line. – bable Sep 1 '14 at 12:41
  • A picture speaks a thousand words - got a sample image of how you want this to look - and maybe also what your attempt looks like and how it fails? – Spacedman Sep 1 '14 at 12:45
  • Please expand upon "... but it doesn't look good." What else are you trying to achieve? What's not working? You can set horizontal alignment to Center to make the 'fraction' look better. – dakcarto Sep 2 '14 at 0:40
  • I don't like that the line beetween data looks like "----" not solid. – bable Sep 2 '14 at 6:18
1

I solved it by using \n—\n separator (em-dash in the middle) and setting multiline height to 0.6 and multiline alignment to center (in the "Formatting" sub-tab).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.