[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-732860-105":59,"doc-detail-732860-en":130,"doc-similar-732860":160},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","codebraid-live-code-in-pandoc-markdown","Codebraid: Live Code in Pandoc Markdown","","Codebraid executes code blocks and inline code within Pandoc Markdown documents during the build process, enabling single documents to mix multiple programming languages and run multiple independent sessions or processes per language. Using only standard Pandoc Markdown syntax, Pandoc performs all parsing and format conversions, while each executed code chunk can be replaced by the chosen combination of source, code, stdout/stderr, or rich Jupyter output. It also supports programmatic copying of code or results into other document sections.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":40,"@type":76,"position":81},"https://docshare.wps.com/document/research-report/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/codebraid-live-code-in-pandoc-markdown/732860/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/codebraid-live-code-in-pandoc-markdown/732860.png","ImageObject",300,407,{"name":92,"@type":93},"eBook King","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-26","2026-11-22",true,{"@type":102,"interactionType":103,"userInteractionCount":14},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What does Codebraid execute in Pandoc Markdown documents?","Question",{"text":112,"@type":113},"Codebraid executes both fenced code blocks and inline code in Pandoc Markdown during the document build process.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"How does Codebraid integrate with Pandoc for parsing and conversions?",{"text":117,"@type":113},"Because Codebraid relies on standard Pandoc Markdown syntax, Pandoc handles all Markdown parsing and the conversion into the final output formats.",{"name":119,"@type":110,"acceptedAnswer":120},"What outputs can be included from executed code blocks?",{"text":121,"@type":113},"A code chunk can be replaced by any combination of its original Markdown source, the code itself, stdout/stderr, or rich output when using Jupyter kernels.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},732860,1795382563,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":39,"category_name":40,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":14,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":39,"language":139,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":67,"update_tm":129,"read_time":46,"preview_page_count":19,"preview_urls":143},962088006270,"https://ap-avatar.wpscdn.com/davatar_085a072bc5b1113ac321206ff7593b45","Codebraid: Live Code in Pandoc Markdown  \nGeoffrey M. Poore‡􀀃  \n~~ ~~ F ~~ ~~  \nAbstract—Codebraid executes code blocks and inline code in Pandoc Markdown documents as part of the document build process. Code can be executed with a built-in system or Jupyter kernels. Either way, a single document can involve multiple programming languages, as well as multiple independent sessions or processes per language. Because Codebraid only uses standard Pandoc Markdown syntax, Pandoc handles all Markdown parsing and format conversions. In the ﬁnal output document produced by Pandoc, a code chunk can be replaced by a display of any combination of its original Markdown source, its code, the stdout or stderr resulting from execution, or rich output in the case of Jupyter kernels. There is also support for programmatically copying code or output to other parts of a document.  \nIndex Terms—reproducibility, dynamic report generation, literate programming, Python, Pandoc, Project Jupyter  \nIntroduction  \nScientiﬁc and technical documents are increasingly written with software that allows a mixture of text and executable code, such as the Jupyter Notebook [KRKP+16], knitr [YX15], and Orgmode Babel [SD11], [SDDD12] . Writing with such tools can enhance reproducibility, simplify code documentation, and aid in automating reports.  \nThis paper introduces Codebraid, which allows executable code within Pandoc Markdown documents [JG19], [JM19] . Codebraid is developed at [https://github.com/gpoore/codebraid](https://github.com/gpoore/codebraid) and is available from the Python Package Index (PyPI) . It allows Markdown code blocks like the one below to be executed during the document build process. In this case, the “.[cb.run](cb.run)” tells Codebraid to run the code and include the output.```{.[python .cb.run}](python .cb.run})  \nprint(\"Running code within *Markdown! *\")```  \nThe ﬁnal document contains the code's output, interpreted as if it had been entered directly in the original Markdown source:  \nRunning code within Markdown!  \nA document using Codebraid can be converted from Markdown into any of the many formats supported by Pandoc, such as HTML, Microsoft Word, LaTeX, and PDF. Codebraid delegates all Markdown parsing and format conversions to Pandoc, so it does not introduce any special restrictions on what is possible with a Pandoc Markdown document. This close integration with Pandoc also means that Codebraid can be extended in the future to work with additional document formats beyond Markdown.  \n* [Corresponding author:](Corresponding author: gpoore@uu.edu)[ gpoore@uu.edu](Corresponding author: gpoore@uu.edu)[ ](Corresponding author: gpoore@uu.edu)‡ Union University  \nCopyright © 2019 Geoffrey M. Poore. This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.  \nCodebraid includes a built-in code execution system. It can also use Jupyter kernels [KRKP+16] to execute code. The ﬁrst code block that is executed with a given language can specify a kernel. In the example below, the “.cb .nb” tells Codebraid to run the code and provide a “notebook” display that shows both code and output, while “jupyter_kernel” speciﬁes a kernel.  \n```{ .python .cb .nb jupyter_kernel=python3} from sympy import *  \ninit_printing()  \nx = Symbol('x')  \nintegral = Integral(E ** (-x **2), (x, -oo, oo))  \ndisplay(integral)  \nintegral .doit()```  \nBecause a Jupyter kernel was used to run the code, the result includes rich output in the form of rendered LaTeX math, just as it would in a Jupyter notebook:  \nfrom sympy import *  \ninit_printing()  \nx = Symbol( ' x ' )  \nintegral = Integral(E ** (-x **2), (x, -oo, oo))  \ndisplay(integral)  \nintegral .doit()  \nZ¥􀀀¥ e􀀀x2 dx  \npp  \nThe next section provides an example of the document build process with Codebraid. This is followed by an overview of Codebr","cbCairttdUACxJWy","https://ap.wps.com/l/cbCairttdUACxJWy","pdf",198546,"English","# Introduction\n## Building a simple Codebraid document\n## Comparison","[{\"question\":\"What does Codebraid execute in Pandoc Markdown documents?\",\"answer\":\"Codebraid executes both fenced code blocks and inline code in Pandoc Markdown during the document build process.\"},{\"question\":\"How does Codebraid integrate with Pandoc for parsing and conversions?\",\"answer\":\"Because Codebraid relies on standard Pandoc Markdown syntax, Pandoc handles all Markdown parsing and the conversion into the final output formats.\"},{\"question\":\"What outputs can be included from executed code blocks?\",\"answer\":\"A code chunk can be replaced by any combination of its original Markdown source, the code itself, stdout/stderr, or rich output when using Jupyter kernels.\"}]","Codebraid: Live Code in Pandoc Markdown | PDF",[144,148,152,156],{"page_no":8,"url":145,"width":146,"height":147},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-22/fe0ed118c14261a72d1c51af94ac6b4a.webp",983,1272,{"page_no":14,"url":149,"width":150,"height":151},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-22/2f486733045871e2937a16efdf3e7023.webp",982,1270,{"page_no":81,"url":153,"width":154,"height":155},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-22/f0c0292c4d12961e9add41a8e37e33d1.webp",981,1269,{"page_no":19,"url":157,"width":158,"height":159},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-22/d1884150adb66f40d938d1a194acd536.webp",980,1268,{"list":161,"token":66},[162,168,175,181,188,194,201,207,213,219],{"doc_id":163,"doc_title":164,"file_type":137,"home_preview_img_url":165,"slug":166,"view_count":14,"category_name":40,"create_tm":167},698000,"Comparing Markdown Flavors - Purpose - Conclusion","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010155776/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110859&Signature=Kf8EWoUvZmlDabK8QxAG5n8F8sg%3D","comparing-markdown-flavors-purpose-conclusion",1794446936,{"doc_id":169,"doc_title":170,"file_type":137,"home_preview_img_url":171,"slug":172,"view_count":173,"category_name":40,"create_tm":174},127899,"Static Analysis Driven Enhancements for Comprehension in Machine Learning Notebooks","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229839461065/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110859&Signature=vzCi2r%2FLeAr5rvLLWD87GQk5WmY%3D","static-analysis-driven-enhancements-for-comprehension-in-machine-learning-notebooks",13,1785942802,{"doc_id":176,"doc_title":177,"file_type":137,"home_preview_img_url":178,"slug":179,"view_count":81,"category_name":40,"create_tm":180},686739,"LATEX Command Summary - Reference and usage notes","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001102595/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110859&Signature=%2BvuZZfFQIOB%2BRTNQPRpg7E5HNvU%3D","latex-command-summary-reference-and-usage-notes",1794062399,{"doc_id":182,"doc_title":183,"file_type":137,"home_preview_img_url":184,"slug":185,"view_count":186,"category_name":40,"create_tm":187},84853,"Plainbook Data Science in Plain Language","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229809074009/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110859&Signature=44u6pHJ1fdECQkY8siRE6zkGCBU%3D","plainbook-data-science-in-plain-language",22,1784198814,{"doc_id":189,"doc_title":190,"file_type":137,"home_preview_img_url":191,"slug":192,"view_count":29,"category_name":40,"create_tm":193},652815,"C Reference Manual - Introduction","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229973518140/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110859&Signature=VboQGHsAZYcq0vUaF3vKhhJL3%2FU%3D","c-reference-manual-introduction",1792882999,{"doc_id":195,"doc_title":196,"file_type":137,"home_preview_img_url":197,"slug":198,"view_count":199,"category_name":40,"create_tm":200},83551,"Beyond Document Grounding Span-Level Hallucination Detection","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229808987186/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110859&Signature=vYHGAp9zrnRmewcInP%2FgbHUHd%2Fw%3D","beyond-document-grounding-span-level-hallucination-detection",32,1784188763,{"doc_id":202,"doc_title":203,"file_type":137,"home_preview_img_url":204,"slug":205,"view_count":52,"category_name":40,"create_tm":206},450802,"Will college promise programs improve or reduce equity? Understanding the contextual conditions that influence program implementation","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229924872496/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110859&Signature=SUvioPHqqYtARXT66bTPMNJ80iw%3D","will-college-promise-programs-improve-or-reduce-equity-understanding-the-contextual-conditions-that-influence-program-implementation",1790733903,{"doc_id":208,"doc_title":209,"file_type":137,"home_preview_img_url":210,"slug":211,"view_count":52,"category_name":40,"create_tm":212},657505,"Adopting the C4 model for lightweight architecture modeling - An experience report","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975517530/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110859&Signature=eQCT6tumZAMKDmXVMElSEMWcPHw%3D","adopting-the-c4-model-for-lightweight-architecture-modeling-an-experience-report",1792981484,{"doc_id":214,"doc_title":215,"file_type":137,"home_preview_img_url":216,"slug":217,"view_count":39,"category_name":40,"create_tm":218},290520,"Configuration Manual - Project Title: Enhancing Digital Image Forensics in Cybersecurity Using Machine Learning","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229903733036/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110859&Signature=%2FBU5bAe5WoSu84zcb0eW43bVkFA%3D","configuration-manual-project-title-enhancing-digital-image-forensics-in-cybersecurity-using-machine-learning",1789641926,{"doc_id":220,"doc_title":221,"file_type":137,"home_preview_img_url":222,"slug":223,"view_count":81,"category_name":40,"create_tm":224},687460,"LaTeX is NOT Easy - Creating Accessible Scientific Documents with R Markdown","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000648754/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110859&Signature=0Slfai%2FG8cJ9es8fmaObjS6LFBg%3D","latex-is-not-easy-creating-accessible-scientific-documents-with-r-markdown",1794083739]