Ah, it's "impLode" in the last line? :) Still it's not working. Just
gives me ^1 in main and \n\n in the footer. Let's see if I can fix it.

On Oct 31, 5:45 pm, Markus <[email protected]> wrote:
> Wow, thanks a lot!
>
> Shouldn't I be able to make this a working plugin by:
> - putting it in a php file in the plugin folder
> - adding <?php if (!defined('BOLTWIRE')) exit(); at the beginning of
> the file
> - prepending BOLTF to both function names?
>
> Regards, Markus
>
> On Oct 31, 4:35 pm, DrunkenMonk <[email protected]> wrote:
>
>
>
> > I can think of a way, but it involves a custom function, or a markup.
>
> > Below is an example. It would be fairly trivial I'm sure to turn it
> > into a markup instead. I just prefer using functions.
>
> > use [(cite "a citation, author etc")] to cite something in the main
> > body
> > use [(references)] to make a rather list of citations, Probably in a
> > footer.
>
> > ----
>
> > function cite($args, $field='') {
> >   global $citenr, $citelist;
> >   $citation = $args[1];
>
> >   if( in_array($citation, $citelist) ) $thecitenr = array_search
> > ($citation);
> >   else {
> >     $citenr += 1;
> >     $thecitenr = $citenr;
> >   }
> >   $citelist[] = "[[{p}#citationanchor$thecitenr|$citation]";
> >   return "^$thecitenr^[[#citationanchor$thecitenr]]";
>
> > }
>
> > function references($args, $field) {
> >   global $citelist;
> >   return '\n'.impode($citelist);
>
> > }
>
> > ----
>
> > On Oct 31, 11:45 am, Markus <[email protected]> wrote:
>
> > > Is there a good way to cite scientific literature? I tried the
> > > footnotes markup but I only got some superscripted text without a link
> > > being created. Manually it gets quite tedious. I came up with this:
>
> > > Some text.[[{p}#1|`[1`]]]
>
> > > !! References
> > > [[#1|`[1`]]] Author etc.
>
> > > Wikipedia does this in an elegant and smart way. For 
> > > example:http://en.wikipedia.org/wiki/Wiki#References
>
> > > To create a link like [1] in the text to the references section:
> > > Some text.<ref>Author, link etc.</ref>
>
> > > This also creates an anchor to jump back from the references section.
> > > The reference section is a numbered list and each reference has a
> > > leading "^" to jump back to the text position where the reference is
> > > referenced. The numbering and link/anchor creation happens
> > > automatically.
>
> > > Regards, Markus
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to