Giter Club home page Giter Club logo

Comments (3)

whrose avatar whrose commented on June 19, 2024 1

from citeproc.

jgm avatar jgm commented on June 19, 2024

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...

from citeproc.

jblachly avatar jblachly commented on June 19, 2024

@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.

from citeproc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.