Re: [greenstone-users] Page turn and go to page capabilities

From Jenn Cole
DateWed, 19 Jan 2005 12:03:44 -0800
Subject Re: [greenstone-users] Page turn and go to page capabilities
In-Reply-To (41EDAF5E-2080404-cs-waikato-ac-nz)
Thanks Katherine. It does makes sense, but we are using nested sections
so I guess I cannot use this function. Too bad.

Another question I have for the list is in our html documents I have set
code for margins and font which Greenstone seems to be ignoring once it
is run through the HTML plugin. How can I control the look and font of
our HTML documents in Greenstone?

Sincerely,
Jenn Cole

Katherine Don wrote:

> Hi Jenn
>
> Greenstone does this for you automatically if the sections of your
> documents are titled 1, 2, 3... (numbers, not letters) and they are a
> linear list.
> Eg, if you have pdfs which are separated into sections, one per page,
> then this happens for them.
>
> During building, documents that meet this criteria are labelled as paged
> documents in the database. You can force this to happen by setting
> "gsdlthistype" metadata to "Paged" during import. I am not sure if
> putting this in metadata.xml files is enough.
> I have done this in PagedImgPlug -
> $doc_obj->set_utf8_metadata_element ($topsection, "gsdlthistype",
> "Paged");
>
> the relevant section in the building code is in
> perllib/mg(pp)buildproc.pm, sub get_document_type.
>
> If you just have some documents that you want to be paged, you could
> modify plugins to set gsdlthistype to Paged. you will need to reimport
> and rebuild.
> If you want all your documents like that, the easiest way is probably
> to modify the get_document_type function to always return paged. eg
>
> sub get_document_type {
> my $self = shift (@_);
> my ($doc_obj) = @_;
>
> my $thistype = "";
> my $childtype = "Paged";
> if ($doc_obj->get_text_length ($doc_obj->get_top_section())) {
> $thistype = "Paged";
> } else {
> $thistype = "Invisible";
> }
>
> return ($thistype, $childtype);
> }
>
> Then you just need to rebuild the gdbm database:
> buildcol.pl -mode infodb <collname>
> copy collect/collname/building/text/collname.ldb to
> collect/collname/index/text/collname.ldb
>
> Note the extra stuff determines whether to display the enclosing
> section or not.
> Noe also that this will not work properly if you have nested sections.
> There can only be one level of sections inside the enclosing document
> setion.
>
> does this make sense? I hope its not too confusing.
>
> Cheers,
> Katherine Don
>
> Jenn Cole wrote:
>
>> Hello,
>>
>> I have searched your e-mail list archives for an answer to this
>> question but have been unable to find an answer that works for me.
>> If anyone had code for the following I would appreciate it.
>>
>> I have a collection of textual documents, I would like to know how I
>> can:
>>
>> 1. Instead of a table of contents listing all of my pages, have a "go
>> to page x" functionality, while keeping the expand text box on the
>> screen. I have found references to PageId, but not quite sure how to
>> set it up.
>>
>> Thanks,
>>
>> Jenn Cole
>> UBCIC Library Technician
>>
>> _______________________________________________
>> greenstone-users mailing list
>> greenstone-users@list.scms.waikato.ac.nz
>> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
>>
>
>
> _______________________________________________
> greenstone-users mailing list
> greenstone-users@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
>