ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] figure libs
@ 2002-10-16  9:31 Jens-Uwe Morawski
  2002-10-16 11:30 ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Jens-Uwe Morawski @ 2002-10-16  9:31 UTC (permalink / raw)



Ahoi,

i have some questions about figure libs:

1) i can only access figures from a figure-lib if the
   file is in the same directory as the document that
   should embed the figures.
   For documents in different variants (screen, print)
   i would prefer that i can have the figure lib in the
   parent directory.

2) is the XML-file that describes the figure-lib really
   required to access the figures in the figure-lib:

  Suppose the following entry:
<figure>
	<file>Figures.1</file>
	<label>fig-one</label>
	<copyright>Jens-Uwe Morawski</copyright>
	<comment>first firgure</comment>
</figure>

  that can be accessed with \externalfigure[fig-one]

 The page of this figure can be found via:
 a) looking for the object that declares the destination
    "about: fig-one":
6 0 obj <<
/Type /Annot
/Subtype /Link /Border [0 0 0] /A <</S /GoTo /D (about: fig-one)>>
/Rect [0 0 333.797 108.797]
>> endobj

 b) looking for the /Page object that uses this object in /Annots:
8 0 obj <<
/Type /Page
/Contents 9 0 R
/Resources 7 0 R
/MediaBox [0 0 333.797 108.797]
/TrimBox [0.0 0.0 333.79617 108.7967]/CropBox [0.0 0.0 333.79617 108.7967]
/Parent 12 0 R
/Annots [ 6 0 R ]

 c) find out at which position this page is declared in the
    /Pages dictionary:
12 0 obj <<
/Type /Pages
/Count 5
/Kids [8 0 R 17 0 R 29 0 R 56 0 R 68 0 R]
>> endobj

Maybe this could be done once for all "about:" destinations
for every \usefigurebase[...]. Thus only the figure-lib-pdf
is required.

Btw, while looking in the PDF-file i found:
86 0 obj <<
/Type /Catalog
/Pages 12 0 R
/Names 85 0 R
/OpenAction <</S /GoTo /D (page:2)>>/PageMode /UseNone\relax 
/PTEX.Fullbanner (This is pdfTeX, Version 3.14159-1.00b-pretest-20020211)
>> endobj

The \relax after the page-mode looks very TeXish. Is this correct?

Thanks,
  Jens
_______________________________________________
ntg-context mailing list
ntg-context@ref.ntg.nl
http://ref.ntg.nl/mailman/listinfo/ntg-context


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [NTG-context] figure libs
  2002-10-16  9:31 [NTG-context] figure libs Jens-Uwe Morawski
@ 2002-10-16 11:30 ` Hans Hagen
  2002-10-16 13:44   ` Jens-Uwe Morawski
  2002-10-16 13:55   ` Bruce D'Arcus
  0 siblings, 2 replies; 6+ messages in thread
From: Hans Hagen @ 2002-10-16 11:30 UTC (permalink / raw)
  Cc: ConTeXt

At 11:31 AM 10/16/2002 +0200, Jens-Uwe Morawski wrote:

>Ahoi,
>
>i have some questions about figure libs:
>
>1) i can only access figures from a figure-lib if the
>    file is in the same directory as the document that
>    should embed the figures.
>    For documents in different variants (screen, print)
>    i would prefer that i can have the figure lib in the
>    parent directory.

\setupexternalfigures[directory={...,...,...}]

>2) is the XML-file that describes the figure-lib really
>    required to access the figures in the figure-lib:

yes, since it determines the page to pick up; of course you can also direct 
the page directly using

\externalfigure[somefile.pdf][page=3]

>/Subtype /Link /Border [0 0 0] /A <</S /GoTo /D (about: fig-one)>>

it could be done if pdftex supported access to named pages; parsing the 
file using tex macros is not doable (well, partially, but a pain for 500 
meg files)

>The \relax after the page-mode looks very TeXish. Is this correct?

no, in spec-fdf, add a space after #6 in:

  \xdef\currentPDFviewerprefs
    {\ifcase#6 \or\or\or /View...


PS. The fig lib mechanism will be replaced (extended) by a more versatile 
resource library system (working on that now)

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ref.ntg.nl
http://ref.ntg.nl/mailman/listinfo/ntg-context


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [NTG-context] figure libs
  2002-10-16 11:30 ` Hans Hagen
