Daren Scot Wilson | 17 Apr 2012 11:30
Gravatar

Spell checking a Lout document?

I have just finished writing my great 15,000 page magnum opus, full of 
genius math, tables, and so on, entirely in Lout.  Hundreds of *.lt 
files  <at> Included in a main Lout file.  Now, before I vanity publish it 
and try to sell a copy to Mom, I wonder if I've made any silly little typos.

What are practical ways to spell-check these .lt files?   Obviously an 
ordinary everyday spell checker will barf on all the  <at> Something Lout 
keywords and maybe trip over the punctuation marks, although most of 
this source text is just regular text which could go through a spell 
checker fine.

Perhaps there's a filter that can extract all the straight text, 
preening out simple markups such as  <at> I, and bypassing all the structural 
stuff and non-text like sections, math, tables etc., making a simple 
text file one can check?   OTOH, maybe there's a way to spell check the 
final .ps or .pdf file?  (Besides paying some unfortunate Human to 
proofread it.)

I'm on Linux so naturally I prefer solutions that would work on that 
platform, or multiplatform.

--

-- 
Daren Scot Wilson
Escondido California
darenw <at> darenscotwilson.com
http://www.darenscotwilson.com
http://www.jeffcottwilson.com
http://toysihad.wordpress.com

(Continue reading)

Mark Summerfield | 17 Apr 2012 13:17
Picon
Favicon

Re: Spell checking a Lout document?

On Tue, 17 Apr 2012 02:30:39 -0700
Daren Scot Wilson <darenw <at> darenscotwilson.com> wrote:
> I have just finished writing my great 15,000 page magnum opus, full
> of genius math, tables, and so on, entirely in Lout.  Hundreds of
> *.lt files  <at> Included in a main Lout file.  Now, before I vanity
> publish it and try to sell a copy to Mom, I wonder if I've made any
> silly little typos.
> 
> What are practical ways to spell-check these .lt files?   Obviously
> an ordinary everyday spell checker will barf on all the  <at> Something
> Lout keywords and maybe trip over the punctuation marks, although
> most of this source text is just regular text which could go through
> a spell checker fine.
> 
> Perhaps there's a filter that can extract all the straight text, 
> preening out simple markups such as  <at> I, and bypassing all the
> structural stuff and non-text like sections, math, tables etc.,
> making a simple text file one can check?   OTOH, maybe there's a way
> to spell check the final .ps or .pdf file?  (Besides paying some
> unfortunate Human to proofread it.)
> 
> I'm on Linux so naturally I prefer solutions that would work on that 
> platform, or multiplatform.

I don't know of any nice way to do this directly with lout files (and
I've looked and I've tried!). Lout has no BNF and is a nightmare to
parse.

The solution I've now switched to is to use my own ViewPDF program. This
is just a very simple PDF viewer but it highlights spelling mistakes and
(Continue reading)

Wolfram Kahl | 17 Apr 2012 15:48
Picon
Picon
Favicon

Re: Spell checking a Lout document?

On Tue, Apr 17, 2012 at 02:30:39AM -0700, Daren Scot Wilson wrote:
> I have just finished writing my great 15,000 page magnum opus, full of
> genius math, tables, and so on, entirely in Lout.  Hundreds of *.lt
> files  <at> Included in a main Lout file.  Now, before I vanity publish it
> and try to sell a copy to Mom, I wonder if I've made any silly little typos.
>
> What are practical ways to spell-check these .lt files?   Obviously an
> ordinary everyday spell checker will barf on all the  <at> Something Lout
> keywords and maybe trip over the punctuation marks, although most of
> this source text is just regular text which could go through a spell
> checker fine.

I always use spellchecking in emacs (originally ispell, now aspell?)
for this --- you ``a''ccept the first occurrence of  <at> Something,
and then it doesn't bother you again about it.
I never felt this to be much worse than checking LaTeX (with lots of
custom commands...)

For math symbols without  <at>  this can be more dangerous,
since they might occur as spelling mistakes outside of math,
so make a judgement before ``a''ccepting those.

