On 17 October 2014 18:35, Ralf Hemmecke <[email protected]> wrote:
> On 10/17/2014 11:23 PM, Bill Page wrote:
>> http://axiom-wiki.newsynthesis.org/SandBoxTestTexOutput
>
>> You can see that there is a significant difference between the way
>> breqn and the texbreak program fold long LaTeX output. In fact
>> breqn seems to fail to fold output (1). I am not sure yet why that
>> is happening. It could be related to the fact that I am still using
>> an older release of breqn.
>
> No. It's not a problem with an old breqn.
>
> This problem with breaking fractions is also the main problem
> for the book.
Oh, :( This seems like a common requirement judging from how often it
happens in axiom-wiki.
> But if you think about it... how would you design an
> algorithm that breaks
>
> \frac{a}{b} + \frac{c}{d}
>
> correctly if one or several of the a, b, c, d expressions are long
> expressions. What looks better? breaking at the + or breaking
> inside frac?
>
Experiments show that both breqn and texbreak give priority to
breaking at the + but texbreak will also break each term in either the
numerator or denominator if necessary while apparently breqn can not
do this even in the simpler case where there is no alternative.
> Admittedly, just one \frac{a}{b} on the top-level is a special case
> and I would be happy if breqn.sty could handle this. I think I even
> wrote a mail to all three of the maintainers and didn't get a reply. :-(
>
That is bit discouraging. As you have designed it, fricasmath
requires breqn. I looked but did not find any easy way to disable the
use of breqn. There are probably times when one would not want the
output handled by breqn. The only way to handle this now would be to
manually edit-out the references to dmath or maybe to redefine it
somehow?
> That texbreak can handle this looks nice, but I'm still not in
> favour of texbreak.
You mean because it is written in C ?
> If only I could reliably say that "\frac is toplevel and the
> expression is too long", it would perhaps be passible to program
> a workaround for this case. But it needs a bit of TeX-knowledge to
> get the length of the line between the numerator and denominator
> correct.
I significant part of texbreak is concerned exactly with this sort of
calculation.
> Easier would be to transform it into
>
> (a)/(b)
>
In FriCAS one can write:
)set output fraction horizontal
>> The other difference is in the numbering of output lines. The old
>> axiom-wiki manages to find and render the equation numbers as
>> html-encoded links while my modified version is not able to do this
>> yet since the fricasmath environment codes these numbers differently,
>> so what you see is the numbers in png images as the fricasmath
>> environment renders them.
>
> Actually, the link that is produced on the wiki is somewhat useless,
> since it simply points to itself.
>
Well this is fairly conventional HTML coding. The link is used to
generate a copyable reference to some output or equation, e.g.
http://axiom-wiki.newsynthesis.org/ManipulatingExpressions#eq19
The HTML code that is generated for this particular example is:
<a name="eq19">
<table width="95%">
<tr>
<td align="center" width="95%">
<img alt="\label{eq19}\left[{y \ z}, \:{x \ z}\right]"
title="\label{eq19}\left[{y \ z}, \:{x \ z}\right]"
class="equation" src="images/9132900558131911484-16.0px.png"
align="bottom" Style="vertical-align:text-bottom"
width="60" height="18"/>
</td>
<td width="5%" align="right">
<a href="#eq19">(19)</a>
</td>
</tr>
</table>
</a>
The anchor is the outter tag, the link is embedded. Usually one uses
right-click/copy-link-location on the link and then inserts it into a
document like I did above. Clicking on this link positions you at the
given anchor on the specified page. So it does look kind of like it
is a link to itself, but that is not the point.
> But anyway, you'd proably just have to extract the number from
>
> \begin{fricasmath}{n}
>
> instead of
>
> \eqno(n)
>
> And maybe you'd have to redefine what fricasmath does with the n. It
> probably shouldn't produce the number into the .png file.
>
Yes, that should be easy. What does fricasmath do if I pass an empty
bracket or omit the bracket altogether?
\begin{fricasmath}{} ...
Regards,
Bill Page.
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.