Mercurial > octave
changeset 23915:adf580507691
Fix error from TeX parser when 'interpreter' is set to 'none' (bug #51751).
* __axis_label__.m: Set all other property/value pairs (varargin) before
setting "string" property in case they influence the interpratation.
* text.m: Set all other property/value pairs (varargin) before setting "string"
property in case they influence the interpratation.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 14 Aug 2017 16:55:52 -0700 |
parents | 2e4033e1f28f |
children | 85488effc0ff |
files | scripts/plot/appearance/private/__axis_label__.m scripts/plot/appearance/text.m |
diffstat | 2 files changed, 8 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/appearance/private/__axis_label__.m Mon Aug 14 16:11:27 2017 -0400 +++ b/scripts/plot/appearance/private/__axis_label__.m Mon Aug 14 16:55:52 2017 -0700 @@ -27,7 +27,8 @@ h = get (hax, caller); - set (h, "string", txt, varargin{:}); + ## Set other prop/values first in case they influence appearance of string. + set (h, varargin{:}, "string", txt); if (nargout > 0) retval = h;
--- a/scripts/plot/appearance/text.m Mon Aug 14 16:11:27 2017 -0400 +++ b/scripts/plot/appearance/text.m Mon Aug 14 16:55:52 2017 -0700 @@ -141,7 +141,7 @@ hax = hax(1); endif - ## Position argument may alse be in PROP/VAL pair + ## Position argument may also be in PROP/VAL pair idx = find (strcmpi (varargin, "position"), 1); if (idx) pos = varargin{idx+1}; @@ -153,15 +153,13 @@ ## Call __go_text__ to do the work htmp = zeros (nt, 1); if (nx == 1) - htmp = __go_text__ (hax, "string", string{1}, - ## varargin first, in case "Units" set for pos. - varargin{:}, - "position", pos); + ## Set varargin first, in case it changes units or interpreter properties. + htmp = __go_text__ (hax, varargin{:}, "position", pos, + "string", string{1}); else for n = 1:nt - htmp(n) = __go_text__ (hax, "string", string{n}, - varargin{:}, - "position", pos(n,:)); + htmp(n) = __go_text__ (hax, varargin{:}, "position", pos(n,:), + "string", string{n}); endfor __request_drawnow__ (); endif