[Jlatexmath] New release of JLaTeXMath (1.0.1)

classic Classic list List threaded Threaded
5 messages Options
Sylvestre Ledru-4 Sylvestre Ledru-4
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Jlatexmath] New release of JLaTeXMath (1.0.1)

Hello guys,

This week, we released the version 1.0.1 of JLaTeXMath:
* Negative spaces were not taken into accound at the end of a horizontal
box.
* Add command \Join.
* Fix bad space around \begin{array}...\end{array}
* There were no spaces around fraction (\nulldelimiterspace).
* Eat one white (if it exists) after a \cr.
* Color name must not be case sensitive
* Add an example to connect C++ and JLaTeXMath in using Giws
* Fix bad cmex10.ttf rendering with OpenJDK
* Add \L, \l, \yen, \mathsterling (in unicode too)
* Handle nbsp, \P and \S
* Fix ligatures definitions in XML (\textbf{\text{-7}} was printed as
\Omega)
* Handle auto-break after a binop or relation op.
* Spaces were not ignored in tabular options.
* Bad positions of the exponent & indice with Bigr{|}_1^3
* Fix bug with line-breaking (infinite loop on "\\ {abcdef}a" or
exceptions).
* Option added for max. width vs exact width.
  Thanks to Felix Natter for the patch.
* Update the example to use the TeXIconBuilder.
  Thanks to Felix Natter for the patch.

Sources and binaries are available here:
http://forge.scilab.org/index.php/p/jlatexmath/downloads/

Thanks,
Sylvestre
_______________________________________________
jlatexmath mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/jlatexmath
Phuc Luoi Phuc Luoi
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Jlatexmath] New release of JLaTeXMath (1.0.1)

Thank you for your bug fix Bad positions of the exponent & indice with
Bigr{|}_1^3


On 03/03/2013 12:17 PM, Sylvestre Ledru wrote:

> Hello guys,
>
> This week, we released the version 1.0.1 of JLaTeXMath:
> * Negative spaces were not taken into accound at the end of a horizontal
> box.
> * Add command \Join.
> * Fix bad space around \begin{array}...\end{array}
> * There were no spaces around fraction (\nulldelimiterspace).
> * Eat one white (if it exists) after a \cr.
> * Color name must not be case sensitive
> * Add an example to connect C++ and JLaTeXMath in using Giws
> * Fix bad cmex10.ttf rendering with OpenJDK
> * Add \L, \l, \yen, \mathsterling (in unicode too)
> * Handle nbsp, \P and \S
> * Fix ligatures definitions in XML (\textbf{\text{-7}} was printed as
> \Omega)
> * Handle auto-break after a binop or relation op.
> * Spaces were not ignored in tabular options.
> * Bad positions of the exponent & indice with Bigr{|}_1^3
> * Fix bug with line-breaking (infinite loop on "\\ {abcdef}a" or
> exceptions).
> * Option added for max. width vs exact width.
>    Thanks to Felix Natter for the patch.
> * Update the example to use the TeXIconBuilder.
>    Thanks to Felix Natter for the patch.
>
> Sources and binaries are available here:
> http://forge.scilab.org/index.php/p/jlatexmath/downloads/
>
> Thanks,
> Sylvestre
> _______________________________________________
> jlatexmath mailing list
> [hidden email]
> http://lists.scilab.org/mailman/listinfo/jlatexmath

_______________________________________________
jlatexmath mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/jlatexmath
Felix Natter Felix Natter
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Jlatexmath] New release of JLaTeXMath (1.0.1)

In reply to this post by Sylvestre Ledru-4
Sylvestre Ledru <[hidden email]> writes:

> Hello guys,

hi Sylvestre,

> This week, we released the version 1.0.1 of JLaTeXMath:
> * Option added for max. width vs exact width.
>   Thanks to Felix Natter for the patch.

Thanks for the release.

Unfortunately, the commit fcb8957bfadb47398105fa12971d3d08fff2471b
("Negative spaces not taken into accound at the end of a hbox") broke
the "width is maximum width" feature.

