Psxy Quoted Line: -Sq Options in Segment Header

Hi everyone. I’m using GMT 6.1 (classic mode) on a Windows PC. I have lines that I am labeling with the label in the segment header (+Lh) and the label location determined by a separate file with various line segments (-SqX). I also have a +f option to format the label text and a +n option to nudge the label above the line. This is the gmt code:

gmt psxy line.txt -Wthin,white,…- -SqX"placement.txt":+Lh+f8p,0,white+n0p/6p -J -R -O -K >> lines.ps

The line.txt file has this format:

`> -L"Line 1 Label"
x1 y1
x2 y2

`> -L"Line 2 Label"
x2 y2
x3 y3

All works as expected using the code and file format above. However all labels have the same attributes. What I want to do is have separate attributes for each segment and the documentation for psxy (-Sq option) states that this can be done:

By placing -Sq options in the segment header you can change the quoted text attributes on a segment-by-segment basis.

My problem is that I can’t get it to work and I can’t find any examples of how the segment should look. So my question is what elements of:

-SqX.“placement.txt”:+Lh+f8p,0,white+n0p/6p

can be moved to the segment header and how should the segment be structured?

To illustrate the problem with an example (for simplicity I’m using -Sqn rather than -SqX, but the problem is the same):

Option 1

gmt code:

gmt pscoast -Di -Glightyellow -Slightblue -JM15 -R108/120/-5/7.5 -K > map.ps
gmt psxy line.txt -Wthin,black,…- -Sqn2:+Lh+f12p,0,black+n0p/9p -J -R -O >> map.ps

with line.txt:

> -L"North West"
111 -3
118 6

Results in:
map1

Whereas Option 2 (placing -Sq options in the segment header):

gmt code:

gmt pscoast -Di -Glightyellow -Slightblue -JM15 -R108/120/-5/7.5 -K > map.ps
gmt psxy line.txt -Wthin,black,…- -J -R -O >> map.ps

with line.txt:

> -L"North West" -Sqn2:+Lh+f12p,0,black+n0p/9p
111 -3
118 6

Results in:
map2