gl2psPrintPGFPrimitive misses closing braces for rotated text
in function gl2psPrintPGFPrimitive, switch case GL2PS_TEXT opens a curly brace which is never closed again, if the text is rotated:
if(prim->data.text->angle)
fprintf(gl2ps->stream, "\\pgftransformrotate{%f}{", prim->data.text->angle);
Locally, I solved the problem with the following patch:
diff -urN gl2ps/gl2ps-2.c gl2ps-new/gl2ps-2.c
--- gl2ps.c 2014-06-20 15:34:49.715525139 +0200
+++ gl2ps.c 2014-06-20 15:36:39.199521904 +0200
@@ -5447,7 +5447,12 @@
prim->verts[0].rgba[0], prim->verts[0].rgba[1],
prim->verts[0].rgba[2], prim->data.text->str);
- fprintf(gl2ps->stream, "}{}{\\pgfusepath{discard}}}\n");
+ fprintf(gl2ps->stream, "}{}{\\pgfusepath{discard}}}");
+
+ if(prim->data.text->angle)
+ fprintf(gl2ps->stream, "}");
+
+ fprintf(gl2ps->stream, "\n");
break;
case GL2PS_SPECIAL :
/* alignment contains the format for which the special output text
I discovered the problem when trying to produce tikz output with octave, which produced broken output when inserting labels to the y-axis.
Hopes this helps, with kind regards, Felix