{"id":26088876,"url":"https://github.com/plus1tv/markademic","last_synced_at":"2025-09-05T21:40:45.918Z","repository":{"id":42926895,"uuid":"68067053","full_name":"plus1tv/markademic","owner":"plus1tv","description":"🏫 A tool for rendering academically flavored markdown.","archived":false,"fork":false,"pushed_at":"2023-01-30T21:08:56.000Z","size":1521,"stargazers_count":10,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-24T01:27:37.468Z","etag":null,"topics":["academic","bibjson","latex","markdown","syntax-highlighting"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plus1tv.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-13T02:34:52.000Z","updated_at":"2023-02-21T15:12:57.000Z","dependencies_parsed_at":"2023-02-16T11:45:22.260Z","dependency_job_id":null,"html_url":"https://github.com/plus1tv/markademic","commit_stats":null,"previous_names":["hyperfuse/markademic","stelatech/markademic"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/plus1tv/markademic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plus1tv%2Fmarkademic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plus1tv%2Fmarkademic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plus1tv%2Fmarkademic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plus1tv%2Fmarkademic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plus1tv","download_url":"https://codeload.github.com/plus1tv/markademic/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plus1tv%2Fmarkademic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273826636,"owners_count":25175232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["academic","bibjson","latex","markdown","syntax-highlighting"],"created_at":"2025-03-09T08:20:03.697Z","updated_at":"2025-09-05T21:40:45.876Z","avatar_url":"https://github.com/plus1tv.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Markademic\n\n[![Npm Package][npm-img]][npm-url]\n[![License][license-img]][license-url]\n[![Unit Tests][travis-img]][travis-url]\n[![Coverage Tests][codecov-img]][codecov-url]\n\n```bash\nnpm i markademic -S\n```\n\nA tool for rendering academically flavored markdown.\n\n## Features\n\n- 😲 Markdown rendering powered by [Remarkable](https://github.com/jonschlinkert/remarkable).\n\n- 👥 Citation support following the [BibJSON](http://okfnlabs.org/bibjson/) specification.\n\n- 🔣 Symbol definition support for cases where you want to define the meaning of a math symbol used in a formula.\n\n- 🧤 LaTeX rendering support with [Katex](https://khan.github.io/KaTeX/).\n\n- 🖊️ Syntax highlighting for 170 languages powered by [highlight.js](http://highlightjs.org).\n\n- 🌠 Reroute relative links for publishing to different platforms or syncing your output with the permalink of your website.\n\n## Usage\n\nMake a config object literal of the following type:\n\n```ts\ntype Config = {\n\n  // Input markdown string\n  input: string,\n\n  // BibJSON file you're using in file.\n  citations?: BibJSON,\n  \n  // Reroute any relative links\n  rerouteLinks?: ((str: string) =\u003e string)\n\n};\n```\n\nThen pass that config to the markademic default export to get back a string of html.\n\n```js\nimport markademic from 'markademic';\nimport citations from './citations.json';\nimport fs from 'fs';\nimport path from 'path';\n\nlet config = {\n  input: fs.readFileSync('./input.md').toString(),\n  citations: require('./citations.json'),\n  rerouteLinks: (link) =\u003e path.join('https://alain.xyz/myblogpost/', link)\n}\n\nlet html = markademic(config);\n```\n\nIn your project you will need the katex css files, as well as highlight.js css files. \n\n## Markdown Additions\n\n### Citations\n\n```markdown\n\u003e I sometimes worry my life's work will be reduced to a 200-line @Shadertoy submission [^timsweeny].\n```\n\nbecomes:\n\n\u003e I sometimes worry my life's work will be reduced to a 200-line @Shadertoy submission [[Sweeny 2015]](#sweeny2015).\n\nSimilar to Latex References, to place references, simply write `[^yourrefname]`, and this will be matched with your BibJSON object's key of the same name (minus the `^`). (This is directly inspired by the same feature on [stackedit.io](https://stackedit.io)). This uses the [BibJSON specification](https://github.com/plus1tv/bibtex-bibjson), which is just a JSON version of common LaTeX bibliographies.\n\nOn the bottom of your markdown file there will be some automatically generated references that look like this:\n\n| References     |\n|:---------------|\n| [Gregory 2014]\u003cbr\u003e**_Game Engine Architecture, Second Edition._**\u003cbr\u003eGregory, Jason\u003cbr\u003eCRC Press, 2014. |\n| [Moller et al. 2008]\u003cbr\u003e**_Real Time Rendering, Third Edition._**\u003cbr\u003eAkenine-Moller, Thomas\u003cbr\u003eCRC Press, 2008. |\n\n#### Social Connections\n\nOften times authors provide some means of contacting them, either via [Twitter](https://twitter.com/alainxyz), [GitHub](https://github.com/alaingalvan), [LinkedIn](https://linkedin.com/in/alaingalvan), Discord, Zoom, Email, etc. If you enter in their social media information in the `author` object, it can be displayed more prominently by Markademic:\n\n```json\n{\n  \"satran2018\": {\n    \"title\": \"Fence-Based Resource Management\",\n    \"author\": [\n      {\n      \"name\": \"Michael Satran\",\n      \"github\": \"https://github.com/msatranjr\"\n      },\n      {\n        \"name\": \"Steven White\",\n        \"github\": \"https://github.com/stevewhims\"\n      }\n      ],\n    \"year\": 2018,\n    \"publisher\": \"Microsoft\",\n    \"link\": [\n      {\n        \"url\": \"https://docs.microsoft.com/en-us/windows/win32/direct3d12/fence-based-resource-management\"\n      }\n    ]\n  }\n}\n```\n\nSince the authors each have a GitHub account, this can be used to get their profile picture.\n\nAlternatively, emails can be queried by common community profile picture tools like [Gravatar](https://en.gravatar.com/site/implement/images/).\n\nThese will be displayed by markademic as so: `\u003cProfilePicture/\u003e \u003cAuthorName href=\"{authorWebsite}\"/\u003e (@\u003cTwitterHandle/\u003e)`.\n\n```ts\ntype BibTexAuthor =\n{\n  name: string,\n  website?: string,\n  github?: string,\n  twitter?: string,\n  email?: string\n}\n```\n\n### LaTeX\n\nLatex is a markup language that's really suited for writing math equations:\n\n```tex\n\\gamma = \\mu \\chi + \\beta\n```\n\nbecomes:\n\n\u003cimg src=\"https://latex.codecogs.com/png.latex?\\gamma\u0026space;=\u0026space;\\mu\u0026space;\\chi\u0026space;\u0026plus;\u0026space;\\beta\" title=\"\\gamma = \\mu \\chi + \\beta\" /\u003e\n\nEasily describe mathematical proofs, formulas, or formalize some algorithms.\n\n### Syntax Highlighting\n\n```glsl\nvec4 integrate( in vec4 sum, in float dif, in float density, in vec3 bgcol, in float time )\n{\n    //Colors\n    vec3 gray = vec3(0.65);\n    vec3 lightgray = vec3(1.0,0.95,0.8);\n    vec3 bluegray = vec3(0.65,0.68,0.7);\n    vec3 orangegray =  vec3(0.7, 0.5, 0.3);\n\n    //Density Colors\n    vec4 col = vec4( mix( 1.15 * lightgray, gray, density ), density );\n    vec3 lin =  (1.3 * bluegray) + (0.5 * orangegray * dif);\n    col.xyz *= lin;\n    col.xyz = mix( col.xyz, bgcol, 1.0 - exp(-0.003*time*time) );\n\n    //Front to Back Blending\n    col.a *= 0.4;\n    col.rgb *= col.a;\n    return sum + col*(1.0 - sum.a);\n}\n```\n\nThe same syntax highlighting featured in Github flavored markdown, [odds are it supports your language (170 and counting!)](https://highlightjs.org/static/demo/).\n\n[cover-img]: assets/cover.gif\n[cover-url]: http://codepen.io/alaingalvan/details/EgjbKP/\n[release-img]: https://img.shields.io/badge/release-0.1.0-4dbfcc.svg?style=flat-square\n[license-img]: http://img.shields.io/:license-mit-blue.svg?style=flat-square\n[license-url]: https://opensource.org/licenses/MIT\n[travis-img]: https://img.shields.io/travis/plus1tv/markademic.svg?style=flat-square\n[travis-url]:https://www.travis-ci.com/github/plus1tv/markademic\n[codecov-img]:https://img.shields.io/codecov/c/github/plus1tv/markademic.svg?style=flat-square\n[codecov-url]: https://codecov.io/gh/plus1tv/markademic\n[npm-img]: https://img.shields.io/npm/v/markademic.svg?style=flat-square\n[npm-url]: http://npm.im/markademic\n[npm-download-img]: https://img.shields.io/npm/dm/markademic.svg?style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplus1tv%2Fmarkademic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplus1tv%2Fmarkademic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplus1tv%2Fmarkademic/lists"}