[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: graphics_toolkit qt
From: |
Ben Abbott |
Subject: |
Re: graphics_toolkit qt |
Date: |
Sun, 17 Jul 2016 16:23:45 -0400 |
> On Jul 17, 2016, at 2:08 PM, Clinton Winant <address@hidden> wrote:
>
> On Sun, Jul 17, 2016 at 7:00 PM, Ben Abbott <address@hidden> wrote:
>
> > On Jul 17, 2016, at 12:09 PM, Clinton Winant <address@hidden> wrote:
> >
> > On Sun, Jul 17, 2016 at 3:37 AM, Ben Abbott <address@hidden> wrote:
> > > On Jul 16, 2016, at 5:56 PM, Ben Abbott <address@hidden> wrote:
> > >
> > > On Jul 15, 2016, at 04:45, Clinton Winant <address@hidden> wrote:
> > >
> > >> BTW the .tex file produced by
> > >>
> > >> print("qt_greek.tex","-depslatexstandalone");
> > >> does not compile with current version of latex. The file requires the
> > >> preamble
> > >>
> > >> \documentclass{article}
> > >> \usepackage{graphicx,xcolor}
> > >> \begin{document}
> > >> and the closing statement
> > >> \end{document}
> > >
> > > That's a bug. Can you file a bug report?
> > >
> > > https://savannah.gnu.org/bugs/?group=octave
> > >
> > > Ben
> >
> > opps! Maybe not a bug. I tried a simple example using the developer’s
> > sources (default branch).
> >
> > graphics_toolkit qt
> > plot (rand (3))
> > text (0.5, 0.5, "\lambda is a greek letter", "horizontalalignment",
> > "center")
> > print ("qt_greek.tex", "-depslatexstandalone”);
> >
> > The tex output is below.
> >
> > \documentclass{minimal}
> > \usepackage{epsfig,color}
> > \usepackage[papersize={576.00bp,432.00bp},text={576.00bp,432.00bp}]{geometry}
> > \begin{document}
> > \centering
> > % Title: gl2ps_renderer figure
> > % Creator: GL2PS 1.3.9, (C) 1999-2015 C. Geuzaine
> > % For: Octave
> > % CreationDate: Sat Jul 16 22:28:37 2016
> > \setlength{\unitlength}{1pt}
> > \begin{picture}(0,0)
> > \includegraphics{qt_greek-inc}
> > \end{picture}%
> > \begin{picture}(576,433)(0,0)
> > \fontsize{12}{0}
> > \selectfont\put(74.88,43.5189){\makebox(0,0)[t]{\textcolor[rgb]{0,0,0}{{1}}}}
> > \fontsize{12}{0}
> > \selectfont\put(186.48,43.5189){\makebox(0,0)[t]{\textcolor[rgb]{0,0,0}{{1.5}}}}
> > \fontsize{12}{0}
> > \selectfont\put(298.08,43.5189){\makebox(0,0)[t]{\textcolor[rgb]{0,0,0}{{2}}}}
> > \fontsize{12}{0}
> > \selectfont\put(409.68,43.5189){\makebox(0,0)[t]{\textcolor[rgb]{0,0,0}{{2.5}}}}
> > \fontsize{12}{0}
> > \selectfont\put(521.28,43.5189){\makebox(0,0)[t]{\textcolor[rgb]{0,0,0}{{3}}}}
> > \fontsize{12}{0}
> > \selectfont\put(69.8755,48.52){\makebox(0,0)[r]{\textcolor[rgb]{0,0,0}{{0}}}}
> > \fontsize{12}{0}
> > \selectfont\put(69.8755,118.936){\makebox(0,0)[r]{\textcolor[rgb]{0,0,0}{{0.2}}}}
> > \fontsize{12}{0}
> > \selectfont\put(69.8755,189.352){\makebox(0,0)[r]{\textcolor[rgb]{0,0,0}{{0.4}}}}
> > \fontsize{12}{0}
> > \selectfont\put(69.8755,259.768){\makebox(0,0)[r]{\textcolor[rgb]{0,0,0}{{0.6}}}}
> > \fontsize{12}{0}
> > \selectfont\put(69.8755,330.184){\makebox(0,0)[r]{\textcolor[rgb]{0,0,0}{{0.8}}}}
> > \fontsize{12}{0}
> > \selectfont\put(69.8755,400.6){\makebox(0,0)[r]{\textcolor[rgb]{0,0,0}{{1}}}}
> > \end{picture}
> > \end{document}
> >
> > Ben
> >
> > Still a bug, but ????
> >
> > I am using:
> >
> > GNU Octave, version 4.0.0
> > Copyright (C) 2015 John W. Eaton and others.
> > This is free software; see the source code for copying conditions.
> > There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
> > FITNESS FOR A PARTICULAR PURPOSE. For details, type 'warranty'.
> >
> > Octave was configured for "x86_64-pc-linux-gnu".
> >
> > OS: ubuntu 16.04 - 64 bit
> >
> > When I run the code you posted, things that are different from what you
> > have, occur:
> >
> > (1) The text line only produces centered text if I use
> > text (2, 0.5, "\lambda is a greek letter", "horizontalalignment", "center")
> >
> > ie the x location must be within the frame generated by the plot command,
> > even with the "horizontalalignment" modifier.
> > (2) In that case, the string \lambda appears on the screen as "lambda",
> > however if the double quotes are replaced by single quotes:
> > text (2, 0.8, '\lambda is a greek letter', "horizontalalignment", "center")
> > the \lambda produces the greek character. I conclude that in qt the
> > generation of the proper greek character is determined by the use of single
> > quotes rather than double quotes. Notice that in the latex file included
> > in your message there is no text, presumably because of point (1).
> >
> > The first and last lines of the latex files generated on my system are as
> > follows:
> >
> > % Title: glps_renderer figure
> > % Creator: GL2PS 1.3.8, (C) 1999-2012 C. Geuzaine
> > % For: Octave
> > % CreationDate: Sun Jul 17 16:47:04 2016
> > \setlength{\unitlength}{1pt}
> > .
> > .
> > \selectfont\put(186.48,118.936){\makebox(0,0)[l]{\textcolor[rgb]{0,0,0}{{lambda=pi}}}}
> > \end{picture}
> >
> > The preable and end lines are consistently not generated on my system.
> > Might the problem be associated with my using 4.0.0? If so, since the
> > ubuntu 16.04 repos don't have 4.0.1 yet, can you point me to a set of
> > instructions on how to configure, make and make install for octave source?
> >
> > Thanks so much to all of you
>
> Opps, sorry for the horizontal position and the double quotes.I tried Octave
> 4.0.3. It also produced the correct tex-file.
>
> Ben
>
> Yes, I just got 4.0.3 installed and got the correct tex file, but the single
> or double quote thing seems to me to be a bug? The charater string should be
> processed the same way whether the delimiter is a single or double quote?
> Should I report that as a bug?
No. Double-quote and single-quotes are not processed the same.
https://www.gnu.org/software/octave/doc/v4.0.0/Escape-Sequences-in-String-Constants.html
Ben