@ 2002-10-16 13:44   ` Jens-Uwe Morawski
  2002-10-16 15:43     ` Hans Hagen
  2002-10-16 13:55   ` Bruce D'Arcus
  1 sibling, 1 reply; 6+ messages in thread
From: Jens-Uwe Morawski @ 2002-10-16 13:44 UTC (permalink / raw)


On Wed, 16 Oct 2002 13:30:19 +0200
Hans Hagen <pragma@wxs.nl> wrote:

> At 11:31 AM 10/16/2002 +0200, Jens-Uwe Morawski wrote:
> 
> >i have some questions about figure libs:
> >
> >1) i can only access figures from a figure-lib if the
> >    file is in the same directory as the document that
> >    should embed the figures.
> >    For documents in different variants (screen, print)
> >    i would prefer that i can have the figure lib in the
> >    parent directory.
> 
> \setupexternalfigures[directory={...,...,...}]

Hmm, since ConTeXt is so good in finding components and
environments i thought that finding figures should not
that problem. Setting up a specific directory is not
a solution if different authors (with different directory
structure) work on the same document.
 
> >2) is the XML-file that describes the figure-lib really
> >    required to access the figures in the figure-lib:
> 
> yes, since it determines the page to pick up; of course you can also direct 
> the page directly using
> 
> \externalfigure[somefile.pdf][page=3]
> 
> >/Subtype /Link /Border [0 0 0] /A <</S /GoTo /D (about: fig-one)>>
> 
> it could be done if pdftex supported access to named pages; parsing the 
> file using tex macros is not doable (well, partially, but a pain for 500 
> meg files)

I thought that the parsing could be done with TeXUtil (Perl). Is there
no Perl-Module (maybe a wrapper for pdflib by Thomas Merz) that allows
efficient parsing? But, I see that this way still consumes too much
time (for a 500M file). Thus, having the xml-file in place sounds
like the better solution.

> PS. The fig lib mechanism will be replaced (extended) by a more versatile 
> resource library system (working on that now)

Can you give some examples what enhanced functionality is available
then, please.

Many thanks,
  Jens
_______________________________________________
ntg-context mailing list
ntg-context@ref.ntg.nl
http://ref.ntg.nl/mailman/listinfo/ntg-context


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [NTG-context] figure libs
  2002-10-16 11:30 ` Hans Hagen
  2002-10-16 13:44   ` Jens-Uwe Morawski
@ 2002-10-16 13:55   ` Bruce D'Arcus
  1 sibling, 0 replies; 6+ messages in thread
From: Bruce D'Arcus @ 2002-10-16 13:55 UTC (permalink / raw)
  Cc: ConTeXt


On Wednesday, October 16, 2002, at 07:30 AM, Hans Hagen wrote:

> PS. The fig lib mechanism will be replaced (extended) by a more 
> versatile resource library system (working on that now)
>
> Hans

I wonder if it would make sense to have interaction between the figure 
library and Taco's forthcoming new bib module.  There's obviously 
overlap.

Just a thought...

Bruce

_______________________________________________
ntg-context mailing list
ntg-context@ref.ntg.nl
http://ref.ntg.nl/mailman/listinfo/ntg-context


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [NTG-context] figure libs
  2002-10-16 13:44   ` Jens-Uwe Morawski
@ 2002-10-16 15:43     ` Hans Hagen
  2002-10-16 19:55       ` Jens-Uwe Morawski
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2002-10-16 15:43 UTC (permalink / raw)
  Cc: ConTeXt

At 03:44 PM 10/16/2002 +0200, Jens-Uwe Morawski wrote:
>On Wed, 16 Oct 2002 13:30:19 +0200
>Hans Hagen <pragma@wxs.nl> wrote:
>
> > At 11:31 AM 10/16/2002 +0200, Jens-Uwe Morawski wrote:
> >
> > >i have some questions about figure libs:
> > >
> > >1) i can only access figures from a figure-lib if the
> > >    file is in the same directory as the document that
> > >    should embed the figures.
> > >    For documents in different variants (screen, print)
> > >    i would prefer that i can have the figure lib in the
> > >    parent directory.
> >
> > \setupexternalfigures[directory={...,...,...}]
>
>Hmm, since ConTeXt is so good in finding components and
>environments i thought that finding figures should not
>that problem. Setting up a specific directory is not
>a solution if different authors (with different directory
>structure) work on the same document.

hm, actually it's practice here, in order to prevent duplicates, how is 
your directory structure for this doc?

> > >2) is the XML-file that describes the figure-lib really
> > >    required to access the figures in the figure-lib:
> >
> > yes, since it determines the page to pick up; of course you can also 
> direct
> > the page directly using
> >
> > \externalfigure[somefile.pdf][page=3]
> >
> > >/Subtype /Link /Border [0 0 0] /A <</S /GoTo /D (about: fig-one)>>
> >
> > it could be done if pdftex supported access to named pages; parsing the
> > file using tex macros is not doable (well, partially, but a pain for 500
> > meg files)
>
>I thought that the parsing could be done with TeXUtil (Perl). Is there
>no Perl-Module (maybe a wrapper for pdflib by Thomas Merz) that allows
>efficient parsing? But, I see that this way still consumes too much
>time (for a 500M file). Thus, having the xml-file in place sounds
>like the better solution.

next versions of context will also provide you a mechanism for generating 
the library

> > PS. The fig lib mechanism will be replaced (extended) by a more versatile
> > resource library system (working on that now)
>
>Can you give some examples what enhanced functionality is available
>then, please.

- labeling, language or application dependent
- alternatives, like graphics, placeholders, applets, videos, depending on 
the kind of doc instance
- more associated data
- clipping, manipulation, etc
- slide show features

Hans

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ref.ntg.nl
http://ref.ntg.nl/mailman/listinfo/ntg-context


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [NTG-context] figure libs
  2002-10-16 15:43     ` Hans Hagen
