mailing-list for TeXmacs Users

Text archives Help


Re: [TeXmacs] displaying html files


Chronological Thread 
  • From: Michael Lachmann <address@hidden>
  • To: address@hidden
  • Subject: Re: [TeXmacs] displaying html files
  • Date: Fri, 6 Aug 2010 12:50:00 +0200

I reported the bug to the R development list.
For the R interface, I simply filter out all </p>, and things work well. This works only for the case where my interface act as a middleman between R and TeXmacs. When TeXmacs directly accesses the help documents from a web server, which is also an option, then the problem will still be there as long as R won't be fixed.

But I think there is still a bug in TeXmacs that causes the display of the text to fall off the left side of the window - probably the position is subtracted below 0, when it shouldn't...

Michael


On 6 Aug 2010, at 7:51AM, Sam Liddicott wrote:

If we don't want to fix R, I suggest libtidy which I have used in the past to make xslt-able xml out of bad-ish html.

Sam

Michael Lachmann <address@hidden> wrote:


I found another problem. This time it isn't totally TeXmacs' fault.

It seems R produces under some conditions somewhat faulty html files,
where <p> and <dl> don't nest correctly.

Here is a sample:
---
<body>
<p>
<dl>
<dt><code>save.defaults</code>, <code>save.image.defaults</code>:</
dt><dd>
see <code>save</code>.</dd>
</p>
<p>
<dt><code>scipen</code>:</dt><dd>integer. A penalty to be applied
when deciding to print numeric values in fixed or exponential
notation. Positive values bias towards fixed and negative towards
scientific notation: fixed notation will be preferred unless it is
more than <code>scipen</code> digits wider.</dd>
</p>
more
</dl>
</body>
--
As you can see, first <p> starts, then <dl> starts, then <p> ends, but
<dl> still continues. The result in TeXmacs is that the definition
list is displayed off the left end of the window. I know that this is
faulty html code, but most browsers display it "correctly".

Michael

P.S. TeXmacs crashes when the above example is opened as an html file,
without the <body></body> tags.


On 5 Aug 2010, at 8:57PM, Michael Lachmann wrote:

Hi,

I found another case. The problem is with the backquote, or "acute
accent"
Which also looks like this: `

If an html file includes this character, displaying the html fails.
This is even if the equivalent html code &#96; is used.

The error I get is:
/usr/local/share/TeXmacs/progs/convert/tools/xmltm.scm:150:7: In
procedure string-replace in expression (string-replace s cork-grave
...):
/usr/local/share/TeXmacs/progs/convert/tools/xmltm.scm:150:7: string
contains #\nul character: "\"
\\t\\n\"\\'\x00<gtr><less>=%;,|&\\{()\\}\""

The acute was where above there is a '\x00'. (I know, the text looks
strange - it explains what are the default wordbreaks in the "options"
documentation in R.)

I think that was also the problem in this half-year old email below.

Michael


On 10 November 2009 04:04, Michael Lachmann <address@hidden>
wrote:
Hi,

I continue to work on the R plugin, and added the ability to
display help
files within TeXmacs. The function that does that is called t.help:
t.help("read.table") will display the documentation about
read.table inside
TeXmacs. This works really well - html rendering in TeXmacs is very
nice.

I encountered the following problem: some files fail to open, with
the
following error:
/usr/local/share/TeXmacs/progs/convert/tools/xmltm.scm:150:7: In
procedure
string-replace in expression (string-replace s cork-grave ...):
/usr/local/share/TeXmacs/progs/convert/tools/xmltm.scm:150:7: string
contains #\nul character: "?\x00+\x00"

I attached a sample file that fails (it is the documentation of the R
function "help"...)

The problem seems to be with a line that is part of the examples:
?`+`

A second problem I encountered repeatedly, but can't reproduce
reliably is
that sometimes, when I open an html help files, and then follow
links in
that help file, and then go back with C-<, then in some case if I
press C-<
when the top html file is display (i.e. the first opened), then
TeXmacs
crashes with the following error:

Assertion failed: (!is_nil (p)), function path_up, file
./Kernel/Types/path.cpp, line 84.
'/usr/local/bin/texmacs ' terminated by signal SIGABRT (Abort)

Michael











Archive powered by MHonArc 2.6.19.

Top of page