Giter Club home page Giter Club logo

Comments (6)

jgm avatar jgm commented on June 16, 2024

This definitely looks like a bug. I note that adding the font-style attribute to the name element rather than names seems to produce the desired italics. But the issue with the ordering is still there, and font-style should work in either place I think.

from citeproc.

JostBrand avatar JostBrand commented on June 16, 2024

@jgm could you elaborate how you fixed it?

My goal is to use small caps for the authors:

  <macro name="author">
    <names variable="author">
      <name delimiter=" / " delimiter-precedes-last="never" initialize-with="." name-as-sort-order="all" font-variant="small-caps"/>
      <label form="short" prefix=" (" suffix=")"/>
      <substitute>
        <names variable="editor author"/>
        <group>
          <text term="anonymous" form="short"/>
        </group>
      </substitute>
    </names>
  </macro>
  <macro name="author-short">
    <names variable="author" font-weight="normal" delimiter=";">
      <name delimiter=" / " delimiter-precedes-last="never" initialize-with="." name-as-sort-order="all" font-variant="small-caps" />
      <substitute>
        <names variable="editor author"/>
        <group delimiter=": ">
          <text term="anonymous" form="short"/>
          <text variable="title"/>
        </group>
      </substitute>
    </names>
  </macro>

from citeproc.

jgm avatar jgm commented on June 16, 2024

@JostBrand this issue is not fixed -- as you can see, it still has the Open status.

from citeproc.

jgm avatar jgm commented on June 16, 2024

@JostBrand I moved the font-style attribute from the names element to the child name element, and that worked with the original CSL.

from citeproc.

jgm avatar jgm commented on June 16, 2024

@TeresaM12 - the issue with the ordering is due to the fact that you use an author-in-text citation in your note: that forces the author out front. If you do

amet^[[@sternSternBecker2019b].]

with a normal citation in the note, you'll get what you expect. Better yet, since this is a note style, let pandoc insert the note automatically (and then you can easily switch to a non-note style if you like):

amet [@sternSternBecker2019b],

I'm still not clear why the font style isn't being applied, but we can cross off the order issue.

from citeproc.

jgm avatar jgm commented on June 16, 2024

In fact, the font issue has the same cause.
When you use an author-in-text form of citation (@foo as opposed to [@foo]), the author's name will be put first. Here we just extract the name, without formatting. I will look into whether we can preserve formatting, but in this case you probably just want to use the fix suggested above.

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.