Feature: CSL Name Rendering
As a CSL hacker
I want to render names
Using names nodes
Scenario: Names Rendering
Given the following style node:
"""
"""
When I render the following citation items as "text":
| translator |
| Romy Schneider and Peter Sellers |
Then the results should be:
| (Romy Schneider & Peter Sellers, Trans.) |
Scenario: Initials
Given the following style node:
"""
"""
When I render the following citation items as "text":
| translator | author |
| Romy Schneider and Peter Sellers | |
Then the results should be:
| (R. Schneider & P. Sellers, Trans.) |
Scenario: Initials when given part is uppercased
Given the following style node:
"""
"""
When I render the following citation items as "html":
| author |
| Cole, Steven J. and Moore, Robert |
Then the results should be:
| COLE, S. J.; MOORE, R. |
Scenario: Name as sort order
Given the following style node:
"""
"""
When I render the following citation items as "html":
| author |
| John Doe |
| John Doe and Jane Doe |
Then the results should be:
| Doe, John |
| Doe, John, and Jane Doe |
Scenario: Substitutions
Given the following style node:
"""
"""
When I render the following citation items as "html":
| editor |
| John Doe |
| |
| John Doe and Jane Doe |
Then the results should be:
| Doe, John |
| UNKNOWN |
| Doe, John, and Jane Doe |
Scenario: Suppression after substitutions
Given the following style node:
"""
"""
When I render the following citation items as "html":
| editor | author | title |
| John Doe | Jane Doe | The Title |
| John Doe | | The Title |
| | | The Title |
Then the results should be:
| Doe, Jane, John Doe (editor), THE TITLE |
| Doe, John, THE TITLE |
| The Title |
Scenario: Subsequent author substitutes complete-all with different roles
Given the following style node:
"""
"""
When I render the following citation items as "text":
| editor | author | title |
| | Jane Doe | Title A |
| | Jane Doe | Title B |
| | John Doe | Title C |
| John Doe | | Title D |
| | Jane Doe and John Doe | Title E |
| | Jane Doe and John Doe | Title F |
Then the results should be:
| Doe, Jane. Title A. |
| ---. Title B. |
| Doe, John. Title C. |
| --- ed. Title D. |
| Doe, Jane, John Doe. Title E. |
| ---. Title F. |
Scenario: Name / Label Order
Given the following style node:
"""
"""
When I render the following citation items as "text":
| translator | author |
| John Doe | Jane Doe |
| John Doe and Jack Doe | Jane Doe and Jill Doe |
Then the results should be:
| Jane Doe (author). Trans. John Doe |
| Jane Doe & Jill Doe (authors). Trans. John Doe & Jack Doe |
Scenario: EtAlUseFirst options
Given the following style node:
"""
"""
When I render the following citation item as "text":
| author | John Doe and Jane Roe |
Then the result should be: John Doe et al.