I’m afraid it’s impossible to achieve it with #cite(, form: “prose”) + CSL, because do_author is hard-coded by typst.
Instead, I managed to develop a CSL with a special #tv(<key>) function.
(At present, it only conforms to your citation format.)
#let tv = cite.with(style: "television.csl")
- During the interaction between the characters in #tv(<show>), it becomes evident that…
- During the characters’ interaction, it becomes evident… #tv(<episode>, supplement: [00:10:24])
#let televisions = ```yaml
episode:
type: video
title: Title of Episode
author:
- Creator
- Another contributor
director: Director
date: 2161
note: Season 1, Episode 1.
archive: Streaming Platform
url: https://example.com
parent:
title: Title of TV Series
author: Production company
show:
type: video
title: Title of Series
author:
- Creators
date: 1999
```.text
#bibliography(
(
"ref.bib", // Your other citations
bytes(televisions),
),
style: "modern-language-association",
)
television.csl
<?xml version='1.0' encoding='utf-8'?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0">
<info>
<title>TV shows and episodes</title>
<id>https://forum.typst.app/t/is-there-a-way-to-cite-tv-shows-and-episodes-with-the-mla-style/6522</id>
</info>
<macro name="video-episode">
<text value="("/>
<text variable="title" prefix="“" suffix=",” " />
<text variable="locator" />
<text value=")"/>
</macro>
<macro name="video-show">
<text variable="title" prefix="“" suffix="”" />
</macro>
<citation>
<layout>
<choose>
<!--
Somehow, type="motion_picture" does not match videos with parents.
https://github.com/typst/hayagriva/blob/799cfdcc5811894f62949a63b155878e2f30b879/src/csl/taxonomy.rs#L636
-->
<if type="broadcast">
<text macro="video-episode"/>
</if>
<else-if type="motion_picture">
<text macro="video-show"/>
</else-if>
<else>
<text value="(Please paste the original CSL here)"/>
</else>
</choose>
</layout>
</citation>
<bibliography>
<layout>
<text value="This CSL style is only intended for citations, not bibliography."/>
</layout>
</bibliography>
</style>
Why *.bib becomes *.yaml?
I switch from *.bib to the hayagriva *.yaml format, in order to make things simpler.
-
For
*.bib, the entry type will be converted multiple times:@typein the file →biblatex::EntryType→hayagriva::EntryType→citationberg::Kind.For example, it looks like that
@video→biblatex::EntryType::Unknown("video")→hayagriva::EntryType::Misc→citationberg::Kind::Document, which is ridiculous… -
For
*.yaml, it gets simplified astype: …in the file =hayagriva::EntryType→citationberg::Kind.For the same example, it is
type: video=hayagriva::EntryType::Video→citationberg::Kind::MotionPicture.
Details can be found in How do I determine which type a legislation bibentry will have in CSL? - #2 by Y.D.X.
