[liblouis-liblouisxml] Re: COM Object: Re: Re: liblouisxml and mathml

  • From: Michael Whapples <mwhapples@xxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Mon, 09 Nov 2009 11:09:46 +0000

John,
Here's my take on things:

* You are right about there being a need for easily finding out the tables and configuration files available. * I would say that ease of use might not be limited to just the tables and configuration files. Before I continue I will say I do think liblouis/liblouisxml do good jobs and seem to be one of the best systems out there (in the opensource world at least). When I say best I mean it does what it says it is meant to, there is code out there, its got some user base, etc, but this doesn't mean it has its limitations. With some of the programming languages available (python, java, ruby) it might feel more natural if liblouis/liblouisxml was more object orientated. Each instance of liblouisxml (I will deal with that as that is what's got my focus at the moment) would be a separate instance. I don't know the full internals of liblouisxml but the liblouisxml class could be based on the UserData type output from lbx_initialize. Compare this with the current situation, I am meant to call lbx_initialize to initialise liblouisxml but I am not fully clear whether I should be calling that with all possible configurations I will use or just one. Possibly a simple way to alter this would be (if UserData holds all the configuration information) would be have lbx_initialize just producing new UserData structures and then these could be passed in to the translate functions instead of char *configfilelist.

I will admit my view might be biased as I use python and java and only know enough about C to interface code to it.

Michael Whapples
On 09/11/09 07:58, John J. Boyer wrote:
neil,

It would be great to have a COM object to acd to the sources. I hope you
or someone can get around to updating it. The interfaces to liblouis and
liblouisxml are not likely to change, except that some new functions
might be added.

It seems we have a demand for more user-friendly ways of finding both
suitable liblouis tables and liblouisxml configuration
files. It might be possible to do this using the liblouis table facility
and the replace opcode.

John

On Sun, Nov 08, 2009 at 09:39:00PM -0800, Neil Soiffer wrote:
    I have a COM wrapper to liblious (and UMCL) that has gone stale.* I keep
    meaning to update it to the current build, but never get around to it.*
    I'd like to update it and get it into the sources so anyone can use it.

    There are essentially two parts to the interface:* discovery and usage.*
    Discovery means finding the COM components that support the interface and
    what info they provide and usage is actually calling for the translation.*
    The advantage of using COM versus compiling in a version of liblious is
    that the application (in my case, MathPlayer) can evolve separate from
    LibLious and people can independently update.* Using a DLL does that also,
    but COM means that others can implement the interface (as UMCL did), so
    you have a wider range of choices -- every product is bound to have their
    own set of "quirks"/bugs.* The downside to COM is that although it is a
    cross platform solution, it is really only used on Windows.* If you are
    providing a windows solution, it is a great way to go.

    I can't remember how we solved the names that we present to users, but I
    don't think it was a good solution (I think only Nemeth existed we we
    wrote it).* Definitely, it would be much better to have some meta info at
    the top of the file that could be read without reading the entire file.* A
    commenting convention as Michael proposes would be OK -- just try to keep
    it simple.

    *** Neil

    On Sun, Nov 8, 2009 at 3:47 AM, Michael Whapples<[1]mwhapples@xxxxxxx>
    wrote:

      I have a few thoughts, possibly influenced from some of the python
      stuff.:

      * Could we have description as another option? I don't know how
      liblouisxml reads the configuration files but in python if using the
      ConfigParser module then a programme would not be affected by extra
      options not originally thought about, it would just ignore the extra
      options (if liblouisxml works this way then it would be able to accept a
      description option as it stands).
      * May be a comment done in a certain way at the beginning of the file
      then only the start of the file needs to be read. I would imagine you
      may want something to determine that it is actually a description
      comment so that for files with no description then the app won't show
      the sort of comments existing at the top of the configuration files
      which do not help understand what that file is for. I will admit I
      haven't looked back at the discussion about liblouis tables, I do intend
      to. I am thinking as an example the comment for a description may start
      #* instead of just #.
      Michael Whapples
      On 08/11/09 03:48, John J. Boyer wrote:

        Selecting configuration files is similar to the problem of selecting
        liblouis tables that Christikn discussed a couple of days ago. The
        files
        could begin with a descriptive comment and the application could just
        display these in a radio-button list. We'll be working on tables and
        can
        consider configuration files also.

        John

        On Sat, Nov 07, 2009 at 10:51:46PM +0000, Michael Whapples wrote:
        *

          Thanks will look at that.

          As for selecting the configuration files, couple of questions:
          * Is there any way for a programme to find out the lbx_files
          directory?
          * While the three cfg files have reasonably easy to understand file
          names at the moment, I was just wondering whether there was a way to
          get
          a more readable configuration name or may be even a description? I
          do
          doubt this as the contents of the file don't hold this information.
          Its
          just I would have liked it that a application could present to the
          user
          a list like:
          "UK maths Braille output with capitals for A4 paper"
          "UK maths Braille output without capitals for A4 paper"
          "Nemeth Braille output for A4 paper"
          ...

          I know that the above may not represent the current options with
          liblouisxml but as people develop more configurations, tables, etc
          such
          a list could start forming and filenames may not be enough to keep
          it
          easy for the user.

          Michael Whapples
          On 07/11/09 21:39, John J. Boyer wrote:
          * *

            Liblouisxml will handle bare equations in MathML. This is already
            done
            by an application from ViewPlus. Use the function
            lbx_translateString
            which is described in the documentation. The configuration file
            specifies which braille math code to use. The lbx_files directory
            contains various configuration files, such as nemeth.cfg
            ukmaths.cfg
            marburg.cfg I think all the user would have to do is pick the math
            code.

            John

            On Sat, Nov 07, 2009 at 07:17:35PM +0000, Michael Whapples wrote:

            * * *

              Hello,
              I know that liblouisxml can handle MathML but I would like to
              know a
              little about what it can do. I am looking into using liblouisxml
              possibly to add some sort of math Braille access in screen
              readers
              (either NVDA or orca, to be decided as I don't know how well
              they can
              communicate with firefox).

              If I hand liblouisxml (from a programme) some MathML, but it is
              only the
              equation will liblouisxml be able to handle this? I have noticed
              that
              when sending a full document to liblouisxml it lays it out as if
              it will
              be embossed, my use is for a Braille display, will it do this
              for the
              example of just sending an equation?

              Some separate stuff: How can I get my programme to know what the
              various
              configurations will do so it could present the user with a list
              of
              options, or will I have to manually map these to easy to
              understand names?

              I am sure I have some other comments on liblouisxml and mathml,
              but
              those are slightly different and so I will deal with them in
              another
              message.

              Michael Whapples
              For a description of the software and to download it go to
              [2]http://www.jjb-software.com

              * * * *

            * * *

          For a description of the software and to download it go to
          [3]http://www.jjb-software.com
          * *

        *

      For a description of the software and to download it go to
      [4]http://www.jjb-software.com

References

    Visible links
    1. mailto:mwhapples@xxxxxxx
    2. http://www.jjb-software.com/
    3. http://www.jjb-software.com/
    4. http://www.jjb-software.com/

For a description of the software and to download it go to
http://www.jjb-software.com

Other related posts: