Using Amrita to prepare a presentation

18 views
Skip to first unread message

Roger Mason

unread,
Nov 22, 2011, 6:18:23 AM11/22/11
to amrita...@googlegroups.com

Hello all,

The message below is pasted from a conversation initiated with JJQ using
his private e-mail. We are moving it to this forum in the interests of
sharing with the group.

Cheers,
Roger

Roger,

Sorry for being slow to reply, but your message caught
me as I was moving back from DC to New Mexico.

On Sun, 6 Nov 2011, Roger Mason wrote:

> Hello James,
>
> I am having another go at using amrita. My plan is to use it to make a
> presentation as a pdf. I have been looking at HelloWorld.
>
> Running 'amrita HelloWorld' generates the expected "Hello, world!" on
> stdout. However, running 'amrbrowse HelloWorld' causes LaTeX to
> generate a lot of formats but does not regenerate HelloWorld.pdf.
>
The first thing to try is:

amrbrowse -sys showerrors test

on the minimal file:

echo Hello, Roger
fold::info'amrbrowse {
This is a minimal example.
}

If nothing else, this will check that your TeX installation is
up to scratch. Now should your AMRITA be broken, I suggest
you install:

http://www.galcit.caltech.edu/~jjq/AMRITAv3.05_R19-11-2011

I just created the instalation kit on a box running Ubuntu 11.04
and so it should install at your end.

> I realise you may be too busy to help me, please just say so if that is
> the case.
My maxim is to help those who help themselves. In this instance
you should really have posted your question to the newsgroup.
Yes there's no traffic, and so you're unlikely to get an answer
from anyone but myself, but doing so will leave a record for
the next person.

James


Roger Mason

unread,
Nov 22, 2011, 6:25:00 AM11/22/11
to amrita...@googlegroups.com
here is the rest of the conversation thus far.

> The first thing to try is:
>
> amrbrowse -sys showerrors test
>
> on the minimal file:
>
> echo Hello, Roger
> fold::info'amrbrowse {
> This is a minimal example.
> }
>

Processing completes without error, but there is no output. Does that
mean something is broken?

> If nothing else, this will check that your TeX installation is
> up to scratch. Now should your AMRITA be broken, I suggest
> you install:
>
> http://www.galcit.caltech.edu/~jjq/AMRITAv3.05_R19-11-2011
>
> I just created the instalation kit on a box running Ubuntu 11.04
> and so it should install at your end.

I get a page not found error from that url.

Cheers,
Roger

James Quirk

unread,
Nov 22, 2011, 7:00:07 AM11/22/11
to amrita...@googlegroups.com
Roger,

On Tue, 22 Nov 2011, Roger Mason wrote:

> here is the rest of the conversation thus far.
>
> > The first thing to try is:
> >
> > amrbrowse -sys showerrors test
> >
> > on the minimal file:
> >
> > echo Hello, Roger
> > fold::info'amrbrowse {
> > This is a minimal example.
> > }
> >
>
> Processing completes without error, but there is no output. Does that
> mean something is broken?
>

By default amrbrowse produces a temporary file:

~/.amrita/listing<pid>.pdf

where <pid> is the process id of the amrbrowse job. So you should
check to see if a listing file was produced. Now if you want to
cach a listing, use the -cl option as in:
amrbrowse -cl my/listing abc

this should generate a file listing.pdf in a directiy my, which
is created aut omatically. Now after the listing is generated,
amrbrowse uses amrpdf to view the pdf. And it may well be that
it is this step is broken at your end. You can check this by running:

cd my
amrpdf listing.pdf

which should launch Adobe Reader. Note I recommend you install
Adobe Reaeder 4.3.4 as later versions are broken on Linux platforms,
at least in regard to /RichMedia annotations. Moreover, owing
to the economic downturn the Linux version will not be fixed.
If you have more than one Adobe Reader on your system you can
use the environment variable AMRACROREAD to fix which one
amrpdf will use.

> > If nothing else, this will check that your TeX installation is
> > up to scratch. Now should your AMRITA be broken, I suggest
> > you install:
> >
> > http://www.galcit.caltech.edu/~jjq/AMRITAv3.05_R19-11-2011
> >
> > I just created the instalation kit on a box running Ubuntu 11.04
> > and so it should install at your end.
>
> I get a page not found error from that url.
>

Sorry, try it now using wget. Note this is a raw kit and not
a formal release i.e. it's not a PDF file. Unpack using:

perl AMRITAv3.05_R19-11-2011 -unpack

