octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Update - LaTeX markup project


From: Michael Goffioul
Subject: Re: Update - LaTeX markup project
Date: Mon, 15 Jul 2013 07:57:01 -0400

On Mon, Jul 15, 2013 at 7:38 AM, Andrej Lojdl <address@hidden> wrote:
It seems that everything you proposed looks okay to me. There is only one thing. As Patrick stated in his question number four.
Should font and color influence latex_renderer? Latex support colors of text and different fonts. Implementing this would be additional job. 
Maybe is best to enable text coloring, just adding /usepackage { color } and if user want he just add inline coloring with  \textcolor{define-color}{text} or any inline text coloring. 

Color, definitely. Font, I'm not sure whether it makes sense with LaTeX rendering. Maybe you could ask some people on the list to make some tests on Matlab for you.

I can see 2 ways to implement the coloring:
1) at LaTeX level, as you suggested
2) at octave level: you render the text in black-n-white, then "colorize" the image pixels in octave
 
So this part is maybe problematic. Should set_font and set_color be implemented and never used or how this should be handled

It's perfectly valid in C++ to have an overridden method do nothing. The base class provides an API, some parts of that API might not be supported by some concrete classes. Either the base class provides a default implementation and the derived class doesn't have to override it, or the base class has pure virtual methods and the derived class must provide a default/empty implementation.
 
  void set_font (...) { rep->set_font (...); }
  void set_color (...) { rep->set_color (...); }

  void text_to_pixel (...) { rep->text_to_pixel (...); }
  ...

 There is still open question regarding interpreter. When is it set? 

It is set by the user. If you create the renderer object only when needed, it doesn't matter when it is set. You just use the value at the time you create the renderer object.

Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]