ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Hyperlinks to locations in other documents
@ 2003-08-12  8:29 Nigel King
  2003-08-12 11:11 ` \placefigure[left] aligning with second line Duncan Hothersall
  2003-08-15  8:58 ` Hyperlinks to locations in other documents-repost Nigel King
  0 siblings, 2 replies; 12+ messages in thread
From: Nigel King @ 2003-08-12  8:29 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 583 bytes --]

Hi,
I am trying to get a group of documents to link together. The references to
the other document work but the hyperlinks only open the document on the
first page.

What am I doing wrong?

The linktest1 has links to testdoc2. For those trying them you may need to
change the font part since my fonts are non standard (subject of other
problems).

Key lines from testdoc1.tex are
\useexternaldocument[testdoc][testdoc2][This document is a test link]
\goto{contents}[testdoc::contents]

And key lines from testdoc2.tex are
\page[yes]
\section[contents]{Contents List}

TIA
-- 
Nigel


[-- Attachment #2: testdoc2.aux --]
[-- Type: application/octet-stream, Size: 88 bytes --]

\citation{*}
\bibstyle{cont-no}
\bibdata{/Users/nigelk/Library/texmf/tex/context/Nigel}

[-- Attachment #3: linktest1.tex --]
[-- Type: text/plain, Size: 924 bytes --]

%!iTeXMac(project): contextquick
\setupoutput[pdftex]
\setupcolors[state=start]
\setupinteraction[state=start,color=darkgreen,style=bold]
\usetypescriptfile[adobekb]
\setupencoding [default=8r]
\usetypescript[adobekb][\defaultencoding]
\usetypescript[times][\defaultencoding]
\setupbodyfont[times]

\useexternaldocument[testdoc][testdoc2][This document is a test link]
%\setuptyping[buffer][margin=default]
\startbuffer[test]
The various references are \from[testdoc]. The contents list 
is found on page \from[testdoc::contents]. A description of 
the \goto{contents}[testdoc::contents] is found in 
\from[testdoc]. The contents are described on 
\at{page}[testdoc::contents] in \from[testdoc]. See for more 
information \in{chapter}[testdoc::contents] in \from[testdoc].
\stopbuffer

\starttext
This document tests a hyperlink to another document and its internal references.

\typebuffer[test]

\getbuffer[test]
\stoptext

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

* \placefigure[left] aligning with second line
  2003-08-12  8:29 Hyperlinks to locations in other documents Nigel King
@ 2003-08-12 11:11 ` Duncan Hothersall
  2003-08-12 11:20   ` Duncan Hothersall
                     ` (2 more replies)
  2003-08-15  8:58 ` Hyperlinks to locations in other documents-repost Nigel King
  1 sibling, 3 replies; 12+ messages in thread
From: Duncan Hothersall @ 2003-08-12 11:11 UTC (permalink / raw)


Hello all.

Apologies for this question which I'm sure has an answer in the manual but I
have been trying to understand the figures chapter for a while now and can't
get my head around it. (Also looked in the mail archives on
http://ml-archives.mini.pw.edu.pl/ntg-context.html but the search facility
is still returning weird results.)

When I use \placefigure[left] the top of the figure is aligned with the
second line of the text. I would like it to be aligned with the first line.
If you look at the example on page 243/4 of the manual you can see it
happening there too:

\placefigure[left]{none}{\externalfigure[bkoe]}
Some text here...

As is seen in the manual, the cow is aligned with the second line of text,
rather than the first. Can anyone help me to move it up?

Thank you.

Duncan
dh@capdm.com

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

* RE: \placefigure[left] aligning with second line
  2003-08-12 11:11 ` \placefigure[left] aligning with second line Duncan Hothersall
@ 2003-08-12 11:20   ` Duncan Hothersall
  2003-08-12 11:31   ` Bill McClain
  2003-08-12 14:33   ` \placefigure[left] aligning with second line Hans Hagen
  2 siblings, 0 replies; 12+ messages in thread
From: Duncan Hothersall @ 2003-08-12 11:20 UTC (permalink / raw)


I wrote:

> When I use \placefigure[left] the top of the figure is aligned 
> with the second line of the text. I would like it to be aligned 
> with the first line. If you look at the example on page 243/4 of 
> the manual you can see it happening there too:

And then immediately afterwards I tried 

\setupfloats[spacebefore=,spaceafter=]

and the unwanted space went away.

Sorry for the noise!

Duncan
dh@capdm.com

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

* Re: \placefigure[left] aligning with second line
  2003-08-12 11:11 ` \placefigure[left] aligning with second line Duncan Hothersall
  2003-08-12 11:20   ` Duncan Hothersall
@ 2003-08-12 11:31   ` Bill McClain
  2003-08-12 14:31     ` \placefigure[left] again! Duncan Hothersall
  2003-08-12 14:33   ` \placefigure[left] aligning with second line Hans Hagen
  2 siblings, 1 reply; 12+ messages in thread
From: Bill McClain @ 2003-08-12 11:31 UTC (permalink / raw)


On Tue, 12 Aug 2003 12:11:47 +0100
"Duncan Hothersall" <dh@capdm.com> wrote:

> As is seen in the manual, the cow is aligned with the second line of
> text, rather than the first. Can anyone help me to move it up?

Try adjusting spacing with \setupfloats. I've used this in the past:

\setupfloats[spacebefore=0pt, spaceafter=0pt, sidespacebefore=0pt,
sidespaceafter=0pt, margin=4pt]

-Bill
-- 
Sattre Press                                The King in Yellow
http://sattre-press.com/                 by Robert W. Chambers
info@sattre-press.com             http://kiy.sattre-press.com/ 

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

* \placefigure[left] again!
  2003-08-12 11:31   ` Bill McClain
@ 2003-08-12 14:31     ` Duncan Hothersall
  2003-08-12 14:48       ` Bill McClain
  0 siblings, 1 reply; 12+ messages in thread
From: Duncan Hothersall @ 2003-08-12 14:31 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1215 bytes --]

I'm having another problem with \placefigure[left] and this time I'm pretty
sure I can't solve it myself.

I'm using ConTeXt ver 2003.7.21 on a TeXlive base with pdfetex
3.14159-1.00b-pretest-20020211-2.1 (Web2C 7.3.7).

The following source overlaps the text on top of the graphic rather than
wrapping it around:

--ConTeXt start--
\setupoutput[pdftex]\setuppapersize[A4][A4]
\useexternalfigure[HWUnodic][hwu-bk-nodic][width=9mm]
\setupfloats[spacebefore=,spaceafter=]
\starttext
\placefigure[left]{none}{\externalfigure[HWUnodic]}
{\bf Do not use a dictionary. You do not need to know the meaning of every
word to do this task.}

\stoptext
--ConTeXt end--

If I remove the {\bf and the closing } then the graphic displays properly.
If I add a \par before the closing } it works properly too. However, since
I'm generating the ConTeXt code from XML, I can't do either of those
work-arounds.

