Recent Changes - Search:

PITS main list

edit sidebar

Main sidebar



Summary: Page text variables flexibility
Created: 2016-03-22 04:02
Status: Discussion
Category: Feature
From: Frank
Priority: 4

Description: Page text variables development request

I think it would be useful having more flexibility on PTV, e.g. to add some values similar to ptv on pagelists like “PTV Start-with” {Group.Page$:ptv=...*} but I am not an expert, perhaps it will cause some problems. So I propose something easier and still useful:

“Consecutive (pseudo-heriarchical) PTV” {Group.Page$:ptv0:ptv01}

On wikipage

: wordA:word1 : ... wAw1
(: wordA:word2 : ... wAw2 :)
wordA:word3 : ... wAw3


{Group.Page$:wordA:word1} ... wAw1
{Group.Page$:wordA:word2} ... wAw2
{Group.Page$:wordA:word3} ... wAw3

On pagelists

(:pagelist $:wordA =... :)
Results: it will search in the thee above (or just in the last one? or just the second? see 01069)

(:pagelist $:wordA:word1 =... :)
Results: it will search just in the first

I would need two ‘levels’, maybe someone would need more, I don’t know.

-- Thank you -- Frank March 22, 2016, at 04:07 AM

Can you use {Group.Page$:wordAword1} or {Group.Page$:wordA_word1} to have something like levels? Alternatively, in a pagelist even now you can search for (:pagelist $:wordA=word1*:). PageTextVariables are set in the order they appear in the script files (pmwiki or recipe) then in the order they appear in the page. This means that currently the variable defined with the markup (:var:value:) last in the page will set the {$:var} value, even if there are var:value1 and :var:value2 before or after it in the page. --Petko March 22, 2016, at 06:50 AM

It is better if I give you more details

Using PublishPDF citations, I wish to prepare some pre-filled bibliographic pages with e.g.:

: Rankin:2006 : bib data ...
: Rankin:2010 : bib data ...
: Rankin:Michaud:2008 : bib data ...
: ...

(I can not change with Author_Year without changing the php, and doing it, I suppose that many other problems will come)

What I have in mind (without using abbreviations like Ran06): their 'bib data' could be individually recalled on other pages , e.g. {Group/Page$:Rankin:2006}, but now with 'one level ptv' is not possible.

-- Frank March 22, 2016, at 10:13 AM

So the line "Rankin:Michaud:2008" would require a third level of PTVs? What if a reference has more authors? :-)

I am reluctant to change the core PTVs and pagelists as many other problems may come, and it may prevent us from extending the PTV and pagelist markup in other ways, like {$:Var:Default value if Var is unset or empty}.

Why not use abbreviations? Other typesetting software does: a decade ago I wrote my thesis with LyX and I used exactly "[Author, Year]" in the text.

Or maybe you need another recipe with the features of Grep or TextExtract? If you have all references in a common datapage, you can have a recipe scanning for that datapage like Grep (only simpler & more friendly) and print in every page as footnotes, the used references for that page. This can be an extension or adaptation of the footnote markup in PublishPDF.

If you place all references in individual pages in a single wikigroup, no need for additional recipes. You can have different PTVs for every reference and have the pagelist print those you need, eg. (:pagelist group=References name=Rankin2006,Michaud2008:). To list all references in a Bibliography section of your book, you can use another pagelist. Moreover, you can always modify your pagelist template at any time to change the appearance of the list, or the table, or the order of the entries (by year, by author...). --Petko March 22, 2016, at 12:01 PM

Yes, you're right, I was complicating my life for nothing. All in all I can use the abbreviations without too many complications.
Thanks for the quick answer (as always). -- Frank March 22, 2016, at 02:19 PM

Edit - History - Print - Recent Changes - Search
Page last modified on March 22, 2016, at 02:19 PM