For a multi-file run, it will be better to ``i''include the first
occurrence of  <at> Something in your personal dictionary,
so it is still there for the next file.
(And then move that dictionary file away before you start checking stuff
 that emacs/spell understand better.)

Wolfram

(Continue reading)

Nicholas Clark | 17 Apr 2012 15:55
Picon

Re: Spell checking a Lout document?

I'm not sure what it does with figures, but Lout has a plain text
output mode which can be enabled by running lout with the -p flag.
pdf2text could also be used to convert your final PDF output instead.
Once in text format, you could spell-check it with aspell, or any of a
bunch of spell-checkers.

If you want to make sure the figures get included, you could also use
pdf2html and some kind of HTML spell-check method, which probably
exists.

On Tue, Apr 17, 2012 at 2:30 AM, Daren Scot Wilson
<darenw <at> darenscotwilson.com> wrote:
> I have just finished writing my great 15,000 page magnum opus, full of
> genius math, tables, and so on, entirely in Lout.  Hundreds of *.lt files
>  <at> Included in a main Lout file.  Now, before I vanity publish it and try to
> sell a copy to Mom, I wonder if I've made any silly little typos.
>
> What are practical ways to spell-check these .lt files?   Obviously an
> ordinary everyday spell checker will barf on all the  <at> Something Lout
> keywords and maybe trip over the punctuation marks, although most of this
> source text is just regular text which could go through a spell checker
> fine.
>
> Perhaps there's a filter that can extract all the straight text, preening
> out simple markups such as  <at> I, and bypassing all the structural stuff and
> non-text like sections, math, tables etc., making a simple text file one can
> check?   OTOH, maybe there's a way to spell check the final .ps or .pdf
> file?  (Besides paying some unfortunate Human to proofread it.)
>
> I'm on Linux so naturally I prefer solutions that would work on that
(Continue reading)

Daren Scot Wilson | 17 Apr 2012 17:33
Gravatar

Re: Spell checking a Lout document?

Ah, the -p option.   Read about that long ago and somehow haven't had a 
reason to use it the last few years.  Just tried it and already within a 
minute found one typo!  If there were a simple way to omit all math and 
diagram content, this may be the way to go.

