ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* reference formatting
@ 2006-06-22 14:13 Hans van der Meer
  2006-06-22 21:13 ` Aditya Mahajan
  0 siblings, 1 reply; 4+ messages in thread
From: Hans van der Meer @ 2006-06-22 14:13 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 553 bytes --]

With \definereferenceformat[pin][left=(,right=)] it is possible to  
typeset references with
	\pin[ref] and get "(ref)"

I have two questions in this respect:

1. is it possible to change the general setup in the same way,
	e.g. let \in[ref] do the same as \pin[ref] here.
	The left and right are not in setupreferencing.

2. some strange interchange takes place when using \pin{A}{B}[ref].
	Instead of the expected "A (ref) B" one gets "A (refB);
	it therefore seems the right parenthesis from the setup comes too  
late in play.

Hans van der Meer




[-- Attachment #1.2: Type: text/html, Size: 2730 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

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

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

* Re: reference formatting
  2006-06-22 14:13 reference formatting Hans van der Meer
@ 2006-06-22 21:13 ` Aditya Mahajan
  2006-06-23  9:04   ` Hans van der Meer
  0 siblings, 1 reply; 4+ messages in thread
From: Aditya Mahajan @ 2006-06-22 21:13 UTC (permalink / raw)




On Thu, 22 Jun 2006, Hans van der Meer wrote:

> With \definereferenceformat[pin][left=(,right=)] it is possible to typeset 
> references with
> 	\pin[ref] and get "(ref)"
>
> I have two questions in this respect:
>
> 1. is it possible to change the general setup in the same way,
> 	e.g. let \in[ref] do the same as \pin[ref] here.
> 	The left and right are not in setupreferencing.


Don't know about this.

> 2. some strange interchange takes place when using \pin{A}{B}[ref].
> 	Instead of the expected "A (ref) B" one gets "A (refB);
> 	it therefore seems the right parenthesis from the setup comes too 
> late in play.

As I understand referencing, this is the expected behaviour. I think 
that \in{..}{..}[...] was for things like

As seen in \in{Figure}{a}[fig]...

that is when you want to refer to a subfigure (or a subformula). That is 
why there is no space between the number and the content in the second 
{..}

This is what core-ref.tex says

%D \placefigure
%D   [here][three calls]
%D   {Three alternatives reference calls.}
%D   {\startcombination[1*3]
%D      {\framed{\type{ \in }}} {a}
%D      {\framed{\type{ \at }}} {b}
%D      {\framed{\type{\goto}}} {c}
%D    \stopcombination}
%D
%D \startbuffer
%D \in figure[fig:three calls]
%D \in{figure}[fig:three calls]
%D \in figure a[fig:three calls]
%D \in{figure}{a}[fig:three calls]
%D figure~\in[fig:three calls]
%D \stopbuffer
%D
%D \typebuffer
%D
%D This turns up as:
%D
%D \startlines
%D \getbuffer
%D \stoplines

I was not aware of that the braces around figure can be omitted!


Aditya

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

* Re: reference formatting
  2006-06-22 21:13 ` Aditya Mahajan
@ 2006-06-23  9:04   ` Hans van der Meer
  2006-06-23 14:43     ` Aditya Mahajan
  0 siblings, 1 reply; 4+ messages in thread
From: Hans van der Meer @ 2006-06-23  9:04 UTC (permalink / raw)



On Jun 22, 2006, at 23:13, Aditya Mahajan wrote:

>
>
> On Thu, 22 Jun 2006, Hans van der Meer wrote:
>
>> With \definereferenceformat[pin][left=(,right=)] it is possible to  
>> typeset
>> references with
>> 	\pin[ref] and get "(ref)"
>>
>> I have two questions in this respect:
>>
>> 1. is it possible to change the general setup in the same way,
>> 	e.g. let \in[ref] do the same as \pin[ref] here.
>> 	The left and right are not in setupreferencing.
>

I finally came up with this, a bit of a kludge I admit:
\let\originalin=\in
\definereferenceformat[parenthesizedin][left=(,right=),command= 
\originalin]
\let\in=\parenthesizedin

>
> Don't know about this.
>
>> 2. some strange interchange takes place when using \pin{A}{B}[ref].
>> 	Instead of the expected "A (ref) B" one gets "A (refB);
>> 	it therefore seems the right parenthesis from the setup comes too
>> late in play.
>
> As I understand referencing, this is the expected behaviour. I think
> that \in{..}{..}[...] was for things like
>
> As seen in \in{Figure}{a}[fig]...
>
> that is when you want to refer to a subfigure (or a subformula).  
> That is
> why there is no space between the number and the content in the second
> {..}
>

I has not understood it that way, but thought it was meant to enclose  
the whole reference. I see the point now.

Hans van der Meer

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

* Re: reference formatting
  2006-06-23  9:04   ` Hans van der Meer
@ 2006-06-23 14:43     ` Aditya Mahajan
  0 siblings, 0 replies; 4+ messages in thread
From: Aditya Mahajan @ 2006-06-23 14:43 UTC (permalink / raw)


On Fri, 23 Jun 2006, Hans van der Meer wrote:

>
> On Jun 22, 2006, at 23:13, Aditya Mahajan wrote:
>
>>
>>
>> On Thu, 22 Jun 2006, Hans van der Meer wrote:
>>
>>> With \definereferenceformat[pin][left=(,right=)] it is possible to
>>> typeset
>>> references with
>>> 	\pin[ref] and get "(ref)"
>>>
>>> I have two questions in this respect:
>>>
>>> 1. is it possible to change the general setup in the same way,
>>> 	e.g. let \in[ref] do the same as \pin[ref] here.
>>> 	The left and right are not in setupreferencing.
>>
>
> I finally came up with this, a bit of a kludge I admit:
> \let\originalin=\in
> \definereferenceformat[parenthesizedin][left=(,right=),command=
> \originalin]
> \let\in=\parenthesizedin

Be careful with this. There are two places in the source that use \in 
command. You will get parenthesis around them also.

If you do not use those commands (\inline and I do not remember the 
second one, I checked that yesterday), then even

\definereferenceformat[in][left=(,right=)] should work.



>>> 2. some strange interchange takes place when using \pin{A}{B}[ref].
>>> 	Instead of the expected "A (ref) B" one gets "A (refB);
>>> 	it therefore seems the right parenthesis from the setup comes too
>>> late in play.
>>
>> As I understand referencing, this is the expected behaviour. I think
>> that \in{..}{..}[...] was for things like
>>
>> As seen in \in{Figure}{a}[fig]...
>>
>> that is when you want to refer to a subfigure (or a subformula).
>> That is
>> why there is no space between the number and the content in the second
>> {..}
>>
>
> I has not understood it that way, but thought it was meant to enclose
> the whole reference. I see the point now.
>
> Hans van der Meer
>
>
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>
>
>

-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008

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

end of thread, other threads:[~2006-06-23 14:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-22 14:13 reference formatting Hans van der Meer
2006-06-22 21:13 ` Aditya Mahajan
2006-06-23  9:04   ` Hans van der Meer
2006-06-23 14:43     ` Aditya Mahajan

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