Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#49 2012-11-27 12:17:54

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: [textile] Textile 2.4 now available.

Gallex wrote:

found the devil! it was typo inside a <txp:rah_metas…/> code in the head section!

What kind of typo should we keep an eye on?


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#50 2012-11-27 12:52:10

Gallex
Member
Registered: 2006-10-08
Posts: 1,289

Re: [textile] Textile 2.4 now available.

uli wrote:

found the devil! it was typo inside a <txp:rah_metas…/> code in the head section!

What kind of typo should we keep an eye on?

i don’t know. i replaced the whole <txp:rah_metas…/> part and didn’t look the differences :(
dumb behaviour from me, i know.

Offline

#51 2012-11-27 17:08:19

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [textile] Textile 2.4 now available.

Gallex wrote:

found the devil! it was typo inside a <txp:rah_metas…/> code in the head section!
fixed it and using the code above inside an article is possible again. problem solved.

Great, glad you found it!


Steve

Offline

#52 2018-02-26 13:40:38

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: [textile] Textile 2.4 now available.

net-carver wrote #264222:

The output you see is correct. … Try this to see what I mean…

The sun is reportedly hot[#hot], just like freshly baked potatoes[#hot]. Ice is cold[#cold].

note#hot. Ouch.

note#cold. Brrr.

notelist:1.

Surfacing this old thread for a couple of reasons:

  1. This use of footnotes as described by Steve works but is not indicated in the footnotes reference of the txstyle.org site. In fact, the simpler footnotes reference there is rather useless, in my useless opinion, because it does not create a semantic list as they should be, rather just paragraphs.
  2. The method Steve describes creates a list, thankfully, but it’s seemingly impossible to target it with a selector.

This is all a bit of a sad situation, because I love and use endnotes — a better name for use in Textile, I think, because they come at the end of the entire web document, not different lists in context of individual pages — and I’ll manually craft them if a list is not too long (5 or less items). But that is often limiting for the kinds of things I want to do in longer essays. It would be nice to use more complex endnotes lists easier. All that I’m really lacking here is a way to put a selector on the endnotes list Steve provided above without adding an extra tag around it in the body for that purpose.

How can we pull this off? Some variable or smd_macro wizardry? I don’t grasp those things yet well enough to know if it’s even worth trying. (I don’t think we’ll be getting it from Steve, but that would be a pleasure if so.)

Head-slap!

Never mind! Just needed to use a Textile selector on the list: notelist(selector):1..

Still might want to put that nice bit of syntax in the Textile site.

Last edited by Destry (2018-02-26 13:53:49)

Offline

#53 2018-02-27 12:21:14

ax
Plugin Author
From: Germany
Registered: 2009-08-19
Posts: 165

Re: [textile] Textile 2.4 now available.

Destry wrote #309442:

Still might want to put that nice bit of syntax in the Textile site.

Agree. See also documentation about endnotes by Steve.

Offline

#54 2018-03-07 11:06:16

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: [textile] Textile 2.4 now available.

Steve’s endnotes extension to Textile is simply wonderful.

But I have one tiny niggle: the seeming enforcement of having to use either alphabetic or numeric backlinks from the notes to the ‘citation labels’ (sups in body copy), as they are often called in the referencing system circles.

As designed, and whether or not Steve realized it at the time (I think he modeled it after Wikipedia’s endnotes functionality and that’s as far as the thinking went), the Textile implementation serves the Vancouver Referencing System for numbered citations, also called “author-number system”. This is different from the more frequently used, Oxford Referencing System, which is also a numbering system used largely in humanities where academic writing can require annotations in addition to the main references themselves.

One of the few main differences between the two numbering systems (Vancouver and Oxford) is how references are referred to. In the Van system, a given source is listed once and can be linked to multiple time from body text, which gives you the alphabetical/numerical back-links from a given reference item. In the Ox system, there is a direct one-to-one relationship between every citation label and an associated reference item. So a given source can be listed multiple times, directly matching a unique number for the context it’s used.

The difference is important depending on what field you work in, but for historians, etc, who need to do a lot of annotations (comments needing made but not suitable for body text). And because a given source (e.g. a thick ol’ history book) can provide many different contexts of reference (not just on the same factoid), the one to one is critical in order to allow for the annotations too.

For example, the Chicago Manual of Style is one popular authority for providing guidelines on the Oxford system (aka “notes & bibliography” system). And if you look at their sample styles rules for the Ox system, you see they define three item formats:

  • Notes (a full source entry in the endnotes)
  • Shortened notes (an abbreviated entry when a given source was already listed previously)
  • bibliography entry (in alphabetical order by author, title, etc)

The difference between an endnotes list of references and a bibliography is largely formatting, but also the bibliography will include everything the author considered, whether or not it was cited. Endnotes only list what is cited in text and makes the connection with the citation labels.

There are different academic circumstances when you may not need both, and it’s even allowed to use either footnotes (like endnotes but restricted to pages they are cited, thus not ideally suited to single web document use — good for forum posts, however) and bibliography, or endnotes and bibliography, or in some cases just endnotes alone if one does not need to included annotations too, as opposed to just the source reference information alone.

So, coming full circle, php Textile and Wikipedia employ the Vancouver model. And while that’s good for some situations, it’s not good for all, and rarely for what I need as an armchair historian.

I can still use Textile endnotes as desired — one-to-one between citations and references — but it leaves me with the rather silly looking a or 1 backlink notation preceding the reference item. For now I choose to use a to contrast from the numbered item. (I think of it standing for citation “anchor”. ;) But that’s my own mental invention that nobody else should get.)

I like the back-link, in fact, but not the forced letter/number convention in this case. Wikipedia uses a caret (^) when there’s only one back-link, which I’m not crazy about. But I do like the idea of being able to use whatever character/glyph I want, which we currently can’t do in Textile.

Ideally Textile endnotes would be adjusted to allow for a custom glyph. Or at the very least add a third option for a fixed up arrow, or something. If I could choose for my own site, I would probably go with this, or or maybe even just a small octothorpre #, which used to be somewhat popular in blogging days to indicate a permlink. Heck, I’d even take the caret at this point ^, which should probably not be a sup if that’s the case, because it’s already a sup by itself, at least in terms of position.

If not that, how can I hack Textile to turn the 1 option into a glyph option?

I should post this in the Textile Github repo, probably, but just want to see what falls out here as a potential quick hack in case that’s the route I have to take.

Offline

#55 2018-03-07 11:33:39

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: [textile] Textile 2.4 now available.

Destry wrote #309712:

Ideally Textile endnotes would be adjusted to allow for a custom glyph. Or at the very least add a third option for a fixed up arrow, or something.

You might be able to do everything you mentioned above, and more already. From the huge help section at the top of the Parser.php source code, which is a goldmine of (unfortunately sometimes undocumented) information:

notelist.

notelist can take attributes (class#id) like this: notelist(class#id).

By default, the note list will show each definition in the order that they
are referenced in the text by the _references_. It will show each definition with
a full list of backlinks to each reference. If you do not want this, you can choose
to override the backlinks like this...

notelist(class#id)!.    Produces a list with no backlinks.
notelist(class#id)^.    Produces a list with only the first backlink.

Should you wish to have a specific definition display backlinks differently to this
then you can override the backlink method by appending a link override to the
_definition_ you wish to customise.

note#label.    Uses the citelist's setting for backlinks.
note#label!.   Causes that definition to have no backlinks.
note#label^.   Causes that definition to have one backlink (to the first ref.)
note#label*.   Causes that definition to have all backlinks.

Any unreferenced notes will be left out of the list unless you explicitly state
you want them by adding a '+'. Like this...

notelist(class#id)!+. Giving a list of all notes without any backlinks.

You can mix and match the list backlink control and unreferenced links controls
but the backlink control (if any) must go first.

Like so: notelist^+. , not like this: notelist+^.

Example...
    Scientists say[#lavader] the moon is small.

    note#other. An unreferenced note.

    note#lavader(myliclass). "Proof":http://example.com of a small moon.

    notelist(myclass#myid)+.

    Would output (the actual IDs used would be randomised)...

    <p>Scientists say<sup><a href="#note1" id="noteref1">1</sup> the moon is small.</p>
    <ol class="myclass" id="myid">
        <li class="myliclass"><a href="#noteref1"><sup>a</sup></a>
            <span id="note1"> </span><a href="http://example.com">Proof</a> of a small moon.</li>
        <li>An unreferenced note.</li>
    </ol>

    The 'a b c' backlink characters can be altered too.

    For example if you wanted the notes to have numeric backlinks starting from 1:

    notelist:1.

That final paragraph about numeric backlinking is interesting and I discussed it with Steve back in July/August 2011. You can actually use any UTF character as a backlink, and if it forms part of a sequence (heck, use greek symbols if you prefer) then they should automatically increment for each backlink. In theory… ymmv with Chinese :-)

Last edited by Bloke (2018-03-07 11:37:29)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#56 2018-03-07 12:12:02

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: [textile] Textile 2.4 now available.

The 'a b c' backlink characters can be altered too.

For example if you wanted the notes to have numeric backlinks starting from 1:

@notelist:1.@
Bloke wrote #309713:

That final paragraph about numeric backlinking is interesting and I discussed it with Steve back in July/August 2011. You can actually use any UTF character as a backlink, and if it forms part of a sequence (heck, use greek symbols if you prefer)

This is the whole reason for my overly long post (sorry)… It only works as:

  • notelist:1. (1, numerical)
  • notelist:a. (a, alphabetical)

If I put any other character there, the list goes poof!

Offline

#57 2018-03-07 12:18:48

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: [textile] Textile 2.4 now available.

I’m not sure what I’m supposed to see if I try using this, if I understand the tricky docs at all:

notelist(class).

note#label^.

But I’m expecting to see:

  1. ^ Some note.

But I don’t. I get the old output from the a back-links, like it’s stuck in memory or something. Bizarre.

Offline

#58 2018-03-07 12:21:03

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: [textile] Textile 2.4 now available.

I’ll just be sticking with notelist:a. for now. “A” for anchor. ;)

Offline

#59 2018-03-07 12:21:57

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: [textile] Textile 2.4 now available.

Destry wrote #309715:

But you can’t put any other character there or the list goes poof!

Not in my tests:

notelist:α.

works fine and gives me alpha, beta, etc. and

notelist:†.

shows daggers on 4.7.0-dev.

EDIT: intriguingly, using Chinese:

notelist:诶.

Shows backrefs: 诶 请

When I ran the second symbol through Google translate, it claimed it was please (but it also told me the first symbol was “eh” so something’s amiss somwhere along the line).

Last edited by Bloke (2018-03-07 12:54:56)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#60 2018-03-07 13:04:27

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: [textile] Textile 2.4 now available.

Hmm… Seems to be not all characters, then.

I tried two obvious choices for tests:

  • notelist(endnotes):↑. (up arrow)
  • notelist(endnotes):^. (caret)

Both make the list crash.

But I can confirm, a dagger works! Though no more symbolically so than an a, really.

Probably a conflict with the caret, that much I could guess. But not sure why the arrow woudn’t work if it’s just a glyph.

Offline

Board footer

Powered by FluxBB