View Single Post
Old 09-16-2018, 06:00 AM   #3
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
@Kovid,

I think, there seems to be something wrong in the manual. Missing/wrong character for backslash.

First place:
https://manual.calibre-ebook.com/template_lang.html, section:
"Using functions in templates - single-function mode"

Quote:
Arguments are separated by commas. Commas inside arguments must be preceeded by a backslash ( ‘' ). The last (or only) argument cannot contain a closing parenthesis ( ‘)’ ). Functions return the value of the field used in the template, suitably modified.
( ‘' ) --> [‘] instead of [\]

Second place:
https://manual.calibre-ebook.com/gen...ndex-separator

Quote:
Examples using basic template mode and assuming that the tags column (which is comma-separated) contains "A, B, C": {tags:sublist(0,1,,)} returns "A". {tags:sublist(-1,0,,)} returns "C". {tags:sublist(0,-1,,)} returns "A, B".
instead of
Quote:
Examples using basic template mode and assuming that the tags column (which is comma-separated) contains "A, B, C": {tags:sublist(0,1,\,)} returns "A". {tags:sublist(-1,0,\,)} returns "C". {tags:sublist(0,-1,\,)} returns "A, B".
Divingduck is offline   Reply With Quote