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

TEI writer extension (like element_citations for Jats) #8790

Open
marviro opened this issue Apr 18, 2023 · 8 comments
Open

TEI writer extension (like element_citations for Jats) #8790

marviro opened this issue Apr 18, 2023 · 8 comments

Comments

@marviro
Copy link

marviro commented Apr 18, 2023

The TEI writer does not keep the structured bibliographic information provided by citeproc.

This is possible using the JATS writer with the extension element_citations.

Would it be possible to create such an extension also for TEI?

The output, following the TEI documentation, could be something like:

<bibl type="article" subtype="book_chapter"
 xml:id="carlin_2003">
 <author>
  <name>
   <surname>Carlin</surname>
     (<forename>Claire</forename>)</name>
 </author>,
<title level="a">The Staging of Impotence : France’s last
   congrès</title> dans
<bibl type="monogr">
  <title level="m">Theatrum mundi : studies in honor of Ronald W.
     Tobin</title>, éd.
 <editor>
   <name>
    <forename>Claire</forename>
    <surname>Carlin</surname>
   </name>
  </editor> et
 <editor>
   <name>
    <forename>Kathleen</forename>
    <surname>Wine</surname>
   </name>
  </editor>,
 <pubPlace>Charlottesville, Va.</pubPlace>,
 <publisher>Rookwood Press</publisher>,
 <date when="2003">2003</date>.
 </bibl>
</bibl>

Is the extension the best way to go, or would you rather suggest to write a filter? I guess that in this case it makes sense to have an extension for the writer...

@tarleb
Copy link
Collaborator

tarleb commented Apr 18, 2023

I agree that an extension makes sense. Could you link me to the relevant docs for this?

Related issue: jgm/citeproc#132; cc @frederik-elwert.

@marviro
Copy link
Author

marviro commented Apr 18, 2023

Thank you!
I think everything is in the TEI Lite doc, here,

@tarleb
Copy link
Collaborator

tarleb commented Apr 19, 2023

I may have answered to quickly, because I didn't fully understand the difference between TEI and JATS. From what I gather, TEI citations are what's called "mixed citations" in JATS; there seems to be no equivalent to JATS element citations. That's problematic, because it means that we cannot just write the tags in any order, but that the CSL must always be applied. This isn't possible yet (and the subject of the citeproc issue linked above).

@marviro
Copy link
Author

marviro commented Apr 19, 2023

Ok, I understand. I am going to try to find a solution. If it is mandatory to apply a style, the other solution would be to create a filter which directly parses the structured bibliography, I guess? This is what you do with JATS (here)?

@YvesMarcoux
Copy link

YvesMarcoux commented Apr 21, 2023

@tarleb It's true that TEI's <bibl> are similar to JATS's "mixed citations". However, there is another TEI element <biblStruct> that is more structured and could likely be produced without applying the CSL. (<biblStruct> is not in TEI Lite, but it is in the "core" module of the TEI, so in theory in all flavours of the TEI).

Examples of this element are here: https://tei-c.org/release/doc/tei-p5-doc/en/html/examples-biblStruct.html

The element itself is described here: https://tei-c.org/release/doc/tei-p5-doc/en/html/ref-biblStruct.html

Does that look like a promising avenue?

@tarleb
Copy link
Collaborator

tarleb commented Apr 22, 2023

That's perfect. I'll give it a try when I have time.

@frederik-elwert
Copy link
Contributor

I think support for biblStruct would be nice, but it’s not necessarily a replacement for bibl support in many places. Not only TEI Lite, also the journal of the TEI (JTEI) schema only supports bibl. (Ideally, it would really be cool if pandoc supported JTEI as one of the output profiles, since I guess writing an article is still one of the main use cases for pandoc. Currently, the TEI output by pandoc is close, but requires some tweaks to fit the JTEI schema.)

Here’s the documentation for JTEI: https://tei-c.org/release/doc/tei-p5-exemplars/html/tei_jtei.doc.html#back

@marviro
Copy link
Author

marviro commented Apr 28, 2023

I agree. But that would mean : 1) changing the CiteprocOutput class and 2) creating a new writer. I would definitely love that. (It's what we do with Stylo an online text editor that uses pandoc (+some xslt) to produce output for journals (also TEI journal) and this is why we need a structured bibliography.)

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

No branches or pull requests

4 participants