Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

textsc in BibLaTeX author field ignored #63

Open
whrose opened this issue Apr 16, 2021 · 3 comments
Open

textsc in BibLaTeX author field ignored #63

whrose opened this issue Apr 16, 2021 · 3 comments

Comments

@whrose
Copy link

whrose commented Apr 16, 2021

In the new citeproc protocol pandoc will pick up text in a LaTeX textsc environment in a number of fields in a BibLaTeX entry, but not in the author field — unlike the old citeproc. Maybe I have missed something, maybe it is a bug. See the example below.

@online{Councileu2021Minute,
    author       = {{Council \textsc{eu}}},
    title        = {{Council \textsc{eu} Draft Minutes 22 February 2021}},
    year         = {2021},
    url          = {https://data.consilium.europa.eu/doc/document/ST-6435-2021-INIT/en/pdf},
}

Earlier

Council [eu]{.smallcaps}. 2021. 'Council [eu]{.smallcaps} Draft Minutes 22 February 2021'. 2021. https://data.consilium.europa.eu/doc/document/ST-6435-2021-INIT/en/pdf.

Recently

Council eu. 2021. 'Council [eu]{.smallcaps} Draft Minutes 22 February 2021'. 2021. https://data.consilium.europa.eu/doc/document/ST-6435-2021-INIT/en/pdf.

@jgm
Copy link
Owner

jgm commented Apr 16, 2021

The type we use in citeproc to represent a name just has plain strings:

data Name =                                 
  Name               
  { nameFamily              :: Maybe Text            
  , nameGiven               :: Maybe Text             
  , nameDroppingParticle    :: Maybe Text        
  , nameNonDroppingParticle :: Maybe Text                
  , nameSuffix              :: Maybe Text                      
  , nameCommaSuffix         :: Bool
  , nameStaticOrdering      :: Bool
  , nameLiteral             :: Maybe Text               
  }                                      
  deriving (Show, Eq, Ord) 

This makes it a lot easier to work with (for all the name manipulations we need to do, like abbreviations).
I can see how this is less than ideal in a few cases, like yours. We can leave this issue open, but it is not a small change that is needed. Perhaps we could set things up so that formatting is allowed in nameLiteral but not the other components...

@whrose
Copy link
Author

whrose commented Apr 16, 2021 via email

@jblachly
Copy link
Sponsor

jblachly commented Oct 2, 2021

@whrose a potential solution is to use luascript to scan and replace name-parts with formatted data using AST elements like Strong. I currently have a transformer working, which I verified in the outputted AST.

Unfortunately the transform seems to run after the bibliography has been rendered(?) so the citation contains original unmodified text element. Will probably turn to the mailing list for help, but thsi is very close to being a solution to your problem (mine is similar -- need to bold face my name in my CV)

edit: Well, bad news. Although I can use a transforming Luascript to modify the citation metadata and manifest this in a bibliography with a two step process (csljson -> md -> pdf), for exactly the reasons that John outlines above, the author formatting , even when present in the intermediate markdown, is lost. Unless there's a way to -- within a single pandoc run -- retrigger document generation after modifying the metadata in AST, out of luck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants