From: Clifford W. <cli...@cl...> - 2008-01-03 11:10:26
|
Hi, first of all a little patch to the patch. It should read if (txt.isNull()) { of course.. ;-) On Thu, Jan 03, 2008 at 11:55:58AM +0100, Bastien ROUCARIES wrote: > Le jeudi 3 janvier 2008, Clifford Wolf a ?crit?: > > Hi there, > > > > I've added support for indices in text fields (see attached patch). I > > wanted to ask if the syntax (Name||Index) is ok for you guys before I start > > adding the Feature to other code paths. > > I will prefer a tex like syntax. Sorry but || is ugly :-( The problem is: the way my patch is working you cant add a text lable like U_1 = R_1 * I_1 because the Label has just one index part at the end. So my plan was to use the || syntax in graphictext.cpp and _ for the cases where a single identifier is used. > BTW I have some code that will allow to use directly latex notation (not latex > but eps generated form latex) in qt using gs. If you want I can send you this > program. yes please. In fact I don't care what the schematics in qucs look like - I just need nice looking pngs. if you have something to create .tex i can use tex and dvipng to generate the pngs I need... > > Actually I'm not sure whether seperating name and Index using the last > > underscore in the text wouldn't be a better idea.. > > > > Also I'm not sure in which places a support for indices would make sense. > > I in fact only need it in the text labels and component attributes > > displayed in the schematic to make the schematic look better. Especially > > when using this for sweeped parameters, etc. would would be better to stay > > within the nameing conventions for variables and thus use the underscore. > > But I'm not sure whether this would break anything or would confuse users > > because then a variable would be displayed using the index in one place and > > using the underscore in another.. > > > what do you think? > > I think that we must use latex in qucs. For now we can use your patch but > please be compatible with latex syntax, do not try to invent a new one But Latex syntax would only be one charater. So I would also need to add a parser for { .. } to allow grouping of multiple characters which in turn would need more escape sequences and so forth.. ..that's to much effort for me for the problem I'd like to solve atm. ;-) In fact a (command-line) converter for creating .tex code from .sch files would be the perfect solution imo. I'd really love to see the code you mentioned above.. yours, - clifford -- for(var d,i=<>just</>,j=function(){d~=i~(defined(i=next[*],i)?" ":" ");},just,another,SPL,hacker;defined i||({debug d;return 0;});j()); |