Conditional layouts in style

Hi,
I would like to condition the prefix and suffix of a style according to certain conditions (I want to condition according to the language of the document but since that option doesn't exist, conditioning according to the type of document is good enough).

However I can not use <layout> inside <if> statement?

Is there anyway around this problem?
Thanks,
Ro'ee
  • no. Could you say more specifically what you're trying to do?
  • Thanks for the quick (unfortunate) reply!
    I use both English and Hebrew sources. In citations of Heberw source the parenthesis appear wrong - something like this: )text(
    I want to use right-to-left parenthesis in Hebrew citations, and haven't found a solution yet
  • ugh - I see. It would seem to me that this should be solved at a more basic level than individual styles - presumably this would affect anyone using Arab or Hebrew in parenthetical styles.
    Maybe fbennett has even thought about it already?
  • If there is a more basic solution that's preferred of course, but for now it seems that I can use only English or modify a style for Hebrew only but can't use Zotero in a text with mixed source which is quite common.

    If anyone has an idea for a solution, I will be grateful...
  • edited November 7, 2011
    A syntax for handling this is described in the citeproc-js CSL Specification Supplement. A style written in this way will not validate against the CSL 1.0 scheme, but should (as far as I know) run okay in the official Zotero client. For validation, you can use the MLZ extended CSL schema. (Note that the extended schema is fussy about the use of spaces in prefix and suffix attributes in the CSL code, so if you have an existing style, it might require some adjustments to validate it. Using a real-time validating editor would be highly recommended.)

    (Edit: looking more closely at the issue description, I'm not sure exactly how this would come out when rendered. If you try the alternative syntax and it doesn't work, post a query and I'll take a look -- the processor certainly should be capable of handling this use case.)
Sign In or Register to comment.