then build it in the usual fashion.

James


> Cheers,
> Roger
>
>

Roger Mason

unread,
Nov 22, 2011, 7:17:25 AM11/22/11
to amrita...@googlegroups.com
James Quirk <j...@galcit.caltech.edu> writes:

> By default amrbrowse produces a temporary file:
>
> ~/.amrita/listing<pid>.pdf
>
> where <pid> is the process id of the amrbrowse job. So you should
> check to see if a listing file was produced. Now if you want to
> cach a listing, use the -cl option as in:
> amrbrowse -cl my/listing abc
>
> this should generate a file listing.pdf in a directiy my, which
> is created aut omatically. Now after the listing is generated,
> amrbrowse uses amrpdf to view the pdf. And it may well be that
> it is this step is broken at your end. You can check this by running:
>
> cd my
> amrpdf listing.pdf
>
> which should launch Adobe Reader. Note I recommend you install
> Adobe Reaeder 4.3.4 as later versions are broken on Linux platforms,
> at least in regard to /RichMedia annotations. Moreover, owing
> to the economic downturn the Linux version will not be fixed.
> If you have more than one Adobe Reader on your system you can
> use the environment variable AMRACROREAD to fix which one
> amrpdf will use.

Will check that out when I get to work.

>> > If nothing else, this will check that your TeX installation is
>> > up to scratch. Now should your AMRITA be broken, I suggest
>> > you install:
>> >
>> > http://www.galcit.caltech.edu/~jjq/AMRITAv3.05_R19-11-2011
>> >
>> > I just created the instalation kit on a box running Ubuntu 11.04
>> > and so it should install at your end.
>>
>> I get a page not found error from that url.
>>
> Sorry, try it now using wget. Note this is a raw kit and not
> a formal release i.e. it's not a PDF file. Unpack using:
>
> perl AMRITAv3.05_R19-11-2011 -unpack
>
> then build it in the usual fashion.

One thing that has arisen in the past: what version of perl should I
use? My box at home has 5.12.4 as system perl and my boxes at work have
5.12.2 (I think). However, I installed perlbrew
(http://search.cpan.org/~gugod/App-perlbrew-0.33/lib/App/perlbrew.pm) in
order to be able to select a perl that is compatible with Amrita for my
user.

Cheers,
Roger

James Quirk

unread,
Nov 22, 2011, 7:22:26 AM11/22/11
to Roger Mason, amrita...@googlegroups.com
Roger,

> One thing that has arisen in the past: what version of perl should I
> use? My box at home has 5.12.4 as system perl and my boxes at work have
> 5.12.2 (I think). However, I installed perlbrew
> (http://search.cpan.org/~gugod/App-perlbrew-0.33/lib/App/perlbrew.pm) in
> order to be able to select a perl that is compatible with Amrita for my
> user.

The kit I linked to has been tested with Perl5.8 and Perl5.10 .

James
>
> Cheers,
> Roger
>
>

Roger Mason

unread,
Nov 22, 2011, 11:29:10 AM11/22/11
to amrita...@googlegroups.com
Hi James,

On 22/11/2011 8:30 AM, James Quirk wrote:
> Roger,
>
> On Tue, 22 Nov 2011, Roger Mason wrote:
>
>> here is the rest of the conversation thus far.
>>
>>> The first thing to try is:
>>>
>>> amrbrowse -sys showerrors test
>>>
>>> on the minimal file:
>>>
>>> echo Hello, Roger
>>> fold::info'amrbrowse {
>>> This is a minimal example.
>>> }

I removed the previous version of acroread (was installed by hand) and
installed the version (very old, 8.1.2) that is in my distro. This
minimal example now works.

I will try 9.3.4.

Roger

--
Roger Mason
Interim Head, Earth Sciences
Memorial University of Newfoundland
(709) 864-2334


This electronic communication is governed by the terms and conditions at
http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2011.php

James Quirk

unread,
Nov 22, 2011, 2:49:06 PM11/22/11
to amrita...@googlegroups.com
Roger,

> I removed the previous version of acroread (was installed by hand) and
> installed the version (very old, 8.1.2) that is in my distro. This minimal
> example now works.
>
> I will try 9.3.4.

You can grab it from:

ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.3.4/enu/

James

>
> Roger
>
>

Roger Mason

unread,
Nov 22, 2011, 4:33:41 PM11/22/11
to amrita...@googlegroups.com
Hi James,

On 22/11/2011 4:19 PM, James Quirk wrote:
> You can grab it from:
> ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.3.4/enu/

Thanks. I have 9.3.4 installed and running. I have not updated amrita
to R19-11-011 yet. My original problem persists.

(1) I download HelloWorld.pdf from
http://www.amrita-ebook.org/doc/hello-world
(2) View the pdf using 'amrpdf HelloWorld.pdf'
(3) Select 'HelloWorld' in top right corner, that opens origami, which I
close, and writes the file 'HelloWorld' into a directory
'HelloWorld.pdfWorkDir'
(4) I cd to that directory and run 'amrbrowse HelloWorld'
(5) Lots of LaTeX formats get generated but the pdf is not regenerated.

Cheers,

James Quirk

unread,
Nov 22, 2011, 4:44:00 PM11/22/11
to amrita...@googlegroups.com
Roger,

On Tue, 22 Nov 2011, Roger Mason wrote:

> Hi James,
>
> On 22/11/2011 4:19 PM, James Quirk wrote:
> > You can grab it from:
> > ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.3.4/enu/
> Thanks. I have 9.3.4 installed and running. I have not updated amrita to
> R19-11-011 yet. My original problem persists.

It's not worth trying to track the problem down until
you've updated to R19-11-011. Also, you should use
the examples from:

$AMRITA/examples/ToA/drink-me/examples/hello

rather than those on the web-site, because there are some
key differences in the annotation machinery.

James

Roger Mason

unread,
Nov 23, 2011, 10:44:49 AM11/23/11
to amrita...@googlegroups.com
On 22/11/2011 6:14 PM, James Quirk wrote:
>
> It's not worth trying to track the problem down until
> you've updated to R19-11-011. Also, you should use
> the examples from:
>
> $AMRITA/examples/ToA/drink-me/examples/hello
>
> rather than those on the web-site, because there are some
> key differences in the annotation machinery.
I now have R19-11-2011 installed (inline python, ruby & perl are
reported as broken).

I ran $AMRITA/examples/ToA/drink-me/examples/hello as follows:

olivine TEST $ amrcp ToA/world.1
copying: $AMRITA/examples/ToA/drink-me/examples/hello/world.1
to : HelloWorld

you-type> amrita -browse HelloWorld

olivine TEST $ amrita -browse HelloWorld
Error at line 169 of file HelloWorld:
AMRITA::system -- command failed!

Line 169 is:
}