The problem is in HorizontalBox.recalculate(Box).
setIsMaximumWidth(true) works again if I rewrite it like this:

    private void recalculate(Box b) {
    if (b.getWidth() <= 0)
    {
        curPos += b.getWidth();
        width = Math.max(width, curPos);
    }
    else
    {
    width += b.getWidth();
    }
   
        // Commented for ticket 764
        // \left(\!\!\!\begin{array}{c}n\\\\r\end{array}\!\!\!\right)+123
        //curPos += b.getWidth();
        //width = Math.max(width, curPos);
   
   
        height = Math.max((children.size() == 0 ? Float.NEGATIVE_INFINITY : height), b.height - b.shift);
        depth = Math.max((children.size() == 0 ? Float.NEGATIVE_INFINITY : depth), b.depth + b.shift);
    }

but this very simple "fix" is most probably against the intention of the
"Negative spaces not taken into accound at the end of a hbox" bug fix.
=> I would appreciate it a lot if you could help me fix this :-)

A minimal example is attached. In this case, "hello world" is
erroneously cut off in the window that appears.

Thanks and Best Regards,
--
Felix Natter

import java.awt.Dimension;

import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JLabel;
import org.scilab.forge.jlatexmath.TeXConstants;
import org.scilab.forge.jlatexmath.TeXFormula;
import org.scilab.forge.jlatexmath.TeXIcon;


public class ExampleSwingWidthIsMaxWidth {
        public static void main(String[] args)
        {
        String latex = "\\text{hello world}";
                TeXFormula formula = new TeXFormula(latex);

                TeXIcon icon = formula.new TeXIconBuilder().setStyle(TeXConstants.STYLE_TEXT)
                                .setSize(16)
                                .setWidth(TeXConstants.UNIT_PIXEL, 256f, TeXConstants.ALIGN_LEFT)
                                .setIsMaxWidth(true).setInterLineSpacing(TeXConstants.UNIT_PIXEL, 20f)
                                .build();
               
                JFrame frame = new JFrame();
                final JLabel label = new JLabel(icon);
                label.setMaximumSize(new Dimension(100,300));
                label.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
                frame.getContentPane().add(label);

                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                frame.pack();
                frame.setVisible(true);
        }

}

_______________________________________________
jlatexmath mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/jlatexmath
Felix Natter Felix Natter
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Jlatexmath] New release of JLaTeXMath (1.0.1)

hi all,

Felix Natter <[hidden email]> writes:
>> This week, we released the version 1.0.1 of JLaTeXMath:
>> * Option added for max. width vs exact width.
>>   Thanks to Felix Natter for the patch.
>
> Thanks for the release.
>
> Unfortunately, the commit fcb8957bfadb47398105fa12971d3d08fff2471b
> ("Negative spaces not taken into accound at the end of a hbox") broke
> the "width is maximum width" feature.

=> could you please consider helping me with fixing this?

We would like to release 1.3.x in a few months and until then I need
a JLaTeXMath Debian package that works for Freeplane :-)

Many Thanks and Best Regards,
--
Felix Natter
_______________________________________________
jlatexmath mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/jlatexmath
Calixte DENIZET Calixte DENIZET
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Jlatexmath] New release of JLaTeXMath (1.0.1)

Hi Felix,

I'll fix in next few days.

C

On 14/03/2013 18:54, Felix Natter wrote:

> hi all,
>
> Felix Natter<[hidden email]>  writes:
>>> This week, we released the version 1.0.1 of JLaTeXMath:
>>> * Option added for max. width vs exact width.
>>>    Thanks to Felix Natter for the patch.
>> Thanks for the release.
>>
>> Unfortunately, the commit fcb8957bfadb47398105fa12971d3d08fff2471b
>> ("Negative spaces not taken into accound at the end of a hbox") broke
>> the "width is maximum width" feature.
> =>  could you please consider helping me with fixing this?
>
> We would like to release 1.3.x in a few months and until then I need
> a JLaTeXMath Debian package that works for Freeplane :-)
>
> Many Thanks and Best Regards,


--
Calixte Denizet
Software Development Engineer
-----------------------------------------------------------
Scilab Enterprises
143bis rue Yves Le Coz - 78000 Versailles, France
http://www.scilab-enterprises.com

_______________________________________________
jlatexmath mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/jlatexmath
Loading...