{"id":20660952,"url":"https://github.com/liatemplates/citations","last_synced_at":"2026-02-19T06:02:18.334Z","repository":{"id":253098956,"uuid":"842437235","full_name":"LiaTemplates/citations","owner":"LiaTemplates","description":"Embed citation into LiaScript","archived":false,"fork":false,"pushed_at":"2025-08-28T11:54:44.000Z","size":11,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-14T10:36:48.126Z","etag":null,"topics":["bibtex","citations","liascript","liascript-template"],"latest_commit_sha":null,"homepage":"https://liascript.github.io/course/?https://raw.githubusercontent.com/LiaTemplates/citations/main/README.md","language":"TeX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LiaTemplates.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-14T10:54:36.000Z","updated_at":"2025-09-21T06:21:40.000Z","dependencies_parsed_at":"2025-08-31T05:33:50.285Z","dependency_job_id":"a90fb6b9-38c3-46d2-be90-0e927fcc7d8f","html_url":"https://github.com/LiaTemplates/citations","commit_stats":null,"previous_names":["liatemplates/citations"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/LiaTemplates/citations","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiaTemplates%2Fcitations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiaTemplates%2Fcitations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiaTemplates%2Fcitations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiaTemplates%2Fcitations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LiaTemplates","download_url":"https://codeload.github.com/LiaTemplates/citations/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiaTemplates%2Fcitations/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29604552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T05:11:50.834Z","status":"ssl_error","status_checked_at":"2026-02-19T05:11:38.921Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bibtex","citations","liascript","liascript-template"],"created_at":"2024-11-16T19:06:37.911Z","updated_at":"2026-02-19T06:02:18.267Z","avatar_url":"https://github.com/LiaTemplates.png","language":"TeX","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n\nauthor:  Sebastian Zug; André Dietrich\nemail:   LiaScript@web.de\n\nversion: 0.0.2\n\ncomment: This is a simple plugin for embedding bibtex based references in LiaScript materials.\n\nscript: https://cdnjs.cloudflare.com/ajax/libs/citation-js/0.7.15/citation.min.js\n\n@onload\nwindow.Cite = require('citation-js')\n\nwindow.bibliographyLoad = (url) =\u003e {\n  fetch(url)\n  .then((response) =\u003e {\n    return response.text();\n  })\n  .then((content) =\u003e {\n    window.bibliography = new Cite(content)\n  })\n}\n\n//window.bibliographyLoad(\"https://raw.githubusercontent.com/LiaTemplates/citations/main/bibtex.bib\")\n@end\n\n@ref\n\u003cscript run-once modify=\"false\"\u003e\nfunction cite() {\n  if (!window.Cite) {\n    setTimeout(cite, 100)\n    return\n  }\n\n  if (window.bibliography) {\n    const bib = structuredClone(window.bibliography)\n    bib.format = window.bibliography.format\n    bib.data = bib.data.filter((e) =\u003e e.id == \"@0\")\n\n    send.lia(\"HTML:\" + bib.format('citation', {\n      format: 'html',\n      template: 'harvard1',\n      lang: 'en-US'\n    }))\n  } else {\n    send.lia(\"No global bibliography defined\")\n  }\n}\n\ncite()\n\"LIA: wait\"\n\u003c/script\u003e\n@end\n\n@cite: @cite.style(harvard1,```@0```)\n\n@cite.style\n\u003cscript run-once modify=\"false\"\u003e\nfunction cite() {\n  if (!window.Cite) {\n    setTimeout(cite, 100)\n    return\n  }\n\n  const example = new Cite(`@1`)\n\n  let output = example.format('citation', {\n    format: 'html',\n    template: `@0`,\n    lang: 'en-US'\n  })\n\n  let url = `@1`.match(/url\\s*=\\s*\\{([^\\}]+)/)\n  if (url \u0026\u0026 url.length \u003e 1) \n  {\n      output = `\u003ca href=\"${url[1]}\" target=\"blank_\"\u003e${output}\u003c/a\u003e`\n  }\n\n  send.lia(\"HTML:\"+output)\n}\n\ncite()\n\"LIA: wait\"\n\u003c/script\u003e\n@end\n\n@bibliography: @bibliography.style(harvard1,```@0```)\n\n@bibliography.style\n\u003cscript run-once modify=\"false\"\u003e\nfunction cite() {\n  if (!window.Cite) {\n    setTimeout(cite, 100)\n    return\n  }\n\n  const example = new Cite(`@1`)\n\n  let output = example.format('bibliography', {\n    format: 'html',\n    template: `@0`,\n    lang: 'en-US'\n  })\n\n  let url = `@1`.match(/url\\s*=\\s*\\{([^\\}]+)/)\n  if (url \u0026\u0026 url.length \u003e 1) \n  {\n      output = `\u003ca href=\"${url[1]}\" target=\"blank_\"\u003e${output}\u003c/a\u003e`\n  }\n\n  send.lia(\"HTML:\"+output)\n}\n\ncite()\n\"LIA: wait\"\n\u003c/script\u003e\n@end\n\n@bibliography.link: @bibliography.link.style(harvard1,@0)\n\n@bibliography.link.style\n\u003cscript run-once modify=\"false\"\u003e\nfunction cite() {\n  if (!window.Cite) {\n    setTimeout(cite, 100)\n    return\n  }\n\n  fetch(`@1`)\n  .then((response) =\u003e {\n    return response.text();\n  })\n  .then((content) =\u003e {\n    const citation = new Cite(content)\n    const output = citation.format('bibliography', {\n      format: 'html',\n      template: `@0`,\n      lang: 'en-US'\n    })\n    send.html(output);\n  })\n}\n\ncite()\n\"LIA: wait\"\n\u003c/script\u003e\n@end\n\n--\u003e\n\n# Embedded Bibtex Citations\n\n    --{{0}}--\nThis plugin supports the use of Bibtex-based references. The user can either specify the corresponding literature sources directly in the LiaScript document or store them in a separate file and address them using a URL.\n\nThis LiaScript plugin uses the [citation_js](https://citation.js.org/) implementation of  L. G.Willighagen. Many thanks for his great work \n\n@bibliography(10.5281/zenodo.1005176)\n\n**Try it on LiaScript:**\n\nhttps://liascript.github.io/course/?https://raw.githubusercontent.com/LiaTemplates/citations/main/README.md\n\nSee the project on Github:\n\nhttps://github.com/LiaTemplates/CollaborativeDrawing\n\n    --{{1}}--\nThere are three ways to use this template.\nThe easiest way is to use the import statement and the url of the raw text-file of the master branch or any other branch or version.\nBut you can also copy the required functionality directly into the header of your Markdown document, see therefor the last slide.\nAnd of course, you could also clone this project and change it, as you wish.\n\n      {{1}}\n- Load the macros via and set the persistence flag to true.\n  Persistent will guarantee, that your drawings will be updated, even if you are on another slide.\n\n  ```text\n  import: https://raw.githubusercontent.com/LiaTemplates/citations/main/README.md\n  ```\n\n  or use the tagged version:\n\n  ```text\n  import: https://raw.githubusercontent.com/LiaTemplates/citations/main/0.0.2/README.md\n  ```\n\n- Copy the definitions into your Project\n\n- Clone this repository on GitHub\n\n## Overview on citation_js\n\n1. The **representation*** can be \n\n   - `cite` - short key reference\n      @cite(https://doi.org/10.1080/08993408.2022.2029046)\n\n   - `bibliography` - detailed reference\n      @bibliography(https://doi.org/10.1080/08993408.2022.2029046)\n\n2. The current implementation distinguishes the user patterns in three directions:\n   Currently just three **styles of documents** are supported#️⃣\n\n   - `ieee` @bibliography.style(ieee, 10.5281/zenodo.1005176)\n\n   - `vancouver` @bibliography.style(vancouver, 10.5281/zenodo.1005176)\n\n   - `harvard1` @bibliography.style(harvard1, 10.5281/zenodo.1005176)\n\n   The pattern is addressed by calling `@bibliography.style()` or `@cite.style()`.\n   The short term versions `@bibliography` or `cite` use `harvard1` as default value.\n\n3. The reference data may be recorded directly in the document or in a separate file.\n   This can then be read in via the URL.\n   The corresponding versions `@bibliography.link` or `@bibliography.link.style` have two parameters, the style pattern from (2) and a url representing a bibtexfile.\n\n## Usage examples\n\n### `@cite`\n\n```` bibtex\n```bibtex @cite\n@book{johnson2019book,\n  title={The Complete Guide to Examples},\n  author={Johnson, Emily},\n  year={2019},\n  publisher={Academic Press},\n  address={New York},\n  url={https://doi.org/10.1000/conf.2021.123} \n}\n```\n````\n\nThe link of the reference points at the corresponding website.\n\n```bibtex @cite\n@book{johnson2019book,\n  title     = {The Complete Guide to Examples},\n  author    = {Johnson, Emily},\n  year      = {2019},\n  publisher = {Academic Press},\n  address   = {New York},\n  url       = {https://doi.org/10.1000/conf.2021.123} \n}\n```\n\n```bibtex @cite.style(ieee)\n@book{johnson2019book,\n  title     = {The Complete Guide to Examples},\n  author    = {Johnson, Emily},\n  year      = {2019},\n  publisher = {Academic Press},\n  address   = {New York},\n  url       = {https://doi.org/10.1000/conf.2021.123} \n}\n```\n\n### `@bibliography`\n\n```` bibtex\n```bibtex @bibliography.style(ieee)\n@book{johnson2019book,\n  title     = {The Complete Guide to Examples},\n  author    = {Johnson, Emily},\n  year      = {2019},\n  publisher = {Academic Press},\n  address   = {New York},\n  url       = {https://doi.org/10.1000/conf.2021.123}\n}\n\n@book{texbook,\n  author    = {Donald E. Knuth},\n  year      = {1986},\n  title     = {The {\\TeX} Book},\n  publisher = {Addison-Wesley Professional}\n}\n```\n````\n\nThe link of the reference points at the corresponding website.\n\n```bibtex @bibliography.style(ieee)\n@book{johnson2019book,\n  title     = {The Complete Guide to Examples},\n  author    = {Johnson, Emily},\n  year      = {2019},\n  publisher = {Academic Press},\n  address   = {New York},\n  url       = {https://doi.org/10.1000/conf.2021.123}\n}\n\n@book{texbook,\n  author    = {Donald E. Knuth},\n  year      = {1986},\n  title     = {The {\\TeX} Book},\n  publisher = {Addison-Wesley Professional}\n}\n```\n\n-------------------------------------------------------------------------------\n\n### `@bibliography.link`\n\n\n``` markdown\n@[bibliography.link](./bibtex.bib)\n\n---\n\n@[bibliography.link.style(ieee)](./bibtex.bib)\n```\n\n@[bibliography.link](./bibtex.bib)\n\n---\n\n@[bibliography.link.style(ieee)](./bibtex.bib)\n\n\n### Global\n\n\n@ref(johnson2019book)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliatemplates%2Fcitations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliatemplates%2Fcitations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliatemplates%2Fcitations/lists"}