error near:
end of line

James Quirk

unread,
Nov 23, 2011, 11:05:37 AM11/23/11
to amrita...@googlegroups.com
Roger,

On Wed, 23 Nov 2011, Roger Mason wrote:
> > rather than those on the web-site, because there are some
> > key differences in the annotation machinery.
> I now have R19-11-2011 installed (inline python, ruby & perl are reported as
> broken).
>
> I ran $AMRITA/examples/ToA/drink-me/examples/hello as follows:
>
> olivine TEST $ amrcp ToA/world.1
> copying: $AMRITA/examples/ToA/drink-me/examples/hello/world.1
> to : HelloWorld
>
> you-type> amrita -browse HelloWorld
>
> olivine TEST $ amrita -browse HelloWorld
> Error at line 169 of file HelloWorld:
> AMRITA::system -- command failed!
>
> Line 169 is:
> }
>
> error near:
> end of line
>

Whenever AMRITA::system fails you can use the -sys verbose
optio n to see what the problem is. In this case it has to
do with the changes in g++ since the example was written
back in 2002. Specifically, you will need to replace
<iostream.h> by <iostream>, inside of the fold::cxx.
Then you will need to add the line:

using namespace std;

so that cout and endl are recognized. However, even after doing that,
while the example compiles, it fails to run on my Ubuntu 11.04. For the
cout crashes AMRITA's back-end. Although it works fine on my OpenSUSE
setup. I will need to investigate the problem further, but it almost
certainly an issue with the gcc compiler suite on Ubuntu.

Now if you'd tried:

amrcp ToA/world.1cc

the example would have worked as intended. As would the other
examples.

James
> Cheers,
> Roger
>
>
>

Roger Mason

unread,
Nov 23, 2011, 12:53:30 PM11/23/11
to amrita...@googlegroups.com
Hello James,

On 23/11/2011 12:35 PM, James Quirk wrote:
>
> Now if you'd tried:
>
> amrcp ToA/world.1cc
>
> the example would have worked as intended. As would the other
> examples.

What I get after running amrcp and following the directions is acroread
showing pdf version of the content of the current directory. Is that
what I'm supposed to see?

James Quirk

