[Parley-devel] [PATCH] adding LaTeX support to parley

Daniel Laidig laidig at kde.org
Fri Apr 9 16:21:20 CEST 2010


Hi Frank,

On Saturday 03 April 2010 11:26:26 Frank C. Eckert wrote:
> Hi Daniel
> 
> thanks for taking the time to look at the code.
> 
> > There are also a few issues I had with the patch:
> > - It looked like there was some error checking missing (e.g. checking if
> > 
> >   converting succeeded)
> 
> Well, I guess that's one of the rough edges. If conversion fails, it will
> only show a small image icon indicating that the image was not found, i.e.
> conversion has failed. The usability issue of course is that you have to
> run parley from the terminal to see what the error was ;)
> 
> > - I doubt that the "\input{/home/opahk/study/partIII/abbr}" should have
> > stayed in the preamble. ;)
> 
> True :) Sorry about that.
> 
> > However, the biggest issue is that LaTeX support doesn't really fit with
> > the concept of Parley as a language trainer. Your patch implements this
> > in a way that is quite visible, exposing it as a top-level training mode
> > to the user. Additionally, LaTeX is not something most of our target
> > users know and seeing it there might be confusing.
> > 
> > That doesn't mean that we don't want LaTeX support in Parley. It's
> > perfectly fine if it's integrated in a way that doesn't make Parley
> > harder to use for our target users. And personally, LaTeX is something I
> > might also like to use in Parley in the future. ;)
> 
> I understand that this feature should not make using Parley more difficult
> for the average user who is mostly concerned with using Parley as a
> language trainer. However, I don't see why the usage has to be limited to
> languages. Using flashcards can be beneficial in virtually any subject,
> especially when the information is more complex than simple word -
> translation correspondance.
> 
> Anyway, I see that Parley should be as simple to use for a language user as
> it can be, but I don't see why the user should not be able to use their
> favourite desktop environment's flashcard program for other (more
> advanced) things ;)
> 
> > I spent some time thinking about the best way to integrate it in the new
> > practice UI and this is what I came up with:
> > 
> > - In the flash card and written practice modes, the text is interpreted
> > as
> > 
> >   LaTeX if it's enclosed in "$$" (like "$$\frac{a}{b}$$", just the way
> > 
> > Kopete does it). This means that there is no extra mode, you just need to
> > use $$ when writing the files and it will just work.
> 
> I like this idea and I thought about it as well. The issue I have with it
> is that I want to be able to do more than formulas, i.e. use things like
> list environments, line breaks, etc. How about proceeding like this:
> $$formula$$ triggers just the conversion of "formula", however, if there
> is some other command \command present, it will convert the whole entry.
> This way the language user notices nothing, the formula guy gets his
> formulas and I get my lists, etc :)

If I understand you correctly, basically you want to be able to not only use 
LaTeX inside the math mode, but also add general LaTeX code. Wouldn't having 
two separate markers for LaTeX code solve the issue? (Like $$ for math and 
something different like §§ for the normal mode.)

> However, this would require the line-edits and labels in the practice view
> to be expandable in the vertical direction (to cater for multi-line
> entries). I haven't looked at the new code, but this might be a problem.

I agree that newlines are probably tricky, but I only see the issue in the 
editor. Can you explain why this could be a problem in the practice mode? You 
should only see the rendered image and the size of that is a different issue.

Cheers!
Daniel

> > - Maybe add a dock widget to the editor that helps with the creation of
> > LaTeX entries. This will just be a line edit and a preview. Finding
> > syntax errors only while practicing doesn't sound like fun. :)
> 
> Sure it's not fun, but to be honest, I'd rather start with implementing
> syntax highlighting and the possibility of word wrap in table cells before
> moving on to extra widgets. I would find that more helpful to start with.
> 
> As far usability is concerned, all LaTeX options could be placed in an
> extra tab under "Advanced" settings. In that way they would be less
> visible to the casual user.
> 
> Those are my thoughts. Does that sound better?
> 
> Many thanks,
> 
> Frank
> 
> > What do you think?
> > 
> > I also had this on my TODO list, but currently getting the new practice
> > done has a higher priority.
> > 
> > Cheers,
> > Daniel
> > 
> > > The attached patch applies to the directory  kdeedu/parley/src of
> > > trunk. Please place the config files "preamble" and "convert-options"
> > > into $KDEHOME/share/apps/parley/latex. The patch assumes that convert
> > > and pdflatex are available in $PATH.
> > > 
> > > Description: The patch adds a LaTeX query mode to Parley which converts
> > > entries to rendered png's via pdflatex. There is no input possibility
> > > and checking algorithm involved, as this would be pointless for the
> > > use cases I have in mind (basically mathematics).
> > > 
> > > Any feedback would be highly appreciated.
> > > 
> > > Cheers, Frank
> 
> _______________________________________________
> Parley-devel mailing list
> Parley-devel at kde.org
> https://mail.kde.org/mailman/listinfo/parley-devel


More information about the Parley-devel mailing list