That pdf2text appears to be Microsoft-only :(

On 04/17/2012 06:55 AM, Nicholas Clark wrote:
> I'm not sure what it does with figures, but Lout has a plain text
> output mode which can be enabled by running lout with the -p flag.
> pdf2text could also be used to convert your final PDF output instead.
> Once in text format, you could spell-check it with aspell, or any of a
> bunch of spell-checkers.
>

--

-- 
Daren Scot Wilson
Escondido California
darenw <at> darenscotwilson.com
http://www.darenscotwilson.com

Daren Scot Wilson | 17 Apr 2012 17:45
Gravatar

Re: Spell checking a Lout document?

If I didn't have to run off for the day, I'd be trying ViewPDF right 
now.  It looks excellent.  Will do so this evening...

On 04/17/2012 04:17 AM, Mark Summerfield wrote:
> I don't know of any nice way to do this directly with lout files (and
> I've looked and I've tried!). Lout has no BNF and is a nightmare to
> parse.
>
> The solution I've now switched to is to use my own ViewPDF program. This
> is just a very simple PDF viewer but it highlights spelling mistakes and
> a couple of other possible problems (e.g., double words). It is free and
> open source and easy to build on Linux once you have installed all the
> -dev libraries it needs:
> http://www.qtrac.eu/viewpdf.html
> (I'd be interested to know how you get on with it.)
>
> BTW At the moment if you add words to your own list (words.lst) they are
> handled case-insensitively.
>

--

-- 
Daren Scot Wilson
Escondido California
darenw <at> darenscotwilson.com
http://www.darenscotwilson.com
http://www.jeffcottwilson.com
http://toysihad.wordpress.com

Pierre | 17 Apr 2012 17:49
Picon

Re: Spell checking a Lout document?


Le mardi 17 avril 2012 à 08:33 -0700, Daren Scot Wilson a écrit :
> Ah, the -p option.   Read about that long ago and somehow haven't had a 
> reason to use it the last few years.  Just tried it and already within a 
> minute found one typo!  If there were a simple way to omit all math and 
> diagram content, this may be the way to go.
> 
> That pdf2text appears to be Microsoft-only :(
> 

Try "pdftotext"

--

-- 
Pierre

Nicholas Clark | 17 Apr 2012 18:14
Picon

Re: Spell checking a Lout document?

That's the one. That's what I get for not being at the terminal when I
wrote my response. I meant pdftotext (part of the xpdf distribution,
also installed by default on many distros) and pdftohtml (part of
poppler-utils).

On Tue, Apr 17, 2012 at 8:49 AM, Pierre <pierre.lesimple <at> mail.mcgill.ca> wrote:
>
>
> Le mardi 17 avril 2012 à 08:33 -0700, Daren Scot Wilson a écrit :
>> Ah, the -p option.   Read about that long ago and somehow haven't had a
>> reason to use it the last few years.  Just tried it and already within a
>> minute found one typo!  If there were a simple way to omit all math and
>> diagram content, this may be the way to go.
>>
>> That pdf2text appears to be Microsoft-only :(
>>
>
> Try "pdftotext"
>
>
> --
> Pierre
>
>

--

-- 
Nicholas Clark
L-3 Electrical Engineering
Email: nicholas.clark <at> gmail.com

(Continue reading)

Michael Koehmstedt, RenPet | 1 May 2012 03:03

Problem with Horizontal line exceeding page margins

Hello everyone,

I am having a problem drawing a simple horizontal line. All I'd like is a slim horizontal line that goes from left margin to right margin.

Here is the relevant code:

def <at> HLine
  left size
{
<at> BackEnd <at> Case {
  PDF <at> Yield {
    { 0 0 m __xsize 0 l __mul(size, __pt) w S } <at> Graphic {}
  }
}
}

As you can see I am using the PDF back-end.

When I look at the PDF in Adobe Acrobat, it looks fine. However, when I print the document, the right end of the horizontal line exceeds the right margin, by a significant amount, around half an inch.

Anyone have any ideas? I know the PDF's graphic capabilities are inferior to PostScript, but I have to use PDF. Hopefully as something as simple as a basic horizontal line is possible.

Regards,
Michael Koehmstedt

Mark Summerfield | 1 May 2012 08:50
Picon
Favicon

Re: Problem with Horizontal line exceeding page margins

Hi Michael,

What's wrong with using  <at> FullWidthRule ?

On Mon, 30 Apr 2012 18:03:06 -0700
"Michael Koehmstedt, RenPet" <mike <at> renpetllc.com> wrote:
> Hello everyone,
> 
> I am having a problem drawing a simple horizontal line. All I'd like
> is a slim horizontal line that goes from left margin to right margin.
> 
> Here is the relevant code:
> 
> def  <at> HLine
>   left size
> {
>  <at> BackEnd  <at> Case {
>   PDF  <at> Yield {
>     { 0 0 m __xsize 0 l __mul(size, __pt) w S }  <at> Graphic {}
>   }
> }
> }
> 
> As you can see I am using the PDF back-end.
> 
> When I look at the PDF in Adobe Acrobat, it looks fine. However, when
> I print the document, the right end of the horizontal line exceeds
> the right margin, by a significant amount, around half an inch.
> 
> Anyone have any ideas? I know the PDF's graphic capabilities are
> inferior to PostScript, but I have to use PDF. Hopefully as something
> as simple as a basic horizontal line is possible.
> 
> Regards,
> Michael Koehmstedt

--

-- 
Mark Summerfield, Qtrac Ltd, www.qtrac.eu
    C++, Python, Qt, PyQt - training and consultancy
        "Advanced Qt Programming" - ISBN 0321635906
            http://www.qtrac.eu/aqpbook.html


Gmane