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

Medium Online Video not working though defined in CSL #183

Open
AnsgarLichter opened this issue Jun 24, 2024 · 0 comments
Open

Medium Online Video not working though defined in CSL #183

AnsgarLichter opened this issue Jun 24, 2024 · 0 comments

Comments

@AnsgarLichter
Copy link

Discussed in typst/typst#4418

Originally posted by AnsgarLichter June 19, 2024
I am using the IEEE style and have included its CSL directly:

set cite(../bibliography/ieee.csl)

Now I am including my .bib file as expected - including the recording of a conference talk as source:

@misc{ConferenceTalk,
  author = {{Conference}},
  title = {Talk},
  url = {https://google.com},
  urldate = {04.06.2024},
  medium = {Online Video},
}

According to my CSL (see full version at ieee.csl) this should be rendered as [Online Video] in the literature section:

<macro name="access">
    <choose>
      <if type="webpage post post-weblog" match="any">
        <!-- https://url.com/ (accessed Mon. DD, YYYY). -->
        <choose>
          <if variable="URL">
            <group delimiter=". " prefix=" ">
              <group delimiter=": ">
                <text term="accessed" text-case="capitalize-first"/>
                <date variable="accessed" form="text"/>
              </group>
              <text term="online" prefix="[" suffix="]" text-case="capitalize-first"/>
              <group delimiter=": ">
                <text term="available at" text-case="capitalize-first"/>
                <text variable="URL"/>
              </group>
            </group>
          </if>
        </choose>
      </if>
      <else-if match="any" variable="DOI">
        <!-- doi: 10.1000/xyz123. -->
        <text variable="DOI" prefix=" doi: " suffix="."/>
      </else-if>
      <else-if variable="URL">
        <!-- Accessed: Mon. DD, YYYY. [Medium]. Available: https://URL.com/ -->
        <group delimiter=". " prefix=" " suffix=". ">
          <!-- Accessed: Mon. DD, YYYY. -->
          <group delimiter=": ">
            <text term="accessed" text-case="capitalize-first"/>
            <date variable="accessed" form="text"/>
          </group>
          <!-- [Online Video]. -->
          <group prefix="[" suffix="]" delimiter=" ">
            <choose>
              <if variable="medium" match="any">
                <text variable="medium" text-case="capitalize-first"/>
              </if>
              <else>
                <text term="online" text-case="capitalize-first"/>
                <choose>
                  <if type="motion_picture">
                    <text term="video" text-case="capitalize-first"/>
                  </if>
                </choose>
              </else>
            </choose>
          </group>
        </group>
        <!-- Available: https://URL.com/ -->
        <group delimiter=": " prefix=" ">
          <text term="available at" text-case="capitalize-first"/>
          <text variable="URL"/>
        </group>
      </else-if>
    </choose>
  </macro>

The result is:
Conference, “Talk.” [Online]. Available: https://google.com/

My expected result is:
Conference, “Talk.” [Online Video]. Available: https://google.com/

If I understand the macro correctly, the variable medium should do the work, but it doesn't.
An alternative is to set the type to motion_picture. I tried to use @video and @movie but this didn't work either.
Does anyone have an idea how I can achieve this?

Is there a possibility to add the relevant minutes of the conference's recording as a note?
I didn't find a suitable variable in the CSL.

@laurmaedje laurmaedje transferred this issue from typst/typst Jul 1, 2024
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

1 participant