<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Markdown on Jingyuan</title>
        <link>https://jingyuan-zheng.github.io/tags/markdown/</link>
        <description>Recent content in Markdown on Jingyuan</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en-US</language>
        <copyright>Jingyuan Zheng</copyright>
        <lastBuildDate>Thu, 22 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://jingyuan-zheng.github.io/tags/markdown/index.xml" rel="self" type="application/rss+xml" /><item>
            <title>Export ChatGPT Conversations to Markdown for Typora</title>
            <link>https://jingyuan-zheng.github.io/p/chatgpt-to-markdown-userscript/</link>
            <pubDate>Tue, 16 Sep 2025 00:00:00 +0000</pubDate>
            <guid>https://jingyuan-zheng.github.io/p/chatgpt-to-markdown-userscript/</guid>
            <description>&lt;img src=&#34;https://jingyuan-zheng.github.io/img/chatgpt-to-markdown-userscript/featured.png&#34; alt=&#34;Featured image of post Export ChatGPT Conversations to Markdown for Typora&#34; /&gt;&lt;p&gt;ChatGPT to Markdown Exporter is a browser userscript that converts loaded conversation content into a Markdown file for editing and archiving in tools such as Typora.&lt;/p&gt;&#xA;&lt;p&gt;Copying a useful answer into notes can lose code formatting, mathematical notation, or links. The &lt;a class=&#34;link&#34; href=&#34;https://github.com/Jingyuan-Zheng/ChatGPT-To-Markdown-UserScript&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;userscript in this repository&lt;/a&gt; adapts an earlier &lt;a class=&#34;link&#34; href=&#34;https://github.com/Marverlises/ChatGPT-To-Markdown-google-plugin&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Chrome-extension project&lt;/a&gt; into a script that runs on supported conversation pages.&lt;/p&gt;&#xA;&lt;p&gt;It works with the page already rendered in the browser. It is not an account-wide export system and should not be assumed to capture conversations that were never loaded.&lt;/p&gt;&#xA;&lt;h2 id=&#34;install-the-userscript-version&#34;&gt;Install the userscript version&#xA;&lt;/h2&gt;&lt;p&gt;The README links to a &lt;a class=&#34;link&#34; href=&#34;https://greasyfork.org/zh-CN/scripts/529601&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Greasy Fork installation page&lt;/a&gt;. Alternatively, inspect &lt;code&gt;ChatGPT-To-Markdown-UserScript.js&lt;/code&gt; in the repository and install its contents through your userscript manager.&lt;/p&gt;&#xA;&lt;p&gt;The repository also retains files and screenshots from the earlier Chrome extension. Instructions for loading an unpacked extension are a different installation method; they are not required just to install this userscript.&lt;/p&gt;&#xA;&lt;p&gt;The script metadata matches ChatGPT/OpenAI conversation domains and Grok. Matching a domain only allows the script to run there; it does not establish that its selectors still match every current page layout.&lt;/p&gt;&#xA;&lt;h2 id=&#34;export-a-loaded-conversation&#34;&gt;Export a loaded conversation&#xA;&lt;/h2&gt;&lt;p&gt;Open the conversation you want to keep, let the relevant messages load, and look for &lt;strong&gt;Export Chat&lt;/strong&gt;. The script builds a preview with &lt;strong&gt;Copy&lt;/strong&gt;, &lt;strong&gt;Download&lt;/strong&gt;, and &lt;strong&gt;Close&lt;/strong&gt; controls.&lt;/p&gt;&#xA;&lt;p&gt;Download saves &lt;code&gt;chat-export.md&lt;/code&gt;. Open it in Typora or another Markdown editor and rename it with a topic and date. Count the question-and-answer turns, then check whether code blocks close correctly and formulas render as expected. Those checks matter more than a tidy-looking preview.&lt;/p&gt;&#xA;&lt;p&gt;The code pairs selected page elements in order. Unusual layouts, missing messages, or changed DOM structure can therefore affect more than appearance: they can affect which messages are included.&lt;/p&gt;&#xA;&lt;h2 id=&#34;how-formulas-and-code-are-handled&#34;&gt;How formulas and code are handled&#xA;&lt;/h2&gt;&lt;p&gt;The script turns headings, lists, links, code blocks, and formulas on the page into Markdown. For formulas, it tries to preserve the underlying LaTeX expression rather than capture the visible equation as an image.&lt;/p&gt;&#xA;&lt;p&gt;A useful small test conversation contains one code block, one inline equation, one display equation, and a short list. Inspect both the Markdown source and its rendered result.&lt;/p&gt;&#xA;&lt;p&gt;For example, a display formula should remain recognizable as:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;&#xA;&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3&#xA;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#xA;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$$&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;E = mc^2&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$$&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&lt;p&gt;For complex equations, nested lists, and tables, compare the exported symbols, indentation, and cell order with the original conversation.&lt;/p&gt;&#xA;&lt;h2 id=&#34;compatibility-needs-checking&#34;&gt;Compatibility needs checking&#xA;&lt;/h2&gt;&lt;p&gt;The script must recognize message containers on the page. After a ChatGPT or Grok redesign, &lt;strong&gt;Export Chat&lt;/strong&gt; may still appear while the download is incomplete. Test a short conversation before treating a new export as a complete backup.&lt;/p&gt;&#xA;&lt;p&gt;If you see &lt;strong&gt;No conversation content found&lt;/strong&gt;, first confirm that the conversation is loaded and that the script is running on the intended page. Then inspect the selectors or report the problem upstream. Reinstalling the same unchanged script will not repair a selector that no longer matches.&lt;/p&gt;&#xA;&lt;p&gt;If the button remains visible but the download is empty, check recent script updates and feedback. A website redesign may require a script update.&lt;/p&gt;&#xA;&lt;h2 id=&#34;confirm-the-script-is-active-on-this-page&#34;&gt;Confirm the script is active on this page&#xA;&lt;/h2&gt;&lt;p&gt;A userscript needs a browser script manager. Opening its source as a webpage does not install it. The Greasy Fork route should present the script name, matching addresses, and an installation confirmation from that manager. If you only see JavaScript text, check the manager first rather than importing the code as an unpacked extension.&lt;/p&gt;&#xA;&lt;p&gt;Reload the conversation after installation and inspect the manager’s menu to confirm the script is enabled on this site. If you already have another exporter or the older extension, test with one active implementation at a time. Two similarly named buttons make it difficult to know which version produced a file.&lt;/p&gt;&#xA;&lt;p&gt;For long conversations, scroll to the material you want and allow it to display before exporting. Seeing the last response does not establish that all earlier messages are loaded. Compare the first and last turns in the download with the webpage, then sample the middle. This reveals omissions more clearly than file size alone.&lt;/p&gt;&#xA;&lt;h2 id=&#34;check-a-small-sample-of-formatted-content&#34;&gt;Check a small sample of formatted content&#xA;&lt;/h2&gt;&lt;p&gt;Choose a conversation containing a heading, list, link, code, and an equation. In code blocks, inspect paired triple backticks, indentation, and characters such as &lt;code&gt;&amp;lt;&lt;/code&gt; and &lt;code&gt;&amp;gt;&lt;/code&gt;. Review the text against the original before running exported code.&lt;/p&gt;&#xA;&lt;p&gt;For formulas, inspect both source and preview. &lt;code&gt;$...$&lt;/code&gt; commonly denotes inline math and &lt;code&gt;$$...$$&lt;/code&gt; display math, but rendering also depends on the editor. If the markers are present while Typora shows plain text, check its mathematics settings before concluding that extraction failed.&lt;/p&gt;&#xA;&lt;p&gt;A missing table separator can shift a whole row. Follow links too: correct visible text does not establish a correct destination. Verify formatting and completeness before rewriting the material into polished notes. Otherwise it becomes harder to tell whether a mistake happened during export or later editing.&lt;/p&gt;&#xA;&lt;h2 id=&#34;give-each-export-an-identifiable-home&#34;&gt;Give each export an identifiable home&#xA;&lt;/h2&gt;&lt;p&gt;The default &lt;code&gt;chat-export.md&lt;/code&gt; name can produce a string of numbered downloads. Create a topic folder and rename the file with a date and subject. Separate the original conversation from a revised note when you want both a full record and a concise explanation.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;&#xA;&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5&#xA;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#xA;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Research Notes/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── Regression/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    ├── 2025-09-16-original-conversation.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    ├── regression-notes.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    └── images/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&lt;p&gt;The &lt;code&gt;images&lt;/code&gt; folder is your own filing convention, not a promise that the script downloads remote images. For offline use, check image access, save the assets where permitted, and update Markdown references to local paths. Reopen the note without a connection to identify anything still dependent on the website.&lt;/p&gt;&#xA;&lt;p&gt;Add a source-conversation link or a brief provenance note to your edited version. Before sharing, remove unrelated private material and check that editing preserved code and mathematical meaning. Export gives you an editable file; organization and verification turn it into a useful reference.&lt;/p&gt;&#xA;&lt;h2 id=&#34;keep-the-archive-useful&#34;&gt;Keep the archive useful&#xA;&lt;/h2&gt;&lt;p&gt;The export code assembles the Markdown in the browser and creates a local download. Image references remain URLs, so the Markdown file alone is not necessarily a self-contained offline archive. Check access and availability before sharing or relying on those images later.&lt;/p&gt;&#xA;&lt;p&gt;After export, remove sensitive content before publishing and verify that code and formulas still mean what the source conversation meant. For better filenames after saving, see &lt;a class=&#34;link&#34; href=&#34;https://jingyuan-zheng.github.io/p/auto-filename-helper/&#34; &gt;Auto Filename Helper&lt;/a&gt;. The &lt;a class=&#34;link&#34; href=&#34;https://github.com/Jingyuan-Zheng/ChatGPT-To-Markdown-UserScript/blob/main/ChatGPT-To-Markdown-UserScript.js&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;source file&lt;/a&gt; is the clearest reference for the actual conversion rules.&lt;/p&gt;&#xA;</description>
        </item></channel>
</rss>
