ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \startquotation, \cite and footnotes
@ 2006-12-02 12:49 Oliver Buerschaper
  2006-12-03 14:14 ` Taco Hoekwater
  0 siblings, 1 reply; 10+ messages in thread
From: Oliver Buerschaper @ 2006-12-02 12:49 UTC (permalink / raw)


Hi,

I've been wondering whether someone (perhaps Taco?) can give me a  
hint on the following:

1. Is there an automated way to place citations into footnotes? So  
whenever I use \cite in the running text it should produce a footnote  
with the reference alongside the usual footnotes. However, when \cite  
is invoked within a footnote it should just type out the reference  
inline (in the footnote, of course ;-). So far I've done this  
manually with \footnote{\cite{key}} (which at times produced its own  
strange results like two footnote blocks on the same page).

2. When typesetting a quotation block I'd like to add a reference  
directly after the closing quotation marks. However, including the  
\cite command before \stopquotation places the reference before the  
closing marks, and moving \cite out of the \start \stop block makes  
the reference appear on a new line ...

Any help highly appreciated!

Cheers,
Oliver

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

* Re: \startquotation, \cite and footnotes
  2006-12-02 12:49 \startquotation, \cite and footnotes Oliver Buerschaper
@ 2006-12-03 14:14 ` Taco Hoekwater
  2006-12-03 21:18   ` Oliver Buerschaper
  0 siblings, 1 reply; 10+ messages in thread
From: Taco Hoekwater @ 2006-12-03 14:14 UTC (permalink / raw)


Oliver Buerschaper wrote:
> Hi,
> 
> I've been wondering whether someone (perhaps Taco?) can give me a  
> hint on the following:
> 
> 1. Is there an automated way to place citations into footnotes? So  
> whenever I use \cite in the running text it should produce a footnote  
> with the reference alongside the usual footnotes. However, when \cite  
> is invoked within a footnote it should just type out the reference  
> inline (in the footnote, of course ;-). So far I've done this  
> manually with \footnote{\cite{key}} (which at times produced its own  
> strange results like two footnote blocks on the same page).

There is no other way. If you strangeness as a result from this,
then it is a bug in the footnote handling that is (should be)
unrelated to the bibliography module.

> 2. When typesetting a quotation block I'd like to add a reference  
> directly after the closing quotation marks. However, including the  
> \cite command before \stopquotation places the reference before the  
> closing marks, and moving \cite out of the \start \stop block makes  
> the reference appear on a new line ...

The next solution is a bit rude, but works:

   % First define an internal version of quotations. It will
   % typeset the contents of the macro \MyMagic at the end,
   % just after the symbol.
   %
   \definedelimitedtext
     [myquotation]
     [left={\symbol[leftquotation]},
      right={\symbol[rightquotation]\MyMagic},
      leftmargin=standard]

   % And this is simply a wrapper for ease of use
   %
   \long\def\startcitedquotation[#1]#2\stopcitedquotation
     {\bgroup
      \def\MyMagic{~\cite[#1]}
      \startmyquotation #2\stopmyquotation
      \egroup}

   % usage:

   \starttext

   \startcitedquotation[schmitz2006]
   overly beautiful pusillanimous sesquipedalian longwinded
   \stopcitedquotation

   \stoptext

Best, Taco

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

* Re: \startquotation, \cite and footnotes
  2006-12-03 14:14 ` Taco Hoekwater
@ 2006-12-03 21:18   ` Oliver Buerschaper
  2006-12-04  9:51     ` Taco Hoekwater
  0 siblings, 1 reply; 10+ messages in thread
From: Oliver Buerschaper @ 2006-12-03 21:18 UTC (permalink / raw)


Thanks very much for your suggestion, Taco!