unread,
Nov 23, 2011, 1:02:46 PM11/23/11
to amrita...@googlegroups.com
On Wed, 23 Nov 2011, Roger Mason wrote:

> Hello James,
>
> On 23/11/2011 12:35 PM, James Quirk wrote:
> >
> > Now if you'd tried:
> >
> > amrcp ToA/world.1cc
> >
> > the example would have worked as intended. As would the other
> > examples.
> What I get after running amrcp and following the directions is acroread
> showing pdf version of the content of the current directory. Is that what I'm
> supposed to see?

Yes. When amrita is invoked with the -browse option it runs the script
and then runs amrbrowse on the directory where the script was run.
This is equivalent to:

amrita HelloWorld
amrbrowse -root $CWD

If you want to browse the source use:

amrbrowse HelloWorld

James

>
> Cheers,
> Roger
>
>
>

Roger Mason

unread,
Nov 23, 2011, 1:22:43 PM11/23/11
to amrita...@googlegroups.com
Hi James,

On 23/11/2011 2:32 PM, James Quirk wrote:
>
> Yes. When amrita is invoked with the -browse option it runs the script
> and then runs amrbrowse on the directory where the script was run.
> This is equivalent to:
>
> amrita HelloWorld
> amrbrowse -root $CWD

OK, thank-you.


> If you want to browse the source use:
>
> amrbrowse HelloWorld

This command does not do anything.

James Quirk

unread,
Nov 23, 2011, 1:28:43 PM11/23/11
to amrita...@googlegroups.com
Roger,

On Wed, 23 Nov 2011, Roger Mason wrote:

> >
> > amrbrowse HelloWorld
>
> This command does not do anything.

We appear to be going around in circle. This was you original
question to which I gave you an answer:

amrbrowse -sys showerrors

and the discussion about amrpdf. You indicated that you
had the minmial eample working with AR8.1.2 and you
checked it still works now you've installed AR9.3.4?

James
>
> Cheers,
> Roger
>
>

Roger Mason

unread,
Nov 23, 2011, 1:56:27 PM11/23/11
to amrita...@googlegroups.com
Hi James,

On 23/11/2011 2:58 PM, James Quirk wrote:
>
> We appear to be going around in circle. This was you original
> question to which I gave you an answer:
>
> amrbrowse -sys showerrors
>
> and the discussion about amrpdf. You indicated that you
> had the minmial eample working with AR8.1.2 and you
> checked it still works now you've installed AR9.3.4?

Sorry for the confusion. It appears the successful run with 8.1.2 and
then 9.3.4 was (perhaps) because a cached copy (in ~/.amrita/junk) was
being used?

Running 'amrbrowse -sys showerrors test' produces this on the console:

olivine TEST $ amrbrowse -sys showerrors test
&latex::widget(handler){%
can't access X11 named colours!
&latex::widget(handler){%
latex::widget failed! Died at /home/rmason/Software/AMRITA/AMRITAv3.05/Amrita/error.pl line 38,<FILE> line 35226.

I guess it is looking for the RGB.txt database?

Thanks,

Roger Mason

unread,
Nov 23, 2011, 2:23:13 PM11/23/11
to amrita...@googlegroups.com
James,

On 23/11/2011 3:32 PM, James Quirk wrote:
>
> Yes. Locate RGB.txt on your system the edit:
>
> $AMRITA/defaults/X11
>
> to suit.
>
> James
Both the test file and HelloWorld are now displayed correctly using
amrbrowse.

Many thanks for your help.

James Quirk

unread,
Nov 23, 2011, 2:02:18 PM11/23/11
to amrita...@googlegroups.com
Roger,

> Sorry for the confusion. It appears the successful run with 8.1.2 and then
> 9.3.4 was (perhaps) because a cached copy (in ~/.amrita/junk) was being used?

No. It's because you're now using AMRITAv3.05.

>
> Running 'amrbrowse -sys showerrors test' produces this on the console:
>
> olivine TEST $ amrbrowse -sys showerrors test
> &latex::widget(handler){%
> can't access X11 named colours!
> &latex::widget(handler){%
> latex::widget failed! Died at
> /home/rmason/Software/AMRITA/AMRITAv3.05/Amrita/error.pl line 38,<FILE> line
> 35226.
>
> I guess it is looking for the RGB.txt database?

Yes. Locate RGB.txt on your system the edit:

$AMRITA/defaults/X11

to suit.

James

>
> Thanks,
> Roger
>
>

Reply all
Reply to author
Forward
0 new messages