Interestingly, it remains broken even if the \bf isn't there, just the open
and close braces. So presumably this is something to do with the expansion
of what comes after the \placefigure?

Is this a bug?

I have attached the graphic in case people are able to test this for
themselves.

Many thanks,

Duncan
dh@capdm.com

[-- Attachment #2: hwu-bk-nodic.pdf --]
[-- Type: application/pdf, Size: 4425 bytes --]

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

* Re: \placefigure[left] aligning with second line
  2003-08-12 11:11 ` \placefigure[left] aligning with second line Duncan Hothersall
  2003-08-12 11:20   ` Duncan Hothersall
  2003-08-12 11:31   ` Bill McClain
@ 2003-08-12 14:33   ` Hans Hagen
  2 siblings, 0 replies; 12+ messages in thread
From: Hans Hagen @ 2003-08-12 14:33 UTC (permalink / raw)


At 12:11 12/08/2003 +0100, Duncan Hothersall wrote:

>When I use \placefigure[left] the top of the figure is aligned with the
>second line of the text. I would like it to be aligned with the first line.
>If you look at the example on page 243/4 of the manual you can see it
>happening there too:
>
>\placefigure[left]{none}{\externalfigure[bkoe]}
>Some text here...
>
>As is seen in the manual, the cow is aligned with the second line of text,
>rather than the first. Can anyone help me to move it up?

this is explained in details.pdf (keywords, key/val pairs)

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
-------------------------------------------------------------------------

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

* Re: \placefigure[left] again!
  2003-08-12 14:31     ` \placefigure[left] again! Duncan Hothersall
@ 2003-08-12 14:48       ` Bill McClain
  2003-08-12 15:13         ` Duncan Hothersall
  0 siblings, 1 reply; 12+ messages in thread
From: Bill McClain @ 2003-08-12 14:48 UTC (permalink / raw)


On Tue, 12 Aug 2003 15:31:44 +0100
"Duncan Hothersall" <dh@capdm.com> wrote:

> Interestingly, it remains broken even if the \bf isn't there, just the
> open and close braces. So presumably this is something to do with the
> expansion of what comes after the \placefigure?

I ran into this also and wrote:

>I've found that it has to do with the content of my text. Any paragraph
>beginning with a block does not flow properly. The best workaround I
>have found is to insert a \strut at the beginning of the text where it
>starts with a block.

To which Hans replied:

> right, this is a known weakness: if you start a par with a \command,
> you may end up with yes/no indentation or some everypar interference
> (can for instance be due to the fact that the command can start a
> group and aftergroup things can be messed up), your \strut solution is
> ok (\indent\ noindent or \dontleavehmode is also ok), since they start
> the paragraph

So begin your text with:

    \strut {\bf ....}

or one of the other commands. \strut is a zero-width character.

-Bill
-- 
Sattre Press                                The King in Yellow
http://sattre-press.com/                 by Robert W. Chambers
info@sattre-press.com             http://kiy.sattre-press.com/ 

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

* RE: \placefigure[left] again!
  2003-08-12 14:48       ` Bill McClain
@ 2003-08-12 15:13         ` Duncan Hothersall
  0 siblings, 0 replies; 12+ messages in thread
From: Duncan Hothersall @ 2003-08-12 15:13 UTC (permalink / raw)


Bill wrote:

> So begin your text with:
>
>     \strut {\bf ....}
>
> or one of the other commands. \strut is a zero-width character.

Excellent, thanks. I had experimented with just {}, and even \,\! but the
problem remained. This solves it, thanks a lot.

Duncan
dh@capdm.com

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

* Hyperlinks to locations in other documents-repost
  2003-08-12  8:29 Hyperlinks to locations in other documents Nigel King
  2003-08-12 11:11 ` \placefigure[left] aligning with second line Duncan Hothersall
@ 2003-08-15  8:58 ` Nigel King
  2003-08-15  9:43   ` Hans Hagen
  1 sibling, 1 reply; 12+ messages in thread
From: Nigel King @ 2003-08-15  8:58 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 786 bytes --]