I'm afraid it doesn't seem to work quite as expected, however :- 
( Could you have a look below?

>> Hi,
>>
>> I've been wondering whether someone (perhaps Taco?) can give me a
>> hint on the following:
>>
>> 1. Is there an automated way to place citations into footnotes? So
>> whenever I use \cite in the running text it should produce a footnote
>> with the reference alongside the usual footnotes. However, when \cite
>> is invoked within a footnote it should just type out the reference
>> inline (in the footnote, of course ;-). So far I've done this
>> manually with \footnote{\cite{key}} (which at times produced its own
>> strange results like two footnote blocks on the same page).
>
> There is no other way. If you strangeness as a result from this,
> then it is a bug in the footnote handling that is (should be)
> unrelated to the bibliography module.

Ok. As for the strange things happening I was able to hunt them down  
and prepare a simple example (still with the standard \startquotation):

---

\usemodule [bib]

\startpublication[k=akey,t=book,a={{Ody}},y=2006]
\author{Some}{B.}{Ody}
\pubyear{2006}
\stoppublication


\starttext

\input tufte
\footnote{\cite[akey]}

\startquotation
\input tufte
\footnote{\cite[akey]}
\stopquotation

\startquotation
\input tufte
\stopquotation
\footnote{\cite[akey]}

\input ward

\startquotation
\input tufte
\stopquotation
\footnote{\cite[akey]}

\input ward
\footnote{\cite[akey]}

\stoptext

---

Please note what happens to the footnotes depending on whether the  
\cite command is before or after \stopquotation. Also when the narrow  
text block extends over a page boundary the ordering of the footnotes  
is mixed up ...

>> 2. When typesetting a quotation block I'd like to add a reference
>> directly after the closing quotation marks. However, including the
>> \cite command before \stopquotation places the reference before the
>> closing marks, and moving \cite out of the \start \stop block makes
>> the reference appear on a new line ...
>
> The next solution is a bit rude, but works:
>
>    % First define an internal version of quotations. It will
>    % typeset the contents of the macro \MyMagic at the end,
>    % just after the symbol.
>    %
>    \definedelimitedtext
>      [myquotation]
>      [left={\symbol[leftquotation]},
>       right={\symbol[rightquotation]\MyMagic},
>       leftmargin=standard]
>
>    % And this is simply a wrapper for ease of use
>    %
>    \long\def\startcitedquotation[#1]#2\stopcitedquotation
>      {\bgroup
>       \def\MyMagic{~\cite[#1]}
>       \startmyquotation #2\stopmyquotation
>       \egroup}
>
>    % usage:
>
>    \starttext
>
>    \startcitedquotation[schmitz2006]
>    overly beautiful pusillanimous sesquipedalian longwinded
>    \stopcitedquotation
>
>    \stoptext

I tried that one but ran into several problems unfortunately. If  
\cite inserts anything but a tiny string these words won't be wrapped  
properly onto a new line. Also if I replace \cite[#1] by \footnote 
{\cite[#1]} then there will be no footnote at all :-(

Oliver

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

* Re: \startquotation, \cite and footnotes
  2006-12-03 21:18   ` Oliver Buerschaper
@ 2006-12-04  9:51     ` Taco Hoekwater
  2006-12-06 20:26       ` Oliver Buerschaper
  0 siblings, 1 reply; 10+ messages in thread
From: Taco Hoekwater @ 2006-12-04  9:51 UTC (permalink / raw)




Oliver Buerschaper wrote:
>>
>>There is no other way. If you strangeness as a result from this,
>>then it is a bug in the footnote handling that is (should be)
>>unrelated to the bibliography module.
> 
> Ok. As for the strange things happening I was able to hunt them down  
> and prepare a simple example (still with the standard \startquotation):

We are looking into this. All footnotes in vertical mode are
behaving oddly.

> 
>>>2. When typesetting a quotation block I'd like to add a reference
>>>directly after the closing quotation marks. However, including the
>>>\cite command before \stopquotation places the reference before the
>>>closing marks, and moving \cite out of the \start \stop block makes
>>>the reference appear on a new line ...
>>
>>The next solution is a bit rude, but works:
...
> 
> I tried that one but ran into several problems unfortunately. If  
> \cite inserts anything but a tiny string these words won't be wrapped  
> properly onto a new line. Also if I replace \cite[#1] by \footnote 
> {\cite[#1]} then there will be no footnote at all :-(

The missing linebreak is probably realted to the problem as in the
other thread, so you just have to wait a little bit longer, until that
is fixed for this problem to magically go away as well.

The disappearing footnote may be unfixable within \startquotation. It 
would be easier to define your own start-stop pair for this, because
\startquotation ... \stopquotation doesn't actually support tacking on 
stuff at the end. Try this instead:

   \long\def\startcitedquotation[#1]#2\stopcitedquotation
       {\bgroup \par
        \startnarrower
          \symbol[leftquotation]%
          #2\removeunwantedspaces
          \symbol[rightquotation]%
          \cite[#1]
        \stopnarrower
        \par \egroup}

Greetings, Taco

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

* Re: \startquotation, \cite and footnotes
  2006-12-04  9:51     ` Taco Hoekwater
@ 2006-12-06 20:26       ` Oliver Buerschaper
  2006-12-07 18:11         ` new context release Taco Hoekwater
  0 siblings, 1 reply; 10+ messages in thread
From: Oliver Buerschaper @ 2006-12-06 20:26 UTC (permalink / raw)


>> Ok. As for the strange things happening I was able to hunt them down
>> and prepare a simple example (still with the standard  
>> \startquotation):
>
> We are looking into this. All footnotes in vertical mode are
> behaving oddly.

Thanks!

>> I tried that one but ran into several problems unfortunately. If
>> \cite inserts anything but a tiny string these words won't be wrapped
>> properly onto a new line. Also if I replace \cite[#1] by \footnote
>> {\cite[#1]} then there will be no footnote at all :-(
>
> The missing linebreak is probably realted to the problem as in the
> other thread, so you just have to wait a little bit longer, until that
> is fixed for this problem to magically go away as well.

Yep, I'll be waiting for some black magic ;-)

> The disappearing footnote may be unfixable within \startquotation. It
> would be easier to define your own start-stop pair for this, because
> \startquotation ... \stopquotation doesn't actually support tacking on
> stuff at the end. Try this instead:
>
>    \long\def\startcitedquotation[#1]#2\stopcitedquotation
>        {\bgroup \par
>         \startnarrower
>           \symbol[leftquotation]%
>           #2\removeunwantedspaces
>           \symbol[rightquotation]%
>           \cite[#1]
>         \stopnarrower
>         \par \egroup}

Works like a charm! Thanks very much for the workaround ... I've  
adapted it slightly so that the optional argument is treated as  
generic text ... in order to use \cite[], \footnote{\cite[]} or  
whatever else I need.

Could this optional argument perhaps be integrated directly in the  
usual \startquotation command some day? I guess a lot of people will  
need this ... every quotation calls for a proper reference ;-)

Cheers,
Oliver

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

* new context release.
  2006-12-06 20:26       ` Oliver Buerschaper
@ 2006-12-07 18:11         ` Taco Hoekwater
  2006-12-07 19:02           ` Renaud Aubin
  0 siblings, 1 reply; 10+ messages in thread
From: Taco Hoekwater @ 2006-12-07 18:11 UTC (permalink / raw)


Oliver Buerschaper wrote:
>>The missing linebreak is probably realted to the problem as in the
>>other thread, so you just have to wait a little bit longer, until that
>>is fixed for this problem to magically go away as well.
> 
   Yep, I'll be waiting for some black magic ;-)

There is a new current context that Hans uploaded just moments ago,
that should fix the line wrapping problem with \quotations. There
is some other stuff as well of course:

   http://wiki.contextgarden.net/Context_2006.12.07

has all the details.

Best, Taco

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

* Re: new context release.
  2006-12-07 18:11         ` new context release Taco Hoekwater
@ 2006-12-07 19:02           ` Renaud Aubin
  2006-12-07 22:27             ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Renaud Aubin @ 2006-12-07 19:02 UTC (permalink / raw)


Hi all,

I've always the same old problem described in Re: [NTG-context] enco-ffr 
? (03.12.2006 00:49), even with the latest ConTeXt...
Is there a way to solve these problems (since it could be nice to me to 
be able to process my PhD dissertation, particularly to write about it...)

TIA

Renaud

Taco Hoekwater a écrit :
>    Yep, I'll be waiting for some black magic ;-)
>
> There is a new current context that Hans uploaded just moments ago,
> that should fix the line wrapping problem with \quotations. There
> is some other stuff as well of course:
>
>    http://wiki.contextgarden.net/Context_2006.12.07
>
> has all the details.
>
> Best, Taco
>   

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

* Re: new context release.
  2006-12-07 19:02           ` Renaud Aubin
@ 2006-12-07 22:27             ` Hans Hagen
  2006-12-08 18:07               ` Renaud Aubin
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2006-12-07 22:27 UTC (permalink / raw)


Renaud Aubin wrote:
> Hi all,
>
> I've always the same old problem described in Re: [NTG-context] enco-ffr 
> ? (03.12.2006 00:49), even with the latest ConTeXt...
> Is there a way to solve these problems (since it could be nice to me to 
> be able to process my PhD dissertation, particularly to write about it...)
>   
i've forgotten what it was; i did fix the mp related semi colon stuff didn't I? 

Hans 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

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

* Re: new context release.
  2006-12-07 22:27             ` Hans Hagen
@ 2006-12-08 18:07               ` Renaud Aubin
  2006-12-08 18:11                 ` Renaud Aubin
  0 siblings, 1 reply; 10+ messages in thread
From: Renaud Aubin @ 2006-12-08 18:07 UTC (permalink / raw)


Hans Hagen a écrit :
> i've forgotten what it was; i did fix the mp related semi colon stuff didn't I? 
>   
Hi Hans,

You've add
\appendtoks
    \disablediscretionaries
    \disablecompoundcharacters
\to\everyMPgraphic
to meta-ini.tex

but the problem is persistent. Moreover, The following example raises 
another class of problem induced by the use of the semicolon with \in:

\useencoding[ffr]
\mainlanguage[fr]

\starttext

text:\blank
text;\blank
text?\blank
text!\blank

A sample table is given: \in{tableau}[tab:mytab].

\placetable[here][tab:mytab]{Test}{
\bTABLE
\bTR
\bTD test \eTD
\bTD test \eTD
\eTR
\eTABLE
}

\startuseMPgraphic{test}
numeric u;
u:=1cm;

draw origin--(10u,10u);
\stopuseMPgraphic

\useMPgraphic{test}

\stoptext


Renaud

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

* Re: new context release.
  2006-12-08 18:07               ` Renaud Aubin
@ 2006-12-08 18:11                 ` Renaud Aubin
  0 siblings, 0 replies; 10+ messages in thread
From: Renaud Aubin @ 2006-12-08 18:11 UTC (permalink / raw)


I forgot to precise that I use (if it can help):
This is pdfTeX, Version 3.141592-1.40.0-beta-20061017 (Web2C 7.5.5)
ConTeXt  ver: 2006.12.07 18:22 MK II  fmt: 2006.12.7  int: english/english
MetaPost 0.99 (Web2C 7.5.5)

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

end of thread, other threads:[~2006-12-08 18:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-02 12:49 \startquotation, \cite and footnotes Oliver Buerschaper
2006-12-03 14:14 ` Taco Hoekwater
2006-12-03 21:18   ` Oliver Buerschaper
2006-12-04  9:51     ` Taco Hoekwater
2006-12-06 20:26       ` Oliver Buerschaper
2006-12-07 18:11         ` new context release Taco Hoekwater
2006-12-07 19:02           ` Renaud Aubin
2006-12-07 22:27             ` Hans Hagen
2006-12-08 18:07               ` Renaud Aubin
2006-12-08 18:11                 ` Renaud Aubin

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