|
From: <pl...@pi...> - 2011-10-23 05:59:43
|
On 10/22/11 23:01, sfeam (Ethan Merritt) wrote: > On Saturday, 22 October 2011, pl...@pi... wrote: >> So the svg title is not so much a property of the plot but the output >> file. > > Part of the problem here is that the SVG spec doesn't say what<title> > is supposed to do. It is left up to the implementation of the viewer. > Furthermore, the<title> element is valid at multiple levels, and the > viewer is apparently free to different things with the titles at different > levels. > > Let me recap. > > Up until our current discussion, the<title> element was being used > inside the group bounding each indivual plot within the graph. > The behavior I observe for firefox/chrome/konqueror/opera is that > when the title is encountered at this level it is used to provide > a pop-up information box on mouse-over. Firefox, but not the other > browsers, _also_ uses the title of the first group to label the > window. I actually think that's a bug, but the spec does allow it. > Agreed , this seems more accidental than intentional. I Opera's use of the file name in absence of a top level title is more appropriate. It does not mean no title is the best content to generate. If file name is determined to be the best text to display , title should be set to that. > The current discussion is about adding a<title> element at the top level, > which is a different thing. Firefox/opera/chrome, but not konqueror, > use a title at the top level to label the window if it is present. > I've added that to the svg terminal driver in CVS. > > There's a wrinkle, however. It actually makes more sense to have the > window label match the file name, which is what all the browsers except > firefox were doing before. The reason I think this is that every file > is guaranteed to get a new name, A unique title for each file would be useful. That is what I would like to see in short tab titles in FF and Opera. To be clear about the tabs I'm referring to that can only display a short text here's a screen-shot. This is the immediate point of reference when viewing several files at a time and is where the need for a shorter text is than the filename or the graph title is seen. http://piments.com/tmp/opera-tabs.png The three files here are: 1. A web based URL with an svg from gnuplot before recent changes. 2. An html wrapper on a local server that opera decides to display the whole URL not the fn. 3. File with "name" based top level svg title. > whereas unless you keep closing and > re-opening the terminal the "name" attribute will remain the same across > files. Which suggests, as I said in my last post, that this is a property, not of the terminal nor of the plot but of the file. It should probably be an option to set output. Many of the problems an inconsistencies seem to derive from the fact that this option is tied to the terminal , which is sufficient for trivial cases like one plot at each invocation of the terminal but falls apart with more complex stuff like the demos. > This means that for all files except the first one, the name > shown in the browser window bar will probably be wrong. > > The code I added to CVS loads the top level title with "name". > But for the reasons stated above I'm not entirely happy with that. > Either the file name or the plot title (from "set title") makes > more sense to me. > > Ethan > That solution seems an improvement but has the short-comings you pointed out for complex plots. I don't use the other terminals enough to comment on how this affects the other issue that have causes complaints. Neither to I do complex multiplots. You clearly have a much more thorough understanding having worked closely on all this. Your complaints seem to indicate that , whatever the text finally is, it cannot be derived from a one off option in set terminal. Since this svg title is an attribute of an svg file (that can then have derivative names for graphs and plot lines in that file ) and you see a need for that name to be unique to each file the obvious and correct place to set this would seem to be when the file is opened, ie as an option to set output. Could you comment on whether that would fit the logic of more complex plots? Peter. |