Guys,
Sorry to repost this but do the rest of you manage to hyperlink to locations
in other documents successfully, this is a small annoyance which I would
really like to solve.

Best Regards
-- 
Nigel

Hi,
I am trying to get a group of documents to link together. The references to
the other document work but the hyperlinks only open the document on the
first page.

What am I doing wrong?

The linktest1 has links to testdoc2. For those trying them you may need to
change the font part since my fonts are non standard (subject of other
problems).

Key lines from testdoc1.tex are
\useexternaldocument[testdoc][testdoc2][This document is a test link]
\goto{contents}[testdoc::contents]

And key lines from testdoc2.tex are
\page[yes]
\section[contents]{Contents List}

TIA
-- 
Nigel


[-- Attachment #2: testdoc2.aux --]
[-- Type: application/octet-stream, Size: 88 bytes --]

\citation{*}
\bibstyle{cont-no}
\bibdata{/Users/nigelk/Library/texmf/tex/context/Nigel}

[-- Attachment #3: linktest1.tex --]
[-- Type: text/plain, Size: 924 bytes --]

%!iTeXMac(project): contextquick
\setupoutput[pdftex]
\setupcolors[state=start]
\setupinteraction[state=start,color=darkgreen,style=bold]
\usetypescriptfile[adobekb]
\setupencoding [default=8r]
\usetypescript[adobekb][\defaultencoding]
\usetypescript[times][\defaultencoding]
\setupbodyfont[times]

\useexternaldocument[testdoc][testdoc2][This document is a test link]
%\setuptyping[buffer][margin=default]
\startbuffer[test]
The various references are \from[testdoc]. The contents list 
is found on page \from[testdoc::contents]. A description of 
the \goto{contents}[testdoc::contents] is found in 
\from[testdoc]. The contents are described on 
\at{page}[testdoc::contents] in \from[testdoc]. See for more 
information \in{chapter}[testdoc::contents] in \from[testdoc].
\stopbuffer

\starttext
This document tests a hyperlink to another document and its internal references.

\typebuffer[test]

\getbuffer[test]
\stoptext

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

* Re: Hyperlinks to locations in other documents-repost
  2003-08-15  8:58 ` Hyperlinks to locations in other documents-repost Nigel King
@ 2003-08-15  9:43   ` Hans Hagen
  2003-08-15 18:29     ` Nigel King
  2003-09-03 17:18     ` Patrick Gundlach
  0 siblings, 2 replies; 12+ messages in thread
From: Hans Hagen @ 2003-08-15  9:43 UTC (permalink / raw)


At 09:58 15/08/2003 +0100, you wrote:
>Guys,
>Sorry to repost this but do the rest of you manage to hyperlink to locations
>in other documents successfully, this is a small annoyance which I would
>really like to solve.
>
>Best Regards
>--
>Nigel
>
>Hi,
>I am trying to get a group of documents to link together. The references to
>the other document work but the hyperlinks only open the document on the
>first page.
>
>What am I doing wrong?
>
>The linktest1 has links to testdoc2. For those trying them you may need to
>change the font part since my fonts are non standard (subject of other
>problems).
>
>Key lines from testdoc1.tex are
>\useexternaldocument[testdoc][testdoc2][This document is a test link]
>\goto{contents}[testdoc::contents]
>
>And key lines from testdoc2.tex are
>\page[yes]
>\section[contents]{Contents List}

I made a small test file

\setupoutput[pdftex] \pdfcompresslevel=0

\setupinteraction[state=start]

\starttext

\chapter[one]{One}

\goto {document} [testtest::]

\goto {chapter 2} [testtest::two]

\chapter[two]{Two}

nothing here

\stoptext


(and its mirror testtest.tex)

Now, somehow this works in acrobat 5 but not in acrobat 6! Creating a link 
in acrobat 6 manually also does not work. Looks like a bug in acrobat 6, 
but before i look into it in more detail i want confirmation from other users

(an option is to cross link docs by page number)

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
-------------------------------------------------------------------------

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

* Re: Hyperlinks to locations in other documents-repost
  2003-08-15  9:43   ` Hans Hagen
@ 2003-08-15 18:29     ` Nigel King
  2003-09-03 17:18     ` Patrick Gundlach
  1 sibling, 0 replies; 12+ messages in thread
From: Nigel King @ 2003-08-15 18:29 UTC (permalink / raw)


Hans,

> From: Hans Hagen <pragma@wxs.nl>
> At 09:58 15/08/2003 +0100, you wrote:
>> Guys,
>> Sorry to repost this but do the rest of you manage to hyperlink to locations
>> in other documents successfully, this is a small annoyance which I would
>> really like to solve.
>> 
>> Best Regards
>> --
>> Nigel
>> 
>> Hi,
>> I am trying to get a group of documents to link together. The references to
>> the other document work but the hyperlinks only open the document on the
>> first page.
>> 
>> What am I doing wrong?
>> 
>> The linktest1 has links to testdoc2. For those trying them you may need to
>> change the font part since my fonts are non standard (subject of other
>> problems).
>> 
>> Key lines from testdoc1.tex are
>> \useexternaldocument[testdoc][testdoc2][This document is a test link]
>> \goto{contents}[testdoc::contents]
>> 
>> And key lines from testdoc2.tex are
>> \page[yes]
>> \section[contents]{Contents List}
> 
> I made a small test file
> 
> \setupoutput[pdftex] \pdfcompresslevel=0
> 
> \setupinteraction[state=start]
> 
> \starttext
> 
> \chapter[one]{One}
> 
> \goto {document} [testtest::]
> 
> \goto {chapter 2} [testtest::two]
> 
> \chapter[two]{Two}
> 
> nothing here
> 
> \stoptext
> 
> 
> (and its mirror testtest.tex)
> 
> Now, somehow this works in acrobat 5 but not in acrobat 6! Creating a link
> in acrobat 6 manually also does not work. Looks like a bug in acrobat 6,
> but before i look into it in more detail i want confirmation from other users

I confirm that the problem does appear to be Acrobat which at 4.05 does the
expected actions and at 6 does not. I no longer have 5 to test.

> 
> (an option is to cross link docs by page number)

I haven't tried cross linking by page numbers because I do not think I know
how to do it!

Thanks very much.

Nigel

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

* Re: Hyperlinks to locations in other documents-repost
  2003-08-15  9:43   ` Hans Hagen
  2003-08-15 18:29     ` Nigel King
@ 2003-09-03 17:18     ` Patrick Gundlach
  1 sibling, 0 replies; 12+ messages in thread
From: Patrick Gundlach @ 2003-09-03 17:18 UTC (permalink / raw)


Hi,

Hans Hagen <pragma@wxs.nl> writes:
> I made a small test file
> \setupoutput[pdftex] \pdfcompresslevel=0
> \setupinteraction[state=start]
> \starttext
> \chapter[one]{One}
> \goto {document} [testtest::]
> \goto {chapter 2} [testtest::two]
> \chapter[two]{Two}
> nothing here
> \stoptext

> (and its mirror testtest.tex)
>
> Now, somehow this works in acrobat 5 but not in acrobat 6! Creating a
> link in acrobat 6 manually also does not work. Looks like a bug in
> acrobat 6, but before i look into it in more detail i want
> confirmation from other users

Same here. The document gets opened, but the page with "Chapter 2" is
not selected. 

Both Acrobat/Adobe reader on Mac OS X.

Patrick

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

end of thread, other threads:[~2003-09-03 17:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-12  8:29 Hyperlinks to locations in other documents Nigel King
2003-08-12 11:11 ` \placefigure[left] aligning with second line Duncan Hothersall
2003-08-12 11:20   ` Duncan Hothersall
2003-08-12 11:31   ` Bill McClain
2003-08-12 14:31     ` \placefigure[left] again! Duncan Hothersall
2003-08-12 14:48       ` Bill McClain
2003-08-12 15:13         ` Duncan Hothersall
2003-08-12 14:33   ` \placefigure[left] aligning with second line Hans Hagen
2003-08-15  8:58 ` Hyperlinks to locations in other documents-repost Nigel King
2003-08-15  9:43   ` Hans Hagen
2003-08-15 18:29     ` Nigel King
2003-09-03 17:18     ` Patrick Gundlach

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).