├── .gitignore ├── LICENSE ├── README-zh.md ├── README.md ├── __init__.py ├── config.json ├── config.md ├── config.py ├── editors.py ├── globalGraph.py ├── icons ├── showGraphPage.svg └── showLinksPage.svg ├── show.gif ├── show.jpg ├── show0.jpg ├── state.py ├── translation.py └── web ├── config.html ├── fonts ├── KaTeX_AMS-Regular.ttf ├── KaTeX_AMS-Regular.woff ├── KaTeX_AMS-Regular.woff2 ├── KaTeX_Caligraphic-Bold.ttf ├── KaTeX_Caligraphic-Bold.woff ├── KaTeX_Caligraphic-Bold.woff2 ├── KaTeX_Caligraphic-Regular.ttf ├── KaTeX_Caligraphic-Regular.woff ├── KaTeX_Caligraphic-Regular.woff2 ├── KaTeX_Fraktur-Bold.ttf ├── KaTeX_Fraktur-Bold.woff ├── KaTeX_Fraktur-Bold.woff2 ├── KaTeX_Fraktur-Regular.ttf ├── KaTeX_Fraktur-Regular.woff ├── KaTeX_Fraktur-Regular.woff2 ├── KaTeX_Main-Bold.ttf ├── KaTeX_Main-Bold.woff ├── KaTeX_Main-Bold.woff2 ├── KaTeX_Main-BoldItalic.ttf ├── KaTeX_Main-BoldItalic.woff ├── KaTeX_Main-BoldItalic.woff2 ├── KaTeX_Main-Italic.ttf ├── KaTeX_Main-Italic.woff ├── KaTeX_Main-Italic.woff2 ├── KaTeX_Main-Regular.ttf ├── KaTeX_Main-Regular.woff ├── KaTeX_Main-Regular.woff2 ├── KaTeX_Math-BoldItalic.ttf ├── KaTeX_Math-BoldItalic.woff ├── KaTeX_Math-BoldItalic.woff2 ├── KaTeX_Math-Italic.ttf ├── KaTeX_Math-Italic.woff ├── KaTeX_Math-Italic.woff2 ├── KaTeX_SansSerif-Bold.ttf ├── KaTeX_SansSerif-Bold.woff ├── KaTeX_SansSerif-Bold.woff2 ├── KaTeX_SansSerif-Italic.ttf ├── KaTeX_SansSerif-Italic.woff ├── KaTeX_SansSerif-Italic.woff2 ├── KaTeX_SansSerif-Regular.ttf ├── KaTeX_SansSerif-Regular.woff ├── KaTeX_SansSerif-Regular.woff2 ├── KaTeX_Script-Regular.ttf ├── KaTeX_Script-Regular.woff ├── KaTeX_Script-Regular.woff2 ├── KaTeX_Size1-Regular.ttf ├── KaTeX_Size1-Regular.woff ├── KaTeX_Size1-Regular.woff2 ├── KaTeX_Size2-Regular.ttf ├── KaTeX_Size2-Regular.woff ├── KaTeX_Size2-Regular.woff2 ├── KaTeX_Size3-Regular.ttf ├── KaTeX_Size3-Regular.woff ├── KaTeX_Size3-Regular.woff2 ├── KaTeX_Size4-Regular.ttf ├── KaTeX_Size4-Regular.woff ├── KaTeX_Size4-Regular.woff2 ├── KaTeX_Typewriter-Regular.ttf ├── KaTeX_Typewriter-Regular.woff └── KaTeX_Typewriter-Regular.woff2 ├── graph.html ├── js ├── d3.js ├── detectClick.js ├── force-graph.js ├── katex-auto-render.js ├── katex-mhchem.js ├── katex.js ├── pixi.js └── translation.js ├── katex.css ├── links.html └── newGraph.html /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | /__pycache__ 3 | meta.json -------------------------------------------------------------------------------- /README-zh.md: -------------------------------------------------------------------------------- 1 | **[English](README.md) | 简体中文** 2 | 3 | # Anki 笔记链接器 4 | 5 | [在 AnkiWeb 中查看](https://ankiweb.net/shared/info/1077002392) 6 | 7 | ![show0.jpg](show0.jpg) 8 | 9 | ![show.jpg](show.jpg) 10 | 11 | ![show.gif](show.gif) 12 | 13 | 您可以通过这个插件轻松地将您的Anki笔记连接在一起,形成一个相互连接的信息网络。 14 | 通过在相关笔记之间建立链接,您可以创建一个全面而有组织的知识库,反映各种概念,想法和主题之间的关系。 15 | 16 | ## 公告 📢 17 | 由于个人精力有限,我无法持续为这个插件开发新功能。未来的更新将主要集中在修复bug上。如果有人对基于此开发新功能感兴趣,欢迎提交合并请求,或开发后独立上架到Anki插件市场。 18 | 19 | ## 链接格式 20 | 21 | `[链接标题|nidxxxxxxxxxxxxx]` 22 | 23 | 链接标题是在卡片中显示的内容。如果标题包含`[`,则需要使用`\[`进行转义 24 | 25 | `x`是笔记的ID,由13位数字组成 26 | 27 | 您可以使用CSS选择器`.noteLink`来自定义链接的样式 28 | 29 | ## 使用方法 30 | 31 | ### 在编辑器中: 32 | 33 | #### 复制笔记ID 34 | 35 | 使用右键菜单或按`Alt+Shift+C`复制编辑器中当前笔记的ID 36 | 37 | #### 复制笔记链接 38 | 39 | 使用右键菜单或按`Alt+Shift+L`复制编辑器中当前笔记的链接 40 | 41 | #### 插入带有已复制的笔记ID的链接 42 | 43 | 使用右键菜单或按`Alt+Shift+V`从剪贴板中的笔记ID和当前选定的文本生成链接 44 | 45 | #### 插入新链接(用于添加笔记) 46 | 47 | 通过使用右键单击菜单或按下`Alt+Shift+N`从当前选定的文本生成新链接 48 | 49 | 双击生成的链接文本可以添加相应的新笔记 50 | 51 | #### 插入链接模板 52 | 53 | 使用右键单击菜单或按`Alt+Shift+T`从当前选定的文本生成链接模板 54 | 55 | 生成的链接模板看起来是这样:`[选定的文本|nid]`,您需要手动补充笔记ID来完成它 56 | 57 | _提示: 若没有选中文本,使用上述操作将生成一个没有标题的链接_ 58 | 59 | #### 在新窗口中打开当前笔记 60 | 61 | 使用右键菜单或按`Alt+Shift+W`在新窗口中打开当前笔记 62 | 63 | #### 在新窗口中打开链接对应的笔记 64 | 65 | `双击链接文本`在新窗口中打开对应的笔记 66 | 67 | ### 在附加到编辑器的“链接面板/关系图面板”中: 68 | 69 | `左键单击链接`在当前编辑器窗口中打开对应的笔记 70 | 71 | `右键单击链接`在新的编辑器窗口中打开对应的笔记 72 | 73 | `中键(滚轮)单击链接`在浏览器界面中打开对应的笔记(在关系图面板中不支持) 74 | 75 | ### 在“复习界面/预览界面/全局关系图”中: 76 | 77 | `左键单击链接`在预览器窗口中打开对应的笔记 78 | 79 | `右键单击链接`在编辑器窗口中打开对应的笔记 80 | 81 | ### 全局关系图 82 | 83 | 入口: `菜单 -> Anki Note Linker -> 全局关系图` 84 | 85 | 请将Anki设置中的显示驱动设置为`Software`以外的选项,因为它会显著降低图形性能 86 | 87 | ### 自定义快捷键 88 | 89 | 您可以根据自己的喜好在插件配置中自定义快捷键 90 | 91 | 如果使用快捷键时没有响应,则可能是由于快捷键冲突,请尝试更改快捷键 92 | 93 | --- 94 | ## 如何在没有此插件的情况下正确显示笔记(例如在AnkiDroid、AnkiWeb或AnkiMobile中) 95 | 96 | 此插件会自动将笔记链接呈现为桌面版Anki上的相应内容。如果没有此插件,链接将无法正确呈现,从而影响在移动设备上的使用。但是,您仍然可以恢复一些功能。 97 | 98 | 如果您已经生成了笔记链接,并且需要在没有此插件的情况下使用,则可以按以下步骤操作: 99 | 100 | 1. 在卡片模版中,给正面和背面的每个笔记字段加上`class`属性`"linkRender"`,您也可以自定义它的名称 101 | 102 | ```html 103 |
{{问题}}
104 |
{{答案}}
105 | 106 |
{{补充}}
107 | ``` 108 | 2. 将以下代码复制到卡片模版中,如果您更改了代码中的`"linkRender"`属性,请同时修改以下代码中对应的文本。如果你想只渲染文本(移除 "[|nid]" 标记)而不需要链接跳转功能,请将`disableLinks`变量设置为`true` 109 | 110 | ```html 111 | 137 | ``` 138 | 139 | 3. 保存卡片模板,并将您的卡片组同步到AnkiWeb 140 | 141 | 完成这些操作后,Anki会自动呈现正确的链接内容 142 | 143 | 如果您在AnkiDroid或AnkiMobile客户端上点击一个链接,将会尝试在卡片浏览器中显示相应笔记的卡片;如果您在AnkiWeb上点击一个链接,它将打开相应笔记的AnkiWeb编辑页面;如果您将`disableLinks`变量更改为`true`,则仅显示原始卡片内容,没有链接功能 144 | 145 | --- 146 | 本插件创作灵感来源于 [Obsidian](https://obsidian.md/) 147 | 148 | 本项目中使用到了以下项目: 149 | 150 | - [pixijs](https://github.com/pixijs/pixijs) 151 | 152 | - [d3](https://github.com/d3/d3) 153 | 154 | - [KaTeX](https://github.com/KaTeX/KaTeX) 155 | 156 | - [Force graph](https://github.com/vasturiano/force-graph) 157 | 158 | 此插件的实现受到以下插件的启发: 159 | 160 | - [link Cards Notes and Preview them in extra window](https://ankiweb.net/shared/info/1423933177) 161 | 162 | - [hjp-linkmaster](https://ankiweb.net/shared/info/1420819673) 163 | 164 | - [Editor Live Preview](https://ankiweb.net/shared/info/1960039667) 165 | 166 | --- 167 | 插件代码:1077002392 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | **English | [简体中文](README-zh.md)** 2 | 3 | # Anki Note Linker 4 | 5 | [View on AnkiWeb](https://ankiweb.net/shared/info/1077002392) 6 | 7 | ![show0.jpg](show0.jpg) 8 | 9 | ![show.jpg](show.jpg) 10 | 11 | ![show.gif](show.gif) 12 | 13 | You can easily connect your Anki notes together by this add-on, forming a web of interconnected information. 14 | By establishing links between relevant notes, you can create a comprehensive and organized knowledge base that reflects the relationships between various concepts, ideas, and topics. 15 | 16 | ## Announcement 📢 17 | Due to limited personal capacity, I am unable to continuously develop new features for this add-on. Future updates will primarily focus on bug fixes. If anyone is interested in contributing new features, feel free to submit a pull request or independently listed on Anki add-on market after development. 18 | 19 | ## Link Format 20 | 21 | `[Link Title|nidxxxxxxxxxxxxx]` 22 | 23 | The link title is the content displayed in the card. If the title contains`[`, it needs to be escaped with`\[` 24 | 25 | `x` is the ID of the note, consisting of 13 digits 26 | 27 | You can customize the style of the links by using the CSS selector: `.noteLink` 28 | 29 | ## Usage 30 | 31 | ### In the editor: 32 | 33 | #### Copy note ID 34 | 35 | Copy the ID of the current note in the editor by using the right-click menu or pressing `Alt+Shift+C` 36 | 37 | #### Copy note link 38 | 39 | Copy the link of the current note in the editor by using the right-click menu or pressing `Alt+Shift+L` 40 | 41 | #### Insert link with copied note ID 42 | 43 | Generate a link from the note ID in the clipboard and the currently selected text by either using the right-click menu or pressing `Alt+Shift+V` 44 | 45 | #### Insert new link 46 | 47 | Generate a new link from the currently selected text by either using the right-click menu or pressing `Alt+Shift+N` 48 | 49 | Double-clicking the generated link text allows adding a corresponding new note 50 | 51 | #### Insert link template 52 | 53 | Generate a link template from the currently selected text by either using the right-click menu or pressing `Alt+Shift+T` 54 | 55 | The generated link template looks like this: `[selected text|nid]`, you need to manually complete it 56 | 57 | _Note: If no text is selected, using the above actions will generate a link without a title_ 58 | 59 | #### Open current note in new window 60 | 61 | Open current note in new window by using the right-click menu or pressing `Alt+Shift+W` 62 | 63 | #### Open the note corresponding to the link 64 | 65 | `Double click link text` to open the corresponding note in a new window 66 | 67 | ### In the "links panel / graph panel" attached to the editor: 68 | 69 | `Left click link` to open the corresponding note in the current editor window 70 | 71 | `Right click link` to open the corresponding note in a new editor window 72 | 73 | `Middle click link` to open the corresponding note in the browser (unsupported in graph panel) 74 | 75 | ### In the reviewer / previewer / global graph: 76 | 77 | `Left click link` to open the corresponding note in a previewer window 78 | 79 | `Right click link` to open the corresponding note in an editor window 80 | 81 | ### Global relationship graph 82 | 83 | Entrance: `Menu -> Anki Note Linker -> Global Relationship Graph` 84 | 85 | Please set the video driver in Anki preference to an option other than `Software`, as it can significantly decrease graphic performance 86 | 87 | ### Customize shortcut keys 88 | 89 | You can customize the shortcut keys according to your preferences in add-on configuration 90 | 91 | If there is no response when using the shortcut key, it may be due to a shortcut key conflict. Please try changing the shortcut key 92 | 93 | --- 94 | ## How to display note links properly without this add-on (such as on AnkiDroid, AnkiWeb, or AnkiMobile clients) 95 | 96 | This add-on automatically renders note links as corresponding content on the desktop version of Anki. Without the add-on, the links will not be rendered properly, affecting use on mobile devices. However, you can still regain some functionality. 97 | 98 | If you have already generated note links and need to use them without the add-on, you can follow the steps below to get links working: 99 | 100 | 1. In the card template, add a `class` attribute `"linkRender"` to each note field on the front and back sides. You can also customize the attribute's name. 101 | 102 | ```html 103 |
{{Front}}
104 |
{{Back}}
105 | 107 |
{{Addition}}
108 | ``` 109 | 2. Copy the following code to the end of the card template on both sides. Rename the `linkRender` attribute in the code if you changed it. Set the `disableLinks` variable to `true` if you only want the text to render (removes the "[|nid]" marker). 110 | 111 | ```html 112 | 138 | ``` 139 | 140 | 3. Save the card template and sync your deck to AnkiWeb. 141 | 142 | After completing these operations, Anki will automatically display the correct content. 143 | 144 | If you click a link on an AnkiDroid or AnkiMobile client, it will attempt to display the corresponding note's flashcard in the card browser; if you click a link on AnkiWeb, it will open the AnkiWeb edit page for the corresponding note. If you changed the `disableLinks` variable to `true`, then the original content of the card will be displayed without any links. 145 | 146 | --- 147 | This add-on is inspired by [Obsidian](https://obsidian.md/) 148 | 149 | The following projects were used in this project: 150 | 151 | - [pixijs](https://github.com/pixijs/pixijs) 152 | 153 | - [d3](https://github.com/d3/d3) 154 | 155 | - [KaTeX](https://github.com/KaTeX/KaTeX) 156 | 157 | - [Force graph](https://github.com/vasturiano/force-graph) 158 | 159 | The implementation of this add-on is inspired by the following add-ons: 160 | 161 | - [link Cards Notes and Preview them in extra window](https://ankiweb.net/shared/info/1423933177) 162 | 163 | - [hjp-linkmaster](https://ankiweb.net/shared/info/1420819673) 164 | 165 | - [Editor Live Preview](https://ankiweb.net/shared/info/1960039667) 166 | 167 | --- 168 | Add-on code:1077002392 -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "showLinksPageAutomatically": true, 3 | "showGraphPageAutomatically": true, 4 | "showLinksPageInReviewerAutomatically": true, 5 | "splitRatio": "2:1", 6 | "splitRatioBetweenLinksPageAndGraphPage": "1:1", 7 | "splitRatioBetweenReviewerAndPanel": "4:1", 8 | "location": "right", 9 | "positionRelativeToReviewer": "right", 10 | "linkMaxLines": 5, 11 | "collapseClozeInLinksPage": true, 12 | "useHjpPreviewer": true, 13 | "noteFieldsDisplayedInTheNoteSummary": [], 14 | "shortcuts-copyNoteID": "Alt+Shift+C", 15 | "shortcuts-copyNoteLink": "Alt+Shift+L", 16 | "shortcuts-openNoteInNewWindow": "Alt+Shift+W", 17 | "shortcuts-insertLinkWithClipboardID": "Alt+Shift+V", 18 | "shortcuts-insertNewLink": "Alt+Shift+N", 19 | "shortcuts-insertLinkTemplate": "Alt+Shift+T", 20 | "globalGraph-defaultSearchText": "deck:current", 21 | "globalGraph-defaultHighlightFilter": "is:due", 22 | "globalGraph-defaultShowSingleNode": false, 23 | "globalGraph-defaultShowTags": false, 24 | "globalGraph-nodeColor": [57, 125, 237], 25 | "globalGraph-highlightedNodeColor": [244, 165, 0], 26 | "globalGraph-tagNodeColor": [127, 199, 132], 27 | "globalGraph-backgroundColor": [16, 16, 32] 28 | } 29 | -------------------------------------------------------------------------------- /config.md: -------------------------------------------------------------------------------- 1 | Please operate on the add-on's graphical configuration page. -------------------------------------------------------------------------------- /config.py: -------------------------------------------------------------------------------- 1 | """ 2 | AGPL3 LICENSE 3 | Author Wang Rui 4 | """ 5 | import json 6 | import re 7 | from typing import Any 8 | 9 | import anki 10 | from aqt import QWidget, QVBoxLayout, Qt, gui_hooks 11 | from aqt import mw 12 | from aqt.utils import restoreGeom, saveGeom 13 | from aqt.webview import AnkiWebView 14 | 15 | from .translation import getTr 16 | from .state import config_html, getWebFileLink 17 | 18 | defaultConfig = { 19 | "showLinksPageAutomatically": True, 20 | "showGraphPageAutomatically": True, 21 | "showLinksPageInReviewerAutomatically": True, 22 | "splitRatio": "2:1", 23 | "splitRatioBetweenReviewerAndPanel": "4:1", 24 | "splitRatioBetweenLinksPageAndGraphPage": "1:1", 25 | "location": "right", 26 | "positionRelativeToReviewer": "right", 27 | "linkMaxLines": 5, 28 | "collapseClozeInLinksPage": True, 29 | "useHjpPreviewer": True, 30 | "noteFieldsDisplayedInTheNoteSummary": [], 31 | 32 | "shortcuts-copyNoteID": "Alt+Shift+C", 33 | "shortcuts-copyNoteLink": "Alt+Shift+L", 34 | "shortcuts-openNoteInNewWindow": "Alt+Shift+W", 35 | "shortcuts-insertLinkWithClipboardID": "Alt+Shift+V", 36 | "shortcuts-insertNewLink": "Alt+Shift+N", 37 | "shortcuts-insertLinkTemplate": "Alt+Shift+T", 38 | 39 | "globalGraph-defaultSearchText": "deck:current", 40 | "globalGraph-defaultHighlightFilter": "is:due", 41 | "globalGraph-defaultShowSingleNode": False, 42 | "globalGraph-defaultShowTags": False, 43 | "globalGraph-nodeColor": [57, 125, 237], 44 | "globalGraph-highlightedNodeColor": [244, 165, 0], 45 | "globalGraph-tagNodeColor": [127, 199, 132], 46 | "globalGraph-backgroundColor": [16, 16, 32] 47 | } 48 | # Check if there is an old version of the configuration; 49 | # if it exists, convert it to the new version and delete the old version. 50 | configTemp = mw.addonManager.getConfig(__name__) 51 | if "shortcuts" in configTemp: 52 | configTemp["shortcuts-copyNoteID"] = ( 53 | configTemp["shortcuts"].get("copyNoteID", defaultConfig["shortcuts-copyNoteID"])) 54 | configTemp["shortcuts-copyNoteLink"] = ( 55 | configTemp["shortcuts"].get("copyNoteLink", defaultConfig["shortcuts-copyNoteLink"])) 56 | configTemp["shortcuts-openNoteInNewWindow"] = ( 57 | configTemp["shortcuts"].get("openNoteInNewWindow", defaultConfig["shortcuts-openNoteInNewWindow"])) 58 | configTemp["shortcuts-insertLinkWithClipboardID"] = ( 59 | configTemp["shortcuts"].get("insertLinkWithClipboardID", defaultConfig["shortcuts-insertLinkWithClipboardID"])) 60 | configTemp["shortcuts-insertNewLink"] = ( 61 | configTemp["shortcuts"].get("insertNewLink", defaultConfig["shortcuts-insertNewLink"])) 62 | configTemp["shortcuts-insertLinkTemplate"] = ( 63 | configTemp["shortcuts"].get("insertLinkTemplate", defaultConfig["shortcuts-insertLinkTemplate"])) 64 | del configTemp["shortcuts"] 65 | 66 | if "globalGraph" in configTemp: 67 | configTemp["globalGraph-defaultSearchText"] = ( 68 | configTemp["globalGraph"].get("defaultSearchText", defaultConfig["globalGraph-defaultSearchText"])) 69 | 70 | configTemp["globalGraph-defaultHighlightFilter"] = ( 71 | configTemp["globalGraph"].get("defaultHighlightFilter", defaultConfig["globalGraph-defaultHighlightFilter"])) 72 | 73 | configTemp["globalGraph-defaultShowSingleNode"] = ( 74 | configTemp["globalGraph"].get("defaultShowSingleNode", defaultConfig["globalGraph-defaultShowSingleNode"])) 75 | 76 | configTemp["globalGraph-nodeColor"] = ( 77 | configTemp["globalGraph"].get("nodeColor", defaultConfig["globalGraph-nodeColor"])) 78 | 79 | configTemp["globalGraph-highlightedNodeColor"] = ( 80 | configTemp["globalGraph"].get("highlightedNodeColor", defaultConfig["globalGraph-highlightedNodeColor"])) 81 | 82 | configTemp["globalGraph-backgroundColor"] = ( 83 | configTemp["globalGraph"].get("graphBackgroundColor", defaultConfig["globalGraph-backgroundColor"])) 84 | 85 | del configTemp["globalGraph"] 86 | 87 | if "Use the previewer of hjp-linkmaster if it is installed" in configTemp: 88 | configTemp["useHjpPreviewer"] = configTemp["Use the previewer of hjp-linkmaster if it is installed"] 89 | del configTemp["Use the previewer of hjp-linkmaster if it is installed"] 90 | 91 | mw.addonManager.writeConfig(__name__, configTemp) 92 | config = mw.addonManager.getConfig(__name__) 93 | 94 | 95 | class ConfigView(QWidget): 96 | configView = None 97 | 98 | def __init__(self): 99 | super().__init__() 100 | self.setWindowTitle(getTr("Anki-Note-Linker Config")) 101 | restoreGeom(self, "AnkiNoteLinkerConfig", default_size=(530, 550)) 102 | self.setWindowModality(Qt.WindowModality.ApplicationModal) 103 | self.setMinimumWidth(530) 104 | outerLayout = QVBoxLayout() 105 | self.setLayout(outerLayout) 106 | self.web = AnkiWebView(self, title="GlobalGraph") 107 | gui_hooks.webview_did_receive_js_message.append(self.handlePycmd) 108 | self.web.stdHtml( 109 | f'' 110 | f'' 111 | f'' 112 | f'' + config_html 113 | ) 114 | self.web.set_bridge_command(lambda s: s, self) 115 | outerLayout.addWidget(self.web) 116 | outerLayout.setContentsMargins(0, 0, 0, 0) 117 | self.activateWindow() 118 | self.show() 119 | 120 | @staticmethod 121 | def openConfigView(): 122 | if ConfigView.configView is None: 123 | ConfigView.configView = ConfigView() 124 | else: 125 | ConfigView.configView.showNormal() 126 | ConfigView.configView.activateWindow() 127 | 128 | def closeEvent(self, event): 129 | gui_hooks.webview_did_receive_js_message.remove(self.handlePycmd) 130 | saveGeom(self, "AnkiNoteLinkerConfig") 131 | ConfigView.configView = None 132 | event.accept() 133 | 134 | def handlePycmd(self, handled: tuple[bool, Any], message, context: Any): 135 | if context != self: 136 | return handled 137 | elif message == "AnkiNoteLinker-config-cancel": 138 | self.close() 139 | return True, None 140 | elif re.match(r'AnkiNoteLinker-config-ok.*}', message): 141 | global config 142 | config.update(json.loads(message[24:])) 143 | mw.addonManager.writeConfig(__name__, config) 144 | self.close() 145 | return True, None 146 | else: 147 | return handled 148 | 149 | 150 | mw.addonManager.setConfigAction(__name__, ConfigView.openConfigView) 151 | -------------------------------------------------------------------------------- /editors.py: -------------------------------------------------------------------------------- 1 | import aqt 2 | 3 | from aqt import QMainWindow, QDialogButtonBox, QPushButton, QKeySequence, QShortcut, Qt 4 | from anki.collection import OpChanges 5 | from anki.notes import Note, NoteId 6 | from aqt import gui_hooks, qconnect 7 | from aqt.addcards import AddCards 8 | from aqt.editcurrent import EditCurrent 9 | from aqt.editor import Editor 10 | from aqt.operations.note import add_note 11 | from aqt.sound import av_player 12 | from aqt.utils import tooltip, tr, restoreGeom, shortcut 13 | 14 | 15 | class MyEditCurrent(EditCurrent): 16 | def __init__(self, noteId: NoteId): 17 | QMainWindow.__init__(self, None, Qt.WindowType.Window) 18 | note = aqt.mw.col.get_note(noteId) 19 | 20 | self.mw = aqt.mw 21 | self.form = aqt.forms.editcurrent.Ui_Dialog() 22 | self.form.setupUi(self) 23 | self.setWindowTitle(tr.editing_edit_current()) 24 | self.setMinimumHeight(400) 25 | self.setMinimumWidth(250) 26 | self.editor = aqt.editor.Editor( 27 | self.mw, 28 | self.form.fieldsArea, 29 | self, 30 | editor_mode=aqt.editor.EditorMode.EDIT_CURRENT, 31 | ) 32 | self.editor.card = note.cards()[0] # 这里改了 33 | self.editor.set_note(note, focusTo=0) # 这里改了 34 | restoreGeom(self, "editcurrent") 35 | close_button = self.form.buttonBox.button(QDialogButtonBox.StandardButton.Close) 36 | close_button.setShortcut(QKeySequence("Ctrl+Return")) 37 | # qt5.14+ doesn't handle numpad enter on Windows 38 | self.compat_add_shorcut = QShortcut(QKeySequence("Ctrl+Enter"), self) 39 | qconnect(self.compat_add_shorcut.activated, close_button.click) 40 | gui_hooks.operation_did_execute.append(self.on_operation_did_execute) 41 | self.show() 42 | 43 | 44 | class MyAddCards(AddCards): 45 | def __init__(self, backLinkNote: Note, placeholder: str): 46 | self.backLinkNote = backLinkNote 47 | self.placeholder = placeholder 48 | AddCards.__init__(self, aqt.mw) 49 | 50 | def setupButtons(self) -> None: 51 | bb = self.form.buttonBox 52 | ar = QDialogButtonBox.ButtonRole.ActionRole 53 | # add 54 | self.addButton = bb.addButton(tr.actions_add(), ar) 55 | qconnect(self.addButton.clicked, self.add_current_note) 56 | self.addButton.setShortcut(QKeySequence("Ctrl+Return")) 57 | # qt5.14+ doesn't handle numpad enter on Windows 58 | self.compat_add_shorcut = QShortcut(QKeySequence("Ctrl+Enter"), self) 59 | qconnect(self.compat_add_shorcut.activated, self.addButton.click) 60 | self.addButton.setToolTip(shortcut(tr.adding_add_shortcut_ctrlandenter())) 61 | # close 62 | self.closeButton = QPushButton(tr.actions_close()) 63 | self.closeButton.setAutoDefault(False) 64 | bb.addButton(self.closeButton, QDialogButtonBox.ButtonRole.RejectRole) 65 | qconnect(self.closeButton.clicked, self.close) 66 | 67 | def _add_current_note(self) -> None: 68 | note = self.editor.note 69 | 70 | if not self._note_can_be_added(note): 71 | return 72 | 73 | target_deck_id = self.deck_chooser.selected_deck_id 74 | 75 | def on_success(changes: OpChanges) -> None: 76 | tooltip(tr.adding_added(), period=500) 77 | av_player.stop_and_clear_queue() 78 | 79 | self.backLinkNote.fields = map( 80 | lambda it: it.replace('new' + self.placeholder, 'nid' + str(note.id)), 81 | self.backLinkNote.fields 82 | ) 83 | aqt.mw.col.update_note(self.backLinkNote) 84 | self._load_new_note(sticky_fields_from=note) 85 | gui_hooks.add_cards_did_add_note(note) 86 | self.close() 87 | 88 | add_note(parent=self, note=note, target_deck_id=target_deck_id).success( 89 | on_success 90 | ).run_in_background() 91 | -------------------------------------------------------------------------------- /globalGraph.py: -------------------------------------------------------------------------------- 1 | """ 2 | AGPL3 LICENSE 3 | Author Wang Rui 4 | """ 5 | import json 6 | from typing import Optional 7 | 8 | import anki 9 | from anki.collection import OpChanges, Collection 10 | from anki.errors import SearchError 11 | from anki.notes import NoteId, Note 12 | from aqt.errors import show_exception 13 | from aqt.operations import QueryOp 14 | from aqt import QColor, QWidget, QVBoxLayout, QPushButton, QLabel, QLineEdit, QHBoxLayout, QCheckBox, gui_hooks 15 | from aqt import mw, qconnect 16 | from aqt.utils import restoreGeom, saveGeom, tooltip 17 | from aqt.webview import AnkiWebView 18 | 19 | from . import state 20 | from .config import config 21 | from .translation import getTr 22 | from .state import Connection, graph_html, NoteNode, log, newGraph_html, getWebFileLink 23 | 24 | 25 | class GlobalGraph(QWidget): 26 | def __init__(self): 27 | super().__init__() 28 | gui_hooks.operation_did_execute.append(self.onOpChange) 29 | gui_hooks.collection_did_load.append(self.refreshGlobalGraph) 30 | gui_hooks.editor_did_update_tags.append(self.onTagUpdate) 31 | self.noteCache: dict[int, NoteNode] = {} 32 | self.searchedIds: set[NoteId] = set() 33 | self.needRefreshAgain = False 34 | self.inRefreshProcess = False 35 | self.lastSearchText = None 36 | self.linkCache: list[Connection] = [] 37 | self.noteCacheList = [] 38 | self.hlIds = set() 39 | self.setWindowTitle(getTr("Global Relationship Graph")) 40 | outerLayout = QVBoxLayout() 41 | topBarLayout = QHBoxLayout() 42 | topBarLayout.setContentsMargins(10, 7, 10, 0) 43 | outerLayout.setContentsMargins(0, 0, 0, 0) 44 | self.setLayout(outerLayout) 45 | self.topBar = QWidget(self) 46 | self.topBar.setLayout(topBarLayout) 47 | self.topBar.setFixedHeight(30) 48 | restoreGeom(self, "GlobalGraph", default_size=(1000, 600)) 49 | self.web = AnkiWebView(self, title="GlobalGraph") 50 | self.web.stdHtml( 51 | f'' 52 | f'' 53 | f'' 54 | f'' 55 | f'' 56 | f'' 57 | f'' 58 | f'' 59 | f'' + newGraph_html 60 | ) 61 | self.web.set_bridge_command(lambda s: s, self) 62 | outerLayout.addWidget(self.topBar) 63 | outerLayout.addWidget(self.web) 64 | self.lineEdit = QLineEdit() 65 | self.lineEdit.setText(config['globalGraph-defaultSearchText']) 66 | self.lineEdit2 = QLineEdit() 67 | self.lineEdit2.setText(config['globalGraph-defaultHighlightFilter']) 68 | self.checkBox = QCheckBox(getTr('Display single nodes')) 69 | self.checkBox.setChecked(config['globalGraph-defaultShowSingleNode']) 70 | self.checkBox2 = QCheckBox(getTr('Display tag nodes')) 71 | self.checkBox2.setChecked(config['globalGraph-defaultShowTags']) 72 | self.sButton = QPushButton(getTr('Search')) 73 | qconnect(self.sButton.clicked, 74 | lambda: self.refreshGlobalGraph(resetCenter=True, reason='Search Button Clicked')) 75 | topBarLayout.addWidget(QLabel(getTr('Search notes:'))) 76 | topBarLayout.addWidget(self.lineEdit) 77 | topBarLayout.addWidget(QLabel(getTr('Highlight specified notes:'))) 78 | topBarLayout.addWidget(self.lineEdit2) 79 | topBarLayout.addWidget(self.checkBox) 80 | topBarLayout.addWidget(self.checkBox2) 81 | topBarLayout.addWidget(self.sButton) 82 | 83 | self.activateWindow() 84 | self.show() 85 | self.refreshGlobalGraph(adaptScale=True, reason='Init Global Graph') 86 | 87 | def switchToOldRenderer(self): 88 | self.web.stdHtml( 89 | f'' 90 | f'' 91 | f'' 92 | f'' 93 | f'' 94 | f'' 95 | f'' 96 | f'' 97 | f'' + graph_html 98 | ) 99 | self.refreshGlobalGraph(adaptScale=True, reason='Switch To Old Renderer') 100 | tooltip(getTr( 101 | 'For better performance, select a display driver other than "Software" to enable the new renderer. The old renderer is no longer maintained.'), 102 | 10000) 103 | 104 | def onOpChange(self, changes: OpChanges, handler: Optional[object]): 105 | # self.printChanges(changes) 106 | if changes.study_queues or changes.notetype: 107 | self.refreshGlobalGraph(reason='onOpChange') 108 | 109 | def onTagUpdate(self, note: Note): 110 | if self.checkBox2.isChecked(): 111 | self.refreshGlobalGraph(reason='tag of note changed', changedTagNote=note) 112 | 113 | def rebuildCache(self, col: Collection, keepTagNote: Note = None): 114 | self.noteCache = {} # 清空缓存 115 | self.searchedIds = set(col.find_notes(self.lineEdit.text())) # 获取搜索节点id 116 | # 获取高亮节点id 117 | if self.lineEdit2.text() == '': 118 | self.hlIds = set() 119 | else: 120 | self.hlIds = set(col.find_notes(self.lineEdit2.text())) 121 | for noteId in self.searchedIds: # 遍历符合搜索条件的笔记的id 122 | note = col.get_note(noteId) 123 | self.updateNodeCache(note, keepTagNote) 124 | 125 | def updateNodeCache(self, note: Note, keepTagNote: Note = None): 126 | """Set the node for the note link""" 127 | if self.needRefreshAgain: # 如果此时又有了新的刷新请求,则抛出异常使当前刷新操作退出 128 | raise Exception('-----Interrupted Refresh Global Graph Process') 129 | noteId = note.id 130 | childIds = state.addon.findChildIds(noteId, ' '.join(note.fields), rangeIdSet=self.searchedIds) # 找出当前节点的子节点id 131 | mainField = state.addon.getMainField(note) 132 | # Set the forward link 133 | node = self.noteCache.get(noteId, None) # Get the current node's information in the cache 在缓存中获取当前笔记节点信息 134 | if node is not None: # If the node already exists 如果当前笔记节点存在于缓存中 135 | oldChildIds = node.childIds # 获取当前节点的旧的子节点id 136 | node.mainField = mainField # Set the node's first field as the new main field 更新当前笔记的主字段 137 | node.childIds = childIds # Update its forward link to the new childIds list 更新当前笔记子节点 138 | 139 | # Remove the reverse link of old child nodes (need optimization: Operate only on nodes with changes) 140 | # 删除旧子节点的反向链接 141 | for id in oldChildIds: 142 | if id in self.noteCache: 143 | self.noteCache[id].parentIds.discard(noteId) 144 | else: 145 | # If the node doesn't exist, create a new NoteNode object and insert it into the cache 146 | # 如果当前节点不存在缓存中,创建一个新的NoteNode对象并将其插入缓存 147 | node = self.noteCache[noteId] = NoteNode(noteId, childIds, set(), mainField) 148 | 149 | if self.checkBox2.isChecked(): 150 | for tag in keepTagNote.tags if keepTagNote is not None and keepTagNote.id == note.id else note.tags: 151 | if tag == "": 152 | continue 153 | # 设置tag的正向链接 154 | if tag in self.noteCache: 155 | self.noteCache[tag].childIds.append(noteId) 156 | else: 157 | self.noteCache[tag] = NoteNode(tag, [noteId], set(), tag, isTag=True) 158 | # 设置当前node指向tag的反向链接 159 | node.parentIds.add(tag) 160 | 161 | # Set the back link of child nodes 为当前节点的子节点设置反向链接 162 | for childId in childIds: 163 | if childId in self.noteCache: # If the node already exists 如果子节点已经存在缓存中 164 | # Get the information of the forward-linked node in the cache 获取子节点信息 165 | childNode = self.noteCache[childId] 166 | if noteId not in childNode.parentIds: # Prevent adding duplicate IDs 167 | childNode.parentIds.add(noteId) # Add the current node ID to its back link list 将当前id添加到子节点的父节点中 168 | else: 169 | # If the node doesn't exist, create a new NoteNode object and insert it into the cache 170 | self.noteCache[childId] = NoteNode(childId, [], {noteId}, None) 171 | 172 | def refreshGlobalGraph(self, onlyChangedNote: Note = None, reason: str = '', adaptScale=False, resetCenter=False, 173 | changedTagNote: Note = None): 174 | if isinstance(onlyChangedNote, Collection): 175 | onlyChangedNote = None 176 | reason = 'collection_did_load' 177 | if self.inRefreshProcess: 178 | self.needRefreshAgain = True 179 | return 180 | 181 | self.inRefreshProcess = True 182 | 183 | # print(reason) 184 | 185 | def op(col): 186 | # 如果只改变了一个笔记且此次搜索条件没发生变化 187 | if onlyChangedNote is not None and self.lineEdit.text() + self.lineEdit2.text() == self.lastSearchText: 188 | log('-----Refresh Global Graph With Update Single Node: ', reason) 189 | # 目前存在的问题:如果修改一个笔记使其不符合搜索条件,自动刷新不会使该笔记消失,需要手动刷新 190 | self.updateNodeCache(onlyChangedNote) # 只更新改变了的笔记 191 | else: 192 | log('-----Refresh Global Graph With Rebuild Cache: ', reason) 193 | self.rebuildCache(col, keepTagNote=changedTagNote) # 重新构造缓存 194 | 195 | showSingle = self.checkBox.isChecked() 196 | self.noteCacheList = [x for x in self.noteCache.values() 197 | if showSingle or len(x.childIds) != 0 or len(x.parentIds) != 0] 198 | 199 | self.linkCache = [] 200 | for parentNode in self.noteCacheList: 201 | for childId in parentNode.childIds: 202 | self.linkCache.append(Connection(parentNode.id, childId)) 203 | 204 | def onSuccess(p): 205 | self.inRefreshProcess = False 206 | if self.needRefreshAgain: 207 | self.needRefreshAgain = False 208 | self.refreshGlobalGraph(onlyChangedNote, 'backlog') 209 | return 210 | 211 | self.lastSearchText = self.lineEdit.text() + self.lineEdit2.text() 212 | self.web.eval( 213 | f'''reloadPage( 214 | {json.dumps([x.toJsNoteNode('highlight') if x.id in self.hlIds else x.toJsNoteNode('normal') for x in self.noteCacheList], default=lambda o: o.__dict__)}, 215 | {json.dumps(self.linkCache, default=lambda o: o.__dict__)}, 216 | {json.dumps(resetCenter)}, 217 | {json.dumps(adaptScale)}, 218 | "{self.qColorToString(QColor.fromRgb(*config["globalGraph-nodeColor"]))}", 219 | "{self.qColorToString(QColor.fromRgb(*config["globalGraph-highlightedNodeColor"]))}", 220 | "{self.qColorToString(QColor.fromRgb(*config["globalGraph-tagNodeColor"]))}", 221 | {config["globalGraph-backgroundColor"]} 222 | )''' 223 | ) 224 | 225 | def onFailure(e: Exception): 226 | self.inRefreshProcess = False 227 | if isinstance(e, SearchError): 228 | show_exception(parent=self, exception=e) 229 | else: 230 | log(type(e).__name__, e) 231 | 232 | if self.needRefreshAgain: 233 | self.needRefreshAgain = False 234 | self.refreshGlobalGraph(onlyChangedNote, 'backlog') 235 | 236 | QueryOp(parent=self, op=op, success=onSuccess).failure(onFailure).run_in_background() 237 | 238 | def closeEvent(self, event): 239 | gui_hooks.operation_did_execute.remove(self.onOpChange) 240 | gui_hooks.collection_did_load.remove(self.refreshGlobalGraph) 241 | gui_hooks.editor_did_update_tags.remove(self.onTagUpdate) 242 | saveGeom(self, "GlobalGraph") 243 | self.web.cleanup() 244 | self.web.close() 245 | state.globalGraph = None 246 | event.accept() 247 | 248 | def qColorToString(self, qColor: QColor): 249 | return f"rgb({qColor.red()},{qColor.green()},{qColor.blue()})" 250 | 251 | def printChanges(self, changes): 252 | """Used for debugging and developing new features""" 253 | if changes.card: 254 | print('changed ------------------ ' + 'card') 255 | if changes.note: 256 | print('changed ------------------ ' + 'note') 257 | if changes.deck: 258 | print('changed ------------------ ' + 'deck') 259 | if changes.tag: 260 | print('changed ------------------ ' + 'tag') 261 | if changes.notetype: 262 | print('changed ------------------ ' + 'notetype') 263 | if changes.config: 264 | print('changed ------------------ ' + 'config') 265 | if changes.deck_config: 266 | print('changed ------------------ ' + 'deck_config') 267 | if changes.mtime: 268 | print('changed ------------------ ' + 'mtime') 269 | if changes.browser_table: 270 | print('changed ------------------ ' + 'browser_table') 271 | if changes.browser_sidebar: 272 | print('changed ------------------ ' + 'browser_sidebar') 273 | if changes.note_text: 274 | print('changed ------------------ ' + 'note_text') 275 | if changes.study_queues: 276 | print('changed ------------------ ' + 'study_queues') 277 | -------------------------------------------------------------------------------- /icons/showGraphPage.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /icons/showLinksPage.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /show.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/show.gif -------------------------------------------------------------------------------- /show.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/show.jpg -------------------------------------------------------------------------------- /show0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/show0.jpg -------------------------------------------------------------------------------- /state.py: -------------------------------------------------------------------------------- 1 | """ 2 | AGPL3 LICENSE 3 | Author Wang Rui 4 | """ 5 | import os 6 | 7 | import anki 8 | from anki.notes import NoteId 9 | from aqt import mw, gui_hooks 10 | from aqt.browser.previewer import BrowserPreviewer 11 | from aqt.utils import tooltip 12 | 13 | from .translation import getTr 14 | 15 | 16 | def log(*args): 17 | debug = 0 18 | if debug: 19 | print(*args) 20 | 21 | 22 | mw.addonManager.setWebExports(__name__, 'web/.*') 23 | addon_path = os.path.dirname(__file__) 24 | addon_folder = os.path.basename(addon_path) 25 | links_html = open(os.path.join(addon_path, 'web', 'links.html'), 'r', encoding='utf-8').read() 26 | graph_html = open(os.path.join(addon_path, 'web', 'graph.html'), 'r', encoding='utf-8').read() 27 | newGraph_html = open(os.path.join(addon_path, 'web', 'newGraph.html'), 'r', encoding='utf-8').read() 28 | config_html = open(os.path.join(addon_path, 'web', 'config.html'), 'r', encoding='utf-8').read() 29 | 30 | 31 | def getWebFileLink(fileName: str): 32 | return f"http://127.0.0.1:{mw.mediaServer.getPort()}/_addons/{addon_folder}/web/{fileName}" 33 | 34 | 35 | globalGraph = None 36 | addon = None 37 | 38 | 39 | class Connection: 40 | def __init__(self, source_id, target_id): 41 | self.source = source_id 42 | self.target = target_id 43 | 44 | 45 | class NoteNode: 46 | def __init__(self, nid: NoteId, childIds: list[NoteId], parentIds: set[NoteId], mainField: str, 47 | isTag: bool = False): 48 | self.id = nid 49 | self.childIds: list[NoteId] = childIds 50 | self.parentIds: set[NoteId] = parentIds 51 | self.mainField: str = mainField 52 | self.isTag: bool = isTag 53 | 54 | def toJsNoteNode(self, type): 55 | return JsNoteNode(self.id, self.mainField, 'tag' if self.isTag else type) 56 | 57 | 58 | class JsNoteNode: 59 | def __init__(self, nid: int, mainField: str, type: str): 60 | self.id = nid 61 | self.mainField = mainField 62 | self.type = type 63 | 64 | 65 | class PreviewState: 66 | def __init__(self, cards): 67 | self.previewer: None | BrowserPreviewer = None 68 | self.cards = cards 69 | self.index = 0 70 | self.card = cards[self.index] 71 | self.singleCard = True 72 | gui_hooks.operation_did_execute.append(self.onOp) 73 | 74 | def onOp(self, changes: anki.collection.OpChanges, handler): 75 | if changes.note_text or changes.card: 76 | if self.previewer: 77 | try: 78 | self.previewer.render_card() 79 | except anki.errors.NotFoundError: 80 | self.previewer.close() 81 | 82 | def onNextCard(self): 83 | if self.has_next_card() and self.previewer is not None: 84 | self.index += 1 85 | try: 86 | self.card = self.cards[self.index] 87 | self.previewer.render_card() 88 | except anki.errors.NotFoundError: 89 | self.index -= 1 90 | self.card = self.cards[self.index] 91 | except IndexError: 92 | self.index -= 1 93 | 94 | def onPreviousCard(self): 95 | if self.has_previous_card() and self.previewer is not None: 96 | self.index -= 1 97 | try: 98 | self.card = self.cards[self.index] 99 | self.previewer.render_card() 100 | except anki.errors.NotFoundError: 101 | self.index += 1 102 | self.card = self.cards[self.index] 103 | except IndexError: 104 | self.index += 1 105 | 106 | def has_previous_card(self): 107 | return self.index > 0 108 | 109 | def has_next_card(self): 110 | return self.index < len(self.cards) - 1 111 | 112 | def setPreviewer(self, previewer): 113 | self.previewer = previewer 114 | 115 | def cleanUpState(self): 116 | gui_hooks.operation_did_execute.remove(self.onOp) 117 | self.previewer = None 118 | -------------------------------------------------------------------------------- /translation.py: -------------------------------------------------------------------------------- 1 | import anki 2 | 3 | lang = anki.lang.current_lang 4 | 5 | 6 | def getTr(s: str) -> str: 7 | if lang != 'zh-CN': 8 | return s 9 | else: 10 | if s == 'Copy current note ID': 11 | return '复制当前笔记ID' 12 | elif s == 'Copy current note link': 13 | return '复制当前笔记链接' 14 | elif s == 'Open current note in new window': 15 | return '在新窗口中打开当前笔记' 16 | elif s == 'Insert link with copied note ID': 17 | return '插入带有已复制的笔记ID的链接' 18 | elif s == 'Insert new link': 19 | return '插入新链接' 20 | elif s == 'Insert link template': 21 | return '插入链接模版' 22 | elif s == 'Copied note ID': 23 | return '已复制笔记ID' 24 | elif s == 'Copied note link': 25 | return '已复制笔记链接' 26 | elif s == 'Toggle Links Panel': 27 | return '显示/隐藏链接面板' 28 | elif s == 'Toggle Graph Panel': 29 | return '显示/隐藏关系图面板' 30 | elif s == 'Show Links Panel': 31 | return '显示链接面板' 32 | elif s == 'Global Relationship Graph': 33 | return '全局关系图' 34 | elif s == 'Display tag nodes': 35 | return '显示标签节点' 36 | elif s == 'The corresponding note does not exist': 37 | return '对应笔记不存在' 38 | elif s == 'Please add the current note first': 39 | return '请先添加当前笔记' 40 | elif s == "Please select a single note/card": 41 | return '请选中单条笔记/卡片' 42 | elif s == 'The content in the clipboard is not a note ID': 43 | return '剪贴板中的内容不是笔记ID' 44 | elif s == 'Display single nodes': 45 | return '显示单独的节点' 46 | elif s == 'Search': 47 | return '搜索' 48 | elif s == 'Search notes:': 49 | return '搜索笔记:' 50 | elif s == 'Highlight specified notes:': 51 | return '高亮指定的笔记:' 52 | elif s == 'Config': 53 | return '设置' 54 | elif s == 'Anki-Note-Linker Config': 55 | return 'Anki-Note-Linker 设置' 56 | elif s == 'For better performance, select a display driver other than "Software" to enable the new renderer. The old renderer is no longer maintained.': 57 | return '为了获得更好的性能,请在Anki设置中选择除"Software"之外的显示驱动以启用新的渲染器,旧的渲染器将不再维护。' 58 | else: 59 | return s 60 | -------------------------------------------------------------------------------- /web/config.html: -------------------------------------------------------------------------------- 1 | 48 |
49 |
50 |
Basic
51 |
52 | 53 |
54 |
55 | 56 |
57 |
58 | 59 |
60 |
61 | 62 |
63 |
64 | 65 |
66 |
67 | 71 |
72 |
73 | 77 |
78 |
79 | 80 |
81 |
82 | 83 |
84 |
85 | 86 |
87 |
88 | 89 |
90 |
91 | 95 |
96 |
97 | 100 |
globalGraph
101 |
102 | 103 |
104 |
105 | 106 |
107 |
108 | 109 |
110 |
111 | 112 |
113 |
114 | 115 |
116 |
117 | 118 |
119 |
120 | 121 |
122 |
123 | 124 |
125 |
shortcuts
126 |
127 | 128 |
129 |
130 | 131 |
132 |
133 | 134 |
135 |
136 | 137 |
138 |
139 | 140 |
141 |
142 | 143 |
144 |
145 |
146 |
147 | 151 | 155 | 158 |
159 | 160 | -------------------------------------------------------------------------------- /web/fonts/KaTeX_AMS-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_AMS-Regular.ttf -------------------------------------------------------------------------------- /web/fonts/KaTeX_AMS-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_AMS-Regular.woff -------------------------------------------------------------------------------- /web/fonts/KaTeX_AMS-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_AMS-Regular.woff2 -------------------------------------------------------------------------------- /web/fonts/KaTeX_Caligraphic-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Caligraphic-Bold.ttf -------------------------------------------------------------------------------- /web/fonts/KaTeX_Caligraphic-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Caligraphic-Bold.woff -------------------------------------------------------------------------------- /web/fonts/KaTeX_Caligraphic-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Caligraphic-Bold.woff2 -------------------------------------------------------------------------------- /web/fonts/KaTeX_Caligraphic-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Caligraphic-Regular.ttf -------------------------------------------------------------------------------- /web/fonts/KaTeX_Caligraphic-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Caligraphic-Regular.woff -------------------------------------------------------------------------------- /web/fonts/KaTeX_Caligraphic-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Caligraphic-Regular.woff2 -------------------------------------------------------------------------------- /web/fonts/KaTeX_Fraktur-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Fraktur-Bold.ttf -------------------------------------------------------------------------------- /web/fonts/KaTeX_Fraktur-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Fraktur-Bold.woff -------------------------------------------------------------------------------- /web/fonts/KaTeX_Fraktur-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Fraktur-Bold.woff2 -------------------------------------------------------------------------------- /web/fonts/KaTeX_Fraktur-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Fraktur-Regular.ttf -------------------------------------------------------------------------------- /web/fonts/KaTeX_Fraktur-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Fraktur-Regular.woff -------------------------------------------------------------------------------- /web/fonts/KaTeX_Fraktur-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Fraktur-Regular.woff2 -------------------------------------------------------------------------------- /web/fonts/KaTeX_Main-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Main-Bold.ttf -------------------------------------------------------------------------------- /web/fonts/KaTeX_Main-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Main-Bold.woff -------------------------------------------------------------------------------- /web/fonts/KaTeX_Main-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Main-Bold.woff2 -------------------------------------------------------------------------------- /web/fonts/KaTeX_Main-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Main-BoldItalic.ttf -------------------------------------------------------------------------------- /web/fonts/KaTeX_Main-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Main-BoldItalic.woff -------------------------------------------------------------------------------- /web/fonts/KaTeX_Main-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Main-BoldItalic.woff2 -------------------------------------------------------------------------------- /web/fonts/KaTeX_Main-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Main-Italic.ttf -------------------------------------------------------------------------------- /web/fonts/KaTeX_Main-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Main-Italic.woff -------------------------------------------------------------------------------- /web/fonts/KaTeX_Main-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Main-Italic.woff2 -------------------------------------------------------------------------------- /web/fonts/KaTeX_Main-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Main-Regular.ttf -------------------------------------------------------------------------------- /web/fonts/KaTeX_Main-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Main-Regular.woff -------------------------------------------------------------------------------- /web/fonts/KaTeX_Main-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Main-Regular.woff2 -------------------------------------------------------------------------------- /web/fonts/KaTeX_Math-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Math-BoldItalic.ttf -------------------------------------------------------------------------------- /web/fonts/KaTeX_Math-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Math-BoldItalic.woff -------------------------------------------------------------------------------- /web/fonts/KaTeX_Math-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Math-BoldItalic.woff2 -------------------------------------------------------------------------------- /web/fonts/KaTeX_Math-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Math-Italic.ttf -------------------------------------------------------------------------------- /web/fonts/KaTeX_Math-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Math-Italic.woff -------------------------------------------------------------------------------- /web/fonts/KaTeX_Math-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Math-Italic.woff2 -------------------------------------------------------------------------------- /web/fonts/KaTeX_SansSerif-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_SansSerif-Bold.ttf -------------------------------------------------------------------------------- /web/fonts/KaTeX_SansSerif-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_SansSerif-Bold.woff -------------------------------------------------------------------------------- /web/fonts/KaTeX_SansSerif-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_SansSerif-Bold.woff2 -------------------------------------------------------------------------------- /web/fonts/KaTeX_SansSerif-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_SansSerif-Italic.ttf -------------------------------------------------------------------------------- /web/fonts/KaTeX_SansSerif-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_SansSerif-Italic.woff -------------------------------------------------------------------------------- /web/fonts/KaTeX_SansSerif-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_SansSerif-Italic.woff2 -------------------------------------------------------------------------------- /web/fonts/KaTeX_SansSerif-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_SansSerif-Regular.ttf -------------------------------------------------------------------------------- /web/fonts/KaTeX_SansSerif-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_SansSerif-Regular.woff -------------------------------------------------------------------------------- /web/fonts/KaTeX_SansSerif-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_SansSerif-Regular.woff2 -------------------------------------------------------------------------------- /web/fonts/KaTeX_Script-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Script-Regular.ttf -------------------------------------------------------------------------------- /web/fonts/KaTeX_Script-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Script-Regular.woff -------------------------------------------------------------------------------- /web/fonts/KaTeX_Script-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Script-Regular.woff2 -------------------------------------------------------------------------------- /web/fonts/KaTeX_Size1-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Size1-Regular.ttf -------------------------------------------------------------------------------- /web/fonts/KaTeX_Size1-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Size1-Regular.woff -------------------------------------------------------------------------------- /web/fonts/KaTeX_Size1-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Size1-Regular.woff2 -------------------------------------------------------------------------------- /web/fonts/KaTeX_Size2-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Size2-Regular.ttf -------------------------------------------------------------------------------- /web/fonts/KaTeX_Size2-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Size2-Regular.woff -------------------------------------------------------------------------------- /web/fonts/KaTeX_Size2-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Size2-Regular.woff2 -------------------------------------------------------------------------------- /web/fonts/KaTeX_Size3-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Size3-Regular.ttf -------------------------------------------------------------------------------- /web/fonts/KaTeX_Size3-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Size3-Regular.woff -------------------------------------------------------------------------------- /web/fonts/KaTeX_Size3-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Size3-Regular.woff2 -------------------------------------------------------------------------------- /web/fonts/KaTeX_Size4-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Size4-Regular.ttf -------------------------------------------------------------------------------- /web/fonts/KaTeX_Size4-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Size4-Regular.woff -------------------------------------------------------------------------------- /web/fonts/KaTeX_Size4-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Size4-Regular.woff2 -------------------------------------------------------------------------------- /web/fonts/KaTeX_Typewriter-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Typewriter-Regular.ttf -------------------------------------------------------------------------------- /web/fonts/KaTeX_Typewriter-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Typewriter-Regular.woff -------------------------------------------------------------------------------- /web/fonts/KaTeX_Typewriter-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gugutu/Anki-Note-Linker/5ab897b1bfb801fa2e13bdc825f272ead04cfb3e/web/fonts/KaTeX_Typewriter-Regular.woff2 -------------------------------------------------------------------------------- /web/graph.html: -------------------------------------------------------------------------------- 1 | 3 | 18 |
19 | 20 | -------------------------------------------------------------------------------- /web/js/detectClick.js: -------------------------------------------------------------------------------- 1 | window.addEventListener('dblclick', function (e) { 2 | var nidreg = /^nid\d{13}$/; 3 | var newreg = /^new\d{8}$/; 4 | const st = window.getSelection().toString(); 5 | if (st !== '') { 6 | if (nidreg.test(st)) { 7 | const nid = st.slice(3) 8 | pycmd('AnkiNoteLinker-openNoteInNewEditor' + nid); 9 | } else if (newreg.test(st)) { 10 | const placeholder = st.slice(3) 11 | pycmd('AnkiNoteLinker-openAddNoteWindow' + placeholder) 12 | } 13 | } 14 | }); -------------------------------------------------------------------------------- /web/js/katex-auto-render.js: -------------------------------------------------------------------------------- 1 | (function webpackUniversalModuleDefinition(root, factory) { 2 | if(typeof exports === 'object' && typeof module === 'object') 3 | module.exports = factory(require("katex")); 4 | else if(typeof define === 'function' && define.amd) 5 | define(["katex"], factory); 6 | else if(typeof exports === 'object') 7 | exports["renderMathInElement"] = factory(require("katex")); 8 | else 9 | root["renderMathInElement"] = factory(root["katex"]); 10 | })((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__771__) { 11 | return /******/ (function() { // webpackBootstrap 12 | /******/ "use strict"; 13 | /******/ var __webpack_modules__ = ({ 14 | 15 | /***/ 771: 16 | /***/ (function(module) { 17 | 18 | module.exports = __WEBPACK_EXTERNAL_MODULE__771__; 19 | 20 | /***/ }) 21 | 22 | /******/ }); 23 | /************************************************************************/ 24 | /******/ // The module cache 25 | /******/ var __webpack_module_cache__ = {}; 26 | /******/ 27 | /******/ // The require function 28 | /******/ function __webpack_require__(moduleId) { 29 | /******/ // Check if module is in cache 30 | /******/ var cachedModule = __webpack_module_cache__[moduleId]; 31 | /******/ if (cachedModule !== undefined) { 32 | /******/ return cachedModule.exports; 33 | /******/ } 34 | /******/ // Create a new module (and put it into the cache) 35 | /******/ var module = __webpack_module_cache__[moduleId] = { 36 | /******/ // no module.id needed 37 | /******/ // no module.loaded needed 38 | /******/ exports: {} 39 | /******/ }; 40 | /******/ 41 | /******/ // Execute the module function 42 | /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 43 | /******/ 44 | /******/ // Return the exports of the module 45 | /******/ return module.exports; 46 | /******/ } 47 | /******/ 48 | /************************************************************************/ 49 | /******/ /* webpack/runtime/compat get default export */ 50 | /******/ !function() { 51 | /******/ // getDefaultExport function for compatibility with non-harmony modules 52 | /******/ __webpack_require__.n = function(module) { 53 | /******/ var getter = module && module.__esModule ? 54 | /******/ function() { return module['default']; } : 55 | /******/ function() { return module; }; 56 | /******/ __webpack_require__.d(getter, { a: getter }); 57 | /******/ return getter; 58 | /******/ }; 59 | /******/ }(); 60 | /******/ 61 | /******/ /* webpack/runtime/define property getters */ 62 | /******/ !function() { 63 | /******/ // define getter functions for harmony exports 64 | /******/ __webpack_require__.d = function(exports, definition) { 65 | /******/ for(var key in definition) { 66 | /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 67 | /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 68 | /******/ } 69 | /******/ } 70 | /******/ }; 71 | /******/ }(); 72 | /******/ 73 | /******/ /* webpack/runtime/hasOwnProperty shorthand */ 74 | /******/ !function() { 75 | /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } 76 | /******/ }(); 77 | /******/ 78 | /************************************************************************/ 79 | var __webpack_exports__ = {}; 80 | // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. 81 | !function() { 82 | 83 | // EXPORTS 84 | __webpack_require__.d(__webpack_exports__, { 85 | "default": function() { return /* binding */ auto_render; } 86 | }); 87 | 88 | // EXTERNAL MODULE: external "katex" 89 | var external_katex_ = __webpack_require__(771); 90 | var external_katex_default = /*#__PURE__*/__webpack_require__.n(external_katex_); 91 | ;// CONCATENATED MODULE: ./contrib/auto-render/splitAtDelimiters.js 92 | /* eslint no-constant-condition:0 */ 93 | const findEndOfMath = function (delimiter, text, startIndex) { 94 | // Adapted from 95 | // https://github.com/Khan/perseus/blob/master/src/perseus-markdown.jsx 96 | let index = startIndex; 97 | let braceLevel = 0; 98 | const delimLength = delimiter.length; 99 | 100 | while (index < text.length) { 101 | const character = text[index]; 102 | 103 | if (braceLevel <= 0 && text.slice(index, index + delimLength) === delimiter) { 104 | return index; 105 | } else if (character === "\\") { 106 | index++; 107 | } else if (character === "{") { 108 | braceLevel++; 109 | } else if (character === "}") { 110 | braceLevel--; 111 | } 112 | 113 | index++; 114 | } 115 | 116 | return -1; 117 | }; 118 | 119 | const escapeRegex = function (string) { 120 | return string.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"); 121 | }; 122 | 123 | const amsRegex = /^\\begin{/; 124 | 125 | const splitAtDelimiters = function (text, delimiters) { 126 | let index; 127 | const data = []; 128 | const regexLeft = new RegExp("(" + delimiters.map(x => escapeRegex(x.left)).join("|") + ")"); 129 | 130 | while (true) { 131 | index = text.search(regexLeft); 132 | 133 | if (index === -1) { 134 | break; 135 | } 136 | 137 | if (index > 0) { 138 | data.push({ 139 | type: "text", 140 | data: text.slice(0, index) 141 | }); 142 | text = text.slice(index); // now text starts with delimiter 143 | } // ... so this always succeeds: 144 | 145 | 146 | const i = delimiters.findIndex(delim => text.startsWith(delim.left)); 147 | index = findEndOfMath(delimiters[i].right, text, delimiters[i].left.length); 148 | 149 | if (index === -1) { 150 | break; 151 | } 152 | 153 | const rawData = text.slice(0, index + delimiters[i].right.length); 154 | const math = amsRegex.test(rawData) ? rawData : text.slice(delimiters[i].left.length, index); 155 | data.push({ 156 | type: "math", 157 | data: math, 158 | rawData, 159 | display: delimiters[i].display 160 | }); 161 | text = text.slice(index + delimiters[i].right.length); 162 | } 163 | 164 | if (text !== "") { 165 | data.push({ 166 | type: "text", 167 | data: text 168 | }); 169 | } 170 | 171 | return data; 172 | }; 173 | 174 | /* harmony default export */ var auto_render_splitAtDelimiters = (splitAtDelimiters); 175 | ;// CONCATENATED MODULE: ./contrib/auto-render/auto-render.js 176 | /* eslint no-console:0 */ 177 | 178 | 179 | /* Note: optionsCopy is mutated by this method. If it is ever exposed in the 180 | * API, we should copy it before mutating. 181 | */ 182 | 183 | const renderMathInText = function (text, optionsCopy) { 184 | const data = auto_render_splitAtDelimiters(text, optionsCopy.delimiters); 185 | 186 | if (data.length === 1 && data[0].type === 'text') { 187 | // There is no formula in the text. 188 | // Let's return null which means there is no need to replace 189 | // the current text node with a new one. 190 | return null; 191 | } 192 | 193 | const fragment = document.createDocumentFragment(); 194 | 195 | for (let i = 0; i < data.length; i++) { 196 | if (data[i].type === "text") { 197 | fragment.appendChild(document.createTextNode(data[i].data)); 198 | } else { 199 | const span = document.createElement("span"); 200 | let math = data[i].data; // Override any display mode defined in the settings with that 201 | // defined by the text itself 202 | 203 | optionsCopy.displayMode = data[i].display; 204 | 205 | try { 206 | if (optionsCopy.preProcess) { 207 | math = optionsCopy.preProcess(math); 208 | } 209 | 210 | external_katex_default().render(math, span, optionsCopy); 211 | } catch (e) { 212 | if (!(e instanceof (external_katex_default()).ParseError)) { 213 | throw e; 214 | } 215 | 216 | optionsCopy.errorCallback("KaTeX auto-render: Failed to parse `" + data[i].data + "` with ", e); 217 | fragment.appendChild(document.createTextNode(data[i].rawData)); 218 | continue; 219 | } 220 | 221 | fragment.appendChild(span); 222 | } 223 | } 224 | 225 | return fragment; 226 | }; 227 | 228 | const renderElem = function (elem, optionsCopy) { 229 | for (let i = 0; i < elem.childNodes.length; i++) { 230 | const childNode = elem.childNodes[i]; 231 | 232 | if (childNode.nodeType === 3) { 233 | // Text node 234 | // Concatenate all sibling text nodes. 235 | // Webkit browsers split very large text nodes into smaller ones, 236 | // so the delimiters may be split across different nodes. 237 | let textContentConcat = childNode.textContent; 238 | let sibling = childNode.nextSibling; 239 | let nSiblings = 0; 240 | 241 | while (sibling && sibling.nodeType === Node.TEXT_NODE) { 242 | textContentConcat += sibling.textContent; 243 | sibling = sibling.nextSibling; 244 | nSiblings++; 245 | } 246 | 247 | const frag = renderMathInText(textContentConcat, optionsCopy); 248 | 249 | if (frag) { 250 | // Remove extra text nodes 251 | for (let j = 0; j < nSiblings; j++) { 252 | childNode.nextSibling.remove(); 253 | } 254 | 255 | i += frag.childNodes.length - 1; 256 | elem.replaceChild(frag, childNode); 257 | } else { 258 | // If the concatenated text does not contain math 259 | // the siblings will not either 260 | i += nSiblings; 261 | } 262 | } else if (childNode.nodeType === 1) { 263 | // Element node 264 | const className = ' ' + childNode.className + ' '; 265 | const shouldRender = optionsCopy.ignoredTags.indexOf(childNode.nodeName.toLowerCase()) === -1 && optionsCopy.ignoredClasses.every(x => className.indexOf(' ' + x + ' ') === -1); 266 | 267 | if (shouldRender) { 268 | renderElem(childNode, optionsCopy); 269 | } 270 | } // Otherwise, it's something else, and ignore it. 271 | 272 | } 273 | }; 274 | 275 | const renderMathInElement = function (elem, options) { 276 | if (!elem) { 277 | throw new Error("No element provided to render"); 278 | } 279 | 280 | const optionsCopy = {}; // Object.assign(optionsCopy, option) 281 | 282 | for (const option in options) { 283 | if (options.hasOwnProperty(option)) { 284 | optionsCopy[option] = options[option]; 285 | } 286 | } // default options 287 | 288 | 289 | optionsCopy.delimiters = optionsCopy.delimiters || [{ 290 | left: "$$", 291 | right: "$$", 292 | display: true 293 | }, { 294 | left: "\\(", 295 | right: "\\)", 296 | display: false 297 | }, // LaTeX uses $…$, but it ruins the display of normal `$` in text: 298 | // {left: "$", right: "$", display: false}, 299 | // $ must come after $$ 300 | // Render AMS environments even if outside $$…$$ delimiters. 301 | { 302 | left: "\\begin{equation}", 303 | right: "\\end{equation}", 304 | display: true 305 | }, { 306 | left: "\\begin{align}", 307 | right: "\\end{align}", 308 | display: true 309 | }, { 310 | left: "\\begin{alignat}", 311 | right: "\\end{alignat}", 312 | display: true 313 | }, { 314 | left: "\\begin{gather}", 315 | right: "\\end{gather}", 316 | display: true 317 | }, { 318 | left: "\\begin{CD}", 319 | right: "\\end{CD}", 320 | display: true 321 | }, { 322 | left: "\\[", 323 | right: "\\]", 324 | display: true 325 | }]; 326 | optionsCopy.ignoredTags = optionsCopy.ignoredTags || ["script", "noscript", "style", "textarea", "pre", "code", "option"]; 327 | optionsCopy.ignoredClasses = optionsCopy.ignoredClasses || []; 328 | optionsCopy.errorCallback = optionsCopy.errorCallback || console.error; // Enable sharing of global macros defined via `\gdef` between different 329 | // math elements within a single call to `renderMathInElement`. 330 | 331 | optionsCopy.macros = optionsCopy.macros || {}; 332 | renderElem(elem, optionsCopy); 333 | }; 334 | 335 | /* harmony default export */ var auto_render = (renderMathInElement); 336 | }(); 337 | __webpack_exports__ = __webpack_exports__["default"]; 338 | /******/ return __webpack_exports__; 339 | /******/ })() 340 | ; 341 | }); -------------------------------------------------------------------------------- /web/js/katex-mhchem.js: -------------------------------------------------------------------------------- 1 | !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("katex"));else if("function"==typeof define&&define.amd)define(["katex"],e);else{var n="object"==typeof exports?e(require("katex")):e(t.katex);for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}("undefined"!=typeof self?self:this,(function(t){return function(){"use strict";var e={771:function(e){e.exports=t}},n={};function o(t){var a=n[t];if(void 0!==a)return a.exports;var r=n[t]={exports:{}};return e[t](r,r.exports,o),r.exports}o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var a={};return function(){var t=o(771),e=o.n(t);e().__defineMacro("\\ce",(function(t){return n(t.consumeArgs(1)[0],"ce")})),e().__defineMacro("\\pu",(function(t){return n(t.consumeArgs(1)[0],"pu")})),e().__defineMacro("\\tripledash","{\\vphantom{-}\\raisebox{2.56mu}{$\\mkern2mu\\tiny\\text{-}\\mkern1mu\\text{-}\\mkern1mu\\text{-}\\mkern2mu$}}");var n=function(t,e){for(var n="",o=t.length&&t[t.length-1].loc.start,i=t.length-1;i>=0;i--)t[i].loc.start>o&&(n+=" ",o=t[i].loc.start),n+=t[i].text,o+=t[i].text.length;return r.go(a.go(n,e))},a={go:function(t,e){if(!t)return[];void 0===e&&(e="ce");var n,o="0",r={};r.parenthesisLevel=0,t=(t=(t=t.replace(/\n/g," ")).replace(/[\u2212\u2013\u2014\u2010]/g,"-")).replace(/[\u2026]/g,"...");for(var i=10,c=[];;){n!==t?(i=10,n=t):i--;var u=a.stateMachines[e],p=u.transitions[o]||u.transitions["*"];t:for(var s=0;s0))return c;if(d.revisit||(t=_.remainder),!d.toContinue)break t}}if(i<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(t,e){if(e)if(Array.isArray(e))for(var n=0;n":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(t){return a.patterns.findObserveGroups(t,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(t){return a.patterns.findObserveGroups(t,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(t){return a.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(t){return a.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(t){return a.patterns.findObserveGroups(t,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(t){return a.patterns.findObserveGroups(t,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(t){return a.patterns.findObserveGroups(t,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(t){return a.patterns.findObserveGroups(t,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(t){return a.patterns.findObserveGroups(t,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(t){return a.patterns.findObserveGroups(t,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(t){return a.patterns.findObserveGroups(t,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(t){return a.patterns.findObserveGroups(t,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(t){var e;if(e=t.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/))return{match_:e[0],remainder:t.substr(e[0].length)};var n=a.patterns.findObserveGroups(t,"","$","$","");return n&&(e=n.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/))?{match_:e[0],remainder:t.substr(e[0].length)}:null},amount2:function(t){return this.amount(t)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(t){if(t.match(/^\([a-z]+\)$/))return null;var e=t.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return e?{match_:e[0],remainder:t.substr(e[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(t,e,n,o,a,r,i,c,u,p){var s=function(t,e){if("string"==typeof e)return 0!==t.indexOf(e)?null:e;var n=t.match(e);return n?n[0]:null},_=s(t,e);if(null===_)return null;if(t=t.substr(_.length),null===(_=s(t,n)))return null;var d=function(t,e,n){for(var o=0;e":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(t,e){var n;if((t.d||"").match(/^[0-9]+$/)){var o=t.d;t.d=void 0,n=this.output(t),t.b=o}else n=this.output(t);return a.actions["o="](t,e),n},"d= kv":function(t,e){t.d=e,t.dType="kv"},"charge or bond":function(t,e){if(t.beginsWithBond){var n=[];return a.concatArray(n,this.output(t)),a.concatArray(n,a.actions.bond(t,e,"-")),n}t.d=e},"- after o/d":function(t,e,n){var o=a.patterns.match_("orbital",t.o||""),r=a.patterns.match_("one lowercase greek letter $",t.o||""),i=a.patterns.match_("one lowercase latin letter $",t.o||""),c=a.patterns.match_("$one lowercase latin letter$ $",t.o||""),u="-"===e&&(o&&""===o.remainder||r||i||c);!u||t.a||t.b||t.p||t.d||t.q||o||!i||(t.o="$"+t.o+"$");var p=[];return u?(a.concatArray(p,this.output(t)),p.push({type_:"hyphen"})):(o=a.patterns.match_("digits",t.d||""),n&&o&&""===o.remainder?(a.concatArray(p,a.actions["d="](t,e)),a.concatArray(p,this.output(t))):(a.concatArray(p,this.output(t)),a.concatArray(p,a.actions.bond(t,e,"-")))),p},"a to o":function(t){t.o=t.a,t.a=void 0},"sb=true":function(t){t.sb=!0},"sb=false":function(t){t.sb=!1},"beginsWithBond=true":function(t){t.beginsWithBond=!0},"beginsWithBond=false":function(t){t.beginsWithBond=!1},"parenthesisLevel++":function(t){t.parenthesisLevel++},"parenthesisLevel--":function(t){t.parenthesisLevel--},"state of aggregation":function(t,e){return{type_:"state of aggregation",p1:a.go(e,"o")}},comma:function(t,e){var n=e.replace(/\s*$/,"");return n!==e&&0===t.parenthesisLevel?{type_:"comma enumeration L",p1:n}:{type_:"comma enumeration M",p1:n}},output:function(t,e,n){var o,r,i;t.r?(r="M"===t.rdt?a.go(t.rd,"tex-math"):"T"===t.rdt?[{type_:"text",p1:t.rd||""}]:a.go(t.rd),i="M"===t.rqt?a.go(t.rq,"tex-math"):"T"===t.rqt?[{type_:"text",p1:t.rq||""}]:a.go(t.rq),o={type_:"arrow",r:t.r,rd:r,rq:i}):(o=[],(t.a||t.b||t.p||t.o||t.q||t.d||n)&&(t.sb&&o.push({type_:"entitySkip"}),t.o||t.q||t.d||t.b||t.p||2===n?t.o||t.q||t.d||!t.b&&!t.p?t.o&&"kv"===t.dType&&a.patterns.match_("d-oxidation$",t.d||"")?t.dType="oxidation":t.o&&"kv"===t.dType&&!t.q&&(t.dType=void 0):(t.o=t.a,t.d=t.b,t.q=t.p,t.a=t.b=t.p=void 0):(t.o=t.a,t.a=void 0),o.push({type_:"chemfive",a:a.go(t.a,"a"),b:a.go(t.b,"bd"),p:a.go(t.p,"pq"),o:a.go(t.o,"o"),q:a.go(t.q,"pq"),d:a.go(t.d,"oxidation"===t.dType?"oxidation":"bd"),dType:t.dType})));for(var c in t)"parenthesisLevel"!==c&&"beginsWithBond"!==c&&delete t[c];return o},"oxidation-output":function(t,e){var n=["{"];return a.concatArray(n,a.go(e,"oxidation")),n.push("}"),n},"frac-output":function(t,e){return{type_:"frac-ce",p1:a.go(e[0]),p2:a.go(e[1])}},"overset-output":function(t,e){return{type_:"overset",p1:a.go(e[0]),p2:a.go(e[1])}},"underset-output":function(t,e){return{type_:"underset",p1:a.go(e[0]),p2:a.go(e[1])}},"underbrace-output":function(t,e){return{type_:"underbrace",p1:a.go(e[0]),p2:a.go(e[1])}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:a.go(e[1])}},"r=":function(t,e){t.r=e},"rdt=":function(t,e){t.rdt=e},"rd=":function(t,e){t.rd=e},"rqt=":function(t,e){t.rqt=e},"rq=":function(t,e){t.rq=e},operator:function(t,e,n){return{type_:"operator",kind_:n||e}}}},a:{transitions:a.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:a.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:a.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(t){if(t.text_){var e={type_:"text",p1:t.text_};for(var n in t)delete t[n];return e}}}},pq:{transitions:a.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(t,e){return{type_:"state of aggregation subscript",p1:a.go(e,"o")}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:a.go(e[1],"pq")}}}},bd:{transitions:a.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(t,e){return{type_:"color",color1:e[0],color2:a.go(e[1],"bd")}}}},oxidation:{transitions:a.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(t,e){return{type_:"roman numeral",p1:e||""}}}},"tex-math":{transitions:a.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var n in t)delete t[n];return e}}}},"tex-math tight":{transitions:a.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(t,e){t.o=(t.o||"")+"{"+e+"}"},output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var n in t)delete t[n];return e}}}},"9,9":{transitions:a.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:a.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(t,e){var n=[];return"+-"===e[0]||"+/-"===e[0]?n.push("\\pm "):e[0]&&n.push(e[0]),e[1]&&(a.concatArray(n,a.go(e[1],"pu-9,9")),e[2]&&(e[2].match(/[,.]/)?a.concatArray(n,a.go(e[2],"pu-9,9")):n.push(e[2])),e[3]=e[4]||e[3],e[3]&&(e[3]=e[3].trim(),"e"===e[3]||"*"===e[3].substr(0,1)?n.push({type_:"cdot"}):n.push({type_:"times"}))),e[3]&&n.push("10^{"+e[5]+"}"),n},"number^":function(t,e){var n=[];return"+-"===e[0]||"+/-"===e[0]?n.push("\\pm "):e[0]&&n.push(e[0]),a.concatArray(n,a.go(e[1],"pu-9,9")),n.push("^{"+e[2]+"}"),n},operator:function(t,e,n){return{type_:"operator",kind_:n||e}},space:function(){return{type_:"pu-space-1"}},output:function(t){var e,n=a.patterns.match_("{(...)}",t.d||"");n&&""===n.remainder&&(t.d=n.match_);var o=a.patterns.match_("{(...)}",t.q||"");if(o&&""===o.remainder&&(t.q=o.match_),t.d&&(t.d=t.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.d=t.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),t.q){t.q=t.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.q=t.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var r={d:a.go(t.d,"pu"),q:a.go(t.q,"pu")};"//"===t.o?e={type_:"pu-frac",p1:r.d,p2:r.q}:(e=r.d,r.d.length>1||r.q.length>1?e.push({type_:" / "}):e.push({type_:"/"}),a.concatArray(e,r.q))}else e=a.go(t.d,"pu-2");for(var i in t)delete t[i];return e}}},"pu-2":{transitions:a.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(t,e){t.rm+="^{"+e+"}"},space:function(){return{type_:"pu-space-2"}},output:function(t){var e=[];if(t.rm){var n=a.patterns.match_("{(...)}",t.rm||"");e=n&&""===n.remainder?a.go(n.match_,"pu"):{type_:"rm",p1:t.rm}}for(var o in t)delete t[o];return e}}},"pu-9,9":{transitions:a.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){var n=t.text_.length%3;0===n&&(n=3);for(var o=t.text_.length-3;o>0;o-=3)e.push(t.text_.substr(o,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(0,n)),e.reverse()}else e.push(t.text_);for(var a in t)delete t[a];return e},"output-o":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){for(var n=t.text_.length-3,o=0;o":case"\u2192":case"\u27f6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<--\x3e":return"rightleftarrows";case"<=>":case"\u21cc":return"rightleftharpoons";case"<=>>":return"rightequilibrium";case"<<=>":return"leftequilibrium";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(t){switch(t){case"-":case"1":return"{-}";case"=":case"2":return"{=}";case"#":case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\mathrlap{\\raisebox{-.1em}{$-$}}\\raisebox{.1em}{$\\tripledash$}}";case"~=":case"~--":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$\\tripledash$}}-}";case"-~-":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$-$}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(t){switch(t){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":case"$\\approx$":return" {}\\approx{} ";case"v":case"(v)":return" \\downarrow{} ";case"^":case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}}}(),a=a.default}()})); -------------------------------------------------------------------------------- /web/js/translation.js: -------------------------------------------------------------------------------- 1 | function getTr(s) { 2 | if (ankiLanguage !== 'zh-CN') return s; 3 | else switch (s) { 4 | case 'Back Links': 5 | return '反向链接' 6 | case 'Forward Links': 7 | return '正向链接' 8 | case 'None': 9 | return '无' 10 | case 'Invalid note': 11 | return '无效笔记' 12 | case 'Invalid link': 13 | return '无效链接' 14 | case 'Basic': 15 | return '基础' 16 | case 'Global Relationship Graph': 17 | return '全局关系图' 18 | case 'Shortcut keys': 19 | return '快捷键' 20 | case 'left': 21 | return '左' 22 | case 'right': 23 | return '右' 24 | case 'Automatically show links panel when entering editor': 25 | return '进入编辑器时自动显示链接面板' 26 | case 'Automatically show graph panel when entering editor': 27 | return '进入编辑器时自动显示关系图面板' 28 | case 'Automatically show links panel when entering reviewer': 29 | return '进入复习界面时自动显示链接面板' 30 | case 'Collapse cloze in links panel': 31 | return '折叠链接面板中的完形填空' 32 | case 'If the "hjp-linkmaster" add-on is installed, use its previewer': 33 | return '如果安装了“hjp-linkmaster”插件,则使用它的预览器' 34 | case 'The position of links/graph panel relative to the editor': 35 | return '链接/图形面板相对于编辑器的位置' 36 | case 'The position of links panel relative to the reviewer': 37 | return '链接面板相对于复习界面的位置' 38 | case 'Split ratio between editor and panels': 39 | return '编辑器和面板之间的显示比例' 40 | case 'Split ratio between links panel and graph panel': 41 | return '链接面板和图形面板之间的显示比例' 42 | case 'Split ratio between reviewer and links panel': 43 | return '复习界面和链接面板之间的显示比例' 44 | case 'Note fields displayed in the note summary': 45 | return '笔记摘要中显示的笔记字段' 46 | case 'Default search text': 47 | return '默认搜索文本' 48 | case 'Default filter text for highlighted nodes': 49 | return '高亮节点的默认筛选文本' 50 | case 'Default display of single nodes': 51 | return '默认显示单独的节点' 52 | case 'Default display of tag nodes': 53 | return '默认显示标签节点' 54 | case 'Node color': 55 | return '节点颜色' 56 | case 'Highlighted node color': 57 | return '高亮节点颜色' 58 | case 'Tag node color': 59 | return '标签节点颜色' 60 | case 'Graph background color': 61 | return '图背景颜色' 62 | case 'Restore Defaults': 63 | return '恢复默认值' 64 | case 'Cancel': 65 | return '取消' 66 | case 'OK': 67 | return '确认' 68 | case 'The format of "split ratio" is incorrect': 69 | return '“显示比例”的格式不正确' 70 | case 'Max displayed lines per link in links panel': 71 | return '链接面板中每个链接的最大显示行数' 72 | case 'Copy current note ID': 73 | return '复制当前笔记ID' 74 | case 'Copy current note link': 75 | return '复制当前笔记链接' 76 | case 'Open current note in new window': 77 | return '在新窗口中打开当前笔记' 78 | case 'Insert link with copied note ID': 79 | return '插入带有已复制的笔记ID的链接' 80 | case 'Insert new link': 81 | return '插入新链接' 82 | case 'Insert link template': 83 | return '插入链接模版' 84 | case 'The note fields displayed in the note summary (content shown in the link panel or graphic). \n' + 85 | 'The add-on will find the first matching field to display as the note summary. \n' + 86 | 'If no field is set or there is no matching field, the first field of the note will be used by default.': 87 | return '在笔记摘要(链接面板或图形中显示的内容)中显示的笔记字段。\n插件将找到第一个匹配的字段将其显示为笔记摘要。\n如果没有设定或没有匹配的字段,则默认使用笔记的第一个字段。' 88 | default: 89 | return s 90 | } 91 | } -------------------------------------------------------------------------------- /web/katex.css: -------------------------------------------------------------------------------- 1 | /* stylelint-disable font-family-no-missing-generic-family-keyword */ 2 | @font-face { 3 | font-family: 'KaTeX_AMS'; 4 | src: url(fonts/KaTeX_AMS-Regular.woff2) format('woff2'), url(fonts/KaTeX_AMS-Regular.woff) format('woff'), url(fonts/KaTeX_AMS-Regular.ttf) format('truetype'); 5 | font-weight: normal; 6 | font-style: normal; 7 | } 8 | @font-face { 9 | font-family: 'KaTeX_Caligraphic'; 10 | src: url(fonts/KaTeX_Caligraphic-Bold.woff2) format('woff2'), url(fonts/KaTeX_Caligraphic-Bold.woff) format('woff'), url(fonts/KaTeX_Caligraphic-Bold.ttf) format('truetype'); 11 | font-weight: bold; 12 | font-style: normal; 13 | } 14 | @font-face { 15 | font-family: 'KaTeX_Caligraphic'; 16 | src: url(fonts/KaTeX_Caligraphic-Regular.woff2) format('woff2'), url(fonts/KaTeX_Caligraphic-Regular.woff) format('woff'), url(fonts/KaTeX_Caligraphic-Regular.ttf) format('truetype'); 17 | font-weight: normal; 18 | font-style: normal; 19 | } 20 | @font-face { 21 | font-family: 'KaTeX_Fraktur'; 22 | src: url(fonts/KaTeX_Fraktur-Bold.woff2) format('woff2'), url(fonts/KaTeX_Fraktur-Bold.woff) format('woff'), url(fonts/KaTeX_Fraktur-Bold.ttf) format('truetype'); 23 | font-weight: bold; 24 | font-style: normal; 25 | } 26 | @font-face { 27 | font-family: 'KaTeX_Fraktur'; 28 | src: url(fonts/KaTeX_Fraktur-Regular.woff2) format('woff2'), url(fonts/KaTeX_Fraktur-Regular.woff) format('woff'), url(fonts/KaTeX_Fraktur-Regular.ttf) format('truetype'); 29 | font-weight: normal; 30 | font-style: normal; 31 | } 32 | @font-face { 33 | font-family: 'KaTeX_Main'; 34 | src: url(fonts/KaTeX_Main-Bold.woff2) format('woff2'), url(fonts/KaTeX_Main-Bold.woff) format('woff'), url(fonts/KaTeX_Main-Bold.ttf) format('truetype'); 35 | font-weight: bold; 36 | font-style: normal; 37 | } 38 | @font-face { 39 | font-family: 'KaTeX_Main'; 40 | src: url(fonts/KaTeX_Main-BoldItalic.woff2) format('woff2'), url(fonts/KaTeX_Main-BoldItalic.woff) format('woff'), url(fonts/KaTeX_Main-BoldItalic.ttf) format('truetype'); 41 | font-weight: bold; 42 | font-style: italic; 43 | } 44 | @font-face { 45 | font-family: 'KaTeX_Main'; 46 | src: url(fonts/KaTeX_Main-Italic.woff2) format('woff2'), url(fonts/KaTeX_Main-Italic.woff) format('woff'), url(fonts/KaTeX_Main-Italic.ttf) format('truetype'); 47 | font-weight: normal; 48 | font-style: italic; 49 | } 50 | @font-face { 51 | font-family: 'KaTeX_Main'; 52 | src: url(fonts/KaTeX_Main-Regular.woff2) format('woff2'), url(fonts/KaTeX_Main-Regular.woff) format('woff'), url(fonts/KaTeX_Main-Regular.ttf) format('truetype'); 53 | font-weight: normal; 54 | font-style: normal; 55 | } 56 | @font-face { 57 | font-family: 'KaTeX_Math'; 58 | src: url(fonts/KaTeX_Math-BoldItalic.woff2) format('woff2'), url(fonts/KaTeX_Math-BoldItalic.woff) format('woff'), url(fonts/KaTeX_Math-BoldItalic.ttf) format('truetype'); 59 | font-weight: bold; 60 | font-style: italic; 61 | } 62 | @font-face { 63 | font-family: 'KaTeX_Math'; 64 | src: url(fonts/KaTeX_Math-Italic.woff2) format('woff2'), url(fonts/KaTeX_Math-Italic.woff) format('woff'), url(fonts/KaTeX_Math-Italic.ttf) format('truetype'); 65 | font-weight: normal; 66 | font-style: italic; 67 | } 68 | @font-face { 69 | font-family: 'KaTeX_SansSerif'; 70 | src: url(fonts/KaTeX_SansSerif-Bold.woff2) format('woff2'), url(fonts/KaTeX_SansSerif-Bold.woff) format('woff'), url(fonts/KaTeX_SansSerif-Bold.ttf) format('truetype'); 71 | font-weight: bold; 72 | font-style: normal; 73 | } 74 | @font-face { 75 | font-family: 'KaTeX_SansSerif'; 76 | src: url(fonts/KaTeX_SansSerif-Italic.woff2) format('woff2'), url(fonts/KaTeX_SansSerif-Italic.woff) format('woff'), url(fonts/KaTeX_SansSerif-Italic.ttf) format('truetype'); 77 | font-weight: normal; 78 | font-style: italic; 79 | } 80 | @font-face { 81 | font-family: 'KaTeX_SansSerif'; 82 | src: url(fonts/KaTeX_SansSerif-Regular.woff2) format('woff2'), url(fonts/KaTeX_SansSerif-Regular.woff) format('woff'), url(fonts/KaTeX_SansSerif-Regular.ttf) format('truetype'); 83 | font-weight: normal; 84 | font-style: normal; 85 | } 86 | @font-face { 87 | font-family: 'KaTeX_Script'; 88 | src: url(fonts/KaTeX_Script-Regular.woff2) format('woff2'), url(fonts/KaTeX_Script-Regular.woff) format('woff'), url(fonts/KaTeX_Script-Regular.ttf) format('truetype'); 89 | font-weight: normal; 90 | font-style: normal; 91 | } 92 | @font-face { 93 | font-family: 'KaTeX_Size1'; 94 | src: url(fonts/KaTeX_Size1-Regular.woff2) format('woff2'), url(fonts/KaTeX_Size1-Regular.woff) format('woff'), url(fonts/KaTeX_Size1-Regular.ttf) format('truetype'); 95 | font-weight: normal; 96 | font-style: normal; 97 | } 98 | @font-face { 99 | font-family: 'KaTeX_Size2'; 100 | src: url(fonts/KaTeX_Size2-Regular.woff2) format('woff2'), url(fonts/KaTeX_Size2-Regular.woff) format('woff'), url(fonts/KaTeX_Size2-Regular.ttf) format('truetype'); 101 | font-weight: normal; 102 | font-style: normal; 103 | } 104 | @font-face { 105 | font-family: 'KaTeX_Size3'; 106 | src: url(fonts/KaTeX_Size3-Regular.woff2) format('woff2'), url(fonts/KaTeX_Size3-Regular.woff) format('woff'), url(fonts/KaTeX_Size3-Regular.ttf) format('truetype'); 107 | font-weight: normal; 108 | font-style: normal; 109 | } 110 | @font-face { 111 | font-family: 'KaTeX_Size4'; 112 | src: url(fonts/KaTeX_Size4-Regular.woff2) format('woff2'), url(fonts/KaTeX_Size4-Regular.woff) format('woff'), url(fonts/KaTeX_Size4-Regular.ttf) format('truetype'); 113 | font-weight: normal; 114 | font-style: normal; 115 | } 116 | @font-face { 117 | font-family: 'KaTeX_Typewriter'; 118 | src: url(fonts/KaTeX_Typewriter-Regular.woff2) format('woff2'), url(fonts/KaTeX_Typewriter-Regular.woff) format('woff'), url(fonts/KaTeX_Typewriter-Regular.ttf) format('truetype'); 119 | font-weight: normal; 120 | font-style: normal; 121 | } 122 | .katex { 123 | font: normal 1.21em KaTeX_Main, Times New Roman, serif; 124 | line-height: 1.2; 125 | text-indent: 0; 126 | text-rendering: auto; 127 | } 128 | .katex * { 129 | -ms-high-contrast-adjust: none !important; 130 | } 131 | .katex * { 132 | border-color: currentColor; 133 | } 134 | .katex .katex-version::after { 135 | content: "0.16.10"; 136 | } 137 | .katex .katex-mathml { 138 | /* Accessibility hack to only show to screen readers 139 | Found at: http://a11yproject.com/posts/how-to-hide-content/ */ 140 | position: absolute; 141 | clip: rect(1px, 1px, 1px, 1px); 142 | padding: 0; 143 | border: 0; 144 | height: 1px; 145 | width: 1px; 146 | overflow: hidden; 147 | } 148 | .katex .katex-html { 149 | /* \newline is an empty block at top level, between .base elements */ 150 | } 151 | .katex .katex-html > .newline { 152 | display: block; 153 | } 154 | .katex .base { 155 | position: relative; 156 | display: inline-block; 157 | white-space: nowrap; 158 | width: -webkit-min-content; 159 | width: -moz-min-content; 160 | width: min-content; 161 | } 162 | .katex .strut { 163 | display: inline-block; 164 | } 165 | .katex .textbf { 166 | font-weight: bold; 167 | } 168 | .katex .textit { 169 | font-style: italic; 170 | } 171 | .katex .textrm { 172 | font-family: KaTeX_Main; 173 | } 174 | .katex .textsf { 175 | font-family: KaTeX_SansSerif; 176 | } 177 | .katex .texttt { 178 | font-family: KaTeX_Typewriter; 179 | } 180 | .katex .mathnormal { 181 | font-family: KaTeX_Math; 182 | font-style: italic; 183 | } 184 | .katex .mathit { 185 | font-family: KaTeX_Main; 186 | font-style: italic; 187 | } 188 | .katex .mathrm { 189 | font-style: normal; 190 | } 191 | .katex .mathbf { 192 | font-family: KaTeX_Main; 193 | font-weight: bold; 194 | } 195 | .katex .boldsymbol { 196 | font-family: KaTeX_Math; 197 | font-weight: bold; 198 | font-style: italic; 199 | } 200 | .katex .amsrm { 201 | font-family: KaTeX_AMS; 202 | } 203 | .katex .mathbb, 204 | .katex .textbb { 205 | font-family: KaTeX_AMS; 206 | } 207 | .katex .mathcal { 208 | font-family: KaTeX_Caligraphic; 209 | } 210 | .katex .mathfrak, 211 | .katex .textfrak { 212 | font-family: KaTeX_Fraktur; 213 | } 214 | .katex .mathboldfrak, 215 | .katex .textboldfrak { 216 | font-family: KaTeX_Fraktur; 217 | font-weight: bold; 218 | } 219 | .katex .mathtt { 220 | font-family: KaTeX_Typewriter; 221 | } 222 | .katex .mathscr, 223 | .katex .textscr { 224 | font-family: KaTeX_Script; 225 | } 226 | .katex .mathsf, 227 | .katex .textsf { 228 | font-family: KaTeX_SansSerif; 229 | } 230 | .katex .mathboldsf, 231 | .katex .textboldsf { 232 | font-family: KaTeX_SansSerif; 233 | font-weight: bold; 234 | } 235 | .katex .mathitsf, 236 | .katex .textitsf { 237 | font-family: KaTeX_SansSerif; 238 | font-style: italic; 239 | } 240 | .katex .mainrm { 241 | font-family: KaTeX_Main; 242 | font-style: normal; 243 | } 244 | .katex .vlist-t { 245 | display: inline-table; 246 | table-layout: fixed; 247 | border-collapse: collapse; 248 | } 249 | .katex .vlist-r { 250 | display: table-row; 251 | } 252 | .katex .vlist { 253 | display: table-cell; 254 | vertical-align: bottom; 255 | position: relative; 256 | } 257 | .katex .vlist > span { 258 | display: block; 259 | height: 0; 260 | position: relative; 261 | } 262 | .katex .vlist > span > span { 263 | display: inline-block; 264 | } 265 | .katex .vlist > span > .pstrut { 266 | overflow: hidden; 267 | width: 0; 268 | } 269 | .katex .vlist-t2 { 270 | margin-right: -2px; 271 | } 272 | .katex .vlist-s { 273 | display: table-cell; 274 | vertical-align: bottom; 275 | font-size: 1px; 276 | width: 2px; 277 | min-width: 2px; 278 | } 279 | .katex .vbox { 280 | display: inline-flex; 281 | flex-direction: column; 282 | align-items: baseline; 283 | } 284 | .katex .hbox { 285 | display: inline-flex; 286 | flex-direction: row; 287 | width: 100%; 288 | } 289 | .katex .thinbox { 290 | display: inline-flex; 291 | flex-direction: row; 292 | width: 0; 293 | max-width: 0; 294 | } 295 | .katex .msupsub { 296 | text-align: left; 297 | } 298 | .katex .mfrac > span > span { 299 | text-align: center; 300 | } 301 | .katex .mfrac .frac-line { 302 | display: inline-block; 303 | width: 100%; 304 | border-bottom-style: solid; 305 | } 306 | .katex .mfrac .frac-line, 307 | .katex .overline .overline-line, 308 | .katex .underline .underline-line, 309 | .katex .hline, 310 | .katex .hdashline, 311 | .katex .rule { 312 | min-height: 1px; 313 | } 314 | .katex .mspace { 315 | display: inline-block; 316 | } 317 | .katex .llap, 318 | .katex .rlap, 319 | .katex .clap { 320 | width: 0; 321 | position: relative; 322 | } 323 | .katex .llap > .inner, 324 | .katex .rlap > .inner, 325 | .katex .clap > .inner { 326 | position: absolute; 327 | } 328 | .katex .llap > .fix, 329 | .katex .rlap > .fix, 330 | .katex .clap > .fix { 331 | display: inline-block; 332 | } 333 | .katex .llap > .inner { 334 | right: 0; 335 | } 336 | .katex .rlap > .inner, 337 | .katex .clap > .inner { 338 | left: 0; 339 | } 340 | .katex .clap > .inner > span { 341 | margin-left: -50%; 342 | margin-right: 50%; 343 | } 344 | .katex .rule { 345 | display: inline-block; 346 | border: solid 0; 347 | position: relative; 348 | } 349 | .katex .overline .overline-line, 350 | .katex .underline .underline-line, 351 | .katex .hline { 352 | display: inline-block; 353 | width: 100%; 354 | border-bottom-style: solid; 355 | } 356 | .katex .hdashline { 357 | display: inline-block; 358 | width: 100%; 359 | border-bottom-style: dashed; 360 | } 361 | .katex .sqrt > .root { 362 | /* These values are taken from the definition of `\r@@t`, 363 | `\mkern 5mu` and `\mkern -10mu`. */ 364 | margin-left: 0.27777778em; 365 | margin-right: -0.55555556em; 366 | } 367 | .katex .sizing.reset-size1.size1, 368 | .katex .fontsize-ensurer.reset-size1.size1 { 369 | font-size: 1em; 370 | } 371 | .katex .sizing.reset-size1.size2, 372 | .katex .fontsize-ensurer.reset-size1.size2 { 373 | font-size: 1.2em; 374 | } 375 | .katex .sizing.reset-size1.size3, 376 | .katex .fontsize-ensurer.reset-size1.size3 { 377 | font-size: 1.4em; 378 | } 379 | .katex .sizing.reset-size1.size4, 380 | .katex .fontsize-ensurer.reset-size1.size4 { 381 | font-size: 1.6em; 382 | } 383 | .katex .sizing.reset-size1.size5, 384 | .katex .fontsize-ensurer.reset-size1.size5 { 385 | font-size: 1.8em; 386 | } 387 | .katex .sizing.reset-size1.size6, 388 | .katex .fontsize-ensurer.reset-size1.size6 { 389 | font-size: 2em; 390 | } 391 | .katex .sizing.reset-size1.size7, 392 | .katex .fontsize-ensurer.reset-size1.size7 { 393 | font-size: 2.4em; 394 | } 395 | .katex .sizing.reset-size1.size8, 396 | .katex .fontsize-ensurer.reset-size1.size8 { 397 | font-size: 2.88em; 398 | } 399 | .katex .sizing.reset-size1.size9, 400 | .katex .fontsize-ensurer.reset-size1.size9 { 401 | font-size: 3.456em; 402 | } 403 | .katex .sizing.reset-size1.size10, 404 | .katex .fontsize-ensurer.reset-size1.size10 { 405 | font-size: 4.148em; 406 | } 407 | .katex .sizing.reset-size1.size11, 408 | .katex .fontsize-ensurer.reset-size1.size11 { 409 | font-size: 4.976em; 410 | } 411 | .katex .sizing.reset-size2.size1, 412 | .katex .fontsize-ensurer.reset-size2.size1 { 413 | font-size: 0.83333333em; 414 | } 415 | .katex .sizing.reset-size2.size2, 416 | .katex .fontsize-ensurer.reset-size2.size2 { 417 | font-size: 1em; 418 | } 419 | .katex .sizing.reset-size2.size3, 420 | .katex .fontsize-ensurer.reset-size2.size3 { 421 | font-size: 1.16666667em; 422 | } 423 | .katex .sizing.reset-size2.size4, 424 | .katex .fontsize-ensurer.reset-size2.size4 { 425 | font-size: 1.33333333em; 426 | } 427 | .katex .sizing.reset-size2.size5, 428 | .katex .fontsize-ensurer.reset-size2.size5 { 429 | font-size: 1.5em; 430 | } 431 | .katex .sizing.reset-size2.size6, 432 | .katex .fontsize-ensurer.reset-size2.size6 { 433 | font-size: 1.66666667em; 434 | } 435 | .katex .sizing.reset-size2.size7, 436 | .katex .fontsize-ensurer.reset-size2.size7 { 437 | font-size: 2em; 438 | } 439 | .katex .sizing.reset-size2.size8, 440 | .katex .fontsize-ensurer.reset-size2.size8 { 441 | font-size: 2.4em; 442 | } 443 | .katex .sizing.reset-size2.size9, 444 | .katex .fontsize-ensurer.reset-size2.size9 { 445 | font-size: 2.88em; 446 | } 447 | .katex .sizing.reset-size2.size10, 448 | .katex .fontsize-ensurer.reset-size2.size10 { 449 | font-size: 3.45666667em; 450 | } 451 | .katex .sizing.reset-size2.size11, 452 | .katex .fontsize-ensurer.reset-size2.size11 { 453 | font-size: 4.14666667em; 454 | } 455 | .katex .sizing.reset-size3.size1, 456 | .katex .fontsize-ensurer.reset-size3.size1 { 457 | font-size: 0.71428571em; 458 | } 459 | .katex .sizing.reset-size3.size2, 460 | .katex .fontsize-ensurer.reset-size3.size2 { 461 | font-size: 0.85714286em; 462 | } 463 | .katex .sizing.reset-size3.size3, 464 | .katex .fontsize-ensurer.reset-size3.size3 { 465 | font-size: 1em; 466 | } 467 | .katex .sizing.reset-size3.size4, 468 | .katex .fontsize-ensurer.reset-size3.size4 { 469 | font-size: 1.14285714em; 470 | } 471 | .katex .sizing.reset-size3.size5, 472 | .katex .fontsize-ensurer.reset-size3.size5 { 473 | font-size: 1.28571429em; 474 | } 475 | .katex .sizing.reset-size3.size6, 476 | .katex .fontsize-ensurer.reset-size3.size6 { 477 | font-size: 1.42857143em; 478 | } 479 | .katex .sizing.reset-size3.size7, 480 | .katex .fontsize-ensurer.reset-size3.size7 { 481 | font-size: 1.71428571em; 482 | } 483 | .katex .sizing.reset-size3.size8, 484 | .katex .fontsize-ensurer.reset-size3.size8 { 485 | font-size: 2.05714286em; 486 | } 487 | .katex .sizing.reset-size3.size9, 488 | .katex .fontsize-ensurer.reset-size3.size9 { 489 | font-size: 2.46857143em; 490 | } 491 | .katex .sizing.reset-size3.size10, 492 | .katex .fontsize-ensurer.reset-size3.size10 { 493 | font-size: 2.96285714em; 494 | } 495 | .katex .sizing.reset-size3.size11, 496 | .katex .fontsize-ensurer.reset-size3.size11 { 497 | font-size: 3.55428571em; 498 | } 499 | .katex .sizing.reset-size4.size1, 500 | .katex .fontsize-ensurer.reset-size4.size1 { 501 | font-size: 0.625em; 502 | } 503 | .katex .sizing.reset-size4.size2, 504 | .katex .fontsize-ensurer.reset-size4.size2 { 505 | font-size: 0.75em; 506 | } 507 | .katex .sizing.reset-size4.size3, 508 | .katex .fontsize-ensurer.reset-size4.size3 { 509 | font-size: 0.875em; 510 | } 511 | .katex .sizing.reset-size4.size4, 512 | .katex .fontsize-ensurer.reset-size4.size4 { 513 | font-size: 1em; 514 | } 515 | .katex .sizing.reset-size4.size5, 516 | .katex .fontsize-ensurer.reset-size4.size5 { 517 | font-size: 1.125em; 518 | } 519 | .katex .sizing.reset-size4.size6, 520 | .katex .fontsize-ensurer.reset-size4.size6 { 521 | font-size: 1.25em; 522 | } 523 | .katex .sizing.reset-size4.size7, 524 | .katex .fontsize-ensurer.reset-size4.size7 { 525 | font-size: 1.5em; 526 | } 527 | .katex .sizing.reset-size4.size8, 528 | .katex .fontsize-ensurer.reset-size4.size8 { 529 | font-size: 1.8em; 530 | } 531 | .katex .sizing.reset-size4.size9, 532 | .katex .fontsize-ensurer.reset-size4.size9 { 533 | font-size: 2.16em; 534 | } 535 | .katex .sizing.reset-size4.size10, 536 | .katex .fontsize-ensurer.reset-size4.size10 { 537 | font-size: 2.5925em; 538 | } 539 | .katex .sizing.reset-size4.size11, 540 | .katex .fontsize-ensurer.reset-size4.size11 { 541 | font-size: 3.11em; 542 | } 543 | .katex .sizing.reset-size5.size1, 544 | .katex .fontsize-ensurer.reset-size5.size1 { 545 | font-size: 0.55555556em; 546 | } 547 | .katex .sizing.reset-size5.size2, 548 | .katex .fontsize-ensurer.reset-size5.size2 { 549 | font-size: 0.66666667em; 550 | } 551 | .katex .sizing.reset-size5.size3, 552 | .katex .fontsize-ensurer.reset-size5.size3 { 553 | font-size: 0.77777778em; 554 | } 555 | .katex .sizing.reset-size5.size4, 556 | .katex .fontsize-ensurer.reset-size5.size4 { 557 | font-size: 0.88888889em; 558 | } 559 | .katex .sizing.reset-size5.size5, 560 | .katex .fontsize-ensurer.reset-size5.size5 { 561 | font-size: 1em; 562 | } 563 | .katex .sizing.reset-size5.size6, 564 | .katex .fontsize-ensurer.reset-size5.size6 { 565 | font-size: 1.11111111em; 566 | } 567 | .katex .sizing.reset-size5.size7, 568 | .katex .fontsize-ensurer.reset-size5.size7 { 569 | font-size: 1.33333333em; 570 | } 571 | .katex .sizing.reset-size5.size8, 572 | .katex .fontsize-ensurer.reset-size5.size8 { 573 | font-size: 1.6em; 574 | } 575 | .katex .sizing.reset-size5.size9, 576 | .katex .fontsize-ensurer.reset-size5.size9 { 577 | font-size: 1.92em; 578 | } 579 | .katex .sizing.reset-size5.size10, 580 | .katex .fontsize-ensurer.reset-size5.size10 { 581 | font-size: 2.30444444em; 582 | } 583 | .katex .sizing.reset-size5.size11, 584 | .katex .fontsize-ensurer.reset-size5.size11 { 585 | font-size: 2.76444444em; 586 | } 587 | .katex .sizing.reset-size6.size1, 588 | .katex .fontsize-ensurer.reset-size6.size1 { 589 | font-size: 0.5em; 590 | } 591 | .katex .sizing.reset-size6.size2, 592 | .katex .fontsize-ensurer.reset-size6.size2 { 593 | font-size: 0.6em; 594 | } 595 | .katex .sizing.reset-size6.size3, 596 | .katex .fontsize-ensurer.reset-size6.size3 { 597 | font-size: 0.7em; 598 | } 599 | .katex .sizing.reset-size6.size4, 600 | .katex .fontsize-ensurer.reset-size6.size4 { 601 | font-size: 0.8em; 602 | } 603 | .katex .sizing.reset-size6.size5, 604 | .katex .fontsize-ensurer.reset-size6.size5 { 605 | font-size: 0.9em; 606 | } 607 | .katex .sizing.reset-size6.size6, 608 | .katex .fontsize-ensurer.reset-size6.size6 { 609 | font-size: 1em; 610 | } 611 | .katex .sizing.reset-size6.size7, 612 | .katex .fontsize-ensurer.reset-size6.size7 { 613 | font-size: 1.2em; 614 | } 615 | .katex .sizing.reset-size6.size8, 616 | .katex .fontsize-ensurer.reset-size6.size8 { 617 | font-size: 1.44em; 618 | } 619 | .katex .sizing.reset-size6.size9, 620 | .katex .fontsize-ensurer.reset-size6.size9 { 621 | font-size: 1.728em; 622 | } 623 | .katex .sizing.reset-size6.size10, 624 | .katex .fontsize-ensurer.reset-size6.size10 { 625 | font-size: 2.074em; 626 | } 627 | .katex .sizing.reset-size6.size11, 628 | .katex .fontsize-ensurer.reset-size6.size11 { 629 | font-size: 2.488em; 630 | } 631 | .katex .sizing.reset-size7.size1, 632 | .katex .fontsize-ensurer.reset-size7.size1 { 633 | font-size: 0.41666667em; 634 | } 635 | .katex .sizing.reset-size7.size2, 636 | .katex .fontsize-ensurer.reset-size7.size2 { 637 | font-size: 0.5em; 638 | } 639 | .katex .sizing.reset-size7.size3, 640 | .katex .fontsize-ensurer.reset-size7.size3 { 641 | font-size: 0.58333333em; 642 | } 643 | .katex .sizing.reset-size7.size4, 644 | .katex .fontsize-ensurer.reset-size7.size4 { 645 | font-size: 0.66666667em; 646 | } 647 | .katex .sizing.reset-size7.size5, 648 | .katex .fontsize-ensurer.reset-size7.size5 { 649 | font-size: 0.75em; 650 | } 651 | .katex .sizing.reset-size7.size6, 652 | .katex .fontsize-ensurer.reset-size7.size6 { 653 | font-size: 0.83333333em; 654 | } 655 | .katex .sizing.reset-size7.size7, 656 | .katex .fontsize-ensurer.reset-size7.size7 { 657 | font-size: 1em; 658 | } 659 | .katex .sizing.reset-size7.size8, 660 | .katex .fontsize-ensurer.reset-size7.size8 { 661 | font-size: 1.2em; 662 | } 663 | .katex .sizing.reset-size7.size9, 664 | .katex .fontsize-ensurer.reset-size7.size9 { 665 | font-size: 1.44em; 666 | } 667 | .katex .sizing.reset-size7.size10, 668 | .katex .fontsize-ensurer.reset-size7.size10 { 669 | font-size: 1.72833333em; 670 | } 671 | .katex .sizing.reset-size7.size11, 672 | .katex .fontsize-ensurer.reset-size7.size11 { 673 | font-size: 2.07333333em; 674 | } 675 | .katex .sizing.reset-size8.size1, 676 | .katex .fontsize-ensurer.reset-size8.size1 { 677 | font-size: 0.34722222em; 678 | } 679 | .katex .sizing.reset-size8.size2, 680 | .katex .fontsize-ensurer.reset-size8.size2 { 681 | font-size: 0.41666667em; 682 | } 683 | .katex .sizing.reset-size8.size3, 684 | .katex .fontsize-ensurer.reset-size8.size3 { 685 | font-size: 0.48611111em; 686 | } 687 | .katex .sizing.reset-size8.size4, 688 | .katex .fontsize-ensurer.reset-size8.size4 { 689 | font-size: 0.55555556em; 690 | } 691 | .katex .sizing.reset-size8.size5, 692 | .katex .fontsize-ensurer.reset-size8.size5 { 693 | font-size: 0.625em; 694 | } 695 | .katex .sizing.reset-size8.size6, 696 | .katex .fontsize-ensurer.reset-size8.size6 { 697 | font-size: 0.69444444em; 698 | } 699 | .katex .sizing.reset-size8.size7, 700 | .katex .fontsize-ensurer.reset-size8.size7 { 701 | font-size: 0.83333333em; 702 | } 703 | .katex .sizing.reset-size8.size8, 704 | .katex .fontsize-ensurer.reset-size8.size8 { 705 | font-size: 1em; 706 | } 707 | .katex .sizing.reset-size8.size9, 708 | .katex .fontsize-ensurer.reset-size8.size9 { 709 | font-size: 1.2em; 710 | } 711 | .katex .sizing.reset-size8.size10, 712 | .katex .fontsize-ensurer.reset-size8.size10 { 713 | font-size: 1.44027778em; 714 | } 715 | .katex .sizing.reset-size8.size11, 716 | .katex .fontsize-ensurer.reset-size8.size11 { 717 | font-size: 1.72777778em; 718 | } 719 | .katex .sizing.reset-size9.size1, 720 | .katex .fontsize-ensurer.reset-size9.size1 { 721 | font-size: 0.28935185em; 722 | } 723 | .katex .sizing.reset-size9.size2, 724 | .katex .fontsize-ensurer.reset-size9.size2 { 725 | font-size: 0.34722222em; 726 | } 727 | .katex .sizing.reset-size9.size3, 728 | .katex .fontsize-ensurer.reset-size9.size3 { 729 | font-size: 0.40509259em; 730 | } 731 | .katex .sizing.reset-size9.size4, 732 | .katex .fontsize-ensurer.reset-size9.size4 { 733 | font-size: 0.46296296em; 734 | } 735 | .katex .sizing.reset-size9.size5, 736 | .katex .fontsize-ensurer.reset-size9.size5 { 737 | font-size: 0.52083333em; 738 | } 739 | .katex .sizing.reset-size9.size6, 740 | .katex .fontsize-ensurer.reset-size9.size6 { 741 | font-size: 0.5787037em; 742 | } 743 | .katex .sizing.reset-size9.size7, 744 | .katex .fontsize-ensurer.reset-size9.size7 { 745 | font-size: 0.69444444em; 746 | } 747 | .katex .sizing.reset-size9.size8, 748 | .katex .fontsize-ensurer.reset-size9.size8 { 749 | font-size: 0.83333333em; 750 | } 751 | .katex .sizing.reset-size9.size9, 752 | .katex .fontsize-ensurer.reset-size9.size9 { 753 | font-size: 1em; 754 | } 755 | .katex .sizing.reset-size9.size10, 756 | .katex .fontsize-ensurer.reset-size9.size10 { 757 | font-size: 1.20023148em; 758 | } 759 | .katex .sizing.reset-size9.size11, 760 | .katex .fontsize-ensurer.reset-size9.size11 { 761 | font-size: 1.43981481em; 762 | } 763 | .katex .sizing.reset-size10.size1, 764 | .katex .fontsize-ensurer.reset-size10.size1 { 765 | font-size: 0.24108004em; 766 | } 767 | .katex .sizing.reset-size10.size2, 768 | .katex .fontsize-ensurer.reset-size10.size2 { 769 | font-size: 0.28929605em; 770 | } 771 | .katex .sizing.reset-size10.size3, 772 | .katex .fontsize-ensurer.reset-size10.size3 { 773 | font-size: 0.33751205em; 774 | } 775 | .katex .sizing.reset-size10.size4, 776 | .katex .fontsize-ensurer.reset-size10.size4 { 777 | font-size: 0.38572806em; 778 | } 779 | .katex .sizing.reset-size10.size5, 780 | .katex .fontsize-ensurer.reset-size10.size5 { 781 | font-size: 0.43394407em; 782 | } 783 | .katex .sizing.reset-size10.size6, 784 | .katex .fontsize-ensurer.reset-size10.size6 { 785 | font-size: 0.48216008em; 786 | } 787 | .katex .sizing.reset-size10.size7, 788 | .katex .fontsize-ensurer.reset-size10.size7 { 789 | font-size: 0.57859209em; 790 | } 791 | .katex .sizing.reset-size10.size8, 792 | .katex .fontsize-ensurer.reset-size10.size8 { 793 | font-size: 0.69431051em; 794 | } 795 | .katex .sizing.reset-size10.size9, 796 | .katex .fontsize-ensurer.reset-size10.size9 { 797 | font-size: 0.83317261em; 798 | } 799 | .katex .sizing.reset-size10.size10, 800 | .katex .fontsize-ensurer.reset-size10.size10 { 801 | font-size: 1em; 802 | } 803 | .katex .sizing.reset-size10.size11, 804 | .katex .fontsize-ensurer.reset-size10.size11 { 805 | font-size: 1.19961427em; 806 | } 807 | .katex .sizing.reset-size11.size1, 808 | .katex .fontsize-ensurer.reset-size11.size1 { 809 | font-size: 0.20096463em; 810 | } 811 | .katex .sizing.reset-size11.size2, 812 | .katex .fontsize-ensurer.reset-size11.size2 { 813 | font-size: 0.24115756em; 814 | } 815 | .katex .sizing.reset-size11.size3, 816 | .katex .fontsize-ensurer.reset-size11.size3 { 817 | font-size: 0.28135048em; 818 | } 819 | .katex .sizing.reset-size11.size4, 820 | .katex .fontsize-ensurer.reset-size11.size4 { 821 | font-size: 0.32154341em; 822 | } 823 | .katex .sizing.reset-size11.size5, 824 | .katex .fontsize-ensurer.reset-size11.size5 { 825 | font-size: 0.36173633em; 826 | } 827 | .katex .sizing.reset-size11.size6, 828 | .katex .fontsize-ensurer.reset-size11.size6 { 829 | font-size: 0.40192926em; 830 | } 831 | .katex .sizing.reset-size11.size7, 832 | .katex .fontsize-ensurer.reset-size11.size7 { 833 | font-size: 0.48231511em; 834 | } 835 | .katex .sizing.reset-size11.size8, 836 | .katex .fontsize-ensurer.reset-size11.size8 { 837 | font-size: 0.57877814em; 838 | } 839 | .katex .sizing.reset-size11.size9, 840 | .katex .fontsize-ensurer.reset-size11.size9 { 841 | font-size: 0.69453376em; 842 | } 843 | .katex .sizing.reset-size11.size10, 844 | .katex .fontsize-ensurer.reset-size11.size10 { 845 | font-size: 0.83360129em; 846 | } 847 | .katex .sizing.reset-size11.size11, 848 | .katex .fontsize-ensurer.reset-size11.size11 { 849 | font-size: 1em; 850 | } 851 | .katex .delimsizing.size1 { 852 | font-family: KaTeX_Size1; 853 | } 854 | .katex .delimsizing.size2 { 855 | font-family: KaTeX_Size2; 856 | } 857 | .katex .delimsizing.size3 { 858 | font-family: KaTeX_Size3; 859 | } 860 | .katex .delimsizing.size4 { 861 | font-family: KaTeX_Size4; 862 | } 863 | .katex .delimsizing.mult .delim-size1 > span { 864 | font-family: KaTeX_Size1; 865 | } 866 | .katex .delimsizing.mult .delim-size4 > span { 867 | font-family: KaTeX_Size4; 868 | } 869 | .katex .nulldelimiter { 870 | display: inline-block; 871 | width: 0.12em; 872 | } 873 | .katex .delimcenter { 874 | position: relative; 875 | } 876 | .katex .op-symbol { 877 | position: relative; 878 | } 879 | .katex .op-symbol.small-op { 880 | font-family: KaTeX_Size1; 881 | } 882 | .katex .op-symbol.large-op { 883 | font-family: KaTeX_Size2; 884 | } 885 | .katex .op-limits > .vlist-t { 886 | text-align: center; 887 | } 888 | .katex .accent > .vlist-t { 889 | text-align: center; 890 | } 891 | .katex .accent .accent-body { 892 | position: relative; 893 | } 894 | .katex .accent .accent-body:not(.accent-full) { 895 | width: 0; 896 | } 897 | .katex .overlay { 898 | display: block; 899 | } 900 | .katex .mtable .vertical-separator { 901 | display: inline-block; 902 | min-width: 1px; 903 | } 904 | .katex .mtable .arraycolsep { 905 | display: inline-block; 906 | } 907 | .katex .mtable .col-align-c > .vlist-t { 908 | text-align: center; 909 | } 910 | .katex .mtable .col-align-l > .vlist-t { 911 | text-align: left; 912 | } 913 | .katex .mtable .col-align-r > .vlist-t { 914 | text-align: right; 915 | } 916 | .katex .svg-align { 917 | text-align: left; 918 | } 919 | .katex svg { 920 | display: block; 921 | position: absolute; 922 | width: 100%; 923 | height: inherit; 924 | fill: currentColor; 925 | stroke: currentColor; 926 | fill-rule: nonzero; 927 | fill-opacity: 1; 928 | stroke-width: 1; 929 | stroke-linecap: butt; 930 | stroke-linejoin: miter; 931 | stroke-miterlimit: 4; 932 | stroke-dasharray: none; 933 | stroke-dashoffset: 0; 934 | stroke-opacity: 1; 935 | } 936 | .katex svg path { 937 | stroke: none; 938 | } 939 | .katex img { 940 | border-style: none; 941 | min-width: 0; 942 | min-height: 0; 943 | max-width: none; 944 | max-height: none; 945 | } 946 | .katex .stretchy { 947 | width: 100%; 948 | display: block; 949 | position: relative; 950 | overflow: hidden; 951 | } 952 | .katex .stretchy::before, 953 | .katex .stretchy::after { 954 | content: ""; 955 | } 956 | .katex .hide-tail { 957 | width: 100%; 958 | position: relative; 959 | overflow: hidden; 960 | } 961 | .katex .halfarrow-left { 962 | position: absolute; 963 | left: 0; 964 | width: 50.2%; 965 | overflow: hidden; 966 | } 967 | .katex .halfarrow-right { 968 | position: absolute; 969 | right: 0; 970 | width: 50.2%; 971 | overflow: hidden; 972 | } 973 | .katex .brace-left { 974 | position: absolute; 975 | left: 0; 976 | width: 25.1%; 977 | overflow: hidden; 978 | } 979 | .katex .brace-center { 980 | position: absolute; 981 | left: 25%; 982 | width: 50%; 983 | overflow: hidden; 984 | } 985 | .katex .brace-right { 986 | position: absolute; 987 | right: 0; 988 | width: 25.1%; 989 | overflow: hidden; 990 | } 991 | .katex .x-arrow-pad { 992 | padding: 0 0.5em; 993 | } 994 | .katex .cd-arrow-pad { 995 | padding: 0 0.55556em 0 0.27778em; 996 | } 997 | .katex .x-arrow, 998 | .katex .mover, 999 | .katex .munder { 1000 | text-align: center; 1001 | } 1002 | .katex .boxpad { 1003 | padding: 0 0.3em; 1004 | } 1005 | .katex .fbox, 1006 | .katex .fcolorbox { 1007 | box-sizing: border-box; 1008 | border: 0.04em solid; 1009 | } 1010 | .katex .cancel-pad { 1011 | padding: 0 0.2em; 1012 | } 1013 | .katex .cancel-lap { 1014 | margin-left: -0.2em; 1015 | margin-right: -0.2em; 1016 | } 1017 | .katex .sout { 1018 | border-bottom-style: solid; 1019 | border-bottom-width: 0.08em; 1020 | } 1021 | .katex .angl { 1022 | box-sizing: border-box; 1023 | border-top: 0.049em solid; 1024 | border-right: 0.049em solid; 1025 | margin-right: 0.03889em; 1026 | } 1027 | .katex .anglpad { 1028 | padding: 0 0.03889em; 1029 | } 1030 | .katex .eqn-num::before { 1031 | counter-increment: katexEqnNo; 1032 | content: "(" counter(katexEqnNo) ")"; 1033 | } 1034 | .katex .mml-eqn-num::before { 1035 | counter-increment: mmlEqnNo; 1036 | content: "(" counter(mmlEqnNo) ")"; 1037 | } 1038 | .katex .mtr-glue { 1039 | width: 50%; 1040 | } 1041 | .katex .cd-vert-arrow { 1042 | display: inline-block; 1043 | position: relative; 1044 | } 1045 | .katex .cd-label-left { 1046 | display: inline-block; 1047 | position: absolute; 1048 | right: calc(50% + 0.3em); 1049 | text-align: left; 1050 | } 1051 | .katex .cd-label-right { 1052 | display: inline-block; 1053 | position: absolute; 1054 | left: calc(50% + 0.3em); 1055 | text-align: right; 1056 | } 1057 | .katex-display { 1058 | display: block; 1059 | margin: 1em 0; 1060 | text-align: center; 1061 | } 1062 | .katex-display > .katex { 1063 | display: block; 1064 | text-align: center; 1065 | white-space: nowrap; 1066 | } 1067 | .katex-display > .katex > .katex-html { 1068 | display: block; 1069 | position: relative; 1070 | } 1071 | .katex-display > .katex > .katex-html > .tag { 1072 | position: absolute; 1073 | right: 0; 1074 | } 1075 | .katex-display.leqno > .katex > .katex-html > .tag { 1076 | left: 0; 1077 | right: auto; 1078 | } 1079 | .katex-display.fleqn > .katex { 1080 | text-align: left; 1081 | padding-left: 2em; 1082 | } 1083 | body { 1084 | counter-reset: katexEqnNo mmlEqnNo; 1085 | } 1086 | 1087 | -------------------------------------------------------------------------------- /web/links.html: -------------------------------------------------------------------------------- 1 | 81 | 82 |

Back Links

83 | 84 |

Forward Links

85 | 86 | 87 | -------------------------------------------------------------------------------- /web/newGraph.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 80 | 81 | 82 |
83 | 84 | 85 | 86 | 87 | --------------------------------------------------------------------------------