@ 2002-10-16 19:55       ` Jens-Uwe Morawski
  0 siblings, 0 replies; 6+ messages in thread
From: Jens-Uwe Morawski @ 2002-10-16 19:55 UTC (permalink / raw)


On Wed, 16 Oct 2002 17:43:23 +0200
Hans Hagen <pragma@wxs.nl> wrote:

> At 03:44 PM 10/16/2002 +0200, Jens-Uwe Morawski wrote:
> >On Wed, 16 Oct 2002 13:30:19 +0200
> >Hans Hagen <pragma@wxs.nl> wrote:
> > > \setupexternalfigures[directory={...,...,...}]
> >
> >Hmm, since ConTeXt is so good in finding components and
> >environments i thought that finding figures should not
> >that problem. Setting up a specific directory is not
> >a solution if different authors (with different directory
> >structure) work on the same document.
> 
> hm, actually it's practice here, in order to prevent duplicates, how is 
> your directory structure for this doc?
.
|-- Basics.tex
|-- Bib.tex
|-- Fill.tex
|-- Intro.tex
|-- Pre-Cont.tex
|-- Setup.tex
|-- Text.tex
|-- env-bib.tex
|-- env-chart.tex
|-- env-def.tex
|-- env-fig.tex
|-- figures
|   |-- AutoColors.mp
|   |-- Figures.mp
|   |-- SegmentPoints.mp
|   |-- basic-patterns.mp
|   |-- dimen-patterns.mp
|   |-- font-setup.mp
|   |-- piechartmp-figures.pdf
|   |-- piechartmp-figures.xml
|   `-- verdunklung.mp
|-- piechartmp-figures.xml -> figures/piechartmp-figures.xml
|-- piechartmp.tex
|-- print-a
|   |-- env-a.tex
|   |-- piechartmp-a.pdf
|   `-- piechartmp-a.tex
`-- screen
    |-- env-ovl.tex
    |-- env-s.tex
    |-- piechartmp-s.pdf
    |-- piechartmp-s.tex
    `-- titel-s.tex

the figure lib is the file piechartmp-figures.pdf||xml in the
"figures" directory. The real documents are the piechartmp-a||s.tex
in their own directories. The .tex-files in the base-directory are
the components and document-wide environments.

As you can see, currently there is a sym-link in the base-dir
  piechartmp-figures.xml -> figures/piechartmp-figures.xml
This is because if i use \setupexternalfigures to point to the
 "figures" dir, then the piechartmp-figures.xml in the same
 dir is not found.
 In contrast, if i copy both figure-lib files (pdf and xml)
 in the base-dir, then the pdf-file is not found automatically.

Do you have an idea for a better structure? thanks.

Jens
_______________________________________________
ntg-context mailing list
ntg-context@ref.ntg.nl
http://ref.ntg.nl/mailman/listinfo/ntg-context


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-10-16 19:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-16  9:31 [NTG-context] figure libs Jens-Uwe Morawski
2002-10-16 11:30 ` Hans Hagen
2002-10-16 13:44   ` Jens-Uwe Morawski
2002-10-16 15:43     ` Hans Hagen
2002-10-16 19:55       ` Jens-Uwe Morawski
2002-10-16 13:55   ` Bruce D'Arcus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).