1:"$Sreact.fragment" 2:I[60675,["8173","static/chunks/8173-066406f34141ecb3.js","7177","static/chunks/app/layout-e5b6254cced12c56.js"],"Header"] 3:I[15244,[],""] 4:I[43866,[],""] 5:I[60766,["8173","static/chunks/8173-066406f34141ecb3.js","7177","static/chunks/app/layout-e5b6254cced12c56.js"],"GoogleAnalytics"] 6:I[65169,["5927","static/chunks/5927-d3ef888da69b1ef7.js","6688","static/chunks/6688-4eb813fd012b609d.js","8996","static/chunks/8996-9f8c149b4b55efd1.js","8655","static/chunks/app/code-highlight/page-ca3b75766e2ee1e8.js"],"CodeInputOutput",1] 8:I[86213,[],"OutletBoundary"] a:I[86213,[],"MetadataBoundary"] c:I[86213,[],"ViewportBoundary"] e:I[34835,[],""] :HL["/_next/static/css/ff47c8294a96d26a.css","style"] 0:{"P":null,"b":"Eh3qxYeU1yEQxh1X2uq5G","p":"","c":["","code-highlight"],"i":false,"f":[[["",{"children":["code-highlight",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[null,["$","html",null,{"lang":"en","children":[["$","body",null,{"children":[["$","$L2",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[],[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]]],"forbidden":"$undefined","unauthorized":"$undefined"}]]}],["$","$L5",null,{"gaId":"G-6TCR87FRLX"}]]}]]}],{"children":["code-highlight",["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","code-highlight","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","div",null,{"style":{"padding":"var(--size-gutter)"},"className":"dark:bg-zinc-900","children":[["$","main",null,{"className":"w-full mb-4","children":["$","article",null,{"className":"prose prose-zinc dark:prose-invert prose-code:before:hidden prose-code:after:hidden prose-inline-code:bg-amber-50 dark:prose-inline-code:bg-amber-950 !max-w-full","children":[["$","h1",null,{"children":"Code Highlighter"}],["$","$L6",null,{}],[["$","a",null,{"href":"#about-this-tool","className":"group no-underline","children":["$","h2",null,{"id":"about-this-tool","children":[["$","span",null,{"className":"absolute -translate-x-[140%] opacity-0 group-hover:opacity-35","children":"#"}]," ","About this tool"]}]}],"\n",["$","p",null,{"children":"This tool adds syntax highlighting to code for pasting into slide decks. It supports highlighting of C/C++ code with Cilk's language extensions for\ntask-parallel programming."}],"\n",["$","a",null,{"href":"#how-to-use-it","className":"group no-underline","children":["$","h2",null,{"id":"how-to-use-it","children":[["$","span",null,{"className":"absolute -translate-x-[140%] opacity-0 group-hover:opacity-35","children":"#"}]," ","How to use it"]}]}],"\n",["$","ol",null,{"children":["\n",["$","li",null,{"children":"Enter the code you want to highlight into the form. A syntax-highlighted version of that code will appear in the output box as you type."}],"\n",["$","li",null,{"children":["Click the ",["$","code",null,{"children":"Copy"}]," button to copy the HTML of the syntax-highlighted version of the code, then paste that HTML into your slide editor: PowerPoint, Keynote, etc."]}],"\n"]}],"\n",["$","p",null,{"children":"Use the drop-down menus above the output box to change the programming language and theme used to highlight the code."}],"\n",["$","div",null,{"className":"not-prose border-l-2 px-4 py-2 bg-purple-50 border-purple-500 dark:bg-purple-950","role":"alert","children":["$","div",null,{"className":"flex","children":[["$","div",null,{"className":"py-1","children":["$","svg",null,{"xmlns":"http://www.w3.org/2000/svg","fill":"none","viewBox":"0 0 24 24","strokeWidth":1.5,"stroke":"currentColor","className":"size-6 text-purple-500 mr-2","children":["$","path",null,{"strokeLinecap":"round","strokeLinejoin":"round","d":"M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 0 1 .865-.501 48.172 48.172 0 0 0 3.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"}]}]}],["$","div",null,{"id":"alert","children":["$","p",null,{"children":"Some systems, such as PowerPoint on macOS, do not preserve all of the spacing in the original HTML. In these cases, you can paste the HTML into a text editor, to generate RTF, and then copy and paste that RTF into your slide."}]}]]}]}],"\n",["$","a",null,{"href":"#troubleshooting","className":"group no-underline","children":["$","h2",null,{"id":"troubleshooting","children":[["$","span",null,{"className":"absolute -translate-x-[140%] opacity-0 group-hover:opacity-35","children":"#"}]," ","Troubleshooting"]}]}],"\n",["$","p",null,{"children":["If your code uses a custom data type that is not defined in the code snippet, then the highlighter might not properly highlight that type or variables that use it. You can fix this issue by adding a ",["$","code",null,{"children":"typedef"}]," or other statement that defines that type, even if the definition is incomplete."]}],"\n",["$","a",null,{"href":"#technical-details","className":"group no-underline","children":["$","h2",null,{"id":"technical-details","children":[["$","span",null,{"className":"absolute -translate-x-[140%] opacity-0 group-hover:opacity-35","children":"#"}]," ","Technical details"]}]}],"\n",["$","p",null,{"children":"This tool runs locally in your browser. Nothing you enter is sent to any server or recorded."}],"\n",["$","p",null,{"children":["This tool uses the ",["$","a",null,{"href":"https://shiki.matsu.io/","children":"Shiki syntax highlighter"}]," with two extensions:"]}],"\n",["$","ol",null,{"children":["\n",["$","li",null,{"children":["Custom C/C++ TextMate grammars, based on ",["$","a",null,{"href":"https://github.com/jeff-hykin/better-cpp-syntax","children":"better-cpp-syntax"}],", that support the Cilk language extension; and"]}],"\n",["$","li",null,{"children":"A simple, custom semantic highlighter for C and C++."}],"\n"]}],"\n",["$","p",null,{"children":["Found a bug? ",["$","a",null,{"href":"https://github.com/neboat/nextjs-personal-site/issues","children":"Please let me know."}]]}]]]}]}],["$","footer",null,{"style":{"marginTop":"var(--space-5)","fontSize":"var(--font-sm)"},"className":"text-zinc-500","children":["© ",2025," Tao B. Schardl"," ","· Last modified ","$@7"," ","· ",["$","a",null,{"href":"http://accessibility.mit.edu/","children":"Accessibility"}]]}]]}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/ff47c8294a96d26a.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","$L8",null,{"children":"$L9"}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,["$","$1","wIbU7ZSsVWqnmpw2x6tRO",{"children":[["$","$La",null,{"children":"$Lb"}],["$","$Lc",null,{"children":"$Ld"}],null]}]]}],false]],"m":"$undefined","G":["$e","$undefined"],"s":false,"S":true} d:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] b:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"Code Highlighter | Tao B. Schardl"}],["$","meta","2",{"name":"description","content":"Tool to generate highlighted C/C++ and Cilk code for slides"}],["$","link","3",{"rel":"author","href":"https://neboat.mit.edu"}],["$","meta","4",{"name":"author","content":"Tao B. Schardl"}],["$","meta","5",{"name":"generator","content":"Next.js"}],["$","meta","6",{"name":"referrer","content":"origin-when-cross-origin"}],["$","link","7",{"rel":"canonical","href":"https://neboat.mit.edu/code-highlight"}],["$","meta","8",{"name":"format-detection","content":"telephone=no, address=no, email=no"}],["$","meta","9",{"property":"og:title","content":"Code Highlighter | Tao B. Schardl"}],["$","meta","10",{"property":"og:description","content":"Tool to generate highlighted C/C++ and Cilk code for slides"}],["$","meta","11",{"property":"og:type","content":"website"}],["$","meta","12",{"name":"twitter:card","content":"summary"}],["$","meta","13",{"name":"twitter:title","content":"Code Highlighter | Tao B. Schardl"}],["$","meta","14",{"name":"twitter:description","content":"Tool to generate highlighted C/C++ and Cilk code for slides"}],["$","link","15",{"rel":"icon","href":"/icon.svg?76306e7d0afecba5","type":"image/svg+xml","sizes":"any"}]] 9:null 7:"12/24/2024"