ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* relative references?
@ 2013-07-02 15:30 Steffen Kram
  2013-07-04 10:07 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Steffen Kram @ 2013-07-02 15:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello,

is it possible to reference parts of a document in a "relative" style?

My structure is as follows:

\startproduct
…
\startbodymatter
  \component chapterFoo/main
  \component chapterBar/main
\stopbodymatter
… 
\stopproduct

Each of my chapters uses \chapter, \section … \subsubsubsection markers. I would like to use references for each of them.


Is it possible to reference for example the subsection "Foo AA" from the chapter start with an relative reference such as 

\chapter[sec:foo]{Foo}

\in[fooA:fooAA]

\section[fooA]{Foo A}

\subsection[fooAA]{Foo AA}


but when referencing it from the second chapter use a absolute reference:

\chapter[sec:bar]{Bar}

\in[sec:foo:fooA:fooAA] …

Is this possible? Or must I use absolute references and identifiers everywhere?

Cheers,
Steffen
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: relative references?
  2013-07-02 15:30 relative references? Steffen Kram
@ 2013-07-04 10:07 ` Wolfgang Schuster
  2013-07-07 14:13   ` Steffen Kram
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2013-07-04 10:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 02.07.2013 um 17:30 schrieb Steffen Kram <sk@kram.io>:

> Hello,
> 
> is it possible to reference parts of a document in a "relative" style?
> 
> My structure is as follows:
> 
> \startproduct
> …
> \startbodymatter
>  \component chapterFoo/main
>  \component chapterBar/main
> \stopbodymatter
> … 
> \stopproduct
> 
> Each of my chapters uses \chapter, \section … \subsubsubsection markers. I would like to use references for each of them.
> 
> 
> Is it possible to reference for example the subsection "Foo AA" from the chapter start with an relative reference such as 
> 
> \chapter[sec:foo]{Foo}
> 
> \in[fooA:fooAA]
> 
> \section[fooA]{Foo A}
> 
> \subsection[fooAA]{Foo AA}
> 
> 
> but when referencing it from the second chapter use a absolute reference:
> 
> \chapter[sec:bar]{Bar}
> 
> \in[sec:foo:fooA:fooAA] …
> 
> Is this possible? Or must I use absolute references and identifiers everywhere?

Take a look at page 149ff at the context manual [1] where this is described.

[1] http://www.pragma-ade.nl/show-man-9.htm

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: relative references?
  2013-07-04 10:07 ` Wolfgang Schuster
@ 2013-07-07 14:13   ` Steffen Kram
  0 siblings, 0 replies; 3+ messages in thread
From: Steffen Kram @ 2013-07-07 14:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Wolfgang,

I already tried using \setuphead[…][prefix=+], this are my definitions:

\setuphead [chapter][command=\ChapterCmd, style={\ss\bfc}, page=right, number=yes, frame=off, placehead=yes, align=left, before={}, after={\blank[3*line]}, header=nomarking, prefix=+]
\setuphead [section][style={\ss\bfb}, page=no, number=yes, frame=off, placehead=yes, align=right, before={\testpage[6]\blank[2*line]}, after={\blank}, prefix=+]
\setuphead [subsection][style={\ss\bfa}, page=no, number=yes, frame=off, placehead=yes, align=right, before={\testpage[6]\blank[line]}, after={}, prefix=+]

But I can't get cross-chapter reference to work, e.g. a subsection in my second chapter is defined as 

\chapter[basics]{foo}
…
\section[development]{bar}


referencing this from my fourth chapter with

\in{Abschnitt}[basics:development]

just produces "Abschnitt ??". Have I set up something wrong?

Thanks!
Steffen



Am 04.07.2013 um 12:07 schrieb Wolfgang Schuster <schuster.wolfgang@gmail.com>:

> 
> Am 02.07.2013 um 17:30 schrieb Steffen Kram <sk@kram.io>:
> 
>> Hello,
>> 
>> is it possible to reference parts of a document in a "relative" style?
>> 
>> My structure is as follows:
>> 
>> \startproduct
>> …
>> \startbodymatter
>> \component chapterFoo/main
>> \component chapterBar/main
>> \stopbodymatter
>> … 
>> \stopproduct
>> 
>> Each of my chapters uses \chapter, \section … \subsubsubsection markers. I would like to use references for each of them.
>> 
>> 
>> Is it possible to reference for example the subsection "Foo AA" from the chapter start with an relative reference such as 
>> 
>> \chapter[sec:foo]{Foo}
>> 
>> \in[fooA:fooAA]
>> 
>> \section[fooA]{Foo A}
>> 
>> \subsection[fooAA]{Foo AA}
>> 
>> 
>> but when referencing it from the second chapter use a absolute reference:
>> 
>> \chapter[sec:bar]{Bar}
>> 
>> \in[sec:foo:fooA:fooAA] …
>> 
>> Is this possible? Or must I use absolute references and identifiers everywhere?
> 
> Take a look at page 149ff at the context manual [1] where this is described.
> 
> [1] http://www.pragma-ade.nl/show-man-9.htm
> 
> Wolfgang
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
> 

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2013-07-07 14:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-02 15:30 relative references? Steffen Kram
2013-07-04 10:07 ` Wolfgang Schuster
2013-07-07 14:13   ` Steffen Kram

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