├── .nojekyll ├── .gitignore ├── CNAME ├── css └── misc.css ├── src ├── faqs.md ├── media │ ├── io.jpg │ ├── fields.png │ ├── Pin_icon.png │ ├── card_info.png │ ├── html_icon.png │ ├── io_modes.jpg │ ├── Statistics.png │ ├── add_screen.png │ ├── cloze_icons.png │ ├── FSRS_retention.png │ ├── decks_screen.png │ ├── editor_icons.png │ ├── study_overview.png │ ├── browser_sidebar.png │ ├── find_and_replace.png │ ├── browser_search_tool.png │ ├── browser_table_modes.png │ ├── browser_selection_tool2.png │ └── study_overview_buried_cards.png ├── math │ ├── convergence_question.png │ └── convergence_question_2.png ├── resources.md ├── importing │ ├── intro.md │ ├── packaged-decks.md │ └── text-files.md ├── platform │ ├── linux │ │ ├── input-methods.md │ │ ├── intro.md │ │ ├── wayland.md │ │ ├── gtk-theme.md │ │ ├── missing-libraries.md │ │ ├── display-issues.md │ │ ├── blank-window.md │ │ ├── distro-packages.md │ │ └── installing.md │ ├── mac │ │ ├── intro.md │ │ ├── display-issues.md │ │ └── installing.md │ ├── windows │ │ ├── copy-and-paste.md │ │ ├── intro.md │ │ ├── installation-issues.md │ │ ├── text-size.md │ │ ├── display-issues.md │ │ ├── permission-problems.md │ │ ├── installing.md │ │ └── startup-issues.md │ └── intro.md ├── addons.md ├── profiles.md ├── misc.md ├── intro.md ├── SUMMARY.md ├── templates │ ├── intro.md │ ├── errors.md │ ├── generation.md │ └── styling.md ├── getting-help.md ├── leeches.md ├── backups.md ├── exporting.md ├── contrib.md ├── media.md ├── troubleshooting.md ├── preferences.md ├── sync-server.md ├── background.md ├── filtered-decks.md ├── syncing.md ├── math.md ├── studying.md ├── stats.md └── files.md ├── .github ├── dependabot.yml └── workflows │ ├── build.sh │ └── gh-pages.yml ├── dprint.json ├── CONTRIBUTING.md ├── book.toml └── README.md /.nojekyll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | book 2 | -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | docs.ankiweb.net 2 | -------------------------------------------------------------------------------- /css/misc.css: -------------------------------------------------------------------------------- 1 | h1:target { 2 | margin-top: 64px; 3 | } 4 | -------------------------------------------------------------------------------- /src/faqs.md: -------------------------------------------------------------------------------- 1 | # Frequently Asked Questions 2 | 3 | Please see 4 | -------------------------------------------------------------------------------- /src/media/io.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankitects/anki-manual/HEAD/src/media/io.jpg -------------------------------------------------------------------------------- /src/media/fields.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankitects/anki-manual/HEAD/src/media/fields.png -------------------------------------------------------------------------------- /src/media/Pin_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankitects/anki-manual/HEAD/src/media/Pin_icon.png -------------------------------------------------------------------------------- /src/media/card_info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankitects/anki-manual/HEAD/src/media/card_info.png -------------------------------------------------------------------------------- /src/media/html_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankitects/anki-manual/HEAD/src/media/html_icon.png -------------------------------------------------------------------------------- /src/media/io_modes.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankitects/anki-manual/HEAD/src/media/io_modes.jpg -------------------------------------------------------------------------------- /src/media/Statistics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankitects/anki-manual/HEAD/src/media/Statistics.png -------------------------------------------------------------------------------- /src/media/add_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankitects/anki-manual/HEAD/src/media/add_screen.png -------------------------------------------------------------------------------- /src/media/cloze_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankitects/anki-manual/HEAD/src/media/cloze_icons.png -------------------------------------------------------------------------------- /src/media/FSRS_retention.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankitects/anki-manual/HEAD/src/media/FSRS_retention.png -------------------------------------------------------------------------------- /src/media/decks_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankitects/anki-manual/HEAD/src/media/decks_screen.png -------------------------------------------------------------------------------- /src/media/editor_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankitects/anki-manual/HEAD/src/media/editor_icons.png -------------------------------------------------------------------------------- /src/media/study_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankitects/anki-manual/HEAD/src/media/study_overview.png -------------------------------------------------------------------------------- /src/media/browser_sidebar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankitects/anki-manual/HEAD/src/media/browser_sidebar.png -------------------------------------------------------------------------------- /src/media/find_and_replace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankitects/anki-manual/HEAD/src/media/find_and_replace.png -------------------------------------------------------------------------------- /src/math/convergence_question.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankitects/anki-manual/HEAD/src/math/convergence_question.png -------------------------------------------------------------------------------- /src/media/browser_search_tool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankitects/anki-manual/HEAD/src/media/browser_search_tool.png -------------------------------------------------------------------------------- /src/media/browser_table_modes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankitects/anki-manual/HEAD/src/media/browser_table_modes.png -------------------------------------------------------------------------------- /src/math/convergence_question_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankitects/anki-manual/HEAD/src/math/convergence_question_2.png -------------------------------------------------------------------------------- /src/media/browser_selection_tool2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankitects/anki-manual/HEAD/src/media/browser_selection_tool2.png -------------------------------------------------------------------------------- /src/media/study_overview_buried_cards.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankitects/anki-manual/HEAD/src/media/study_overview_buried_cards.png -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "monthly" 7 | -------------------------------------------------------------------------------- /src/resources.md: -------------------------------------------------------------------------------- 1 | # Resources 2 | 3 | You can find guides, templates, custom schedulers and other resources in [this resource list](https://forums.ankiweb.net/t/collection-of-anki-resources/60044). 4 | -------------------------------------------------------------------------------- /src/importing/intro.md: -------------------------------------------------------------------------------- 1 | # Importing 2 | 3 | Anki can import text files, packaged Anki decks created by the export 4 | feature, Mnemosyne 2.0 .db files, and SuperMemo .xml files. To import a 5 | file, click the File menu and then "Import". 6 | -------------------------------------------------------------------------------- /src/platform/linux/input-methods.md: -------------------------------------------------------------------------------- 1 | # Input Methods on Linux 2 | 3 | ## Fcitx 4 | 5 | The standard Anki build includes fcitx support, but it may not work on 6 | all distributions. If you are unable to use fcitx, you may want to run 7 | Anki from [Python wheels](https://betas.ankiweb.net/#via-pypipip) 8 | instead. 9 | -------------------------------------------------------------------------------- /src/platform/linux/intro.md: -------------------------------------------------------------------------------- 1 | # Linux 2 | 3 | ## Installing & Upgrading Anki on Linux 4 | 5 | For instructions on how to install or upgrade Anki on Linux, please see: 6 | - [Install & Upgrade](installing.md) 7 | 8 | ## Problems 9 | 10 | If you encounter any issues when installing or starting Anki, please see the subsections in the table of contents. -------------------------------------------------------------------------------- /src/platform/mac/intro.md: -------------------------------------------------------------------------------- 1 | # macOS 2 | 3 | ## Installing & Upgrading Anki on macOS 4 | 5 | For instructions on how to install or upgrade Anki on macOS, please see: 6 | - [Install & Upgrade](installing.md) 7 | 8 | ## Problems 9 | 10 | If you encounter any issues when installing or starting Anki, please see the subsections in the table of contents. -------------------------------------------------------------------------------- /src/platform/windows/copy-and-paste.md: -------------------------------------------------------------------------------- 1 | # Copy and paste issues 2 | 3 | If you are experiencing problems with copying and pasting, please check if you 4 | are running other programs on your computer that monitor the clipboard, such as 5 | dictionary programs, clipboard managers or clipping tools. The toolkit Anki uses 6 | can have trouble when such programs are running. 7 | -------------------------------------------------------------------------------- /src/platform/windows/intro.md: -------------------------------------------------------------------------------- 1 | # Windows 2 | 3 | ## Installing & Upgrading Anki on Windows 4 | 5 | For instructions on how to install or upgrade Anki on Windows, please see: 6 | - [Install & Upgrade](installing.md) 7 | 8 | ## Problems 9 | 10 | If you encounter any issues when installing or starting Anki, please see the 11 | subsections in the table of contents. -------------------------------------------------------------------------------- /src/platform/intro.md: -------------------------------------------------------------------------------- 1 | # Platform Notes 2 | 3 | This section explains the way Anki is installed, and the possible problems you may encounter, depending on your OS: 4 | 5 | - [Windows](./windows/intro.md) 6 | - [macOS](./mac/intro.md) 7 | - [Linux](./linux/intro.md) 8 | 9 | If you have already installed Anki, you can skip to the [Getting Started](../getting-started.md) section. 10 | -------------------------------------------------------------------------------- /dprint.json: -------------------------------------------------------------------------------- 1 | { 2 | "json": { 3 | }, 4 | "markdown": { 5 | }, 6 | "toml": { 7 | }, 8 | "includes": ["**/*.{json,md,toml}"], 9 | "excludes": [ 10 | "**/*-lock.json" 11 | ], 12 | "plugins": [ 13 | "https://plugins.dprint.dev/json-0.17.1.wasm", 14 | "https://plugins.dprint.dev/markdown-0.15.2.wasm", 15 | "https://plugins.dprint.dev/toml-0.5.4.wasm" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /src/platform/linux/wayland.md: -------------------------------------------------------------------------------- 1 | # Wayland 2 | 3 | From Anki 2.1.48, you can force Anki to use Wayland by defining ANKI_WAYLAND=1 4 | before starting Anki. Wayland may give you better rendering across multiple 5 | displays, but it is currently off by default, due to the following issues: 6 | 7 | - On some distros, windows are rendered without borders. 8 | - Bringing windows to the front is not possible, so for example, clicking on Add 9 | to reveal an existing Add Cards window will not work. 10 | -------------------------------------------------------------------------------- /src/platform/linux/gtk-theme.md: -------------------------------------------------------------------------------- 1 | # Anki not picking up GTK theme on Gnome/Linux 2 | 3 | You can work around this issue by explicitly telling Anki what the GTK theme is. Run the following commands in a terminal: 4 | 5 | ```shell 6 | theme=$(gsettings get org.gnome.desktop.interface gtk-theme) 7 | echo "gtk-theme-name=$theme" >> ~/.gtkrc-2.0 8 | echo "export GTK2_RC_FILES=$HOME/.gtkrc-2.0" >> ~/.profile 9 | ``` 10 | 11 | Then log out and log back into your computer, and Anki should pick up the GTK theme. 12 | -------------------------------------------------------------------------------- /src/platform/windows/installation-issues.md: -------------------------------------------------------------------------------- 1 | # Windows installation issues 2 | 3 | Some error messages you may encounter when installing Anki: 4 | 5 | 6 | 7 | Please also see [startup issues](./startup-issues.md). 8 | 9 | ## "Error opening file for writing" 10 | 11 | If closing Anki and your browser does not help, please try restarting your 12 | computer, then running the installer again. 13 | 14 | ## Antivirus issues 15 | 16 | Antivirus programs may sometimes report a [false positive](https://faqs.ankiweb.net/my-antivirus-program-says-anki-is-infected.html). 17 | -------------------------------------------------------------------------------- /src/platform/linux/missing-libraries.md: -------------------------------------------------------------------------------- 1 | # Missing Libraries 2 | 3 | If Anki fails to start, please run it from a terminal with `anki`. If it says a 4 | library is missing, please install it and try again. 5 | 6 | If it complains about no platform being available, please start Anki with the 7 | following command line, which should reveal a missing library: 8 | 9 | ```shell 10 | QT_DEBUG_PLUGINS=1 anki 11 | ``` 12 | 13 | After installing the library with apt-get or similar, repeat the process. You 14 | may need to do this a few times before all required libraries are installed. 15 | -------------------------------------------------------------------------------- /src/platform/linux/display-issues.md: -------------------------------------------------------------------------------- 1 | ## Display Issues on Linux 2 | 3 | Hardware acceleration defaults to on. If you experience blank screens 4 | or display issues, you can try enabling software rendering. 5 | 6 | ### Changing the Driver From the Preferences Screen 7 | In Anki 23.10+, you can change the graphics driver from preferences screen by 8 | navigating to **Tools → Preferences** and then selecting the driver from the 9 | dropdown menu. 10 | 11 | ### Changing the Driver From the Terminal 12 | ``` 13 | echo software > ~/.local/share/Anki2/gldriver6 14 | ``` 15 | 16 | If you wish to switch back to the default, change `software` to `auto`, or 17 | remove that file. 18 | -------------------------------------------------------------------------------- /src/platform/linux/blank-window.md: -------------------------------------------------------------------------------- 1 | # Blank Main Window 2 | 3 | Some Linux distros have recently updated glibc. Recent versions break the web toolkit that Anki is built on, causing Anki's main window to appear blank. 4 | 5 | There are two ways to work around this: 6 | 7 | 1. Install the latest Qt6 version of Anki, which uses an updated toolkit: 8 | 9 | 10 | 11 | 2. Use one of the workarounds posted on the following threads: 12 | 13 | - 14 | - 15 | - 16 | - 17 | -------------------------------------------------------------------------------- /src/platform/windows/text-size.md: -------------------------------------------------------------------------------- 1 | # Text Size 2 | 3 | If you find the text is the wrong size, there are two environment 4 | variables you can try: 5 | 6 | - ANKI_NOHIGHDPI=1 will turn off some of Qt’s high dpi support 7 | 8 | - ANKI_WEBSCALE=1 will alter the scale of Anki’s web views (like the 9 | deck list, study screen, etc), while leaving interface elements like 10 | the menu bar alone. Replace 1 with the desired scale, such as 1.5 or 11 | 0.75. 12 | 13 | On Windows you can add these to a batch file to make it easier to start 14 | Anki. For example, create a file called startanki.bat on your desktop 15 | with the following text: 16 | 17 | set ANKI_WEBSCALE=0.75 18 | start "Anki" "%LocalAppData%\Programs\Anki\anki.exe" 19 | 20 | After saving, you can double click on the file to start Anki with that 21 | setting. 22 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to the Anki manual 2 | 3 | ## Local development 4 | 5 | anki-manual is built using [mdBook](https://rust-lang.github.io/mdBook/), a Rust-based tool for creating webpages using Markdown. 6 | 7 | ### Install dependencies 8 | 9 | In order to use mdBook, please first ensure that you have [Rust](https://www.rust-lang.org/tools/install) installed on your machine. 10 | 11 | Next, install mdBook and its pre-processors 12 | ``` 13 | cargo install mdbook 14 | cargo install mdbook-toc 15 | cargo install mdbook-linkcheck 16 | ``` 17 | 18 | ### Develop and preview 19 | 20 | To serve anki-manual locally, build the book with 21 | 22 | ``` 23 | mdbook build 24 | ``` 25 | 26 | and then serve anki-manual with 27 | 28 | ``` 29 | mdbook serve --open 30 | ``` 31 | 32 | You can now make changes to the markdown (*.md) files in the `src/` directory and have your changes previewed locally. -------------------------------------------------------------------------------- /book.toml: -------------------------------------------------------------------------------- 1 | [book] 2 | authors = ["Ankitects Pty Ltd and contributors"] 3 | description = "Anki's user manual. Anki is a flashcard program that makes learning easier." 4 | language = "en" 5 | src = "src" 6 | title = "Anki Manual" 7 | 8 | [build] 9 | create-missing = true 10 | 11 | [preprocessor.toc] 12 | command = "mdbook-toc" 13 | renderer = ["html"] 14 | 15 | [preprocessor.admonish] 16 | command = "mdbook-admonish" 17 | assets_version = "3.0.3" # do not edit: managed by `mdbook-admonish install` 18 | 19 | [output.html] 20 | git-repository-url = "https://github.com/ankitects/anki-manual/" 21 | cname = "docs.ankiweb.net" 22 | additional-css = ["css/misc.css", "css/mdbook-admonish.css"] 23 | smart-punctuation = true 24 | mathjax-support = true 25 | 26 | [output.linkcheck] 27 | optional = true 28 | warning-policy = "warn" 29 | follow-web-links = true 30 | exclude = [ 31 | 'microsoft.com', 32 | 'twitter.com', 33 | 'stackexchange.com', 34 | 'stackoverflow.com', 35 | 'https://github.com/open-spaced-repetition/fsrs4anki#add-on-compatibility', 36 | 'support.google.com', 37 | 'wikiwiki.jp', 38 | 'web.archive.org', 39 | ] 40 | 41 | [output.html.fold] 42 | enable = true 43 | level = 0 44 | -------------------------------------------------------------------------------- /src/platform/linux/distro-packages.md: -------------------------------------------------------------------------------- 1 | # Packages Distributed by Linux Distributions 2 | 3 | We have seen a lot of issues caused by the customized versions of Anki 4 | distributed by Linux distributions: 5 | 6 | - Anki depends on third-party libraries like Qt, and Linux distributions often 7 | substitute different versions of those libraries, without testing the impact 8 | of those changes. 9 | - Sometimes the version of Anki they distribute is years old, or is an 10 | alpha/beta version not intended for stable release. Distributions will often 11 | disable the built-in update check as well, to prevent you from being notified 12 | of newer versions. 13 | 14 | Compiled builds of Anki are available on . Most of the 15 | necessary libraries are included, and Anki has been tested to work with these 16 | library versions. If you're experiencing issues with your distro's version, the 17 | first thing you should try is switching to the latest packaged version we 18 | provide. 19 | 20 | You are welcome to continue using your distro's version of Anki if you prefer, 21 | but if you run into any issues, you will need to report them to your 22 | distribution's package maintainers. 23 | -------------------------------------------------------------------------------- /src/platform/mac/display-issues.md: -------------------------------------------------------------------------------- 1 | # Display Issues on macOS 2 | 3 | 4 | 5 | ## Change the Video Driver 6 | 7 | ### Changing the Driver From the Preferences Screen 8 | If you're experiencing display issues or crashes in Anki 23.10+, you can try 9 | changing the video driver in the preferences screen by navigating to **Anki → 10 | Preferences** and then selecting the driver from the dropdown menu. After that it 11 | is necessary to restart Anki. 12 | 13 | ### Changing the Driver From Terminal.app 14 | Older Anki versions did not provide an option in the preferences, but allowed 15 | you to adjust the driver by opening Terminal.app, then pasting the following and hit Enter: 16 | 17 | ``` 18 | echo software > ~/Library/Application\ Support/Anki2/gldriver6 19 | ``` 20 | 21 | It will not print anything. You can then start Anki again. 22 | 23 | If you wish to switch back to the default, change `software` to `auto`, or 24 | remove that file. 25 | 26 | ## eGPUs 27 | 28 | If you experience blank screens when using an external graphics card on a Mac, you can Ctrl-click on the Anki app, click **Get Info**, and enable the **prefer eGPU** option. 29 | 30 | ## Monitors with Different Resolutions 31 | 32 | Please see [this forum post](https://forums.ankiweb.net/t/mac-known-issues-wording-suggestion/7331). 33 | -------------------------------------------------------------------------------- /src/addons.md: -------------------------------------------------------------------------------- 1 | # Add-ons 2 | 3 | Anki's capabilities can be extended with add-ons. Add-ons can provide 4 | features like extra support for specific languages, extra control over 5 | scheduling, and so on. 6 | 7 | To browse the list of available add-ons, select **Tools > Add-ons**, then click on **Get Add-ons**. 8 | Alternatively, open [ankiweb.net/shared/addons](https://ankiweb.net/shared/addons) in a web browser. 9 | 10 | If you have downloaded an add-on that is not working properly, or if you 11 | accidentally made a mistake when editing an add-on, you can use the 12 | **Delete** option in the menu to remove it. 13 | 14 | Add-ons use and modify arbitrary parts of Anki’s codebase, so in some 15 | cases, updating Anki can break the compatibility with older add-ons. If 16 | one of your add-ons stops working after updating Anki, please consider 17 | reporting the issue to the add-on author. If you rely on this add-on, 18 | you will need to keep using an older Anki version until the add-on gets 19 | an update. 20 | 21 | There is a **Contact Author** button on most add-ons pages on AnkiWeb, 22 | and many authors include their email address in the add-on, so if you 23 | need to get in touch with the author, editing the add-on and looking at 24 | the top of the file may help. 25 | 26 | To learn how to write your own add-ons, please see the [add-on writing guide](https://addon-docs.ankiweb.net). 27 | -------------------------------------------------------------------------------- /.github/workflows/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Version configuration 4 | MDBOOK_VERSION="0.4.51" 5 | MDBOOK_LINKCHECK_COMMIT="3222e857f22a5b41596070848203d160a4d78fd9" 6 | MDBOOK_TOC_VERSION="0.14.2" 7 | MDBOOK_ADMONISH_VERSION="1.19.0" 8 | 9 | # mdbook needs to be able to find things like mdbook-toc 10 | export PATH="$HOME/.cargo/bin:$PATH" 11 | 12 | install_if_needed() { 13 | local binary=$1 14 | local install_cmd=$2 15 | 16 | if [ "$GITHUB_ACTIONS" = "true" ]; then 17 | # avoid recompiling if cached 18 | if ! command -v $binary &> /dev/null; then 19 | eval $install_cmd 20 | fi 21 | else 22 | eval $install_cmd 23 | fi 24 | } 25 | 26 | # Install required binaries 27 | install_if_needed "mdbook" "cargo install mdbook --version $MDBOOK_VERSION" 28 | install_if_needed "mdbook-toc" "cargo install mdbook-toc --version $MDBOOK_TOC_VERSION" 29 | install_if_needed "mdbook-linkcheck" "cargo install --git https://github.com/ankitects/mdbook-linkcheck --rev $MDBOOK_LINKCHECK_COMMIT mdbook-linkcheck" 30 | install_if_needed "mdbook-admonish" "cargo install mdbook-admonish --version $MDBOOK_ADMONISH_VERSION" 31 | 32 | # Avoid checking links in deploy mode 33 | if [ "$CHECK" == "" ]; then 34 | mv $HOME/.cargo/bin/mdbook-linkcheck linkcheck-tmp 35 | fi 36 | 37 | mdbook --version 38 | mdbook build 39 | 40 | if [ "$CHECK" == "" ]; then 41 | # restore linkcheck so it gets stored in the cache 42 | mv linkcheck-tmp $HOME/.cargo/bin/mdbook-linkcheck 43 | fi 44 | -------------------------------------------------------------------------------- /.github/workflows/gh-pages.yml: -------------------------------------------------------------------------------- 1 | env: 2 | cname: docs.ankiweb.net 3 | 4 | name: github pages 5 | 6 | on: 7 | push: 8 | branches: 9 | - main 10 | - test 11 | 12 | jobs: 13 | deploy: 14 | runs-on: ubuntu-24.04 15 | steps: 16 | - uses: actions/checkout@v5 17 | 18 | - name: Install Rust 19 | uses: dtolnay/rust-toolchain@stable 20 | with: 21 | components: rustfmt 22 | 23 | - name: Cache binaries 24 | uses: actions/cache@v4 25 | with: 26 | path: ~/.cargo/bin 27 | key: ${{ runner.os }}-bin-${{ hashFiles('.github/workflows/build.sh') }} 28 | restore-keys: | 29 | ${{ runner.os }}-bin- 30 | 31 | - name: Build 32 | run: .github/workflows/build.sh 33 | 34 | - name: Deploy 35 | uses: peaceiris/actions-gh-pages@v4 36 | with: 37 | github_token: ${{ secrets.GITHUB_TOKEN }} 38 | publish_dir: ./book/html 39 | cname: ${{ env.cname }} 40 | 41 | check: 42 | runs-on: ubuntu-24.04 43 | steps: 44 | - uses: actions/checkout@v5 45 | 46 | - name: Install Rust 47 | uses: dtolnay/rust-toolchain@stable 48 | with: 49 | components: rustfmt 50 | 51 | - name: Cache binaries 52 | uses: actions/cache@v4 53 | with: 54 | path: ~/.cargo/bin 55 | key: ${{ runner.os }}-bin-${{ hashFiles('.github/workflows/build.sh') }} 56 | restore-keys: | 57 | ${{ runner.os }}-bin- 58 | 59 | - name: Build 60 | run: CHECK=1 .github/workflows/build.sh 61 | -------------------------------------------------------------------------------- /src/platform/windows/display-issues.md: -------------------------------------------------------------------------------- 1 | # Windows Display Issues 2 | 3 | 4 | 5 | On Windows, there are three ways of content being displayed on screen. The 6 | default is _software_, which is slower, but the most compatible. There are two 7 | other options that are faster: _OpenGL_ and _ANGLE_. They are faster, but they 8 | may not work, or may cause display issues such as missing menubars, blank 9 | windows, and so on. Which one works best will depend on your computer. 10 | 11 | 12 | ## Changing the Driver From the Preferences Screen 13 | In Anki 23.10+, you can change the graphics driver from preferences screen by 14 | navigating to **Tools → Preferences** and then selecting the driver from the 15 | dropdown menu. 16 | 17 | 18 | ## Changing the Driver From the Command Line 19 | If you run into display issues, you can try switching to software mode via cmd: 20 | 21 | ```bat 22 | echo software > %APPDATA%\Anki2\gldriver6 23 | ``` 24 | 25 | Or you can do it via PowerShell: 26 | 27 | ```powershell 28 | echo software > $env:APPDATA\Anki2\gldriver6 29 | ``` 30 | 31 | It will not print anything. You can then start Anki again. 32 | 33 | To revert to the default behaviour, change `software` to `auto`, or delete that file. 34 | 35 | ## Full Screen 36 | 37 | Anki 2.1.50+ comes with a full screen mode, but due to various issues, it had to 38 | be disabled while `OpenGL` is used. Turning on software rendering as described 39 | above will allow the full screen option to be used, though please bear in mind 40 | that rendering performance may suffer. 41 | 42 | In Anki 23.10+, full screen mode is supported with the default Direct3D driver. 43 | -------------------------------------------------------------------------------- /src/profiles.md: -------------------------------------------------------------------------------- 1 | # Profiles 2 | 3 | If more than one person wants to use Anki on your computer, you can set 4 | up a separate profile for each user. Each user profile has their own 5 | collection, and own program settings. Add-ons are shared across profiles. 6 | Profiles are configured by going to the File menu and choosing "Switch Profile". 7 | 8 | **Only a single profile can be synced to an AnkiWeb account.** 9 | If you have different users on your computer, each user will 10 | need to set up a separate AnkiWeb account for their profile. If you attempt 11 | to link two or more profiles to the same AnkiWeb account, you will overwrite 12 | the data from one profile with the data from the other. 13 | 14 | Profiles are primarily intended to be used by different people, and are not 15 | recommended for splitting up your own content. 16 | If you have created multiple profiles for yourself, the best option is to 17 | merge them into a single profile. You can do so by exporting one deck from 18 | profile A, and then importing it into profile B, repeating for any other decks 19 | in profile A, until everything is in profile B. 20 | 21 | AnkiDroid does not support profiles. 22 | 23 | ## Profiles window 24 | 25 | From the Profiles window (accessible via File>Switch Profile from the main window), you can: 26 | 27 | - Open / Add / Rename / Delete user profiles. 28 | - Quit the program. 29 | - Restore an [automatic backup.](./backups.md) 30 | - Downgrade your collection, which is necessary if you want to open it with 31 | an earlier Anki release. If you skip this step, you may get an error message 32 | when opening your collection in an older Anki version, and you will need to 33 | return to this version, downgrade, then try again. 34 | -------------------------------------------------------------------------------- /src/platform/windows/permission-problems.md: -------------------------------------------------------------------------------- 1 | # Windows permission problems 2 | 3 | 4 | 5 | ## Permission Problems 6 | 7 | If you receive "access denied" messages, some of Anki's files may be set to read only mode, meaning Anki is not able to write to them. 8 | 9 | To fix the problem, you can do the following: 10 | 11 | - in the search area of the start bar, type `cmd.exe` and hit Enter 12 | - in the window that opens, type the following and hit Enter to see your username: 13 | 14 | whoami 15 | 16 | - type the following, hitting Enter after each line, and replacing ____ (and keeping the :F part) with your username from the previous command 17 | 18 | cd %APPDATA% 19 | 20 | icacls Anki2 /grant ____:F /t 21 | 22 | That command should fix the permissions on Anki's data folder, and you should now be able to start the program. 23 | 24 | ## Antivirus/Firewall/Anti-Malware 25 | 26 | Some users have experienced "permission denied" or "readonly" errors that were caused by security software installed on their machine. You may need to add an exception for Anki, or try temporarily disabling the software to rule it out as the cause. Some users have reported that simply turning off their software did not fix the problem, and they either had to add an exception for Anki or uninstall the software. 27 | 28 | ## Debugging Permission Problems 29 | 30 | If problems persist after you've ruled out Antivirus and related programs, have performed the steps above to fix permissions, and don't use OneDrive, please run the following commands in `cmd.exe`, pressing Enter after each one. 31 | 32 | whoami 33 | 34 | cd %APPDATA% 35 | 36 | icacls Anki2 /t 37 | 38 | Then please copy & paste or screenshot what you see, and post it to us in a support ticket. 39 | -------------------------------------------------------------------------------- /src/platform/mac/installing.md: -------------------------------------------------------------------------------- 1 | # Installing & Upgrading Anki on macOS 2 | 3 | 4 | 5 | ## Requirements 6 | 7 | macOS version requirements are listed on the download page. 8 | 9 | If you're on an old machine, you can obtain the old version from the [releases page](https://github.com/ankitects/anki/releases). The Qt5 builds on 24.11 and earlier support macOS 10.14 and later. If your macOS 10 | is between 10.10 and 10.13, you'll need to use [Anki 2.1.35-alternate](https://github.com/ankitects/anki/releases/tag/2.1.35). 11 | 12 | ## Installing 13 | 14 | 1. Download Anki from . 15 | 2. Save the file to your desktop or downloads folder. 16 | 3. Open it, and drag Anki to your Applications folder or desktop. 17 | 4. Double-click on Anki in the location you placed it. 18 | 19 | ## Upgrading 20 | 21 | To upgrade, close Anki if it is open, and then follow the steps above. Drag 22 | the Anki icon into the same location you previously stored it, and when prompted, 23 | overwrite the old version. Your card data will be preserved. 24 | 25 | ## Homebrew 26 | 27 | [Homebrew](https://brew.sh/) users can install Anki using 28 | `brew install --cask anki` in their preferred Terminal application. 29 | 30 | Upgrading can be done using `brew upgrade`, and for uninstalling: `brew uninstall --cask anki` 31 | 32 | ## Add-on Compatibility 33 | 34 | Some add-ons may not always work with the latest Anki release. If you upgrade to 35 | the latest Anki version and find an add-on you cannot live without stops working, 36 | you can download older Anki versions from the [releases page](https://github.com/ankitects/anki/releases). 37 | 38 | ## Problems 39 | 40 | If you encounter any issues when installing or starting Anki, please see: 41 | - [Display Issues](display-issues.md) 42 | -------------------------------------------------------------------------------- /src/misc.md: -------------------------------------------------------------------------------- 1 | # Miscellanea 2 | 3 | 4 | 5 | ## Menu Shortcuts 6 | 7 | On Windows/Linux you can hold down the Alt key and press a highlighted 8 | letter to activate a particular menu. 9 | 10 | Although macOS doesn’t support this feature, it does allow you instead to assign 11 | shortcuts to specific menu items. Please see 12 | 13 | for more information. 14 | 15 | ## Debug Console 16 | 17 | Sometimes you may be asked to use the debug console to change a setting 18 | or check something. Unless asked to enter text in the "debug console", 19 | you will probably not need this. Advanced users may like to read more 20 | about it in the [add-on writing guide](https://addon-docs.ankiweb.net/debugging.html#debug-console). 21 | 22 | When asked to enter text into the "debug console", please start Anki, 23 | and in the main window, press 24 | 25 | Ctrl+Shift+; 26 | 27 | (the control key, shift key, and semi-colon key at the same time) 28 | 29 | On a Mac, press 30 | 31 | Command+Shift+; 32 | 33 | (the command key, shift key, and semi-colon key at the same time) 34 | 35 | On some non-English keyboards, you may need to press : or + instead 36 | of ;. 37 | 38 | In the window that has popped up, please paste the text you were asked 39 | to paste in the top section. When you’ve done so, please press 40 | Ctrl+Return (On Mac, Command+Return), and some text should appear in 41 | the bottom section. If you’ve been asked to paste the resulting output, 42 | please copy it from the bottom area, and paste it back to the support 43 | person. 44 | 45 | If you press Ctrl+Shift+Return instead of just Ctrl+Return, Anki will 46 | try to print the result rather than doing what you asked it to. If you 47 | are getting unexpected errors, please make sure you’re not holding down 48 | the Shift key. 49 | -------------------------------------------------------------------------------- /src/intro.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | ## Mobile Clients 4 | 5 | This is the manual for the computer version of Anki. Separate manuals are available for the mobile clients: 6 | 7 | - [AnkiDroid Manual](https://docs.ankidroid.org/) (Android) 8 | - [AnkiMobile Manual](https://docs.ankimobile.net/) (iPhone/iPad) 9 | 10 | ## Quickstart 11 | 12 | In a hurry? Jump straight to [Getting Started](getting-started.md). 13 | 14 | ## Getting Help 15 | 16 | Looking for help? Please see [Getting Help](./getting-help.md). 17 | 18 | ## Translations 19 | 20 | Volunteers have contributed translations of this manual. The 21 | translations may not always be up to date. 22 | 23 | - [Bahasa Indonesia](https://web.archive.org/web/20250228144632/https://apps.ankiweb.net/docs/manual.id.html) 24 | - [Deutsch](https://web.archive.org/web/20240413080739/https://www.dennisproksch.de/anki) 25 | - [Español](https://web.archive.org/web/20250130154657/https://apps.ankiweb.net/docs/manual.es.html) 26 | - [Français](https://web.archive.org/web/20250209100830/https://apps.ankiweb.net/docs/manual.fr.html) 27 | - [Italiano](https://web.archive.org/web/20160423223801/http://192.167.9.6/Anki_ITA/Manual_ITA.htm) 28 | - [Polski](https://platynowy.github.io/anki-manual/) 29 | - [Português Brasileiro](https://mizerablebr.github.io/anki-manual/) 30 | - [русский язык](https://alexeygorelov.github.io/anki-manual-ru/) 31 | - [Українська](https://astropsy999.github.io/anki-manual/) 32 | - [العربية](https://abdnh.github.io/anki-manual/) 33 | - [فارسى](https://web.archive.org/web/20250328102629/http://ankidroid.ir/anki.pdf) 34 | - [日本語](http://wikiwiki.jp/rage2050/) 35 | - [简体中文](https://open-spaced-repetition.github.io/anki-manual-zh-CN/) 36 | 37 | If you would like to help translate the manual into a different language, 38 | please see the [translation docs](https://translating.ankiweb.net/anki/manual.html). 39 | 40 | ## Legacy Documentation 41 | 42 | Not on the latest version of Anki? Find archives of this manual at the [Internet Archive](https://web.archive.org/web/20240829022941/https://docs.ankiweb.net/). 43 | 44 | For information on old scheduler versions, see [this FAQ](https://faqs.ankiweb.net/the-anki-2.1-scheduler.html). 45 | -------------------------------------------------------------------------------- /src/platform/windows/installing.md: -------------------------------------------------------------------------------- 1 | # Installing & Upgrading Anki on Windows 2 | 3 | 4 | 5 | ## Requirements 6 | 7 | Recent Anki releases require a computer running the 64 bit version of Windows 8 | 10 or 11. 9 | 10 | - The last Anki release that supported Windows 7 and 8.1 was Anki 2.1.49. 11 | - The last Anki release that supported 32 bit Windows was [Anki 2.1.35-alternate](https://github.com/ankitects/anki/releases/tag/2.1.35). 12 | 13 | If you're on an old machine, you can obtain old releases from the [releases page](https://github.com/ankitects/anki/releases). 14 | 15 | ## Installing 16 | 17 | To install Anki: 18 | 19 | 1. Download Anki from . 20 | 2. Save the installer to your desktop or downloads folder. 21 | 3. Double-click on the installer to run it. If you see an error 22 | message, please see the [installation issues page](installation-issues.md). 23 | 4. Once Anki is installed, double-click on the new star icon on your 24 | desktop to start Anki. 25 | 26 | ## Upgrading 27 | 28 | If upgrading from Anki 2.1.6+, there is no need to uninstall the previous 29 | version first. All you need to do is close Anki if it is open, and then follow 30 | the installation steps above. Your cards will be preserved when you upgrade. 31 | 32 | If upgrading from an Anki version before 2.1.6, or switching from the standard 33 | to the alternate version or vice versa, we recommend uninstalling the old 34 | version first, which will remove Anki's program data, but not delete your card 35 | data. 36 | 37 | If you wish to downgrade to a previous version, please make sure you 38 | [downgrade first](http://changes.ankiweb.net). 39 | 40 | ## Add-on Compatibility 41 | 42 | Some add-ons may not always work with the latest Anki release. If you upgrade to 43 | the latest Anki version and find an add-on you cannot live without stops working, 44 | you can download older Anki versions from the [releases page](https://github.com/ankitects/anki/releases). 45 | 46 | ## Problems 47 | 48 | If you encounter any issues when installing or starting Anki, please see the 49 | following pages: 50 | - [Installation Issues](installation-issues.md) 51 | - [Startup Issues](startup-issues.md) 52 | - [Display Issues](display-issues.md) 53 | - [Permission Problems](permission-problems.md) 54 | 55 | If you encounter any interface issues when using Anki, please see the following pages: 56 | - [Copy and Paste Issues](copy-and-paste.md) 57 | - [Text Size Issues](text-size.md) 58 | -------------------------------------------------------------------------------- /src/SUMMARY.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | 3 | [Introduction](intro.md) 4 | 5 | - [Background](background.md) 6 | - [Platform Notes](platform/intro.md) 7 | - [Windows](platform/windows/intro.md) 8 | - [Install & Upgrade](platform/windows/installing.md) 9 | - [Installation Issues](platform/windows/installation-issues.md) 10 | - [Startup Issues](platform/windows/startup-issues.md) 11 | - [Display Issues](platform/windows/display-issues.md) 12 | - [Copy and Paste Issues](platform/windows/copy-and-paste.md) 13 | - [Text Size](platform/windows/text-size.md) 14 | - [Permission Problems](platform/windows/permission-problems.md) 15 | - [macOS](platform/mac/intro.md) 16 | - [Install & Upgrade](platform/mac/installing.md) 17 | - [Display Issues](platform/mac/display-issues.md) 18 | - [Linux](platform/linux/intro.md) 19 | - [Install & Upgrade](platform/linux/installing.md) 20 | - [Missing Libraries](platform/linux/missing-libraries.md) 21 | - [Display Issues](platform/linux/display-issues.md) 22 | - [Blank Main Window](platform/linux/blank-window.md) 23 | - [Linux Distro Packages](platform/linux/distro-packages.md) 24 | - [Incorrect GTK Theme](platform/linux/gtk-theme.md) 25 | - [Wayland](platform/linux/wayland.md) 26 | - [Input Methods](platform/linux/input-methods.md) 27 | - [Getting Started](getting-started.md) 28 | - [Getting Help](getting-help.md) 29 | - [Studying](studying.md) 30 | - [Adding/Editing](editing.md) 31 | - [Card Templates](templates/intro.md) 32 | - [Field Replacements](templates/fields.md) 33 | - [Card Generation](templates/generation.md) 34 | - [Styling & HTML](templates/styling.md) 35 | - [Checks and Errors](templates/errors.md) 36 | - [Preferences](preferences.md) 37 | - [Deck Options](deck-options.md) 38 | - [Syncing with AnkiWeb](syncing.md) 39 | - [Profiles](profiles.md) 40 | - [Browsing](browsing.md) 41 | - [Filtered Decks](filtered-decks.md) 42 | - [Searching](searching.md) 43 | - [Importing](importing/intro.md) 44 | - [Text Files](importing/text-files.md) 45 | - [Packaged Decks](importing/packaged-decks.md) 46 | - [Exporting](exporting.md) 47 | - [Backups](backups.md) 48 | - [Managing Files](files.md) 49 | - [Statistics](stats.md) 50 | - [Media](media.md) 51 | - [Math & Symbols](math.md) 52 | - [Leeches](leeches.md) 53 | - [Add-ons](addons.md) 54 | - [Troubleshooting](troubleshooting.md) 55 | - [Sync Server](sync-server.md) 56 | - [Miscellaneous](misc.md) 57 | 58 | [Contributing](contrib.md) 59 | [FAQs](faqs.md) 60 | [Resources](resources.md) 61 | -------------------------------------------------------------------------------- /src/importing/packaged-decks.md: -------------------------------------------------------------------------------- 1 | # Packaged Decks 2 | 3 | 4 | 5 | Anki packages (.apkg files) enable you to import decks, notes, note types, and cards from 6 | other users. They are commonly shared on [AnkiWeb](https://ankiweb.net/shared/decks). 7 | 8 | ## Scheduling 9 | 10 | Anki packages may also contain scheduling information, which is useful if you want to 11 | transfer decks between devices or profiles. However, when importing 12 | a deck shared by someone else, you typically do not want to adopt their card intervals 13 | or review history. 14 | 15 | If you encounter imported cards with unexpectedly large intervals, the deck author may 16 | accidentally have included their scheduling information. You can use the 17 | [Set Due Date feature](../browsing.md#cards) to reset the imported cards. On Anki 18 | 23.10 and later, you can remove any scheduling information during the import process 19 | by leaving the "Import any learning progress" option unselected. This will also remove 20 | any "leech" or "marked" tags from the imported cards. 21 | 22 | ## Updating 23 | 24 | When you import an .apkg file, Anki will identify any notes in it that are 25 | already in your collection due to a previous import. If the notes in the file 26 | are newer than your local copy, the notes will be updated with the contents of 27 | the file by default. 28 | 29 | This updating process is generally not possible if the note type is changed (e.g. if either 30 | you or the deck author do things like add an extra field to the note type). 31 | You will still be able to import any missing notes from the file, but 32 | notes you have imported previously will not be updated if the deck author 33 | has made changes. 34 | 35 | ### Anki 23.10 and Later 36 | 37 | Anki 23.10 introduced more flexibility: You can choose to unconditionally 38 | update notes and note types, always overwriting your modifications, 39 | or, on the other hand, never update existing objects. 40 | 41 | Also, if both you and the deck author modified the same note type, you can now decide to 42 | _merge_ the two versions. This will preserve all templates and fields contained in 43 | either one, but will require a full sync, and may mark other existing notes as modified. 44 | 45 | #### Note to Deck Authors 46 | 47 | Merging relies on template and field ids, which were introduced in Anki 2.1.67. 48 | If a template or field lacks an id, because it has been created with an earlier 49 | release, Anki attempts to find an equivalent by comparing names. 50 | 51 | See this [this add-on](https://ankiweb.net/shared/info/2063785767) for why it is 52 | advantageous to share note types with field and template ids, and how to add them to 53 | existing ones. 54 | -------------------------------------------------------------------------------- /src/templates/intro.md: -------------------------------------------------------------------------------- 1 | # Card Templates 2 | 3 | Card templates tell Anki which fields should appear on the front and back of your card, 4 | and control which cards will be generated when certain fields have text in them. 5 | By adjusting your card templates, you can alter the design and styling of many of your 6 | cards at once. 7 | 8 | Card templates are covered in some of the intro videos: 9 | 10 | - [Switching Card Order](http://www.youtube.com/watch?v=DnbKwHEQ1mA&yt:cc=on) 11 | 12 | - [Styling Cards](http://www.youtube.com/watch?v=F1j1Zx0mXME&yt:cc=on) 13 | 14 | - [Typing in the Answer](http://www.youtube.com/watch?v=5tYObQ3ocrw&yt:cc=on) 15 | 16 | ## The Templates Screen 17 | 18 | You can modify card templates by clicking the **Cards...** button inside the 19 | editing screen. 20 | 21 | 22 | You can switch between **Front template**, **Back template** and **Styling** with Ctrl+1, Ctrl+2, and Ctrl+3. 23 | 24 | In Anki, templates are written in HTML, which is the language that web 25 | pages are written in. The styling section is CSS, which is the language 26 | used for styling web pages. 27 | 28 | On the right is a preview of the front and back of the currently 29 | selected card. If you opened the window while adding notes, the preview 30 | will be based on the text you had typed into the Add Notes window. If 31 | you opened the window while editing a note, the preview will be based on 32 | the content of that note. If you opened the window from Tools → Manage 33 | Note Types, Anki will display each field’s name in parentheses in place 34 | of content. 35 | 36 | At the top right of the window is an Options button that gives you 37 | options to rename or reorder the cards, as well as the following two 38 | options: 39 | 40 | - The **Deck Override** option allows you to change the deck that cards 41 | generated from the current card type will be placed into. By 42 | default, cards are placed into the deck you provide in the Add Notes 43 | window. If you set a deck here, that card type will be placed into 44 | the deck you specified, instead of the deck listed in the Add Notes 45 | window. This can be useful if you want to separate cards into 46 | different decks (for instance, when studying a language, to put 47 | production cards in one deck and recognition cards in another). You 48 | can check which deck the cards are currently going to by choosing 49 | Deck Override again. 50 | 51 | - The **Browser Appearance** option allows you to set different (perhaps 52 | simplified) templates for display in the Question and Answer columns 53 | of the browser; see [browser appearance](styling.md#browser-appearance) for more 54 | information. 55 | -------------------------------------------------------------------------------- /src/getting-help.md: -------------------------------------------------------------------------------- 1 | # Getting help 2 | 3 | ## Asking good questions 4 | 5 | With the exception of AnkiMobile, Anki and its support are provided free of 6 | charge, by people who generously volunteer their time. Please bear this in mind 7 | when posting - if you are rude and demanding, or have made no effort to solve 8 | the problem on your own, people are less likely to want to help you. 9 | 10 | Please start by trying to resolve the issue on your own: 11 | 12 | - Read the [getting started](./getting-started.md) section 13 | of the manual, and check out the intro videos. 14 | - If you've encountered a bug, please follow [these steps](./troubleshooting.md). 15 | - Use the search button on this page to search frequently asked questions. 16 | - Use the search button in the manual. 17 | - Use the search button on the forums. 18 | - Google the issue. 19 | 20 | If you have tried the above and are still stuck, it's time to ask for help. 21 | When writing a post, please explain the problem you are having clearly, and in detail. 22 | 23 | Please avoid vague questions like: 24 | 25 | > "My Anki doesn't work, what should I do?" 26 | 27 | Instead, please provide as much detail as you can. For example: 28 | 29 | > "When I double-click on the Anki icon, an error message pops up. I tried 30 | > searching for the error on Google, but couldn't find anything useful. I have 31 | > copied and pasted the error message to the bottom of my post. I followed the 32 | > steps on the "When problems occur" page, but the error message does not go 33 | > away. What should I do?" 34 | 35 | This is a much better question. It tells us: 36 | 37 | - What you have tried. 38 | - What steps you are taking when the problem happens. 39 | - What problems/errors you are getting when things go wrong. 40 | 41 | Knowing these things makes it much easier to answer your question. 42 | 43 | The user forums use a different login to AnkiWeb, so please create an 44 | account there if it's your first time. 45 | 46 | ## Anki Desktop (the computer version) and AnkiWeb 47 | 48 | After reading the above section, please post on the 49 | [user forums](https://forums.ankiweb.net) for assistance. 50 | 51 | The user forums use a different login to AnkiWeb, so please create an 52 | account there if it's your first time. 53 | 54 | ## AnkiDroid (Android devices) 55 | 56 | Please see [AnkiDroid's support page](https://docs.ankidroid.org/help.html). 57 | 58 | ## AnkiMobile (iPhone/iPad) 59 | 60 | Please see [AnkiMobile's support page](https://docs.ankimobile.net/support.html). 61 | 62 | ## Private questions 63 | 64 | For security reports and business enquiries, you can post a private ticket 65 | [here](https://anki.tenderapp.com/discussions/private). If you have a question 66 | about Anki, AnkiWeb or AnkiDroid, please use the [user forums](https://forums.ankiweb.net) 67 | instead. 68 | -------------------------------------------------------------------------------- /src/leeches.md: -------------------------------------------------------------------------------- 1 | # Leeches 2 | 3 | 4 | 5 | Leeches are cards that you keep forgetting. Because they require so 6 | many reviews, they take up a lot more of your time, compared to other cards. 7 | 8 | Anki can help you identify leeches. Each time a review card "lapses" (is 9 | failed while it is in review mode), a counter increases. When this counter 10 | reaches 8, Anki tags the note as a leech and suspends the card. The 11 | threshold, and whether to suspend or not, can be adjusted in the 12 | [deck options](deck-options.md). 13 | 14 | If you keep failing that card, Anki will continue to alert you about the 15 | leech periodically. These warnings occur at half the initial leech 16 | threshold. For example, if you set the warning at 8 lapses, future 17 | warnings will happen every 4 lapses (at 12, 16, and so on). 18 | 19 | Once a leech is found, there are several ways to handle it. 20 | 21 | ## Editing 22 | 23 | The most efficient method to deal with leeches is to change how the 24 | information is presented. Maybe your cards have too much information, or 25 | you’re trying to memorize something without fully understanding it. Often, 26 | it helps to follow the [20 rules of formulating 27 | knowledge](https://supermemo.guru/wiki/20_rules_of_knowledge_formulation), 28 | proposed by Dr Piotr Wozniak, the creator of SuperMemo. Some cards can 29 | benefit from a mnemonic. Even some well-written cards may need a boost in 30 | coherence, e.g. by adding cards for related concepts. However, it takes a 31 | lot of experience to know how to formulate the material properly, break it 32 | down into smallest possible components, and use mnemonic techniques. 33 | 34 | ## Deleting 35 | 36 | If the material you’re struggling with isn't important enough to justify 37 | the time spent, you can simply delete the card. By selectively deleting 38 | difficult and obscure items, you can spend more time learning other 39 | material, making studying more enjoyable. If you think the card might be 40 | useful for future reference, you can leave it suspended. 41 | 42 | ## Waiting 43 | 44 | Some leeches are caused by "interference". For example, an English 45 | learner may have recently learned the words "disappoint" and "disappear". 46 | As they look similar, the learner may find themselves confusing the two 47 | when trying to answer. In such situations, it’s often helpful to 48 | concentrate on one idea at a time. Once that idea is firmly ingrained in 49 | your mind, you can then start learning the other idea. So, in these 50 | situations, you might want to leave one of the words suspended until you 51 | have learned the other one well, and then unsuspend it. 52 | 53 | For a more detailed discussion, you can refer to the article "[Dealing 54 | with Leeches](https://controlaltbackspace.org/leech/)", written by Soren 55 | Bjornstad. 56 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Anki Manual 2 | 3 | This repository contains the source of [Anki's user manual](https://docs.ankiweb.net). 4 | 5 | ## License 6 | 7 | This manual is licensed under the [CC BY-SA 4 license](https://creativecommons.org/licenses/by-sa/4.0/). 8 | 9 | ## Contributing 10 | 11 | Contributions are welcome! Please see the [issue tracker](https://github.com/ankitects/anki-manual/issues) for things you can start working on. For details on local development, see [CONTRIBUTING](CONTRIBUTING.md). 12 | 13 | Unless stated otherwise, any pull requests you 14 | submit will be licensed under the [CC BY-SA 4 license](https://creativecommons.org/licenses/by-sa/). 15 | 16 | ## Style Guidelines 17 | 18 | In 2024, we began efforts to standardize the styles used throughout the documentation. You will probably find that following conventions are not consistently applied in the manual, but these are the rules we are using going forward. If you are submitting edits or updates, please follow these guidelines, and you are welcome to update other text to fit these guidelines as well. 19 | 20 | - Use double quotes, `"`, instead of single quotes, `'`. 21 | - For emphasis, such as when defining a word, use italics, `_`. 22 | - Also use italics when referring to a word itself rather than what it means, e.g. "To search for either _dog_ or _cat_, use `dog or cat`". 23 | - When referring to UI elements, use bold formatting, `**`. 24 | - When referring to keyboard buttons, wrap them with ``. 25 | - Use code formatting for example inputs by wrapping them with backticks, `` ` ``. 26 | 27 | ## Preserving Legacy Links 28 | 29 | ### Removing a section 30 | 31 | We often use anchor links to direct users to the specific section of a page that will be most useful to them. These anchor links are created from section headers, e.g., `https://docs.ankiweb.net/deck-options.html#timers`. 32 | 33 | If you are submitting a PR that changes or deletes a section header, please add a hidden anchor so those legacy anchor links will continue to function correctly. 34 | 35 | Example: To change the header "Clocks" to "Timers" -- replace: 36 | ``` 37 | ## Clocks 38 | ``` 39 | with: 40 | ``` 41 | ## Timers 42 | 43 | ``` 44 | 45 | ### Removing a page 46 | 47 | If you are submitting a PR that results in a page being removed from the manual or FAQ entirely: 48 | 49 | 1. Remove that "chapter" from the [SUMMARY](src/SUMMARY.md) in the manual [or FAQ: [SUMMARY](../../../faqs/blob/main/src/SUMMARY.md)]. 50 | 51 | 2. Consider whether the link should be redirected to a new location for that documentation, or fail with a [404 error](https://docs.ankiweb.net/404.html). If it should be redirected, add an entry to the `[output.html.redirect]` section of [book.toml](book.toml) in the manual [or FAQ: [book.toml](../../../faqs/blob/main/book.toml)]. 52 | * Example: `"old-page-name.html" = "new-page-name.html"` 53 | * See the [mdBook Documentation](https://rust-lang.github.io/mdBook/format/configuration/renderers.html#outputhtmlredirect). 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/backups.md: -------------------------------------------------------------------------------- 1 | # Backups 2 | 3 | 4 | 5 | ## Automatic backups 6 | 7 | Anki will create automatic backups of your card data. These include the text 8 | on your cards and your scheduling information, but do not include sounds or 9 | image files. 10 | 11 | Automatic backups can be useful to recover from mistakes, but you should not 12 | rely solely on them. Because they are stored on your local device, they will not 13 | protect you if your device breaks or is stolen. We recommend you combine them with 14 | [manual backups](#manual-colpkg-backups). 15 | 16 | ### Restoring 17 | 18 | To restore from an automatic backup: 19 | 20 | - Open Anki, and choose Switch Profile from the File menu. 21 | - Click on the "Open Backup" button. 22 | - Select the backup you wish to restore from. 23 | 24 | ```admonish warning 25 | When restoring from a backup, any changes made since the backup was created will be lost. 26 | ``` 27 | 28 | Anki disables automatic syncing and backups when you restore from a backup. Once you're 29 | happy that you've restored the correct backup, close and re-open Anki to return to normal. 30 | 31 | ### Creating 32 | 33 | Backups are created periodically. You can configure the time between backups 34 | in the [preferences](preferences.md) screen. The default is 30 minutes. 35 | 36 | Certain operations will trigger a backup, even if the configured time has not 37 | elapsed yet: 38 | 39 | - A one-way sync download 40 | - Importing a .colpkg file using File>Import 41 | - Tools>Check Database 42 | 43 | After backups are two days old, Anki will start removing some of the older ones. 44 | You can control how many daily, weekly and monthly backups you'd like to keep. 45 | 46 | Backups created with 2.1.50 will not be importable into older Anki versions. 47 | 48 | ## Manual colpkg backups 49 | 50 | ### Restoring 51 | 52 | You can restore from a manual backup by using File>Import. 53 | 54 | ### Creating 55 | 56 | In Anki 2.1.50+, you can use File>Create Backup to trigger an immediate backup. This 57 | functions like regular automatic backups, and does not include media files. 58 | 59 | To create a backup that includes your sounds and images: 60 | 61 | - Select Export from the File menu. 62 | - Ensure "Anki collection package (.colpkg)" is selected. 63 | - Enable the "include media" option. 64 | 65 | This will create a .colpkg file that contains all of your cards and any sounds/images they 66 | use. We recommend you store the file somewhere safe, like a different device, or a cloud-based 67 | file storage service like Dropbox or Google Drive. 68 | 69 | ## AnkiWeb 70 | 71 | [Synchronising](./syncing.md) your collection with AnkiWeb provides some level of protection 72 | against your device being lost or stolen. If you need to restore your collection from AnkiWeb, 73 | you can force a one-way sync in the preferences screen, or sync from a new device, and then choose 74 | "Download". 75 | 76 | ## Deletion log 77 | 78 | Anki logs deleted notes to a text file called deleted.txt in your 79 | profile folder. These notes are in a text format that can be read by 80 | File>Import, though please note the import feature only supports a 81 | single note type at one time, so if you have deleted notes from 82 | different note types, you'll need to split the file into separate files 83 | for each note type first. 84 | -------------------------------------------------------------------------------- /src/exporting.md: -------------------------------------------------------------------------------- 1 | # Exporting 2 | 3 | 4 | 5 | Exporting allows you to save part of your collection as a text file or 6 | packaged Anki deck. To export, click the File menu and choose **Export**. 7 | 8 | ## Text Files 9 | 10 | If you choose "Notes in Plain Text", Anki will write the contents of the 11 | notes into a text file. Each field is separated by a tab. If you edit 12 | the resulting file and don't modify the first field, you can later 13 | import that file back into Anki and Anki will update your notes based on 14 | your edits, provided you import back into the same note type. 15 | 16 | If you find yourself needing to edit the first field as well, you'll 17 | need to change the format of your note type so that the first field is 18 | an ID number rather than actual text. (You can install 19 | the [Add note id](https://ankiweb.net/shared/info/8897764) 20 | add-on to make this easier.) 21 | 22 | In order for formatting to be preserved when you import text back in, 23 | the text is exported with all the HTML formatting embedded in it. 24 | 25 | ## Packaged Decks 26 | 27 | A "packaged deck" consists of cards, notes, note types, and any sounds or 28 | images bundled up into a file ending with .apkg or .colpkg. You can use 29 | packaged decks to transfer cards between people, or for backing up parts 30 | of your collection. 31 | 32 | There are two different kinds of packaged decks. 33 | 34 | ### Collection (.colpkg) 35 | 36 | When you export all decks with scheduling included, this is called a 37 | "collection package". Anki will copy your entire collection into a file 38 | ending in .colpkg, and place it on your desktop. A collection package is 39 | used to back up your collection, or copy it to another device. 40 | 41 | Collection packages created with previous versions of Anki were called 42 | collection.apkg. 43 | 44 | When this file is later imported, Anki will delete all the current cards 45 | in the collection, and replace the collection with the items in the 46 | file. This is useful for copying your collection back and forth between 47 | devices. 48 | 49 | Existing media in your collection is not deleted when you import a 50 | collection package. To delete unused media, use Tools>Check Media. 51 | 52 | If you choose Anki 2.1.50+ Collection Package format, imports and exports 53 | will be faster, and media files will be compressed, but the resulting 54 | .colpkg file will not be readable by older Anki clients. 55 | 56 | ### Deck (.apkg) 57 | 58 | Deck packages contain a single deck (and any child decks it may have). 59 | They have a filename ending with .apkg, but a filename other than 60 | collection.apkg. When you import a deck package, Anki will add the 61 | contents into your collection, rather than overwriting your collection. 62 | 63 | If some notes in the deck package have previously been imported, Anki 64 | will keep the version with the most recent modification time. So if you 65 | download an updated deck, the edits that have been made in the updated 66 | version will be made in your collection as well, but if you re-import an 67 | unchanged deck after making edits in your collection, the changes in 68 | your collection will be kept. 69 | 70 | If you choose not to include scheduling information, Anki will assume 71 | that you are sharing the deck with other people, and will remove marked 72 | and leech tags so that they will have a clean copy of it. 73 | -------------------------------------------------------------------------------- /src/contrib.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | 4 | 5 | ## Sharing Decks Publicly 6 | 7 | To share decks with the general public, [synchronize](syncing.md) them 8 | with AnkiWeb, then log into AnkiWeb and click on "Share" from the menu 9 | next to the deck you wish to share. 10 | 11 | If you shared a deck previously (including with previous versions of 12 | Anki), you can update it by clicking "Share" as above. Updating a shared 13 | deck will not reset the download counts or ratings. You can delete a 14 | shared deck that you have uploaded using the Delete button on the shared 15 | deck's page. 16 | 17 | When updating a deck, AnkiWeb expects the deck to be at the same 18 | location as before. If you shared a deck when it was called "Korean 19 | Verbs" for example, and then renamed it to "Korean::Korean Verbs", 20 | resharing will not be able to update the existing copy. If you have 21 | forgotten the original name, you can guess it by downloading the 22 | deck on AnkiWeb and importing it (File > Import) in a new profile 23 | (File > Switch profile > Add). Then you can copy the exact name of the 24 | deck when it was first shared. If this doesn't work, please contact 25 | support. 26 | 27 | When you update a shared deck, users who downloaded the deck previously 28 | will not automatically receive updates. If they download the deck again 29 | and re-import it, newly added material will be imported without altering 30 | their existing study progress, provided neither you nor the user has 31 | altered the note type since the first import. 32 | 33 | ## Sharing Decks Privately 34 | 35 | If you’d like to share decks with a limited group of people (such as a 36 | study group or class) rather than the general public, you can do so by 37 | sharing them outside of AnkiWeb. 38 | 39 | To share a deck privately, go to the File menu and choose Export. Select 40 | a single deck (not "All Decks"), and turn off "include scheduling 41 | information". This will produce an .apkg file which you can share with 42 | others. 43 | 44 | You can share the .apkg file by emailing it to people, placing it on a 45 | website or shared folder, or using a free file sharing service like 46 | Dropbox or Google Drive and sending people a link. 47 | 48 | Both the computer version and mobile clients make it easy to import from 49 | an apkg file simply by clicking or tapping on it. AnkiWeb does not have 50 | the ability to import apkg files however, so the recipients of your deck 51 | will need to have the computer version or Anki on their mobile device. 52 | 53 | When a user imports an .apkg file, cards that already exist in their 54 | collection will be ignored and any new cards will be added. As long as 55 | they use the same note type, modified cards will also be updated. To 56 | prevent data loss, cards that have been deleted in the new apkg file 57 | will not be deleted in the user’s collection, so if you need to delete 58 | cards from users' decks for whatever reason, you will need to contact 59 | them about it. 60 | 61 | ## Sharing Add-ons 62 | 63 | Please see 64 | 65 | ## Translating Anki 66 | 67 | Please see 68 | 69 | ## Contributing Code 70 | 71 | Anki's source code is available at 72 | 73 | Before contributing, please see [contributing.md](https://github.com/ankitects/anki/blob/main/docs/contributing.md). 74 | -------------------------------------------------------------------------------- /src/media.md: -------------------------------------------------------------------------------- 1 | # Media 2 | 3 | Anki stores the sounds and images used in your notes in a folder next to 4 | the collection. For more on the folder location, please see the [file locations](files.md#user-data) section. When you add media within Anki, either by 5 | using the paperclip icon in the [editor](editing.md) or by pasting it into 6 | a field, Anki will copy it from its original location into the media 7 | folder. This makes it easy to back up your collection’s media or move it 8 | to another computer. 9 | 10 | If your media filenames contain spaces or other special characters such 11 | as percentage signs, the way the filenames appear in the HTML editor will 12 | differ from the way the filenames appear on disk. For example, a file called 13 | `hello 100%.jpg` will appear as `hello%20100%25.jpg` in the HTML editor. 14 | Internally, Anki still uses the original filenames, so if you would like to 15 | [search](searching.md) for the file or modify the filename with [Find&Replace](browsing.md#find-and-replace), you will 16 | need to use the name as it appears on disk, not as it appears in the 17 | HTML editor. Exporting to a text file is another way to see the underlying 18 | representation. 19 | 20 | ## Checking Media 21 | 22 | You can use the Tools>Check Media menu option to scan your notes and 23 | media folder. It will generate a report of files in the media folder 24 | that are not used by any notes, and media referenced in notes but 25 | missing from your media folder. It also allows you: 26 | 27 | - To delete unused media files. 28 | - To tag notes that refer to missing media files. 29 | - To empty your trash folder. 30 | - To restore the deleted files back to your media folder. 31 | 32 | This tool does not scan question or answer 33 | templates, which is why you can’t place media references to fields in 34 | the template. If you need a static image or sound on every card, name it 35 | with a leading \_ (e.g., `_dog.jpg`) to tell Anki to ignore it when 36 | checking for media. If you delete media using the unused media check, 37 | Anki will move it into your operating system’s trash folder, so you can 38 | recover if you accidentally delete media that shouldn’t have been 39 | deleted. 40 | 41 | ## Manually Adding Media 42 | 43 | When you add media via Anki's interface, Anki takes care of ensuring the 44 | filenames are encoded in a way that should work across different devices, 45 | removing characters that won't work on certain operating systems, 46 | and truncating very long filenames. 47 | 48 | If you manually add files to your [media folder](files.md#user-data), 49 | you should use Tools>Check Media afterwards, to ensure the filenames are 50 | encoded correctly. If you skip this step, any filenames that are not compatible 51 | will be skipped when syncing. 52 | 53 | Anki doesn’t follow symbolic links in the media folder when syncing. If you 54 | rely on symlinks for including fonts, stylesheets, or other resources, these files 55 | may appear to work on desktop but fail on mobile. To ensure files sync properly, copy 56 | the actual files into the collection.media folder instead of using symlinks. 57 | 58 | ## Supported Formats 59 | 60 | Anki uses a program called mpv (and mplayer as a fallback) in order to support 61 | sounds and videos. A wide variety of file formats are supported, but not all of 62 | these formats will work on AnkiWeb and the mobile clients. MP3 audio and 63 | MP4 video seems to be the most universally supported. 64 | -------------------------------------------------------------------------------- /src/troubleshooting.md: -------------------------------------------------------------------------------- 1 | # Troubleshooting 2 | 3 | If you encounter a problem with Anki, please try the following steps in order: 4 | 5 | ### 1. Restart Anki 6 | 7 | Please close Anki, then start it again. 8 | 9 | If you are unable to close Anki because of an error message, you can either 10 | terminate Anki using your task manager, or restart your computer. Anki saves 11 | periodically, so you should not lose more than a few minutes of work in most 12 | circumstances. 13 | 14 | If the problem does not occur again, you can skip the following steps. 15 | 16 | ### 2. Check add-ons 17 | 18 | Please close Anki, then open it in safe mode by holding down the 19 | Shift key while starting Anki. Keep holding Shift down 20 | until the on-screen message informs you that Anki has started in safe mode. 21 | If you're on Linux and that didn't work, run 'anki --safemode'. 22 | 23 | If the problem goes away, that indicates an add-on is causing the problem. 24 | Remove any add-ons you don't need, and disable half of the others. If the 25 | problem continues, try the other half. Repeat the process until you've figured 26 | out which add-on is causing the problem. Then please report the issue to the 27 | add-on author, using the Copy Debug Info button, and pasting that into the 28 | report. 29 | 30 | ### 3. Check your Anki version 31 | 32 | You can find the version you're using in the **Help → About** or **Anki → 33 | About** menu. If the version you're using is not the latest version published on 34 | , please close Anki, install the latest version, and 35 | then start Anki again to see if the problem has gone away. 36 | 37 | If you're using Linux, please make sure you can reproduce the error using the 38 | packaged version on the Anki website, as distros often distribute [broken versions](platform/linux/distro-packages.md). 39 | 40 | ### 4. Check your database 41 | 42 | After restarting Anki, please try the **Tools → Check Database** menu item to 43 | make sure your collection doesn't have any problems. 44 | 45 | ### 5. Restart your computer 46 | 47 | Sometimes restarting your computer may help. 48 | 49 | ### 6. Change the Video Driver 50 | 51 | Crashes and display issues can be caused by the video driver. Changing to a 52 | different video driver may help. Make sure you try all the driver options and 53 | restart Anki after each change. 54 | 55 | If you're using Anki version 23.10 or above, the easiest way is to open 56 | **Tools → Preferences** (or **Anki → Preferences** if you're on a Mac) and 57 | change the driver from the dropdown menu. 58 | 59 | If you are on an older Anki version or if you cannot access the preferences for 60 | some reason, you can use the command-line instructions instead and manually 61 | change the gldriver file: 62 | 63 | - [Windows](https://docs.ankiweb.net/platform/windows/display-issues.html) 64 | - [Mac](https://docs.ankiweb.net/platform/mac/display-issues.html) 65 | - [Linux](https://docs.ankiweb.net/platform/linux/display-issues.html) 66 | 67 | ### 7. Reset window sizes 68 | 69 | Sometimes pressing **reset window sizes** button in the preferences screen 70 | immediately after starting Anki will help. 71 | 72 | ### 8. If the problem remains 73 | 74 | If you've confirmed you are using the latest Anki version, and are still 75 | receiving errors even with add-ons disabled, 76 | please [report the problem](./getting-help.md), including the next error you 77 | receive in your post. 78 | -------------------------------------------------------------------------------- /src/platform/windows/startup-issues.md: -------------------------------------------------------------------------------- 1 | # Windows startup issues 2 | 3 | 4 | 5 | ## No error, but app does not appear 6 | 7 | If you start Anki and it fails to appear, without 8 | any error message, you can try the following: 9 | 10 | - Disconnect multiple/external displays. 11 | - Install the [latest Anki version](https://apps.ankiweb.net/). 12 | - Adjust [your decimal separator](https://forums.ankiweb.net/t/windows-update-broke-anki/1822/75), if it is not a period. 13 | - Install the old [2.1.35-alternate build](https://github.com/ankitects/anki/releases/tag/2.1.35) of Anki. 14 | 15 | ## Windows updates 16 | 17 | When starting Anki, you may receive a message like the following: 18 | 19 | - _Error loading Python DLL_ 20 | - _The program can't start because api-ms-win.... is missing_ 21 | - _Failed to execute script runanki_ 22 | - _Failed to execute script pyi_rth_multiprocessing_ 23 | - _Failed to execute script pyi_rth_win32comgenpy_ 24 | 25 | These errors are usually because your computer is missing a Windows update 26 | or Windows library. 27 | 28 | Please open Windows update, and ensure your system has all updates installed. 29 | If any needed to be installed, please restart your device after installing. 30 | 31 | ## Windows 7/8 32 | 33 | On Windows 7/8, you may need to manually install extra updates. Please try: 34 | 35 | - 36 | - 37 | - 38 | - 39 | 40 | ## Video driver issues 41 | 42 | Please see [display issues](./display-issues.md). 43 | 44 | ## Multiple displays 45 | 46 | If you get a _LoadLibrary failed with error 126_, this may be caused by the 47 | toolkit Anki is built on having trouble with [multiple displays](https://forums.ankiweb.net/t/error-126-on-open-anki-desktop/13967). 48 | 49 | ## Antivirus/firewall software 50 | 51 | Third-party software on your machine may prevent Anki from loading. You can 52 | try adding an exception for Anki, or temporarily disabling your antivirus/firewall 53 | to see if it helps. 54 | 55 | ## Admin access 56 | 57 | Some users have reported that Anki did not run for them until they right-clicked 58 | on the Anki icon and chose "Run as administrator". Anki stores all of its data in 59 | your user folder, and should not need administrator privileges, but it's something 60 | you can try if you've exhausted other options. 61 | 62 | ## Multiple Anki installations present after updating 63 | 64 | If the update process leaves you with multiple Anki installs (such as within 65 | `C:\Program Files\Anki` and `C:\Program Files (x86)\Anki`), they may be left in a 66 | non-working state, and Anki may refuse to start without showing an error message. 67 | 68 | Try uninstalling all copies of Anki from your computer. To do this, find them in Windows Settings > Apps & features (or Apps > Installed apps) and uninstall, or run `uninstall.exe` in each Anki program 69 | folder. Afterward, install Anki again. 70 | 71 | ## Debugging 72 | 73 | Starting Anki from a terminal may reveal a bit more information about some 74 | errors. After installing the latest Anki version and ensuring all Windows 75 | updates are installed, instead of running Anki directly, press the Windows key (or open the Start menu), type `cmd`, and launch Command Prompt. When the terminal window opens, paste the following command, and press Enter. (The path will be different if Anki is installed in a location that is not the default.) 76 | 77 | ``` 78 | %LocalAppData%\Programs\Anki\anki-console.bat 79 | ``` 80 | 81 | Presumably Anki will fail to open like before, but the output in the terminal window may reveal something about 82 | what is causing the problem. 83 | 84 | ## If all else fails 85 | 86 | If you are unable to start Anki after trying the above workarounds, you have 87 | two remaining options: 88 | 89 | - You can try [running from Python](https://faqs.ankiweb.net/running-from-python.html). 90 | - You can try an older Anki version built with an older toolkit, such as 91 | [2.1.35-alternate](https://github.com/ankitects/anki/releases/tag/2.1.35), or [2.1.15](https://github.com/ankitects/anki/releases/tag/2.1.15). 92 | -------------------------------------------------------------------------------- /src/platform/linux/installing.md: -------------------------------------------------------------------------------- 1 | # Installing & Upgrading Anki on Linux 2 | 3 | 4 | 5 | ## Requirements 6 | 7 | The packaged version requires a recent 64 bit Intel/AMD Linux with glibc 2.36+, and common 8 | libraries like libwayland-client and systemd. If you are on a different 9 | architecture (e.g ARM/AArch64), or a barebones Linux distro, you will not be able to use the 10 | packaged version, but you may be able to use the [Python wheels](https://betas.ankiweb.net/#via-pypipip) 11 | instead. 12 | 13 | Debian and derivatives, such as Ubuntu and [Chromebooks with Linux enabled](https://support.google.com/chromebook/answer/9145439?), please use the following before 14 | installing: 15 | 16 | ```shell 17 | sudo apt install libxcb-xinerama0 libxcb-cursor0 libnss3 18 | ``` 19 | 20 | If Anki fails to start after installing, you may be [missing other libraries](./missing-libraries.md). 21 | 22 | If you're on Ubuntu 24.04 and Anki won't start, please see [this thread](https://forums.ankiweb.net/t/issues-running-on-ubuntu-24-04/40974). 23 | 24 | Anki's build system only supports glibc, so musl-based distros are not currently supported. 25 | 26 | ## Installing 27 | 28 | To install Anki: 29 | 30 | 1. Download Anki from to your Downloads folder. 31 | 2. If zstd is not already installed on your system, you'll need to install it (e.g `sudo apt install zstd`). 32 | 3. Open a terminal and run the following commands, replacing the filename as appropriate. 33 | 34 | ```shell 35 | tar xaf Downloads/anki-2XXX-linux-qt6.tar.zst 36 | cd anki-2XXX-linux-qt6 37 | sudo ./install.sh 38 | ``` 39 | 40 | On some Linux systems, you may need to use `tar xaf --use-compress-program=unzstd`. 41 | 42 | 4. You can then start Anki by typing `anki` and hitting Enter. If you encounter 43 | any issues, please see the links on the left. 44 | 45 | ## Upgrading 46 | 47 | If you were running Anki from a .deb/.rpm/etc in the past, please make 48 | sure to remove the system version before installing the package 49 | provided here. 50 | 51 | If you're upgrading from a previous package, simply repeat the 52 | installation steps to upgrade to the latest version. Your user data 53 | will be preserved. 54 | 55 | If you wish to downgrade to a previous version, please make sure you 56 | [downgrade first](http://changes.ankiweb.net). 57 | 58 | ## Add-on Compatibility 59 | 60 | Some add-ons may not always work with the latest Anki release. If you upgrade to 61 | the latest Anki version and find an add-on you cannot live without stops working, 62 | you can download older Anki versions from the [releases page](https://github.com/ankitects/anki/releases). 63 | 64 | ## System Qt versions 65 | 66 | Anki's launcher uses the official PyQt builds by default. This makes it easier to 67 | install Anki on distros that don't have the relevant Python/Qt versions, but means that 68 | you may not have access certain Qt features provided by your Linux distro, such as certain 69 | Qt themes, support for the FCITX input method, etc. 70 | 71 | If your Linux distro provides up-to-date Anki packages, you may find using them easiest. 72 | 73 | If it doesn't, advanced users may wish to combine Anki's launcher with their system's Qt version. 74 | To do this, your system needs to have a Python version Anki supports (soon to be 3.11+), 75 | and suitable PyQt libraries (6.2+). 76 | 77 | WARNING: This is an experimental feature, and your system's Qt may fix some bugs while 78 | introducing others. 79 | 80 | 1. Install Python and the relevant PyQt packages. On Ubuntu: 81 | 82 | > sudo apt install python3-pyqt6.qtwebengine 83 | 84 | 1. If you previously used the launcher, `rm -rf ~/.local/share/AnkiProgramFiles`. 85 | 86 | 1. Untar the launcher, and cd to its folder. 87 | 88 | 1. Run `touch system_qt` to create a system_qt file in that folder. 89 | 90 | 1. Install Anki via ./anki or ./install.sh. In the list of installed packages, 91 | you should not see any mention of PyQt6. 92 | 93 | ## Problems 94 | 95 | If you encounter any issues when installing or starting Anki, please see the 96 | following pages: 97 | 98 | - [Missing Libraries](missing-libraries.md) 99 | - [Display Issues](display-issues.md) 100 | - [Blank Main Window](blank-window.md) 101 | - [Linux Distro Packages](distro-packages.md) 102 | - [Incorrect GTK Theme](gtk-theme.md) 103 | - [Wayland](wayland.md) 104 | - [Input Methods](input-methods.md) 105 | -------------------------------------------------------------------------------- /src/templates/errors.md: -------------------------------------------------------------------------------- 1 | # Checks and Errors 2 | 3 | 4 | 5 | When you save changes to a note type or export a deck, Anki 2.1.45+ checks 6 | for some common errors. These errors will cause issues later on when anyone studies 7 | the affected cards, so Anki won't let you proceed before you have fixed them. 8 | 9 | ## Basics 10 | 11 | Please see [Key Concepts](../getting-started.md#key-concepts) before reading further. 12 | 13 | Most of the errors below will require you to modify your note type/card template. To do so: 14 | 15 | - Open the Browse screen, and look at the items on the left. 16 | - Locate the note type mentioned in error message. You can use the search bar at the top left 17 | if necessary. 18 | - Click on the note type, to show its cards/notes on the right. 19 | - Click the Cards... button at the top of the editing area to open the [templates screen](./intro.md#the-templates-screen). 20 | 21 | ## Specific Issues 22 | 23 | ### Template Syntax Error 24 | 25 | This kind of error indicates an incorrect usage of the [field replacement](./fields.md) 26 | syntax. 27 | 28 | You can correct mistakes on the template by opening the card templates screen: 29 | 30 | - On the computer version, edit a problem card, and then click on the Cards... button 31 | - On AnkiMobile, while viewing a problem card in the study screen, tap the cog/gear, then Card Template. 32 | 33 | When you correct a mistake, it will update all cards of that type - you do not need to make the same change for every card that uses the template. 34 | 35 | What needs changing will depend on the message you are getting. 36 | 37 | **Found '{{Field}}', but there is no field called 'Field'** 38 | 39 | This indicates your template includes the name of a field that doesn't exist. To fix the problem, locate the 40 | `{{Field}}` inside the card template, and remove it. 41 | 42 | **Missing }} in {{Field** 43 | 44 | This message is shown when {{ is found in the template without a matching }}. For example, if you have 45 | 46 | ``` 47 | {{Field 48 | ``` 49 | 50 | then this needs to be changed to 51 | 52 | ``` 53 | {{Field}} 54 | ``` 55 | 56 | **Missing {{/Field}}** 57 | 58 | This means Anki found `{{#Field}}` or `{{^Field}}` in your card template, without a matching `{{/Field}}`. Removing `{{#Field}}` or `{{^Field}}` from the template will fix the error. 59 | 60 | **Found {{/One}}, but expected {{/Two}}** 61 | 62 | Conditional replacements need to be closed in the same order they are opened. For example, the following template is incorrect: 63 | 64 | ``` 65 | {{#One}} 66 | {{#Two}} 67 | {{Three}} 68 | {{/One}} 69 | {{/Two}} 70 | ``` 71 | 72 | To fix the problem, the template should be changed like so: 73 | 74 | ``` 75 | {{#One}} 76 | {{#Two}} 77 | {{Three}} 78 | {{/Two}} 79 | {{/One}} 80 | ``` 81 | 82 | **Found {{/Field}}, but missing '{{#Field}}' or '{{^Field}}'** 83 | 84 | Closing tags must be matched by opening tags. For example, the following is invalid, because there is no `{{#Two}}` or `{{^Two}}` at the start: 85 | 86 | ``` 87 | {{Field}} 88 | {{/Two}} 89 | ``` 90 | 91 | It can be fixed by removing the closing tag: 92 | 93 | ``` 94 | {{Field}} 95 | ``` 96 | 97 | ### Identical Front Sides 98 | 99 | You have Anki configured to create two identical questions for each input. This can 100 | happen if you add a new card type without making any adjustments to it. Identical 101 | cards double your workload, and make Anki's scheduling less effective. 102 | 103 | To fix this, open the [templates screen](./intro.md#the-templates-screen), and 104 | select one of the duplicates at the top. Then use the button on the top right to 105 | remove the selected card type. This will delete all the duplicate cards/notes that 106 | were using the card type as well. 107 | 108 | ### Front of Card is Blank 109 | 110 |
111 | 112 | Anki displays cards by combining the fields you've entered with a 113 | template that says which fields should appear on the front and back of your cards. If you receive a 114 | message that a card has a blank front, it means either none of the fields included on your front template have any text in them, or you have fields that have text, 115 | but none are included on the front template. 116 | You can fix this problem by editing the card on the computer version, clicking on **Cards...**, 117 | and checking to make sure at least one field with some text on it is included on the front template. 118 | You can add extra fields with the Add Field button. 119 | 120 | If you are using the Cloze note type, 121 | please make sure you've included one or more cloze deletions in the Text field, e.g. {{c1::some cloze-deleted text}}. 122 | 123 | If you're using the type-in-the-answer functionality, please make sure you've included another field on the front side as well. 124 | 125 | ### No Cloze Filter on Cloze Note Type 126 |
127 | 128 | A Cloze note type's front and back templates should have a [cloze](../editing.md#cloze-deletion) 129 | filter. If one is missing, you will need to add it back so that Anki can create cloze cards 130 | correctly. 131 | 132 | #### Single empty cards 133 | 134 | When making clozes, each cloze number is turned into a separate card. For example, the following will create three cards: 135 | 136 | ``` 137 | {{c1::This}} is a {{c2::sample}} {{c3::sentence}}. 138 | ``` 139 | 140 | If you later edit the text, and either remove or change a cloze number, the previously created card may become blank. For example: 141 | 142 | ``` 143 | {{c1::This}} is a {{c2::sample}} 144 | ``` 145 | 146 | and 147 | 148 | ``` 149 | {{c1::This}} is a {{c2::sample}} {{c1::sentence}}. 150 | ``` 151 | 152 | are both changes that would make card 3 blank. When you view card 3, you'll see a message indicating that the card is blank, and can be cleaned up with the Empty Cards function. You can access that function via the Tools menu of the computer version's main window, and use it to remove blank cards. Please check the reported empty cards first, and if in doubt, create a backup with the File>Export menu item before proceeding. 153 | 154 | #### All cloze cards empty 155 | 156 | If you accidentally modify your card template, it may prevent any cloze deletions from appearing. If that has happened, please edit one such problem card, and note down the name of the first field - it is usually called "Text". Then, please: 157 | 158 | - Click on the Cards... button 159 | - Replace the front text with 160 | 161 | ``` 162 | {{cloze:Text}} 163 | ``` 164 | 165 | - Replace the back text with the same. 166 | 167 | If your field was called something other than Text, replace Text with the name of the field. 168 | -------------------------------------------------------------------------------- /src/preferences.md: -------------------------------------------------------------------------------- 1 | # Preferences 2 | 3 | 4 | 5 | The preferences are available from the **Tools** menu on Windows/Linux, or 6 | the **Anki** menu on a Mac. 7 | 8 | ## Appearance 9 | 10 | ### General 11 | 12 | **Language**\ 13 | Change your display language. You can help to improve translations [here](https://translating.ankiweb.net/) 14 | 15 | ### User Interface 16 | 17 | **Theme**\ 18 | Dark (night) mode will make Anki's interface dark, and will cause cards to be shown as white text on a 19 | black background. Some card templates may need to be modified to work 20 | properly with this option enabled - please see [night mode styling](templates/styling.md#night-mode) for more information. 21 | 22 | From 2.1.50+ there is an option to switch to day or night mode automatically. 23 | 24 | **User interface size**\ 25 | If you find that the interface elements are too small for you, you can 26 | try to increase this setting. 27 | 28 | **Reset Window Sizes**\ 29 | This will reset all window sizes and locations to the default settings. 30 | 31 | **Video driver**\ 32 | Anki's libraries need a video driver to draw content on the screen. 33 | Due to different hardware and software configurations, the driver that 34 | works best on your machine may vary. Software tends to be slower, but will 35 | work on some systems where the other options do not. 36 | 37 | Note: If you're on Windows, please check [this page](./platform/windows/display-issues.md) as well. 38 | 39 | ### Distractions 40 | 41 | These options allow you to remove some unnecessary elements from the screen during reviews. You can: 42 | 43 | - Hide the top and bottom bar during reviews. 44 | - Enable the "minimalist" mode, making the interface more compact/less fancy. 45 | - Reduce motion, to disable some transitions/animations. 46 | - Switching between native styling and the Anki theme (only on Mac/Linux). 47 | 48 | ## Review 49 | 50 | ### Scheduler 51 | 52 | **Next day starts at**\ 53 | Controls when Anki should start showing the next day’s cards. The default 54 | setting of 4AM ensures that if you’re studying around midnight, you won’t have 55 | two days' worth of cards shown to you in one session. If you stay up very late 56 | or wake up very early, you may want to adjust this to a time you’re usually 57 | sleeping. Note that the start of the next day is relative to your current time zone. 58 | Also note that any cards that cross a day boundary [will appear at the start of 59 | the day they are scheduled for](./deck-options.md#day-boundaries), just like review cards do. 60 | 61 | **Learn ahead limit**\ 62 | Tells Anki how to behave when there is nothing left to study in the current deck 63 | but cards in learning. The default setting of 20 minutes tells Anki that cards 64 | should be shown early if they have a delay of less than 20 minutes and there’s 65 | nothing else to do. If you set this to 0, Anki will always wait the full delay, 66 | showing the congratulations screen until the remaining cards are ready to be 67 | reviewed. 68 | 69 | **Timebox time limit**\ 70 | Timeboxing is a technique to help you focus by dividing a longer activity (such 71 | as a 30 minute study session) into smaller blocks. If you set the timebox time 72 | limit to a non-zero number of minutes, Anki will periodically show you how many 73 | cards you’ve managed to study during the prescribed time limit. 74 | 75 | ### Review 76 | 77 | **Show play buttons on cards with audio**\ 78 | Whether a clickable (re)play button will be shown in the study screen 79 | for cards with audio. 80 | 81 | **Interrupt current audio when answering**\ 82 | Whether a currently playing audio file should be stopped when answering 83 | a card. 84 | 85 | **Show remaining card count**\ 86 | Disable this option to hide the card count at the bottom of the screen. 87 | 88 | **Show next review time above answer buttons**\ 89 | Useful to know how far in the future your cards are being pushed. 90 | 91 | **Spacebar (or enter) also answers card**\ 92 | Defines whether a press on Space or Enter answers cards. 93 | 94 | ## Editing 95 | 96 | ### Editing 97 | 98 | **Paste clipboard images as PNG**\ 99 | By default Anki pastes images on the clipboard as JPG files, to save disk space. 100 | You can use the option to paste as PNG images instead. PNG images support 101 | transparent backgrounds and are lossless, but they usually result in much larger 102 | file sizes. 103 | 104 | **Paste without Shift strips formatting**\ 105 | By default, formatting like bold and colors are kept when pasting, 106 | unless the Shift key is held down. This option reverses the behaviour. 107 | 108 | **Default deck**\ 109 | Controls how note types and decks interact. The default option **When adding, default 110 | to current deck** means that Anki saves the last-used note type for each deck and 111 | selects it again the next time you choose the deck (and, in addition, will 112 | start with the current deck selected when choosing **Add** from anywhere). The other 113 | option, **Change deck depending on note type**, saves the last-used deck for each 114 | note type (and opens the add window to the last-used note type when you choose 115 | **Add**). This may be more convenient if you always use a single note type for each 116 | deck. 117 | 118 | The last used deck/note type is updated when you add a card. If you change the deck 119 | and close the add window without adding a card, it won't be saved. 120 | 121 | ### Browsing 122 | 123 | **Default search text**\ 124 | Allows you to customize the starting search text in the browser (eg, to start 125 | with "deck:current"). 126 | 127 | **Ignore accents in search (slower)**\ 128 | When enabled, simple text searches automatically [ignore accents](./searching.md#ignoring-accentscombining-characters). 129 | 130 | ## Syncing 131 | 132 | This tab contains options related to syncing with AnkiWeb. 133 | 134 | ### Synchronisation 135 | 136 | **Synchronize audio and images too**\ 137 | When enabled, media will also be synced with AnkiWeb. 138 | 139 | **Automatically sync on profile open/close**\ 140 | Disable this if you don't want an automatic sync with AnkiWeb when opening / closing a [profile](./profiles.md). 141 | 142 | **Periodically sync media** 143 | 144 | **On next sync, force changes in one direction**\ 145 | When this option is enabled, the next sync will 146 | ask you whether you wish to upload or download. This is useful if 147 | you have made some changes accidentally, and wish to overwrite them 148 | with an older version that is on AnkiWeb. 149 | 150 | ### AnkiWeb Account 151 | 152 | When logged in, clicking on **Log Out** will log you out. 153 | 154 | ### Self-hosted Sync Server 155 | 156 | For info on the custom sync server option, see [this section](./sync-server.md). 157 | 158 | ## Backups 159 | 160 | Please see [this](backups.md#automatic-backups) section of the manual. 161 | -------------------------------------------------------------------------------- /src/sync-server.md: -------------------------------------------------------------------------------- 1 | # Self-Hosted Sync Server 2 | 3 | Advanced users who cannot or do not wish to use AnkiWeb can use a self-hosted 4 | sync server instead. 5 | 6 | Things to be aware of: 7 | 8 | - This is an advanced feature, targeted at users who are comfortable with 9 | networking and the command line. If you use this, the expectation is you 10 | can resolve any setup/network/firewall issues you run into yourself, and 11 | use of this is entirely at your own risk. 12 | - Newer clients may depend on changes to the sync protocol, so syncing may 13 | stop working if you update your Anki clients without also updating the server. 14 | - Third-party sync servers also exist. No testing is done against them, and 15 | they tend to take time to catch up when the sync protocol changes, so they 16 | are not recommended. 17 | - The messages inside Anki will use the term "AnkiWeb" even if a custom server 18 | has been configured, (e.g. "Cannot connect to AnkiWeb" when your server is down). 19 | 20 | ## Installing/Running 21 | 22 | There are various ways you can install and run the server. You can use either: 23 | 24 | - the sync server bundled with the desktop version of Anki 25 | - a separate minimal sync server that doesn't include Anki's GUI dependencies. Python and Rust implementations are available. 26 | 27 | ### From a Packaged Build 28 | 29 | This uses the sync server built into the desktop version of Anki as of version 2.1.57+. 30 | 31 | On Windows in a cmd.exe session: 32 | 33 | ``` 34 | set SYNC_USER1=user:pass 35 | "\Program Files\anki\anki-console" --syncserver 36 | ``` 37 | 38 | Or MacOS, in Terminal.app: 39 | 40 | ``` 41 | SYNC_USER1=user:pass /Applications/Anki.app/Contents/MacOS/launcher --syncserver 42 | ``` 43 | 44 | Replace 'launcher' with 'anki' for old packaged builds prior to 25.07. 45 | 46 | Or Linux: 47 | 48 | ``` 49 | SYNC_USER1=user:pass anki --syncserver 50 | ``` 51 | 52 | ### With Pip 53 | 54 | To avoid downloading desktop Anki's GUI dependencies, you can run a standalone Anki sync server using a Python package downloaded from PyPI instead. 55 | Make sure you have Python 3.9+ installed. 56 | 57 | ``` 58 | python3 -m venv ~/syncserver 59 | ~/syncserver/bin/pip install anki 60 | SYNC_USER1=user:pass ~/syncserver/bin/python -m anki.syncserver 61 | ``` 62 | 63 | ### With Cargo 64 | 65 | From Anki 2.1.66+, you can alternatively build a Rust implementation of the standalone sync server using the below command. 66 | Make sure you have Rustup installed. 67 | 68 | ``` 69 | cargo install --locked --git https://github.com/ankitects/anki.git --tag 25.02.5 anki-sync-server 70 | ``` 71 | 72 | Replace 25.02.5 with whatever the latest Anki version is. 73 | 74 | Protobuf (protoc) will need to be installed. 75 | 76 | After building, you can run it with: 77 | 78 | ``` 79 | SYNC_USER1=user:pass anki-sync-server 80 | ``` 81 | 82 | ### From a source checkout 83 | 84 | If you've cloned the Anki repo from GitHub, you can install from there: 85 | 86 | ``` 87 | ./ninja extract:protoc ftl_repo 88 | cargo install --path rslib/sync 89 | ``` 90 | 91 | ### With Docker 92 | 93 | You can find a user-contributed Dockerfile and some instructions 94 | [here](https://github.com/ankitects/anki/tree/main/docs/syncserver). 95 | 96 | ## Multiple Users 97 | 98 | `SYNC_USER1` declares the first user and password, and must be set. 99 | You can optionally declare `SYNC_USER2`, `SYNC_USER3` and so on, if you 100 | wish to set up multiple accounts. 101 | 102 | ## Hashed Passwords 103 | 104 | Advanced users may wish to use hashed passwords instead of plain text 105 | passwords. If you wish to do this, you'll need to use a separate tool (such as 106 | [this one](https://git.sr.ht/~laalsaas/pbkdf2-password-hash)) to generate a 107 | password hash. You can then tell the server to expect hashed passwords by 108 | setting the env var PASSWORDS_HASHED to 1 (or any other value). 109 | 110 | When hashed passwords are used, SYNC_USER variables are expected to be in 111 | username:password_hash format, where password_hash is a hash of the password in 112 | the PHC Format. 113 | 114 | ## Storage Location 115 | 116 | The server needs to store a copy of your collection and media in a folder. 117 | By default it is ~/.syncserver; you can change this by defining 118 | a `SYNC_BASE` environment variable. 119 | 120 | - This must not be the same location as your normal Anki data folder, as the 121 | server and client must store separate copies. 122 | - You must sync your data to the server, not manually copy files into the 123 | server folder. 124 | 125 | ## Public Access 126 | 127 | The server listens on an unencrypted HTTP connection, so it's not a good 128 | idea to expose it directly to the internet. You'll want to either restrict 129 | usage to your local network, or place some form of encryption in front of 130 | the server, such as a VPN (Tailscale is apparently easy), or a HTTPS 131 | reverse proxy. 132 | 133 | You can define `SYNC_HOST` and `SYNC_PORT` to change the host and port 134 | that the server binds to. 135 | 136 | ## Client Setup 137 | 138 | You'll need to determine your computer's network IP address, and then 139 | point each of your Anki clients to the address, e.g something like 140 | `http://192.168.1.200:8080/`. The URL can be configured in the preferences. 141 | 142 | If you're using AnkiMobile and are unable to connect to a server on your local 143 | network, please go into the iOS settings, locate Anki near the bottom, and 144 | toggle "Allow Anki to access local network" off and then on again. 145 | 146 | Older desktop clients required you to define `SYNC_ENDPOINT` and 147 | `SYNC_ENDPOINT_MEDIA`. If using an older client, you'd put it as e.g. 148 | `http://192.168.1.200:8080/sync/` and `http://192.168.1.200:8080/msync/` 149 | respectively. AnkiDroid clients before 2.16 require separate configuration for 150 | the two endpoints. 151 | 152 | ## Reverse Proxies 153 | 154 | If using a reverse proxy to provide HTTPS access (e.g. nginx), and binding to a subpath 155 | (e.g. `http://example.com/custom/` -> `http://localhost:8080/`), you must make sure to 156 | include a trailing slash when configuring Anki. If you put `http://example.com/custom` 157 | instead, it will not work. 158 | 159 | On iOS, TLS 1.3 is not supported, so your reverse proxy will need to have TLS 1.2 160 | enabled, or you'll get an "error code -9836". 161 | 162 | ## Large Requests 163 | 164 | The standard AnkiWeb limit on uploads is applied by default. You can optionally 165 | set `MAX_SYNC_PAYLOAD_MEGS` to something greater than 100 if you wish to 166 | increase the limit. Bear in mind that if you're using a reverse proxy, you may 167 | need to adjust the limit there as well. 168 | 169 | ## Contributing Changes 170 | 171 | Because this server is bundled with Anki, simplicity is a design goal - it is 172 | targeted at individual/family use, and PRs that add things like a REST API or 173 | external databases are unlikely to be accepted at this time. If in doubt, please 174 | reach out before starting work on a PR. 175 | 176 | If you're looking for an existing API solution, the AnkiConnect add-on may 177 | meet your needs. 178 | -------------------------------------------------------------------------------- /src/background.md: -------------------------------------------------------------------------------- 1 | # Background 2 | 3 | 4 | 5 | Anki is a program which makes remembering things easy. Because it is a 6 | lot more efficient than traditional study methods, you can either 7 | greatly decrease your time spent studying, or greatly increase the 8 | amount you learn. 9 | 10 | Anyone who needs to remember things in their daily life can benefit from 11 | Anki. Since it is content-agnostic and supports images, audio, videos 12 | and scientific markup, the possibilities are endless. For 13 | example: 14 | 15 | - Learning a language 16 | 17 | - Studying for medical and law exams 18 | 19 | - Memorizing names and faces of people 20 | 21 | - Brushing up on geography 22 | 23 | - Mastering long poems 24 | 25 | - Even practising guitar chords! 26 | 27 | There are two simple concepts behind Anki: **active recall testing** and 28 | **spaced repetition**. They are not known to most learners, despite being well-documented in scientific literature. 29 | Understanding how these concepts work will make you a more effective learner. 30 | 31 | ## Active Recall Testing 32 | 33 | _Active recall testing_ means being asked a question and trying to 34 | remember the answer. This is in contrast to _passive study_, where we 35 | read, watch, or listen to something without pausing to consider if we 36 | know the answer. Research has shown that active recall testing is far 37 | more effective at building strong memories than passive study. There are 38 | two reasons for this: 39 | 40 | - The act of recalling something _strengthens_ the memory, increasing 41 | the chances we’ll be able to remember it again. 42 | 43 | - When we're unable to answer a question, it tells us we need to 44 | return to the material to review or relearn it. 45 | 46 | You have probably encountered active recall testing in your school years 47 | without even realizing it. When good teachers give you a series of 48 | questions to answer after reading an article, or make you take weekly 49 | tests, they are not doing it simply to see if you 50 | understood the material or not. By testing you, they are increasing the 51 | chances you will be able to remember the material in the future. 52 | 53 | A good way to integrate active recall testing into your own studies is 54 | to use _flashcards_. With traditional paper flashcards, you write a 55 | question on one side of a card, and the answer on the other side. By not 56 | turning the card over until you've recalled the answer, you can 57 | learn things more effectively than passive observation allows. 58 | 59 | ## Use It or Lose It 60 | 61 | Our brains are efficient machines, and they rapidly forget information 62 | that doesn't seem useful. Chances are that you don't remember what you 63 | had for dinner on Monday two weeks ago, because this information is not 64 | usually useful. However, if you went to a fantastic restaurant that day and have spent 65 | the last two weeks telling people about how great it was, 66 | you're likely to still remember it in vivid detail. 67 | 68 | The brain's "use it or lose it" policy applies to everything we learn. 69 | If you spend an afternoon memorizing some science terms, and then don't 70 | think about that material for two weeks, you'll probably have forgotten 71 | most of it. In fact, studies show we forget about 75% of material learned 72 | within a 48 hour period. This can seem pretty depressing when you need 73 | to learn a lot of information! 74 | 75 | However, the solution is simple: _review_. By reviewing newly-learned 76 | information, we can greatly reduce forgetting. 77 | 78 | The only problem is that traditionally, reviewing has not been very practical. If 79 | you are using paper flashcards, it's easy to flick through all of them 80 | if you only have 30 of them to review, but as the number grows to 300 or 81 | 3000, it quickly becomes unmanageable. 82 | 83 | ## Spaced Repetition 84 | 85 | The _spacing effect_ was reported in 1885 by a German psychologist called Hermann Ebbinghaus. He 86 | observed that we tend to remember things more effectively, if we spread 87 | reviews out over time, instead of studying multiple times in one 88 | session. Since the 1930s, there have been a number of proposals for 89 | utilizing the spacing effect to improve learning, in what has come to be 90 | called _spaced repetition_. 91 | 92 | One example was in 1972, when a German scientist called Sebastian Leitner 93 | popularized a method of spaced repetition with paper flashcards. By 94 | separating the paper cards into a series of boxes, and moving the 95 | cards to a different box on each successful or unsuccessful review, it 96 | was possible to see at a glance a rough estimate of how well a card was 97 | known and when it should be reviewed again. This was a great improvement 98 | over a single box of cards, and it has been widely adopted by 99 | computerized flashcard software. It is a rather rough approach however, 100 | as it cannot give you an exact date on which you should review something 101 | again, and it does not work very well with material of varying 102 | difficulty. 103 | 104 | The biggest developments in the last 30 years have come from the authors 105 | of SuperMemo, a commercial flashcard program that implements spaced 106 | repetition. SuperMemo pioneered the concept of a system that keeps track 107 | of the ideal time to review material and optimizes itself based on the 108 | performance of the user. 109 | 110 | In SuperMemo's spaced repetition system, every time you answer a 111 | question, you tell the program how well you were able to remember it — 112 | whether you forgot completely, made a small mistake, remembered with 113 | trouble, remembered easily, etc. The program uses this feedback to 114 | decide the optimal time to show you the question again. Because a memory 115 | gets stronger each time you successfully recall it, the time between 116 | reviews gets longer and longer — so you may see a question for the first 117 | time today, then 3 days later, 15 days later, 45 days later, and so on. 118 | 119 | This was a revolution in learning, as it meant material could be learned 120 | and retained with the absolute minimum amount of effort necessary. 121 | SuperMemo's slogan sums it up: with spaced repetition, you can: "forget 122 | about forgetting". 123 | 124 | ## Why Anki? 125 | 126 | While there is no denying the huge impact SuperMemo has had on the 127 | field, it is not without its problems. The program is often criticized 128 | for being buggy and difficult to navigate. It only runs on Windows 129 | computers. It is proprietary software, meaning that end-users cannot extend it 130 | or access the raw data. And while very old versions have been made available 131 | for free, they are quite limited for modern use. 132 | 133 | Anki addresses these issues. There are free clients for Anki available 134 | on many platforms, so struggling students and teachers with budgetary 135 | constraints are not left out. Anki is open source, with an already 136 | flourishing library of add-ons contributed by end-users. It is 137 | multi-platform, running on Windows, macOS, Linux/FreeBSD, and some 138 | mobile devices. And it is considerably easier to use than SuperMemo. 139 | 140 | Anki's spaced repetition system is based on an older version of the 141 | SuperMemo algorithm called [SM-2](https://faqs.ankiweb.net/what-spaced-repetition-algorithm). Recently, a new algorithm called [FSRS](https://docs.ankiweb.net/deck-options.html?highlight=FSRS#fsrs) has been integrated as an alternative to the legacy SM-2 algorithm. 142 | -------------------------------------------------------------------------------- /src/templates/generation.md: -------------------------------------------------------------------------------- 1 | # Card Generation 2 | 3 | 4 | 5 | ## Reverse Cards 6 | 7 | You can watch [a video about reversing cards](http://www.youtube.com/watch?v=DnbKwHEQ1mA&yt:cc=on) on YouTube. 8 | 9 | If you want to create cards that go in both directions (e.g., both 10 | “ookii”→“big” and “big”→“ookii”), you have several options. The simplest 11 | is to select the “Basic (and reversed card)” built-in note type. This 12 | will generate two cards, one in each direction. 13 | 14 | If you want to generate reverse cards for only some of your material 15 | (perhaps you only want to take the time to study reverses for the most 16 | important material, or some of your cards don’t make sense reversed), 17 | you can select the “Basic (optional reversed card)” note type. This note 18 | type generates a forward-only card when you fill in only the first two 19 | fields; if you additionally enter something in the “Add Reverse” field 20 | (like a "y"), Anki will generate a reverse card as well. The contents of 21 | this field will never be displayed on a card. 22 | 23 | ## Card Generation & Deletion 24 | 25 | Anki will not create cards with empty front sides. Thus if “My Field” 26 | was empty, and one card’s front template included only that field, the 27 | card would not be created. 28 | 29 | When you edit a previously added note, Anki will automatically create 30 | extra cards if they were previously blank but no longer are. If your 31 | edits have made some cards blank when they previously were not, however, 32 | Anki will not delete them immediately, as that could lead to accidental 33 | data loss. To remove the empty cards, go to Tools → Empty Cards in the 34 | main window. You will be shown a list of empty cards and be given the 35 | option to delete them. 36 | 37 | Because of the way that card generation works, it is not possible to 38 | manually delete individual cards, as they would just end up being recreated 39 | the next time the note was edited. Instead, you should make the 40 | relevant conditional replacement fields empty and then use the Empty 41 | Cards option. 42 | 43 | Anki does not consider special fields or non-field text for the purposes 44 | of card generation. Thus if your front template looked like the 45 | following, no card would be generated if Country was empty: 46 | 47 | Where is {{Country}} on the map? 48 | 49 | ## Selective Card Generation 50 | 51 | Sometimes you may want to generate extra cards for only some of your 52 | material, such as testing your ability to recall the most important 53 | words of a set. You can accomplish this by adding an extra field to your 54 | note, and adding some text into it (such as "1") on the notes you want 55 | the extra card. Then in the card template, you can make the card’s 56 | creation depend on that field being non-empty. For more information on 57 | this, please see the conditional replacement section below. 58 | 59 | ## Conditional Replacement 60 | 61 | It is possible to include certain text, fields, or HTML on your cards 62 | only if a field is empty or not empty. An example: 63 | 64 | This text is always shown. 65 | 66 | {{#FieldName}} 67 | This text is only shown if FieldName has text in it 68 | {{/FieldName}} 69 | 70 | {{^FieldName}} 71 | This text is only shown if FieldName is empty 72 | {{/FieldName}} 73 | 74 | A real life example is only showing a label if the field is not empty: 75 | 76 | {{#Tags}} 77 | Tags: {{Tags}} 78 | {{/Tags}} 79 | 80 | Or say you want to display a specific field in blue on the front of your 81 | card if there are extra notes on the back (perhaps the fact that there 82 | are notes serves as a reminder that you should spend more time thinking 83 | about the answer). You can style the field as follows: 84 | 85 | {{#Notes}} 86 | 87 | {{/Notes}} 88 | 89 | {{FieldToFormat}} 90 | 91 | {{#Notes}} 92 | 93 | {{/Notes}} 94 | 95 | You can also use conditional replacement to control which cards are 96 | generated. This works since Anki will not generate 97 | cards which would have a blank front side. For 98 | example, consider a card with two fields on the front: 99 | 100 | {{Expression}} 101 | {{Notes}} 102 | 103 | Normally a card would be generated if either the expression or notes 104 | field had text in it. If you only wanted a card generated if expression 105 | was not empty, then you could change the template to this: 106 | 107 | {{#Expression}} 108 | {{Expression}} 109 | {{Notes}} 110 | {{/Expression}} 111 | 112 | And if you wanted to require both fields, you could use two conditional 113 | replacements: 114 | 115 | {{#Expression}} 116 | {{#Notes}} 117 | {{Expression}} 118 | {{Notes}} 119 | {{/Notes}} 120 | {{/Expression}} 121 | 122 | Keep in mind that this only works when you place the 123 | conditional replacement code on the _front_ of the card; if you do this 124 | on the back, you will simply end up with cards with a blank back side. 125 | Similarly, since this works by checking if the front field would be 126 | empty, it is important to make sure you wrap the "entire" front side in 127 | the conditional replacement; for instance, the following would not work 128 | as expected: 129 | 130 | {{#Expression}} 131 | {{Expression}} 132 | {{/Expression}} 133 | {{Notes}} 134 | 135 | ## Blank Back Sides 136 | 137 | Card generation only looks at the front side of the card. For example, if you have a 138 | front template: 139 | 140 | {{Field 1}} 141 | 142 | and a back template: 143 | 144 | {{Field 2}} 145 | 146 | Then a card will be generated if Field 1 is non-empty. If Field 2 is empty, the card 147 | will still be generated, and you will get a blank back side. 148 | 149 | If you wish to avoid a blank back side, you will need to place a required field 150 | on the front template as a conditional, like so: 151 | 152 | {{#Field 2}} 153 | {{Field 1}} 154 | {{/Field 2}} 155 | 156 | This will ensure the card is generated only if both Field 2 and Field 1 are non-empty. 157 | 158 | ## Adding Empty Notes 159 | 160 | When you add a new note in Anki, if the card 161 | templates and note fields combine to produce no cards, a blank card will be 162 | created using the first template. This allows you to add material even if it's 163 | incomplete, and modify it or the template later to make it valid. If you don't 164 | wish to keep an empty note, you can remove it with the Empty Cards function. 165 | 166 | ## Cloze Templates 167 | 168 | Please see the [cloze deletion](../editing.md#cloze-deletion) section for background info. 169 | 170 | The cloze note type functions differently from regular note types. 171 | Instead of a customizable number of card types, it has a single type 172 | which is shared by all cloze deletions on a note. 173 | 174 | As mentioned in the card generation section above, generation of regular 175 | cards depends on one or more fields on the question being non-empty. 176 | Cloze deletion note types are generated differently: 177 | 178 | - Anki looks on the front template for one or more cloze replacements, 179 | like {{cloze:FieldName}}. 180 | 181 | - It then looks in the FieldName field for all cloze references, like 182 | {{c1::text}}. 183 | 184 | - For each separate number, a card will be generated. 185 | 186 | Because card generation functions differently for cloze deletion cards, 187 | {{cloze:…​}} tags can not be used with a regular note type - they 188 | will only function properly when used with a cloze note type. 189 | 190 | Conditional generation provides a special field so you can check which 191 | card you are rendering. If you wanted to display the "hint1" field on 192 | the first cloze, and "hint2" field on the second cloze for example, you 193 | could use the following template: 194 | 195 | {{cloze:Text}} 196 | 197 | {{#c1}} 198 | {{Hint1}} 199 | {{/c1}} 200 | 201 | {{#c2}} 202 | {{Hint2}} 203 | {{/c2}} 204 | -------------------------------------------------------------------------------- /src/filtered-decks.md: -------------------------------------------------------------------------------- 1 | # Filtered Decks & Cramming 2 | 3 | 4 | 5 | When you study a regular deck in Anki, only a limited number of cards 6 | are shown: the cards Anki thinks you are about to forget, and a daily 7 | limit of new cards. This is generally useful, as it ensures you don't 8 | spend more time studying than necessary. But sometimes it can be useful 9 | to step outside of these normal limits, such as when you need to review 10 | for a test, focus on particular material, and so on. To make this 11 | possible, Anki provides a different type of deck called a "filtered 12 | deck". 13 | 14 | Filtered decks offer a lot of possibilities. They can be used for 15 | previewing cards, cramming cards before a test, studying particular 16 | tags, catching up on a backlog with a particular sort order, reviewing 17 | ahead of schedule, going over the day's failed cards, and more. 18 | 19 | ## Custom Study 20 | 21 | The easiest way to create a filtered deck is with the Custom Study 22 | button, which appears at the bottom of the screen when you click on a 23 | deck. It offers some convenient preset filters for common tasks like reviewing 24 | the cards that you have failed that day. It will create a filtered deck called 25 | "Custom Study Session" and automatically open it for you. 26 | 27 | If an existing "Custom Study Session" deck exists, it will be emptied 28 | before a new one is created. If you wish to keep a custom study deck, 29 | you can rename it from the deck list. 30 | 31 | Here is a summary of each of the options: 32 | 33 | **Increase today's new card limit**\ 34 | Add more new cards to the deck you are currently studying. Note that 35 | unlike other options, this does "not" create a new filtered deck, it 36 | modifies the existing deck. 37 | 38 | **Increase today's review card limit**\ 39 | If not all reviews due today were shown because of the daily review limit, 40 | this option allows you to show more of them. As with the new cards 41 | option, this modifies the existing deck. 42 | 43 | **Review forgotten cards**\ 44 | Show all the cards, for which you've answered Again (1) within the number of days 45 | you specify. 46 | 47 | **Review ahead**\ 48 | Show cards that will be due in the near future (the number of days you 49 | specify). This is useful for working through some of your older cards 50 | before a vacation, but it will not help with cards you have learned 51 | recently. Please see the [reviewing ahead](#reviewing-ahead) section 52 | below for more info. 53 | 54 | **Preview new cards**\ 55 | Show cards that you have recently added, without converting them to 56 | review cards as they are answered. 57 | 58 | **Study by card state or tag**\ 59 | Select a certain number of cards from the current deck to study. You can 60 | choose to select new cards only, due cards only, or all cards; after you 61 | click "Choose Tags", you can also limit the selected cards by tags. If 62 | you wish to see all the cards in the deck (for instance, to study before 63 | a big test), you can set the number of cards to more than the number of 64 | cards in the deck. 65 | 66 | ## Home Decks 67 | 68 | When a card is moved to a filtered deck, it retains a link to the deck, 69 | from which it came. That previous deck is said to be the card's "home 70 | deck". 71 | 72 | Cards automatically return to their home deck after they are studied in 73 | the filtered deck. This can be after a single review, or after multiple 74 | reviews, depending on your settings. 75 | 76 | It is also possible to move all cards back to their home decks at once: 77 | 78 | - The "Empty" button in the study overview moves all cards in the 79 | filtered deck back to their home deck, but does not delete the empty 80 | filtered deck. This can be useful if you want to fill it again later 81 | (using the Rebuild button). 82 | 83 | - Deleting a filtered deck does the same thing as "Empty" does, but 84 | also removes the emptied deck from the deck list. No cards are 85 | deleted when you delete a filtered deck. 86 | 87 | ## Creating Manually 88 | 89 | Advanced users can create filtered decks with arbitrary search strings 90 | (or "filters"), 91 | instead of relying on the preset filters. To create a filtered deck manually, 92 | choose Create Filtered Deck from the Tools menu. 93 | 94 | When you click the Build button, Anki finds cards that match the 95 | settings you specified, and temporarily moves them from their existing 96 | decks into your new filtered deck for study. 97 | 98 | If you wish to fetch cards again using the same filter options (for 99 | instance, if you want to study all cards with a particular tag every 100 | day), you can use the Rebuild button at the bottom of the deck's 101 | overview screen. 102 | 103 | The **search** area controls what cards Anki will gather. All of the 104 | searches possible in the browser are also possible for filtered decks, 105 | such as limiting to tags, finding cards forgotten a certain number of 106 | times, and so on. Please see the [searching](searching.md) section of the 107 | manual for more information on the different possibilities. 108 | 109 | Filtered decks cannot pull in cards that are suspended, buried, or already in a 110 | different filtered deck. For this reason, a search in the 111 | browser may reveal cards that do not end up in the filtered deck. 112 | 113 | The **limit** option controls how many cards will be gathered into the 114 | deck. The order you select controls both the order cards are gathered 115 | in, and the order they will be reviewed in. If you select "most lapses" 116 | and a limit of 20 for example, then Anki will show you only the 20 most 117 | lapsed cards. 118 | 119 | The **enable second filter** option allows you to create a filtered deck 120 | comprised of two different searches, so that you can, for example, include 121 | due cards with one order, and a smaller amount of new cards with a different order. 122 | 123 | ## Order 124 | 125 | The "cards selected by" option controls the order that cards will appear 126 | in. If the maximum number of cards you select is lower than the number 127 | of cards that match the filter criteria, Anki will exclude the cards at 128 | the end of this sorted list first. 129 | 130 | **Oldest seen first**\ 131 | Display those cards first, that you haven't seen in reviews for the longest 132 | time. 133 | 134 | **Random**\ 135 | Randomize the order of all cards that match the filter criteria (use no 136 | set order). 137 | 138 | **Increasing intervals**\ 139 | Display cards that have the smallest interval first. 140 | 141 | **Decreasing intervals**\ 142 | Display cards that have the largest interval first. 143 | 144 | **Most lapses**\ 145 | Display those cards first, that you have failed the most times. 146 | 147 | **Order added**\ 148 | Display cards that you added first (i.e. those cards that have the earliest 149 | creation date). 150 | 151 | **Order due**\ 152 | Display cards with the earliest due date first. 153 | 154 | **Latest added first**\ 155 | Display cards that you have most recently added to the deck first. 156 | (This is the opposite of "Order added".) 157 | 158 | **Relative overdueness**\ 159 | Display cards that you're most likely to have forgotten first. This is useful if 160 | you have a large backlog that may take some time to get through, and you want to 161 | reduce the chances of forgetting more cards. 162 | 163 | When using the SM-2 algorithm, overdueness is determined by comparing how 164 | overdue cards are, and how long their interval is. For example, a card with a 165 | current interval of 5 days that is overdue by 2 days, will display before a card 166 | with a current interval of 10 days that is overdue by 3 days. 167 | 168 | When using FSRS, overdueness is calculated based on on each card's retrievability, 169 | and the desired retention in the deck preset. 170 | 171 | ## Steps & Returning 172 | 173 | By default, Anki will use the steps of a card’s home deck. If a new card 174 | would normally be reviewed twice when being learned, the same thing will 175 | happen when you study it in a filtered deck. 176 | To learn about how (re)learning steps work, see [Deck Options](deck-options.md#learning-steps) section. 177 | 178 | Cards return to their home deck when (re)learning is complete. Thus if 179 | you have 3 learning steps, a new card will return to its home deck upon 180 | three presses of "Good" or a single press of "Easy". 181 | 182 | Filtered decks with rescheduling disabled show 4 buttons. The **Again**, **Hard**, and **Good** buttons have configurable delays. The **Easy** button removes cards from the filtered deck. 183 | 184 | ## Due Reviews 185 | 186 | If the filtered deck includes cards that were due for review, they will 187 | be shown like they would have been in their original deck: they appear 188 | in the review card count at the bottom of the screen, and there are four 189 | choices for how well you remembered. Upon a correct answer, the card 190 | will be moved back to its home deck, and its next delay adjusted using 191 | the home deck's settings. If you forget the card, it will be shown 192 | according to the relearning steps defined in the home deck. 193 | 194 | ## Reviewing Ahead 195 | 196 | If your search included cards that are not due, Anki will show the 197 | reviews ahead of time. 198 | 199 | Anki uses a special algorithm for these reviews that takes into account 200 | how early you are reviewing. If the cards were almost due to be shown, 201 | they will be given a new delay similar to what they would have received 202 | if you had reviewed them on time. If the cards are reviewed soon after 203 | they were scheduled however, their new delay will be similar to their 204 | previous delay. This calculation works on a sliding scale. 205 | 206 | Because reviewing a card shortly after it is scheduled has little impact 207 | on scheduling (e.g. a card due tomorrow with a one day interval will 208 | remain due tomorrow if reviewed early), **the "review ahead" custom 209 | study setting is not appropriate for repeated use**. If used to go 210 | through a week's worth of cards before a trip, the mature cards will be 211 | rescheduled into the future and the new cards will remain at small 212 | intervals, because you don't know them well enough for them to be 213 | rescheduled further. If you review ahead again the next day, all you'll 214 | end up doing is going through those same new cards again, to little 215 | benefit. 216 | 217 | ## Rescheduling 218 | 219 | By default, Anki will return cards to their home decks with altered scheduling, 220 | based on your performance in the filtered deck. 221 | 222 | To change this behaviour, turn off **Reschedule 223 | cards based on my answers**. When this is turned off, cards are shown in a simple "preview mode", and 224 | when they are returned to their original deck, they are returned exactly as they started. 225 | 226 | ## Catching Up 227 | 228 | Filtered decks can be useful for catching up when you've fallen behind 229 | in your reviews. One Anki user describes the way they use the filtered 230 | decks to catch up as follows: 231 | 232 | I did this for a backlog of 800 cards with filtered subdecks. Worked 233 | very well for me. 234 | 235 | Just Due filter with: "is:due prop:due>-7" 236 | 237 | Over Due filter with: "is:due prop:due<=-7" 238 | 239 | The Just Due deck will then contain cards that became due in the past 240 | week. That's the deck you should study every day as it gets the cards 241 | that become due regularly. With this you can study as if there weren't 242 | any backlog. 243 | 244 | The Over Due deck will contain your backlog — cards which you didn't 245 | study in time. You can study them the same way you would study new 246 | cards. They go back into the regular cards, so the number of overdue 247 | will never grow as long as you keep your Just Due deck in check. 248 | 249 | How long it takes depends on how many overdue cards you study each day 250 | in addition to the ones that become due regularly. You can still motor 251 | through them when you feel like it - or you can do a specific number per 252 | day like you would for new cards. Up to you. 253 | -------------------------------------------------------------------------------- /src/syncing.md: -------------------------------------------------------------------------------- 1 | # Syncing with AnkiWeb 2 | 3 | 4 | 5 | AnkiWeb is a service that allows you to keep your collection 6 | synchronized across multiple devices, and to study online. Please sign 7 | up for a [free account](https://ankiweb.net/) before following the steps 8 | below. 9 | 10 | ## Intro Videos 11 | 12 | For a quick introduction to syncing, please check out the 13 | [syncing intro videos](https://www.youtube.com/watch?v=YkiM4DPzSVc&list=PLGgmaKOIHykFoomqkBJAyGiDQ2kyiuTao&yt:cc=on). 14 | 15 | ## Setup 16 | 17 | To start syncing your collection across devices, click the sync button 18 | (the top right one on the [main screen](studying.md#decks), or press Y on your keyboard. 19 | You’ll be prompted for your AnkiWeb ID and password, which you created 20 | in the signup process. 21 | 22 | When you synchronize your collection for the first time, Anki will ask 23 | you if you want to upload or download. If you have cards on your 24 | computer and your AnkiWeb account is empty, choose **Upload** to send your 25 | data to AnkiWeb. If you have cards on AnkiWeb from another device, and 26 | no cards on your computer, choose **Download** to replace the empty local 27 | collection with the cards that are on AnkiWeb. If you have different 28 | cards on both devices, [more work is required](#merging-conflicts) to 29 | avoid losing data. 30 | 31 | Once the initial one-way sync is completed, Anki will be able to merge 32 | changes from multiple locations with a few exceptions. 33 | 34 | If you have multiple people using Anki on one machine and have created a 35 | profile for each user, each user will need to create their own AnkiWeb 36 | account to sync with. If you attempt to synchronize multiple profiles 37 | with a single AnkiWeb account, you will lose data. 38 | 39 | ## Automatic Syncing 40 | 41 | Once syncing is enabled, Anki will automatically sync each time your 42 | collection is closed or opened. If you would prefer to synchronize 43 | manually, you can disable automatic syncing in Anki’s [preferences.](preferences.md#syncing) 44 | 45 | ## Button Color 46 | 47 | The sync button will change to blue when a normal sync is required, 48 | and red when a full sync is required. 49 | 50 | ## Media 51 | 52 | You can watch a [related video](https://www.youtube.com/watch?v=phP9GGG-PxY) on this topic. 53 | 54 | Anki will synchronize any sounds and images used by your notes. It will 55 | notice when media has been added, removed or replaced in your [media folder](files.md#user-data), but 56 | will not notice if you have made edits to existing files. To get your edits synced, you 57 | need to add, remove or replace a file as well. 58 | 59 | One-way syncs (where you're prompted to upload or download) have no influence over how media 60 | syncs - media changes are always merged. 61 | 62 | To prevent accidental data loss, deletions will only sync to other devices if they are made after 63 | media is fully in sync. If you delete files before your device is fully in sync, and the deleted 64 | files are already on AnkiWeb, they will be downloaded the next time you sync. 65 | 66 | If you have accidentally deleted media files, and want to restore them, open the preferences 67 | and log out. The next time you sync, Anki will restore any deleted files, if they are available 68 | on AnkiWeb still. 69 | 70 | If you’re running Anki off a [USB flash drive](files.md#running-from-a-flash-drive), you should use an NTFS 71 | file system, as Anki may not be able to detect media changes on a FAT32 72 | filesystem. 73 | 74 | ## Conflicts 75 | 76 | You can watch a [related video](https://www.youtube.com/watch?v=UEAcpfMQnjo) on this topic. 77 | 78 | Under normal circumstances, reviews and note edits can be merged, so if 79 | you review or edit on two different devices before syncing, Anki will 80 | preserve your changes from both locations. If the same card has been 81 | reviewed in two different locations, both reviews will be marked in the 82 | revision history, and the card will be kept in the state it was when it 83 | was most recently answered. 84 | 85 | There are certain changes that Anki is unable to merge. These mainly 86 | relate to the format of notes: things like adding a new field, or 87 | removing a card template. When you perform an operation that can’t be 88 | merged, Anki will warn you, and give you the option of aborting the 89 | operation. If you choose to continue, you’ll be asked to choose whether 90 | to keep the local copy or the copy on AnkiWeb when your collection is 91 | next synchronized. 92 | 93 | If certain problems are detected while syncing, Anki forces a 94 | 95 | one-way sync. If you find this consistently happening, please post on our 96 | [support site](https://forums.ankiweb.net). 97 | 98 | When a one-way sync is required, you need to choose whether you wish to 99 | keep the collection on your local device, or the collection on AnkiWeb. 100 | If changes have been made on both ends, only changes on one end can be 101 | preserved. 102 | 103 | If you choose **Upload**, the content on your local device will be sent to 104 | AnkiWeb. You then need to sync your other devices, and choose **Download** 105 | to have them grab a copy of that content. 106 | 107 | If you choose **Download**, it will replace any local changes you’ve made 108 | with the data that is on AnkiWeb. 109 | 110 | Once all devices are in sync, future syncs will return to the normal 111 | behaviour of merging changes from both ends. 112 | 113 | If you wish to force a full upload or download (for example, because you 114 | accidentally deleted a deck on one side and want to restore the deck 115 | rather than having its deletion synchronized), you can check the "On 116 | next sync, force changes in one direction" box in 117 | **Tools > Preferences > Network**, then sync as usual. (You’ll be given 118 | the option to choose which side you want to use.) 119 | 120 | Forcing a one way sync only affects card syncing - media is synced as 121 | normal. If you have files that you want to remove from AnkiWeb, please 122 | ensure your client is fully in sync first. After syncing is up to date, 123 | any files you remove (e.g. via the **Check Media** function) will be removed 124 | from AnkiWeb on the following sync. 125 | 126 | ## Merging Conflicts 127 | 128 | Because the [first sync](#setup) can only sync changes in one 129 | direction, if you have added different content to different devices or 130 | profiles before setting syncing up, content on one device will be lost 131 | if you overwrite it with the content from the other device. With some 132 | work, it is possible to manually merge data into a single collection. 133 | 134 | Start by taking a backup on each device/profile, in case something goes 135 | wrong. With the computer version you can use **File > Export** to export 136 | "all decks" with scheduling information and media files included, and 137 | save the file somewhere safe. In AnkiMobile, the Add/Export button on 138 | the decks list screen will let you export all decks with media. 139 | 140 | Next, if one of your devices is a mobile device, synchronize it first. 141 | If there’s a conflict, choose **Upload** to overwrite any existing data on 142 | AnkiWeb with the data from your mobile device. If both devices/profiles 143 | are on your computer, synchronize the device/profile with the most 144 | number of decks first. 145 | 146 | Now return to the other device/profile. If automatic syncing is enabled, 147 | a message may pop up asking if you want to upload or download. Click the 148 | cancel button - we don’t want to sync yet. 149 | 150 | Once you’re looking at the deck list, click the cog icon next to the 151 | first deck, and choose **Export**. Export the content with scheduling 152 | information and media included, and save the `.apkg` file somewhere. Now 153 | you’ll need to repeat this for each top-level deck. 154 | 155 | Once all top-level decks have been exported, click the sync button at 156 | the top right, and choose **Download**, which will overwrite the local 157 | content with the content you synced from your other device. 158 | 159 | You can now use **File > Import** to import the `.apkg` files you exported 160 | earlier, which will merge the exported content with the existing 161 | content, so everything will be in one place. 162 | 163 | ## AnkiWeb Data Deletion 164 | 165 | As AnkiWeb is a free service, we need to periodically delete unused account data 166 | to keep costs down. If you haven't accessed your account or synced in the last 6 months, 167 | the data on your account might get deleted. 168 | 169 | ### What Gets Deleted 170 | 171 | Only your data stored on AnkiWeb is deleted. Your account itself will remain and can be used again. 172 | 173 | Any cards you have stored on your computer, phone or tablet will remain on those devices. Items shared from your account, including decks and add-ons will also remain on AnkiWeb. 174 | 175 | ### Returning to AnkiWeb 176 | 177 | Once your deck data has expired, it is not possible for us to recover your data from AnkiWeb, 178 | but you may be able to recover it if you have a local copy or a [backup](./backups.md). 179 | 180 | ### Avoiding Data Deletion 181 | 182 | Each time you visit ankiweb.net, or use the synchronization feature in Anki, AnkiMobile or AnkiDroid, 183 | your account will automatically be marked as active. 184 | 185 | If your account has been inactive for 6 months or more, and you used the service for a week or longer, 186 | we will send you an email notifying you that deletion is pending. 187 | If you'd like to keep your account active, please log in to ankiweb.net 188 | and study a card, or sync one of your devices within 30 days. 189 | 190 | ## Firewalls 191 | 192 | Anki needs to be able to make outbound HTTPS connections to sync. It must be 193 | able to connect to ankiweb.net, sync.ankiweb.net, sync2.ankiweb.net, and so on. 194 | These domains may change over time, and the IP addresses they point to may also 195 | change, so we recommend you allow wildcard access to \*.ankiweb.net to reduce 196 | the chance of the firewall rules needing to be updated in the future. 197 | 198 | If you have a firewall on your machine, you should add an exception for 199 | Anki. If you are on a work or school network, please contact your 200 | network administrator for assistance - it is not something we can help 201 | you with. 202 | 203 | ## Proxies 204 | 205 | If you need a proxy to access the internet, Anki should automatically 206 | pick up your system proxy settings if you’re on Windows or macOS, and 207 | will honour the HTTP_PROXY environment variable if you’re on another 208 | platform. 209 | 210 | Anki will only be able to pick up your system settings if a proxy is 211 | manually configured, and does not require a password. If your system 212 | uses automatic proxy setup, or uses a proxy that requires a username and 213 | password, you will need to manually tell Anki the proxy configuration. 214 | 215 | To tell Anki your proxy settings, define a HTTPS_PROXY environment 216 | variable that points to the proxy server. It will look like: 217 | 218 | http://user:pass@proxy.company.com:8080 219 | 220 | If your username or password contains an @ (e.g `user@workdomain.com`), 221 | you need to change it to %40, like so: 222 | 223 | http://user%40workdomain.com:pass@proxy.company.com:8080 224 | 225 | Anki 2.0 expects to find HTTP_PROXY instead of HTTPS_PROXY. 226 | 227 | To set environment variables on Windows, please see 228 | 229 | 230 | If you’re on a Mac, please see 231 | 232 | 233 | Heavily locked down networks that intercept secure connections and 234 | present their own certificates may cause Anki to throw up SSL 235 | errors. In such environments, you may be able to work around the errors using [this add-on](https://ankiweb.net/shared/info/1332261690). 236 | 237 | An alternative solution is to install a local proxy server, and point 238 | that proxy server at your normal proxy server. You can then tell Anki to 239 | use the local proxy, which will redirect requests to the proxy you 240 | normally use. 241 | -------------------------------------------------------------------------------- /src/math.md: -------------------------------------------------------------------------------- 1 | # Math and Symbols 2 | 3 | 4 | 5 | ## MathJax 6 | 7 | [MathJax](https://www.mathjax.org) is a modern, browser-based 8 | typesetting system, useful for mathematical and chemical equations. It 9 | does not require the installation of any extra software, so it is easy 10 | to use, and it is recommended for most users. 11 | 12 | MathJax is supported out of the box on Anki 2.1+, AnkiMobile, and 13 | AnkiDroid 2.9+. 14 | 15 | To try it out: 16 | 17 | 1. Type the following in a field: 18 | 19 | \sqrt{x} 20 | 21 | 2. Select the text you just typed. 22 | 23 | 3. Click the rightmost button in the editor, and choose "MathJax 24 | inline" from the menu. Anki will change the text so it reads: 25 | 26 | \(\sqrt{x}\) 27 | 28 | 4. Click the **Cards...** button. You’ll see a preview of how the 29 | equation will appear when the card is reviewed. 30 | 31 | $$ 32 | \sqrt{x} 33 | $$ 34 | Anki’s MathJax support expects content in TeX format. If you’re not 35 | familiar with TeX formatting, please see [this cheatsheet](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference). 36 | Please note that point 1 does not apply in Anki - Anki uses `\(` and 37 | `\)` for inline equations, and `\[` and `\]` for display equations. 38 | 39 | If you want to use newlines in a MathJax expression, please use 40 | Shift+Enter instead of just Enter, as a normal newline will prevent 41 | MathJax from working correctly. 42 | 43 | Anki includes built in support for mhchem for rendering chemical 44 | equations. Please see the "chemical equations" section and the following 45 | sections for more information: 46 | 47 | 48 | ### Customize MathJax 49 | 50 | Anki's bundled MathJax support is loaded before card content, so if you wish to customise MathJax you'll have to do so in a specific way. An example is provided here. 51 | 52 | ```javascript 53 | 62 | ``` 63 | 64 | Note that Anki has special logic for cloze deletions that might not work if you change the standard delimiters for MathJax equations. 65 | 66 | ## LaTeX 67 | 68 | LaTeX is a powerful typesetting system, useful for entering mathematical 69 | formulas, chemical formulas, musical notation and so on. Anki provides 70 | some support for LaTeX, allowing you to enter LaTeX code in your notes. 71 | When you review a card, Anki will call LaTeX and display the generated 72 | image instead. 73 | 74 | LaTeX is more work to set up, and images can only be generated with the 75 | computer version of Anki - though once generated, the images can be 76 | displayed by mobile clients. Because of the extra complexity LaTeX 77 | brings, it is only recommended for users that need more features than 78 | MathJax provides. 79 | 80 | ### Security Warning 81 | 82 | LaTeX code can contain malicious commands that can read or write non-Anki 83 | data on your computer. For this reason, recent Anki versions will refuse to 84 | generate LaTeX images by default. 85 | 86 | If you wish to use LaTeX on your own cards, you will need to enable the **Generate LaTeX images** option in the preferences screen. 87 | 88 | **We strongly recommend you do not enable this option if you use shared decks, or think 89 | you will import shared decks in the future, as you are potentially giving any shared 90 | deck author access to your computer**. 91 | 92 | You do not need to enable this option for shared decks. If a shared deck author has 93 | correctly generated all the images prior to them sharing the deck, the images should 94 | already be available. 95 | 96 | ### Assumed Knowledge 97 | 98 | Anki’s LaTeX support is not turn-key: it is assumed that you know how to 99 | use LaTeX already, and that you have it installed. If you have no 100 | experience with LaTeX, please consult one of the many guides available 101 | on the internet. If you are having trouble with markup, please ask on a 102 | LaTeX forum. 103 | 104 | To install LaTeX, on Windows use MiKTeX; on macOS use MacTeX, and on Linux 105 | use your distro’s package manager. Dvipng must also be installed. 106 | 107 | On Windows, go to Settings in MikTeX’s maintenance window, and make sure 108 | "Install missing packages on the fly" is set to "Always", not to "Ask me 109 | first". If you continue to have difficulties, one user reported that 110 | running Anki as an administrator until all the packages were fetched 111 | helped. 112 | 113 | On macOS, LaTeX has only been tested with MacTeX and BasicTeX. If you use 114 | BasicTeX, you need to install dvipng separately, with the following 115 | command: 116 | 117 | sudo tlmgr update --self; sudo tlmgr install dvipng 118 | 119 | The command may not be on the path, so you may need to provide the full 120 | path, e.g /usr/local/texlive/2014basic/bin/x86_64-darwin/tlmgr. 121 | 122 | If you are not using the above LaTeX packages, you will need to use the 123 | [edit LaTeX](https://ankiweb.net/shared/info/937148547) add-on to specify 124 | the full path to latex and dvipng. 125 | 126 | ### Web/Mobile 127 | 128 | When you review a card with LaTeX on it, Anki will generate an image for 129 | that LaTeX and place the image in your collection’s media folder for 130 | future use. The web & mobile clients will display these images if they 131 | already exist, but can not generate the images on their own. 132 | 133 | To avoid having to review all your cards at least once before you can 134 | study on the other clients, Anki can generate the images in bulk for 135 | you. To generate all the images, please go to Tools>Check Media. 136 | After that, syncing should upload the generated media to AnkiWeb and the 137 | other clients. 138 | 139 | ### Example 140 | 141 | The most general way to input LaTeX content is to surround it with 142 | \[latex\]\[/latex\] tags. There’s a shortcut button for this documented 143 | in the [editor](editing.md) section. 144 | 145 | \[latex\] tags must be used inside a field - placing them in the card 146 | template will [cause problems](templates/fields.md). 147 | 148 | For example, entering the following on the front of an Anki flashcard: 149 | 150 | Does [latex]\begin{math}\sum_{k = 1}^{\infty}\frac{1}{k}\end{math}[/latex] converge? 151 | 152 | will produce this when the flashcard is viewed: 153 | 154 | ![convergence question](math/convergence_question.png) 155 | 156 | The formula in the example above is called a "text formula", because it 157 | is displayed right within the non-mathematical text. In contrast, the 158 | following example shows a "displayed formula": 159 | 160 | Does the sum below converge? 161 | 162 | [latex]\begin{displaymath}\sum_{k = 1}^{\infty}\frac{1}{k}\end{displaymath}[/latex] 163 | 164 | ![convergence question 2](math/convergence_question_2.png) 165 | 166 | "Text formulas" and "display formulas" are the most common type of LaTeX 167 | expressions, so Anki provides abbreviated versions of them. Expressions 168 | of the form: 169 | 170 | [latex]\begin{math}...\end{math}[/latex] 171 | 172 | can be shortened to 173 | 174 | [$]...[/$] 175 | 176 | and expressions of the form 177 | 178 | [latex]\begin{displaymath}...\end{displaymath}[/latex] 179 | 180 | can be shortened to 181 | 182 | [$$]...[/$$] 183 | 184 | For example, the two LaTeX snippets shown before are equivalent to 185 | 186 | Does [$]\sum_{k = 1}^{\infty}\frac{1}{k}[/$] converge? 187 | 188 | and 189 | 190 | Does the sum below converge? 191 | 192 | [$$]\sum_{k = 1}^{\infty}\frac{1}{k}[/$$] 193 | 194 | respectively. 195 | 196 | ### Packages 197 | 198 | Anki allows you to customize the LaTeX preamble so you can import custom 199 | packages for chemistry, music and so on. For example, imagine you find 200 | an example file for chemtex on the internet: 201 | 202 | \documentclass[a4paper,12pt]{report} 203 | \usepackage{chemtex} 204 | \begin{document} 205 | 206 | \initial 207 | \begin{figure}[h]\centering 208 | \parbox{.3\textwidth}{\ethene{H}{H$_3$C}{CH$_3$}{Br}} 209 | \hfil 210 | \parbox{.3\textwidth}{\cbranch{H}{S}{H}{S}{C}{S}{}{S}{H} 211 | \xi=-200 \cright{}{Q}{C}{D}{O}{S}{OH}} 212 | \hfil 213 | \parbox{.3\textwidth}{\hetisix{Q}{Q}{Q}{Q}{Q}{Q}{O}{Q}{O} 214 | \xi=-171 \fuseup{Q}{Q}{Q}{Q}{D}{Q}{D}{Q}{D}} 215 | \caption{Chemie mit {\tt CHEMTEX}\label{a1}} 216 | \end{figure} 217 | 218 | \end{document} 219 | 220 | Firstly, follow the documentation of the package and MiKTeX/MacTeX in 221 | order to install the package. To check the package is working, you’ll 222 | want to put code like the above into a .latex file and test if you can 223 | compile it from the command line. Once you’ve confirmed that the package 224 | is available and working, we can integrate it with Anki. 225 | 226 | To use the package with Anki, click "Add" in the main window, then click 227 | the note type selection button. Click the "Manage" button, then select 228 | the note type you plan to use and click "Options". The LaTeX header and 229 | footer are shown. The header will look something like: 230 | 231 | \documentclass[12pt]{article} 232 | \special{papersize=3in,5in} 233 | \usepackage{amssymb,amsmath} 234 | \pagestyle{empty} 235 | \setlength{\parindent}{0in} 236 | \begin{document} 237 | 238 | To use chemtex, you’d add the usepackage line in the earlier example, so 239 | it looks like: 240 | 241 | \documentclass[12pt]{article} 242 | \special{papersize=3in,5in} 243 | \usepackage{amssymb,amsmath} 244 | \usepackage{chemtex} 245 | \pagestyle{empty} 246 | \setlength{\parindent}{0in} 247 | \begin{document} 248 | 249 | After that, you should be able to include lines like the following in 250 | your Anki cards: 251 | 252 | [latex]\ethene{H}{H$_3$C}{CH$_3$}{Br}[/latex] 253 | 254 | ### Template Conflicts 255 | 256 | As of Anki 2.1.20 / AnkiMobile 2.0.56 / AnkiDroid 2.13, this workaround is no 257 | longer required, as `{{field}}` text inside fields no longer causes problems. If 258 | you need to support older versions and want to keep using this syntax, please 259 | make sure you place the `{{=<% %>=}}` string at the very top of your front and 260 | back template, as recent Anki versions will not recognize it anywhere but the 261 | start. 262 | 263 | For older versions: 264 | 265 | It’s not uncommon for {{ and }} to pop up in LaTeX code when writing 266 | mathematical equations. To ensure that your LaTeX equations don’t 267 | conflict with Anki’s field replacements, it’s possible to change the 268 | separator to something else. 269 | 270 | For example, if you have a template: 271 | 272 | {{latex field}} 273 | 274 | Changing it to the following will make it unlikely that the LaTeX will 275 | conflict: 276 | 277 | {{=<% %>=}} 278 | <%latex field%> 279 | 280 | ### Cloze Conflicts 281 | 282 | Cloze deletions are terminated with `}}`, which can conflict with a `}}` 283 | appearing in your LaTeX. To prevent LaTeX from being interpreted as a closing 284 | cloze marker, you can put a space between any double closing braces that do not 285 | indicate the end of the cloze, so 286 | 287 | {{c1::[$]\frac{foo}{\frac{bar}{baz}}[/$] blah blah blah.}} 288 | 289 | will not work, but 290 | 291 | {{c1::[$]\frac{foo}{\frac{bar}{baz} }[/$] blah blah blah.}} 292 | 293 | will (and LaTeX ignores spaces in math mode, so your equation will 294 | render the same). If you want to avoid adding the extra space into the 295 | rendered text (for example, when you are making Cloze cards for learning 296 | programming languages), another option is to use a HTML comment when 297 | editing the card in HTML mode: 298 | 299 | {{c1::[$]\frac{foo}{\frac{bar}{baz}}[/$] blah blah blah.}} 300 | 301 | You may use either workaround if you need to use the `::` character 302 | sequence within the Cloze-deleted text. The first card generated for the 303 | following note text will read `[type] in C++ is a type-safe union`: 304 | 305 | {{c1::std::variant::~type~}} in C++ is a {{c2::type-safe union}} 306 | 307 | ### Unsafe Commands 308 | 309 | Anki prohibits certain commands like \\input or \\def from being used on 310 | cards or in templates, because allowing them could allow malicious 311 | shared decks to damage your system. (To be on the safe side, these 312 | commands are prohibited even in comments, so if you’re getting this 313 | error but don’t think you’ve used one, please double-check any comments 314 | you have in your headers, templates, and cards.) If you need to use 315 | these commands, please add them to a system package and import that 316 | package as described in the previous section. 317 | -------------------------------------------------------------------------------- /src/importing/text-files.md: -------------------------------------------------------------------------------- 1 | # Text Files 2 | 3 | 4 | 5 | Any **plain text** file that contains fields separated by commas, 6 | semicolons or tabs can be imported into Anki, provided some conditions 7 | are met. 8 | 9 | - The files must be plain text (myfile.txt). Other formats like 10 | myfile.xls, myfile.rtf, myfile.doc must be saved as a plain text 11 | file first. 12 | 13 | - The files must be in UTF-8 format (see below). 14 | 15 | - Anki determines the number of fields in the file by looking at the first 16 | (non-commented) line. If some of the later records in the file contain fewer 17 | fields, Anki will treat the missing fields as if they were blank. If some of your 18 | records contain extra fields, the extra content will not be imported. 19 | 20 | - Anki tries to guess which field separator (commas, tabs, etc.) your file uses. 21 | If it guesses wrongly, you can change it in the import options window and preview 22 | the results. Or you can add [file headers](#file-headers) to force a specific field separator. 23 | 24 | Fields in your text file can be mapped to any field in your notes, 25 | including the tags field. You can choose which field in the text file 26 | corresponds to which field in the note when you import. 27 | 28 | When you import a text file, you can choose what deck to put the cards 29 | in. Keep in mind that if you have the deck override option set for one 30 | or more of your templates, the cards will go to that deck rather than 31 | the one you’ve selected. 32 | 33 | This is an example of a valid file with three fields: 34 | 35 | apple;banana;grape 36 | first field;second field;third field 37 | 38 | There are two ways to include newlines or the field separator in fields. 39 | 40 | **Escape the characters by placing the contents of the field in 41 | quotation marks**: 42 | 43 | hello;"this is 44 | a two line answer" 45 | two;this is a one line field 46 | "this includes a ; (semicolon)";another field 47 | 48 | Because quotes are used to mark where a field begins and ends, if you 49 | wish to include them inside your field, you need to replace a single 50 | doublequote with two doublequotes to "escape" them from the regular 51 | handling, like so: 52 | 53 | field one;"field two with ""escaped quotes"" inside it" 54 | 55 | When you use a spreadsheet program like Libreoffice to create the CSV 56 | file for you, it will automatically take care of escaping double quotes. 57 | 58 | **Use HTML new lines**: 59 | 60 | hello; this is
a two line answer 61 | two; this is a one line one 62 | 63 | You need to turn on the **Allow HTML in fields** in the import 64 | dialog for HTML newlines to work. 65 | 66 | Escaped multi-lines will not work correctly if you are using cloze 67 | deletions that span multiple lines. In this case, please use HTML 68 | newlines instead. 69 | 70 | You can also include tags in another field and select it as a tags field 71 | in the import dialog: 72 | 73 | first field;second field;tags 74 | 75 | This is an example of a valid file where the first line is ignored (\#): 76 | 77 | # this is a comment and is ignored 78 | foo bar;bar baz;baz quux 79 | field1;field2;field3 80 | 81 | ## Spreadsheets and UTF-8 82 | 83 | If you have non-Latin characters in your file (such as accents, Japanese 84 | and so on), Anki expects files to be saved in a "UTF-8 encoding". The 85 | easiest way to do this is to use the free LibreOffice spreadsheet 86 | program instead of Excel to edit your file, as it supports UTF-8 easily, 87 | and also exports multi-line content properly, unlike Excel. If you wish 88 | to keep using Excel, please see [this doc](https://docs.google.com/document/d/12YE_FS6A9ANLTESJNtPP116ti4nNmCBghyoJBRtno_k/edit?usp=sharing) 89 | for more information. 90 | 91 | To save your spreadsheet to a file Anki can read with LibreOffice, go to 92 | **File > Save As**, and then select CSV for the type of file. After 93 | accepting the default options, LibreOffice will save the file and you 94 | can then import the saved file into Anki. 95 | 96 | ## HTML 97 | 98 | Anki can treat text imported from text files as HTML (the language used 99 | for web pages). This means that text with bold, italics and other 100 | formatting can be exported to a text file and imported again. If you 101 | want to include HTML formatting, you can check the "allow HTML in 102 | fields" checkbox when importing. You may wish to turn this off if you’re 103 | trying to import cards whose content contains angle brackets or other 104 | HTML syntax. 105 | 106 | If you wish to use HTML for formatting your file but also wish to 107 | include angle brackets or ampersands, you may use the following replacements: 108 | 109 | | Character | Replacement | 110 | | --------- | ----------- | 111 | | < | `<` | 112 | | > | `>` | 113 | | & | `&` | 114 | 115 | ## Importing Media 116 | 117 | If you want to include audio and pictures from a text file import, copy 118 | the files into the [collection.media folder](../files.md). **Do not put 119 | subdirectories in the media folder, or some features will not work.** 120 | 121 | After you’ve copied the files, change one of the fields in your text 122 | file as follows. 123 | 124 | 125 | 126 | or 127 | 128 | [sound:myaudio.mp3] 129 | 130 | Alternatively, you can use the [find and replace](../browsing.md) feature 131 | in the browse screen to update all the fields at once. If each field 132 | contains text like "myaudio", and you wish to make it play a sound, 133 | you’d search for (.\*) and replace it with "\[sound:\\1.mp3\]", with the 134 | **regular expressions** option enabled. 135 | 136 | When importing a text file with these references, you must make sure to 137 | enable the "Allow HTML" option. 138 | 139 | You might be tempted to do this in a template, like: 140 | 141 | 142 | 143 | Anki doesn’t support this for two reasons: searching for used media is 144 | expensive, as each card has to be rendered, and such functionality isn’t 145 | obvious to shared deck users. Please use the find & replace technique 146 | instead. 147 | 148 | ## Bulk Media 149 | 150 | Another option for importing large amounts of media at once is to use 151 | the [media import add-on](https://ankiweb.net/shared/info/129299120). 152 | This add-on will automatically create notes for all files in a folder 153 | you select, with the filenames on the front (minus the file extension, 154 | so if you have a file named apple.jpg, the front would say "apple") and 155 | the images or audio on the back. If you would like a different 156 | arrangement of media and filenames, you can [change the note type](../browsing.md) of the created cards afterwards. 157 | 158 | ## Duplicates and Updating 159 | 160 | When importing text files, Anki uses the first field to determine if a 161 | note is unique. By default, if the file you are importing has a first 162 | field that matches one of the existing notes in your collection and that 163 | existing note is the same type as the type you’re importing, the 164 | existing note’s other fields will be updated based on content of the 165 | imported file. A drop-down box in the import screen allows you to change 166 | this behaviour, to either ignore duplicates completely, or import them 167 | as new notes instead of updating existing ones. 168 | 169 | The **match scope** setting controls how duplicates are identified. When 170 | **note type** is selected, Anki will identify a duplicate if another note 171 | with the same note type has the same first field. When set to **note type and deck**, 172 | a duplicate will only be flagged if the existing note also happens to be 173 | in the deck you are importing into. 174 | 175 | If you have updating turned on and older versions of the notes you’re 176 | importing are already in your collection, they will be updated in place 177 | (in their current decks) rather than being moved to the deck you have 178 | set in the import dialog. If notes are updated in place, the existing 179 | scheduling information on all their cards will be preserved. 180 | 181 | For info on how duplicates are handled in .apkg files, please see the 182 | [Deck Packages](../exporting.md#packaged-decks) section. 183 | 184 | ## File Headers 185 | 186 | Anki 2.1.54+ supports certain headers that can be included in the text file to 187 | make importing more powerful or convenient. They consist of `#key:value` pairs 188 | and must be listed in separate lines at the top of the file. 189 | 190 | | Key | Allowed Values | Behaviour | 191 | | ----------------- | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------- | 192 | | `separator` | `Comma`, `Semicolon`, `Tab`, `Space`, `Pipe`, `Colon`, or the corresponding literal characters | Determines the field separator. | 193 | | `html` | `true`, `false` | Determines whether the file is treated as HTML. | 194 | | `tags` | List of tags, separated by spaces | Adds the listed tags to every imported note. | 195 | | `columns` | List of names, separated by the previously set separator | Determines the number of columns and shows their given names when importing. | 196 | | `notetype` | Note type name or id | Presets the note type, if it exists. | 197 | | `deck` | Deck name or id | Presets the deck, if it exists. | 198 | | `notetype column` | `1`, `2`, `3`, ... | Determines which column contains the note type name or id of each note, see [Notetype Column](#notetype-column). | 199 | | `deck column` | `1`, `2`, `3`, ... | Determines which column contains the deck name or id of each note, see [Deck Column](#deck-column). | 200 | | `tags column` | `1`, `2`, `3`, ... | Determines which column contains the tags of each note. | 201 | | `guid column` | `1`, `2`, `3`, ... | Determines which column contains the GUID of each note, see [GUID Column](#guid-column). | 202 | 203 | Some headers have further implications. 204 | 205 | ### Notetype Column 206 | 207 | Usually, all notes from a file will be mapped to a single note type. That changes, if there is a column with note type names or ids. 208 | 209 | This allows you to 210 | import notes with different note types, and their fields will be mapped implicitly: 211 | The first regular column is used for the first field of any note regardless of 212 | its note type, the second regular column for the second field, and so on. 213 | A _regular column_ here being a column that does not contain special information 214 | like decks, tags, note types or GUIDs. 215 | 216 | ### Deck Column 217 | 218 | Usually, any new cards created as a result of importing a text file will be placed 219 | in a single deck of your choice. If the file contains a deck column, however, new 220 | cards of a note will be placed in its specified deck instead. If the deck does not 221 | exist, a deck with the given name will be created. 222 | 223 | ### GUID Column 224 | 225 | GUID stands for _Globally Unique Identifier_. When you create notes in Anki, Anki 226 | assigns each note a unique ID, which can be used for duplicate checking. If you 227 | export your notes with the GUID included, you can make changes to the notes, and 228 | as long as you do not modify the GUID field, you'll be able to import the notes back 229 | in to update the existing notes. 230 | 231 | Please note that the GUID is intended to be created by Anki. If you are creating 232 | your own IDs, such as `MYNOTE0001`, then it's recommended that you place the IDs 233 | in the first field, instead of assigning them to Anki's internal GUID. When importing, 234 | Anki is able to use either the first field or the GUID for duplicate checking, so you do not 235 | need to make IDs a GUID in order to be able to update your notes. 236 | 237 | One other thing to note is that the duplicate option will not work for rows that have a 238 | non-empty GUID. If a GUID is provided, and already exists in the collection, a duplicate will 239 | not be created. 240 | -------------------------------------------------------------------------------- /src/studying.md: -------------------------------------------------------------------------------- 1 | # Studying 2 | 3 | 4 | 5 | When you have found a deck you like or entered some notes in, it’s time 6 | to start studying. 7 | 8 | ## Decks 9 | 10 | Study in Anki is limited to the currently selected deck as well as any 11 | subdecks it contains. 12 | 13 | On the decks screen, your decks and subdecks will be displayed in a list. [New, Learn, and Due (To Review)](getting-started.md#card-states) 14 | cards for that day will be also displayed here. 15 | 16 | ![](media/decks_screen.png) 17 | 18 | When you click on a deck, it will become the "current deck", and Anki 19 | will change to the study screen. You can return to the deck list at any time by clicking on “Decks” at 20 | the top of the main window. (You can also use the Study 21 | Deck action in the menu to select a new deck from the keyboard, or you 22 | can press the S key to study the currently selected deck.) 23 | 24 | You can click the gears button to the right of a deck to rename or 25 | delete the deck, change its [options](deck-options.md), or [export](exporting.md) it. 26 | 27 | ## Study Overview 28 | 29 | After clicking on a deck to study, you’ll see a screen that shows you 30 | how many cards are due today. This is called the "deck overview" screen: 31 | 32 | ![](media/study_overview.png) 33 | 34 | The cards are split into [three types](getting-started.md#card-states): New, Learning, and To Review. 35 | If you have [Bury siblings](#siblings-and-burying) activated in your deck options, you 36 | may see how many cards will be buried in grey: 37 | 38 | ![](media/study_overview_buried_cards.png) 39 | 40 | To start a study session, click the **Study Now** button. Anki will 41 | proceed to show you cards until the cards to be shown for the day have 42 | run out. 43 | 44 | While studying, you can return to the overview by pressing the S key 45 | on your keyboard. 46 | 47 | ## Questions 48 | 49 | When a card is shown, only the question is shown at first. After 50 | thinking about the answer, either click the **Show Answer** button, or 51 | press the Space. The answer will then be shown. It’s okay if it takes 52 | you a little while to recall the answer, but as a general rule if you 53 | can’t answer within about 10 seconds, it’s probably better to move on 54 | and show the answer than keep struggling to remember. 55 | 56 | ## Answer Buttons 57 | 58 | After the answer is shown, compare the answer you thought of 59 | with the answer that is shown and select any of the following buttons. 60 | 61 | - **Again**: Select this when your answer is incorrect or when you couldn't recall the answer. If your answer is partially correct, you should be strict with yourself: if it counts as a fail in a real-life context outside of Anki, then it counts as a fail in Anki as well. You'll typically use this button about 5-20% of the time. 62 | 63 | Keyboard Shortcut: 1 64 | 65 | - **Hard**: Select this button when your answer is correct, but you had doubts about it or it took a long time to recall. 66 | 67 | Keyboard Shortcut: 2 68 | 69 | - **Good**: Select this when your answer is correct, but it took some mental effort to recall it. When Anki is used properly, this should be the most commonly used button. You'll typically use this button about 80-95% of the time. 70 | 71 | Keyboard Shortcut: 3, Space, Enter 72 | 73 | - **Easy**: Select this if your answer is correct and it took no mental effort to recall it. 74 | 75 | Keyboard Shortcut: 4 76 | 77 | If you find it hard to use four answer buttons, you can also use only **Again** and **Good** buttons. Use **Again** for incorrect answers and use **Good** for correct answers. 78 | 79 | Each answer button shows the next time a card will be reviewed again if you select that button. To learn about the settings that control the next review intervals, see the topics [Learning Steps](deck-options.html#learning-steps), [Lapses](deck-options.md#lapses), [FSRS](deck-options.html#fsrs) and [Advanced](deck-options.md#advanced) in the Deck Options section. 80 | 81 | ## Fuzz Factor 82 | 83 | When you select an answer button on a review card, Anki also applies a small amount of random “fuzz” 84 | to prevent cards that were introduced at the same time and given the same ratings 85 | from sticking together and always coming up for review on the same day. 86 | 87 | Learning cards are also given up to 5 minutes of extra delay so that they 88 | don’t always appear in the same order, but answer buttons won't reflect that. It 89 | is not possible to turn this feature off. 90 | 91 | ## Editing and More 92 | 93 | You can click the **Edit** button in the bottom left to edit the current 94 | note. When you finish editing, you’ll be returned to study. The editing 95 | screen works very similarly to the [add notes](editing.md) screen. 96 | 97 | At the bottom right of the study screen is a button labeled **More**. 98 | This button provides some other operations you can do on the current 99 | card or note: 100 | 101 | - [**Flag Card**](editing.md#using-flags): Adds a colored marker to the card, or toggles it off. Flags will appear during 102 | study, and you can search for flagged cards in the Browse screen. This is useful 103 | when you want to take some action on the card at a later date, such as looking 104 | up a word when you get home. If you're using Anki 2.1.45+, you can also rename flags 105 | from the [browser](browsing.md). 106 | 107 | - **Bury Card / Note**: Hides a card or all of the note’s cards from review until the next day. 108 | (If you want to unbury cards before then, you can click the “unbury” 109 | button on the [deck overview](studying.md#study-overview) screen.) This is useful if 110 | you cannot answer the card at the moment or you want to come back to it 111 | another time. Burying can also [happen automatically](studying.md#siblings-and-burying) for 112 | cards of the same note. 113 | 114 | - **Reset card**: Moves the current card to [the end of the new queue](browsing.md#cards). 115 | 116 | The "Restore original position" option allows you to reset the card back to its original position when you reset it. 117 | 118 | The "Reset repetition and lapse count" option, if enabled, will set the review and failure counters 119 | for the card back to zero. It does not remove the review history that is shown at the bottom of the 120 | card info screen. 121 | 122 | - **Set Due Date**: Puts cards in the review queue, and [makes them due on a certain date.](browsing.md#cards) 123 | 124 | - **Suspend Card / Note**: Hides a card or all of the note’s cards from review until they are 125 | manually unsuspended (by clicking the suspend button in the browser). 126 | This is useful if you want to avoid reviewing the note for some time, 127 | but don’t want to delete it. 128 | 129 | - **Options**: Edit the [options](deck-options.md) for the current deck. 130 | 131 | - **Card Info**: Displays [statistical information](stats.md#card-info) about the card. 132 | 133 | - **Previous Card Info**: Displays [statistical information](stats.md#card-info) about the previous card. 134 | 135 | - [**Mark Note**](editing.md#the-marked-tag): Adds a “marked” tag to the current note, so it can be easily found in the 136 | browser. This is similar to flagging individual cards, but works with a tag 137 | instead, so if the note has multiple cards, all cards will appear in a search 138 | for the marked tag. Most users will want to use flags instead. 139 | 140 | - **Create Copy**: Opens a [duplicate](browsing.md#finding-duplicates) of the current 141 | note in the editor, which can be slightly modified to easily obtain variations of your cards. 142 | By default, the duplicate card will be created in the same deck as the original. 143 | 144 | - **Delete Note**: Deletes the note and all of its cards. 145 | 146 | - **Replay Audio**: If the card has audio on the front or back, play it again. 147 | 148 | - **Pause Audio**: Pauses the audio if it is playing. 149 | 150 | - **Audio -5s / +5s**: Jump backwards / forward 5 seconds in the currently playing audio. 151 | 152 | - **Record Own Voice**: Record from your microphone for the purposes of checking your 153 | pronunciation. This recording is temporary and will go away when you 154 | move to the next card. If you want to add audio to a card permanently, 155 | you can do that in the edit window. 156 | 157 | - **Replay Own Voice**: Replay the previous recording of your voice (presumably after showing 158 | the answer). 159 | 160 | ## Display Order 161 | 162 | Studying will show cards from the selected deck and any decks it 163 | contains. Thus, if you select your “French” deck, the subdecks 164 | “French::Vocab” and “French::My Textbook::Lesson 1” will be shown as 165 | well. 166 | 167 | By default, for new cards, Anki gathers cards from the decks in 168 | alphabetical order. So in the above example, you would get cards first 169 | from “French”, then “My Textbook”, and finally “Vocab”. You can use this 170 | to control the order cards appear in, placing high priority cards in 171 | decks that appear higher in the list. When computers sort text 172 | alphabetically, the “-” character comes before alphabetical characters, 173 | and “\~” comes after them. So you could call the deck “-Vocab” to make 174 | them appear first, and you could call the other deck “\~My Textbook” to 175 | force it to appear after everything else. 176 | 177 | New cards and reviews are gathered separately, and Anki won’t wait until 178 | both queues are empty before moving on to the next deck, so it’s 179 | possible you’ll be exposed to new cards from one deck while seeing 180 | reviews from another deck, or vice versa. If you don’t want this, click 181 | directly on the deck you want to study instead of one of the parent 182 | decks. 183 | 184 | Since cards in learning are somewhat time-critical, they are fetched 185 | from all decks at once and shown in the order they are due. 186 | 187 | To control the order cards appear in, see [Display Order](./deck-options.md#display-order). For more fine-grained ordering of new cards, you 188 | can change the order in the [browser](browsing.md). 189 | 190 | ## Siblings and Burying 191 | 192 | Recall from [the basics](getting-started.md) that Anki can create more than one 193 | card for each thing you input, such as a front→back card and a 194 | back→front card, or two different cloze deletions from the same text. 195 | These related cards are called "siblings". 196 | 197 | When you answer a card that has siblings, Anki can prevent the card’s 198 | siblings from being shown in the same session by automatically "burying" 199 | them. Buried cards are hidden from review until the clock rolls over to 200 | a new day or you manually unbury them using the “Unbury” button that’s 201 | visible at the bottom of the [deck overview](studying.md#study-overview) screen. Anki 202 | will bury siblings even if the siblings are not in the same deck (for 203 | instance, if you use the [deck override](templates/intro.md) feature). 204 | 205 | You can enable burying from the [deck options](deck-options.md) screen - 206 | there are separate settings for new cards and reviews. 207 | 208 | Anki will only bury siblings that are new or review cards. It will not 209 | hide cards in learning, as time is of the essence for those cards. On 210 | the other hand, when you study a learning card, any new/review siblings 211 | will be buried. 212 | 213 | Also note that a card cannot be buried and suspended at the same time. Suspending a 214 | buried card will unbury it. Suspended cards can't be buried. 215 | 216 | ## Keyboard Shortcuts 217 | 218 | Most of the common operations in Anki have keyboard shortcuts. Most of 219 | them are discoverable in the interface: menu items list their shortcuts 220 | next to them, and hovering the mouse cursor over a button will generally 221 | show its shortcut in a tooltip. 222 | 223 | When studying, either Space or Enter will show the answer. When the 224 | answer is shown, you can use Space or Enter to select the Good button. 225 | You can use the 1-4 keys to select a specific ease button. Many people 226 | find it convenient to answer most cards with Space and keep one finger 227 | on 1 for when they forget. 228 | 229 | The "Study Deck" item in the Tools menu allows you to quickly switch to 230 | a deck with the keyboard. You can trigger it with the / key. When 231 | opened, it will display all of your decks and show a filter area at the 232 | top. As you type characters, Anki will display only decks matching the 233 | characters you type. You can add a space to separate multiple search 234 | terms, and Anki will show only decks that match all the terms. So “ja 1” 235 | or “on1 ja” would both match a deck called “Japanese::Lesson1”. 236 | 237 | ## Falling Behind 238 | 239 | When you fall behind in your reviews, Anki by default prioritizes cards that have 240 | been waiting the longest. This ordering ensures that no cards will 241 | be left waiting indefinitely, but it means that if you introduce new 242 | cards, their reviews won’t appear until you’ve gotten through your 243 | backlog. 244 | 245 | When you answer cards that have been waiting for a while, Anki factors 246 | in that delay when determining the next time a card should be shown. This means if you are returning to Anki after a long break, you don't have to start anew and can just start back from where you left. 247 | -------------------------------------------------------------------------------- /src/stats.md: -------------------------------------------------------------------------------- 1 | # Card Info, Graphs and Statistics 2 | 3 | 4 | 5 | ## Card Info 6 | 7 | You can display information about a card by using the Cards>Info menu item, 8 | by right-clicking on the card and then selecting **Info**, or by pressing 9 | I on the study screen. 10 | 11 | ![Card Info](media/card_info.png) 12 | 13 | A few notes: 14 | 15 | **Position**\ 16 | It shows the order the card will appear 17 | in relative to other new cards. The position can be changed in the 18 | browser. Once a card has been studied, the position is not used, unless 19 | the card is manually reset to new again. 20 | 21 | **Interval**\ 22 | The delay from one review to the next. Times are abbreviated; "0s, 1m, 23 | 3h, 4d, 5mo, 6y" refers to seconds, minutes, hours, days, months and 24 | years respectively. 25 | 26 | **Ease**\ 27 | The approximate amount the interval will grow when you answer a review 28 | card with the "Good" button. 29 | 30 | The bottom section shows the review history for the card. Rating denotes 31 | the button (1 = Again, 4 = Easy). When cards are manually rescheduled using 32 | the "reset" or "set due date" actions, the type will be listed as Manual 33 | and the rating as 0. 34 | 35 | ## Statistics 36 | 37 | The statistics window is accessed by clicking on **Stats** button at the 38 | top of the main window, or by pressing T. 39 | 40 | ![Statistics screen](media/Statistics.png) 41 | 42 | ## Selecting Decks / Collection 43 | 44 | ### Deck 45 | 46 | By default, the statistics window will show statistics from the currently selected deck and any 47 | subdecks it may contain, but you can select any deck from your collection by typing its name in the 48 | text box at the top of the screen or (from Anki 2.1.61), by using the deck selector at the bottom. 49 | 50 | ### Collection 51 | 52 | If you select this checkbox, statistics will be shown for your entire collection. You can also display graphs 53 | for arbitrary searches by adding filters in the search box at the top (2.1.28+). 54 | 55 | ### History 56 | 57 | By default, Anki shows you statistics for the last 12 months. 58 | You can change this to all history scope or deck life scope at the top. (The 59 | "today" section at the top remains of course unaffected by this selection.) 60 | 61 | ### More 62 | 63 | - Clicking on "Save PDF" at the bottom will save a PDF document of the statistics to a file 64 | on your desktop to make it easy to share your statistics with others. 65 | 66 | - When you delete notes, their review history is maintained in Anki. It 67 | will not be included when looking at statistics for a specific deck (as 68 | Anki has no way of knowing which deck the deleted cards belonged to), 69 | but will be included when you look at statistics for the whole 70 | collection. 71 | 72 | - Anki 2.1.28+ introduced redesigned graphs. The old graphs are still 73 | accessible with a Shift-click on the Stats button. 74 | 75 | ## Today 76 | 77 | At the top of the statistics window is a brief list of textual 78 | statistics about the reviews that you have completed today. A “review” 79 | in this context is "one answering of a card", so a card might count as 80 | multiple reviews if it needed to be seen multiple times, and a learning 81 | card answered also counts as a “review.” A couple of the stats whose 82 | meaning may not be immediately obvious: 83 | 84 | ### Again Count 85 | This is the number of reviews that you have failed (i.e., pressed Again 86 | on). The correct percentage listed afterwards is the number of cards you 87 | did "not" fail divided by the total number of cards you studied. 88 | 89 | ### Learn, Review, Relearn, Filtered 90 | The number of reviews that were learning cards, review cards, relearning 91 | cards, or studied in a filtered deck when not due. 92 | 93 | The stats for the current day are not a good overall indicator of your 94 | learning progress; everyone has bad days and good days, and seeing that 95 | you got a lower percentage correct on a particular day should not be 96 | cause for concern. The remainder of the stats, which take longer periods 97 | of time into account, will give more useful information if you wish to 98 | try to change your study habits or scheduling settings based on your 99 | performance. 100 | 101 | The “today” statistics are unaffected by the time period selected at the 102 | bottom of the window. 103 | 104 | ## The Graphs 105 | 106 | ### Future Due 107 | This graph shows an estimated number of reviews that will be due on a 108 | given day in the future if you learn no new cards and fail no cards. The 109 | bars and the left axis show the number of cards due on each day if you 110 | study all cards each day, while the gray shaded region and the right axis show 111 | the number of cards due on that day if you don’t study at all until then. 112 | Note that the forecast graph does not count reviews that are currently 113 | overdue, so if you have a large backlog, the overdue cards will not be 114 | displayed. 115 | 116 | Daily load is an estimate of the average number of cards to be reviewed daily. 117 | If you don't have a backlog, daily load should be approximately equal to 118 | your number of due cards. 119 | 120 | It is calculated as follows: 121 | 122 | $$ 123 | \frac{1}{I_1} + \frac{1}{I_2} + \frac{1}{I_3} + \dots + \frac{1}{I_n} 124 | $$ 125 | 126 | Here, \\(I_n\\) is the interval of 127 | the n-th card. If the interval is less than one day, the summation term is 1. This 128 | prevents cards with short intervals from unrealistically skewing the value of daily load. 129 | 130 | Example: you have a card with an interval of 10 days and a card with an interval of 50 days. 131 | Daily load = \\(\frac{1}{10} + \frac{1}{50} = 0.12\\), meaning that, _on average_, you will have 0.12 due cards per day. 132 | 133 | ### Calendar 134 | This graph shows past card review activity. Hovering the mouse over a specific item 135 | allows you to view the number of revisions made that day. Click on a day of the 136 | week to make that the starting day. 137 | 138 | ### Reviews 139 | This graph counts the number of card reviews you have done. The bars may 140 | correspond to days, weeks, or months, depending on the time period 141 | you’ve selected at the bottom of the screen. The differently colored 142 | blocks show how many of the cards you answered on each day were 143 | [mature](getting-started.md#card-states), young, relearning, or learning cards. 144 | There is also a separate group for cards answered in a filtered/cram 145 | deck while they were not due. The gray shaded region and the right axis show 146 | the cumulative total for each type of review as time progresses across the 147 | graph (so at 0 days, it would display the number for the entire time 148 | period displayed on the graph). 149 | 150 | ### Card Counts 151 | This pie chart shows what percentage of your deck or collection consists 152 | of mature, unseen, young/learn, and suspended cards. If you wish to 153 | calculate a more precise percentage, the key shows the exact number of 154 | cards in each section, and the total number of cards is displayed to the 155 | side. 156 | 157 | ### Review Time 158 | This graph works exactly like Review Count, except that it deals with 159 | the amount of time you spent on each card rather than the number of 160 | cards answered. 161 | 162 | ### Review Intervals 163 | This graph displays the number of cards that have a given interval (the 164 | delay between two reviews). The gray shaded region and the right axis tell you 165 | what percentage of your cards have an interval of less than or equal to the 166 | time below that point. The time scope has a different effect on this 167 | graph than other graphs: rather than changing which cards or period of 168 | studying is included, it limits how far out the intervals are displayed 169 | to (so 14-month intervals are not displayed at all on a 1-year graph). 170 | 171 | ### Card Ease 172 | This graph shows the number of cards that have a specific ease factor. 173 | Average ease of the selected deck / collection is also displayed here. 174 | 175 | ### Card Stability 176 | Only shown if FSRS is enabled. Stability is defined as the amount of time required 177 | for the probability of recall to decrease from 100% to 90%. 178 | 179 | ### Card Difficulty 180 | Only shown if FSRS is enabled. Difficulty determines how quickly a card's interval grows 181 | after each review. 182 | 183 | ### Card Retrievability 184 | Only shown if FSRS is enabled. "Retrievability" is synonymous with "probability of recall". 185 | 186 | Estimated total knowledge is the total number of cards you are likely to currently remember, 187 | calculated by multiplying average retrievability by the number of cards that have been 188 | reviewed at least once. 189 | 190 | ### Hourly Breakdown 191 | This graph shows the percentage of total reviews you have passed during given 192 | hours. 193 | 1. x-axis (bottom): Time of day (at given hour). 194 | 2. y-axis (right): Amount of cards studied. 195 | 3. secondary y-axis (left): Success rate in percent. 196 | 197 | The blue bars thus show you the number of reviews you’ve made at that hour (so 198 | that you know how significant the results are). The gray shaded region shows 199 | the percentage of the total reviews you have passed (i.e., not pressed _Again_ 200 | on) at that hour. 201 | 202 | ### Answer Buttons 203 | This graph shows how many times you’ve chosen the Again, Hard, Good, or 204 | Easy button while studying learning/new, young, and 205 | [mature](getting-started.md#card-states) cards. Anki also displays the percentage 206 | of correct reviews for each type of card. 207 | 208 | 209 | ### True Retention Table 210 | 211 | This table shows your retention across different cards and different time frames. 212 | A card is defined as "mature" if its interval is ≥21 days. Only one review per day - the first one - counts. 213 | Again counts as "Fail"; Hard, Good, and Easy count as "Pass". 214 | This table can be used to check how well [Anki's spaced repetition algorithm](https://faqs.ankiweb.net/what-spaced-repetition-algorithm.html) is working for you. 215 | 216 | If you are using FSRS, your true retention is expected to be close to your [desired retention](deck-options.md#desired-retention). 217 | Please keep in mind that data for a single day is noisy, so it's better to look at monthly data. If your true retention doesn't match your desired retention very well, here are some general recommendations: 218 | 219 | 1) Optimize your FSRS parameters. 220 | 2) Use different presets with their own parameters for different material. 221 | 3) Suspend/reformulate [leeches](leeches.md). 222 | 4) Make sure you are [using the answer buttons as intended](studying.md#answer-buttons). 223 | 224 | 225 | ## Manual Analysis 226 | 227 | If you’re interested in getting information from your statistics other 228 | than what Anki provides, it is possible to access the data directly. 229 | Because of the complexity involved, this is not something we can provide 230 | any support for. 231 | 232 | One option is to [write an add-on](addons.md) that adds another graph or 233 | more details to the statistics window. There are several add-ons of this 234 | sort on AnkiWeb already, which you can look at to get an idea of how it 235 | works. 236 | 237 | A more powerful and more complex option is to extract the review log 238 | information directly from Anki’s database and analyze it in an external 239 | program. Anki uses a database format called SQLite. There are many tools 240 | available for working with SQLite databases; one of the easiest to start 241 | with is called [SQLite Browser](http://sqlitebrowser.org/), which will 242 | allow you to look around the database as well as export a CSV version of 243 | tables for import into another program. 244 | 245 | The most important table for statistics is the "revlog" table, which 246 | stores an entry for each review that you conduct. The columns are as 247 | follows: 248 | 249 | **id**\ 250 | The time at which the review was conducted, as the number of 251 | milliseconds that had passed since midnight UTC on January 1, 1970. 252 | (This is sometimes known as "Unix epoch time", especially when in 253 | straight seconds instead of milliseconds.) 254 | 255 | **cid**\ 256 | The ID of the card that was reviewed. You can look up this value in the 257 | id field of the "cards" table to get more information about the card, 258 | although note that the card could have changed between when the revlog 259 | entry was recorded and when you are looking it up. It is also the 260 | millisecond timestamp of the card’s creation time. 261 | 262 | **usn**\ 263 | This column is used to keep track of the sync state of reviews and 264 | provides no useful information for analysis. 265 | 266 | **ease**\ 267 | Which button you pressed at the end of the review (1 for Again, 4 for 268 | Easy). 269 | 270 | **ivl**\ 271 | The new interval that the card was pushed to after the review. Positive 272 | values are in days; negative values are in seconds (for learning cards). 273 | 274 | **lastIvl**\ 275 | The interval the card had before the review. Cards introduced for the 276 | first time have a last interval equal to the Again delay. 277 | 278 | **factor**\ 279 | The new ease factor of the card in permille (parts per thousand). If the 280 | ease factor is 2500, the card’s interval will be multiplied by 2.5 the 281 | next time you press Good. 282 | 283 | **time**\ 284 | The amount of time (in milliseconds) you spent on the question and 285 | answer sides of the card before selecting an ease button. 286 | 287 | **type**\ 288 | This is 0 for learning cards, 1 for review cards, 2 for relearning cards, 289 | and 3 for early "cram" cards (cards being studied in a filtered deck when they 290 | are not due). 291 | -------------------------------------------------------------------------------- /src/files.md: -------------------------------------------------------------------------------- 1 | # Managing Files and Your Collection 2 | 3 | 4 | 5 | ## Checking Your Collection 6 | 7 | It is a good idea to occasionally check your collection file for 8 | problems. You can do this via the Tools>Check Database menu item. 9 | Checking the database ensures the file has not been corrupted, rebuilds some 10 | internal structures, and optimizes the file. 11 | 12 | When you check the database, your tag list is also rebuilt. When you 13 | delete individual decks or cards, Anki does not update the list of used 14 | tags, as it's inefficient to do so. If you want to clear old tags out 15 | from the list that are no longer in use, checking your database is the 16 | way to do it. 17 | 18 | Please note that Anki will automatically optimize your collection once 19 | every 2 weeks. This optimization ensures the collection performs well, 20 | but it does not check for errors or rebuild the tag list when 21 | automatically optimizing. 22 | 23 | 24 | 25 | ## User Data 26 | 27 | On **Windows**, the latest Anki versions store your collection files in your 28 | appdata folder. You can access it by opening the file manager, and 29 | typing `%APPDATA%\Anki2` in the location field. Older versions of Anki 30 | stored your Anki files in a folder called `Anki` in your `Documents` 31 | folder. 32 | 33 | On **Mac** computers, recent Anki versions store all user data in the 34 | `~/Library/Application Support/Anki2` folder. The Library folder is 35 | hidden by default, but can be revealed in Finder by holding down the 36 | option key while clicking on the Go menu. If you're on an older Anki 37 | version, your Anki files will be in your `Documents/Anki` folder. 38 | 39 | On **Linux**, recent Anki versions store your user data in 40 | `~/.local/share/Anki2`, or `$XDG_DATA_HOME/Anki2` if you have set a 41 | custom data path. If you are using a third-party **Flatpak** build, 42 | your files will be in `~/.var/app/net.ankiweb.Anki/data/Anki2/`. 43 | Older versions of Anki stored your files in 44 | `~/Documents/Anki` or `~/Anki`. 45 | 46 | Within the Anki folder, the program-level and profile-level preferences 47 | are stored in a file called `prefs.db`. 48 | 49 | There is also a separate folder for each profile. The folder contains: 50 | 51 | - Your notes, decks, cards and so on in a file called `collection.anki2` 52 | 53 | - Your audio and images in a `collection.media` folder 54 | 55 | - A backups folder 56 | 57 | - Some system files 58 | 59 | You should never copy or move your collection while Anki is open. Doing 60 | so could cause your collection to become corrupt. Please do not move or 61 | modify the other files in the folder either. 62 | 63 | ## Program Files 64 | 65 | Anki's launcher is installed in the following locations by default: 66 | 67 | - Windows: `%LOCALAPPDATA%\Programs\Anki` 68 | - macOS: `/Applications/Anki.app` 69 | - Linux: `/usr/local/share/anki` 70 | 71 | When you install/update Anki with the launcher, it downloads support 72 | files and places them in the following locations: 73 | 74 | - Windows: `%LOCALAPPDATA%\AnkiProgramFiles` 75 | - macOS: `~/Library/Application Support/AnkiProgramFiles` 76 | - Linux: `~/.local/share/AnkiProgramFiles` 77 | 78 | Removing that folder will cause the launcher to behave like a fresh install. 79 | 80 | The `AnkiProgramFiles` contains all the files needed to run Anki aside from 81 | the launcher. You can copy it to a different folder or system, and start 82 | Anki from the new location by opening `AnkiProgramFiles/.venv/bin/anki` (or 83 | `AnkiProgramFiles\.venv\scripts\anki` on Windows). If placed in the standard location on a new computer, the launcher will also be able to re-use the existing files, provided the files were copied with modification times preserved. 84 | 85 | See the flash drive section below for more. 86 | 87 | ## Startup Options 88 | 89 | If you have made a destructive change on one computer and have an 90 | undamaged copy on another computer, you may wish to start Anki without 91 | syncing in order to use the full sync option without first downloading 92 | the changes. Similarly, if you are experiencing problems with Anki, you 93 | might need to (or might be instructed to) disable add-ons temporarily to 94 | see if one might be causing the problem. To do both of these things at the same time, you can 95 | open Anki in safe mode by holding down the Shift key while starting Anki. Keep holding Shift down until the on-screen message informs you that Anki has started in safe mode. If you're on Linux and that didn't work, run 'anki --safemode'. 96 | 97 | It is possible to specify a custom folder location during startup. This 98 | is an advanced feature that is primarily intended to be used with 99 | portable installations, and we recommend you use the default location in 100 | most circumstances. 101 | 102 | The syntax to specify an alternate folder is as follows: 103 | 104 | anki -b /path/to/anki/folder 105 | 106 | - If you have multiple profiles, you can pass -p <name> to load 107 | a specific profile. 108 | - If you pass -p some-fake-name, Anki will show the profile screen on startup. 109 | If no profile is provided, the last-used profile is loaded. 110 | 111 | - To change the interface language, use -l <iso 639-1 language 112 | code>, such as "-l ja" for Japanese. 113 | 114 | If you always want to use a custom folder location, you can modify your 115 | shortcut to Anki. On Windows, right-click on the shortcut, choose 116 | Properties, select the Shortcut tab, and add "-b 117 | \\path\\to\\data\\folder" after the path to the program, which should 118 | leave you with something like 119 | 120 | "C:\Program Files\Anki\anki.exe" -b "C:\AnkiDataFolder" 121 | 122 | You can also use this technique with the -l option to easily use Anki in 123 | different languages. 124 | 125 | On Windows, you should use a backslash (\\) not a forward slash (/). 126 | 127 | On a Mac there is no easy way to alter the behaviour when clicking on 128 | the Anki icon, but it is possible to start Anki with a custom base 129 | folder from a terminal: 130 | 131 | open /Applications/Anki.app --args -b ~/myankifolder 132 | 133 | Alternatively, you can define the environment variable "ANKI_BASE". 134 | On Windows, you can define the environment variable with: 135 | 136 | set "ANKI_BASE=C:/path/to/AnkiDataFolder" 137 | 138 | On Linux and macOS, you can use: 139 | 140 | export ANKI_BASE="/path/to/AnkiDataFolder" 141 | 142 | ## DropBox and File Syncing 143 | 144 | We do not recommend you sync your Anki folder directly with a 145 | third-party synchronization service, as it can lead to database 146 | corruption when files are synced while in use. 147 | 148 | If you just want to synchronize your media, you can link external 149 | folders into services like DropBox. Please see [DropboxWiki: Sync 150 | Folders Outside Dropbox (archive.org)][dropboxwiki-sync-other] 151 | for more info. 152 | 153 | [dropboxwiki-sync-other]: http://web.archive.org/web/20180919153730/http://www.dropboxwiki.com/tips-and-tricks/sync-other-folders 154 | 155 | If you wish to keep your collection in sync as well, it is strongly 156 | recommended that you create a script that copies your files from your 157 | synced folder to a local folder, launches Anki, and then copies the 158 | files back when Anki is closed. This will ensure that the files are 159 | never synchronized while they are open. 160 | 161 | ## Network Filesystems 162 | 163 | We strongly recommend you have Anki store your files on a local hard 164 | disk, as network filesystems can lead to database corruption. If a 165 | network filesystem is your only option, regular use of Tools>Check 166 | Database to detect corruption is recommended. 167 | 168 | ## Running from a Flash Drive 169 | 170 | On Windows, Anki can be installed on a USB / flash drive and run as a 171 | portable application. The following example assumes your USB drive is 172 | drive E; adjust as necessary. 173 | 174 | WARNING: The drive letter must be the same on all devices. If you set this up for drive E, 175 | it won't work for a flash drive mapped to drive D for example. 176 | 177 | WARNING: Media syncing with AnkiWeb may not work if your flash drive is formatted 178 | as FAT32. Please format the drive as NTFS to ensure media syncs 179 | correctly. 180 | 181 | 1. Download the latest Anki launcher, and install it in a custom location: 182 | `E:\Anki\Launcher`. Not `E:\Anki\Launcher\Anki`. 183 | 2. When the launcher appears, close it without installing. 184 | 3. Put the following in a file `E:\Anki\Anki.bat`: 185 | 186 | ```bat 187 | @echo off 188 | echo Starting Anki... 189 | set USB_ROOT=%~dp0 190 | set ANKI_LAUNCHER_VENV_ROOT=%USB_ROOT%\AnkiProgramFiles 191 | set ANKI_LAUNCHER=%USB_ROOT%\Launcher\anki 192 | set ANKI_BASE=%USB_ROOT%\AnkiData 193 | start /b %ANKI_LAUNCHER% 194 | ``` 195 | 196 | 4. Double-click on the .bat file you created, and install Anki as normal. 197 | 5. You can now double-click on the .bat file to run Anki from other machines. 198 | 199 | Tools>Upgrade/Downgrade will continue to function, but only when your machine 200 | has access to the internet. 201 | 202 | ## Backups 203 | 204 | Please see [this section](./backups.md). 205 | 206 | ## Inaccessible Harddisk 207 | 208 | If Anki can't write to files in the [Anki folder](#user-data), a message 209 | will be displayed on startup saying that Anki can't write to the 210 | harddisk, and Anki will close. If you're unsure how to fix the 211 | permissions, please contact someone near you who is knowledgeable about 212 | computers and can help you out. 213 | 214 | ## Permissions of Temp Folder 215 | 216 | Anki uses the system's temporary folder to store temporary data. If the 217 | permissions of this folder have been changed from the default settings 218 | by a rogue app or buggy antivirus app, Anki will not function properly. 219 | 220 | If you're on a Windows 7 machine, the general steps to fix the problem 221 | are listed below. As this is somewhat complicated, please ask someone 222 | knowledgeable about Windows if you are not sure. 223 | 224 | 1. Click on the start bar, and type in %temp% (including the percents), 225 | then hit Enter. 226 | 227 | 2. Go up one folder, and locate the temp folder. Right click on it, and 228 | choose Properties. 229 | 230 | 3. In the security tab, click on Advanced. 231 | 232 | 4. Click on the Owner tab. If you're not listed as the owner, click the 233 | button to take ownership. 234 | 235 | 5. On the permissions tab, ensure that you have full control. On a 236 | default W7 install the control will actually be inherited from 237 | c:\\users\\your-username. 238 | 239 | ## Corrupt Collections 240 | 241 | Anki uses a file format that is robust against program and computer 242 | crashes, but it's still possible for your collection to become corrupt 243 | if the files are modified while Anki is open, stored on a network drive, 244 | or corrupted by a bug. 245 | 246 | When you run Tools>Check Database, you will receive a message if Anki 247 | detects the file has been corrupted. **The best way to recover from this 248 | is to restore from the most recent [automatic backup](#backups)**, but 249 | if your backup is too old, then you can attempt to repair the corruption 250 | instead. 251 | 252 | On Linux, make sure sqlite3 is installed. On a Mac, it should be 253 | installed already. On Windows, download 254 | . 255 | 256 | Next, create a backup of your collection.anki2 file, in case something 257 | goes wrong with the steps below. 258 | 259 | ### Linux/macOS 260 | 261 | Open a terminal, change to the folder your collection is located in, and 262 | type: 263 | 264 | sqlite3 collection.anki2 .dump > dump.txt 265 | 266 | Open the resulting dump.txt file in a text editor, and look at the final 267 | line. If it reads "rollback;", change it to "commit;" 268 | 269 | Then run the following in a terminal: 270 | 271 | cat dump.txt | sqlite3 temp.file 272 | 273 | Make sure you use temp.file - do not put collection.anki2 on the right, 274 | or you will blank out the file. When you're done, proceed to the final 275 | step. 276 | 277 | ### Windows 278 | 279 | Copy the `sqlite3.exe` program and your deck to your desktop. Then go to 280 | **Start>Run** and type in `cmd.exe`. 281 | 282 | If you're on a recent Windows, the command prompt may not start on your 283 | desktop. If you don't see desktop displayed in the command prompt, type 284 | something like the following, replacing "administrator" with your login 285 | name. 286 | 287 | cd C:\Users\Administrator\Desktop 288 | 289 | Then type: 290 | 291 | sqlite3 collection.anki2 .dump > dump.txt 292 | 293 | Open the resulting dump.txt file in a text editor, and look at the final 294 | line. If it reads "rollback;", change it to "commit;" 295 | 296 | Then run the following in a terminal: 297 | 298 | type dump.txt | sqlite3 temp.file 299 | 300 | Make sure you use temp.file - do not put collection.anki2 on the right, 301 | or you will blank out the file. When you're done, proceed to the final 302 | step. 303 | 304 | ### Final Step 305 | 306 | Check that you didn't get an error message, and that temp.file is not 307 | empty. The procedure optimizes the collection in the process, so it's 308 | normal for the new file to be somewhat smaller than the old one. 309 | 310 | When you've confirmed the file is not empty: 311 | 312 | - rename the original collection.anki2 file to something else 313 | 314 | - rename temp.file to collection.anki2 315 | 316 | - move collection.anki2 back into your collection folder, overwriting 317 | the old version 318 | 319 | - start Anki and go to Tools>Check Database to make sure the 320 | collection has been successfully restored. 321 | -------------------------------------------------------------------------------- /src/templates/styling.md: -------------------------------------------------------------------------------- 1 | # Styling & HTML 2 | 3 | 4 | 5 | ## Card Styling 6 | 7 | You can watch [a video about styling cards](http://www.youtube.com/watch?v=F1j1Zx0mXME&yt:cc=on) on YouTube. 8 | The video shows Anki 2.0’s interface, but the concepts are largely the 9 | same. 10 | 11 | The styling section of the Cards screen can be accessed by clicking the 12 | "Styling" button next to the "Back Template" button. In that section, 13 | you can change the background color of the card, the default font, the 14 | text alignment, and so on. 15 | 16 | The standard options available to you are: 17 | 18 | **font-family**\ 19 | The name of the font to use on the card. If your font has spaces in it 20 | like "MS Unicode", then you need to surround the font name in double 21 | quotes, like `font-family: "MS Unicode";`. It is also possible to use multiple fonts on 22 | one card; for information on that, please see below. 23 | 24 | **font-size**\ 25 | The size of the font in pixels. When changing it, make sure you leave px 26 | at the end. 27 | 28 | **text-align**\ 29 | Whether the text should be aligned in the center, left, or right. 30 | 31 | **color**\ 32 | The color of the text. Simple color names like "blue", "lightyellow", 33 | and so on will work, or you can use HTML color codes to select arbitrary 34 | colors. Please see [this webpage](https://htmlcolorcodes.com/) for more 35 | information. 36 | 37 | **background-color**\ 38 | The color of the card background. 39 | 40 | Any CSS can be placed in the styling section – advanced users may wish 41 | to do things like add a background image or gradient, for example. If 42 | you’re wondering how to get some particular formatting, please search 43 | the web for information about how to do it in CSS, as there is a great 44 | deal of documentation available. 45 | 46 | The styling is shared between all cards, which means that when you make 47 | an adjustment it will affect all cards for that note type. It is also 48 | possible to specify card-specific styling, however. The following 49 | example will use a yellow background on all cards except the first one: 50 | 51 | ```css 52 | .card { 53 | background-color: yellow; 54 | } 55 | .card1 { 56 | background-color: blue; 57 | } 58 | ``` 59 | 60 | ## Image Resizing 61 | 62 | Anki shrinks images to fit the screen by default. You can change this by adding 63 | the following to the bottom of your styling section (outside of the default 64 | `.card { ... }`): 65 | 66 | ```css 67 | img { 68 | max-width: none; 69 | max-height: none; 70 | } 71 | ``` 72 | 73 | AnkiDroid sometimes has [trouble scaling images to fit the 74 | screen](https://github.com/ankidroid/Anki-Android/issues/3612). Setting maximum 75 | image dimensions using css should fix this, but seems to be ignored as of 76 | AnkiDroid 2.9. A fix is to append `!important` to each style directive, for 77 | example: 78 | 79 | ```css 80 | img { 81 | max-width: 300px !important; 82 | max-height: 300px !important; 83 | } 84 | ``` 85 | 86 | If you try to change the style for images and find that the star that 87 | appears on marked cards is affected (for instance, it becomes way too 88 | large), you can target it with the following: 89 | 90 | ```css 91 | img#star { 92 | ...; 93 | } 94 | ``` 95 | 96 | You can explore the styling of cards interactively by using Chrome: 97 | 98 | 99 | 100 | Anki 2.1.50+ supports image resizing within the editor natively. 101 | 102 | ## Field Styling 103 | 104 | The default styling applies to the whole card. You can also make certain 105 | fields or part of the card use a different font, color, and so on. This 106 | is particularly important when studying foreign languages, as Anki will 107 | sometimes be unable to correctly display characters unless an 108 | appropriate font has been chosen. 109 | 110 | Say you have an “Expression” field, and you want to give it the macOS Thai 111 | font “Ayuthaya”. Imagine your template already reads: 112 | 113 | What is {{Expression}}? 114 | 115 | {{Notes}} 116 | 117 | What we need to do is wrap the text we want to style in some HTML. We 118 | will put the following in front of the text: 119 | 120 |
121 | 122 | And the following behind it: 123 | 124 |
125 | 126 | By wrapping the text like the above, we tell Anki to style the wrapped 127 | text with a custom style called “mystyle1”, which we will create later. 128 | 129 | Thus if we wanted the entire “What is …​?” expression to use the Thai 130 | font, we would use: 131 | 132 |
What is {{Expression}}?
133 | 134 | {{Notes}} 135 | 136 | And if we wanted only the expression field itself to use the Thai font, 137 | we’d use: 138 | 139 | What is
{{Expression}}
? 140 | 141 | {{Notes}} 142 | 143 | After we’ve edited the template, we now need to move to the Styling 144 | section between the templates. Before editing it, it should look 145 | something like: 146 | 147 | ```css 148 | .card { 149 | font-family: arial; 150 | font-size: 20px; 151 | text-align: center; 152 | color: black; 153 | background-color: white; 154 | } 155 | ``` 156 | 157 | Add your new style to the bottom, so it looks like: 158 | 159 | ```css 160 | .card { 161 | font-family: arial; 162 | font-size: 20px; 163 | text-align: center; 164 | color: black; 165 | background-color: white; 166 | } 167 | 168 | .mystyle1 { 169 | font-family: ayuthaya; 170 | } 171 | ``` 172 | 173 | You can include any styling you want in the style. If you wanted to 174 | increase the font size too, you’d change the mystyle1 section to look 175 | like: 176 | 177 | ```css 178 | .mystyle1 { 179 | font-family: ayuthaya; 180 | font-size: 30px; 181 | } 182 | ``` 183 | 184 | It’s also possible to bundle custom fonts with your deck, so you don’t 185 | need to install them on your computer or mobile device. Please see the 186 | [installing fonts](#installing-fonts) section for more info. 187 | 188 | ## Audio Replay Buttons 189 | 190 | When audio or text to speech is included on your cards, Anki will show 191 | buttons you can click on to replay the audio. 192 | 193 | If you prefer not to see the buttons, you can hide them in the 194 | preferences screen. 195 | 196 | You can customize their appearance in your card styling, for example, to 197 | make them smaller and colored, you could use the following: 198 | 199 | ```css 200 | .replay-button svg { 201 | width: 20px; 202 | height: 20px; 203 | } 204 | .replay-button svg circle { 205 | fill: blue; 206 | } 207 | .replay-button svg path { 208 | stroke: white; 209 | fill: green; 210 | } 211 | ``` 212 | 213 | ## Text Direction 214 | 215 | If you use a language that is written right-to-left, such as Arabic or Hebrew, 216 | you can add the CSS `direction` property to the .card section for correct display during review: 217 | 218 | ```css 219 | .card { 220 | direction: rtl; 221 | } 222 | ``` 223 | 224 | This will change the direction of the entire card. You can change the direction 225 | of only certain fields by wrapping their references in some HTML: 226 | 227 |
{{Front}}
228 | 229 | To change the direction of fields in the editor, please see 230 | the [editing](../editing.md#customizing-fields) section. 231 | 232 | ## Other HTML 233 | 234 | Your templates can contain arbitrary HTML, which means that all the 235 | layout possibilities used on internet web pages can also be used on your 236 | cards. Things like tables, lists, images, links to external pages and so 237 | on are all supported. With tables for example, you could change the 238 | layout so that the front and back of a card appear on the left and right 239 | instead of the top and bottom. 240 | 241 | Covering all of HTML’s features is outside the scope of this manual, but 242 | there are plenty of good introductory guides to HTML available on the 243 | web if you’d like to learn more. 244 | 245 | ## Browser Appearance 246 | 247 | If your card templates are complex, it may be difficult to read the 248 | question and answer columns (called "Front" and "Back") in the [card list](../browsing.md#cardnote-table). The "browser appearance" option allows you to define a 249 | custom template to be used only in the browser, so you can include only 250 | the important fields and change the order if you desire. The syntax is 251 | the same as in standard card templates. 252 | 253 | When using this option, if the text in the question column is repeated at the beginning of the answer column, Anki will display the text only in the question column. For example, if the question column text is "People in Ladakh speak", and the answer is "People in Ladakh speak Ladakhi", the answer column will only display "Ladakhi", omitting the rest. 254 | 255 | ## Platform-Specific CSS 256 | 257 | Anki defines some special CSS classes that allow you to define different 258 | styling for different platforms. The example below shows how to vary the 259 | font depending on where you’re reviewing: 260 | 261 | ```css 262 | /* Windows */ 263 | .win .example { 264 | font-family: "Example1"; 265 | } 266 | /* macOS */ 267 | .mac .example { 268 | font-family: "Example2"; 269 | } 270 | /* Linux desktops */ 271 | .linux:not(.android) .example { 272 | font-family: "Example3"; 273 | } 274 | /* both Linux desktops, and Android devices */ 275 | .linux .example { 276 | font-family: "Example4"; 277 | } 278 | /* both Android and iOS */ 279 | .mobile .example { 280 | font-family: "Example5"; 281 | } 282 | /* iOS */ 283 | .iphone .example, 284 | .ipad .example { 285 | font-family: "Example6"; 286 | } 287 | /* Android */ 288 | .android .example { 289 | font-family: "Example7"; 290 | } 291 | ``` 292 | 293 | And in the template: 294 | 295 | ```html 296 |
{{Field}}
297 | ``` 298 | 299 | You can also use properties like .gecko, .opera, and .ie to select 300 | particular browsers when using AnkiWeb. Please see 301 | for a full list of options. 302 | 303 | ## Installing Fonts 304 | 305 | You can install fonts directly to Anki. This is useful if you’re using Anki on 306 | a work or school computer where you don’t have permission to install new fonts, 307 | or if you’re using Anki on a mobile device. 308 | 309 | Anki supports the most widely used font formats, such as TrueType (.ttf), 310 | OpenType (.otf), Web Open Font Format (.woff) and others. 311 | 312 | ### Add Font to Media Folder 313 | 314 | Once you have downloaded a supported font, such as "Arial.ttf", you have to add 315 | it to the media folder. 316 | 317 | 1. Rename the file, adding an underscore at the start, so it becomes 318 | like "\_arial.ttf". Adding an underscore will tell Anki that this 319 | file will be used on a template, and should not be deleted when 320 | checking for unused media. 321 | 322 | 2. In your computer’s file browser, go to your Anki application data folder (see [File Locations](../files.md#file-locations) for details), 323 | and then into your profile folder (e.g., "User 1"). 324 | 325 | 3. Inside the folder, you should see a folder called collection.media. 326 | Drag the renamed file to that folder. 327 | 328 | ### Update Template to Use That Font 329 | 330 | After the font has been added to the media folder, you need to update the 331 | template. 332 | 333 | 1. Click **Add** at the top of the main screen, and then select the 334 | note type you want to change with the top left button. 335 | 336 | 2. Click **Cards**. 337 | 338 | 3. In the styling section, add the following text to the bottom (after 339 | the last "}" character), replacing "\_arial.ttf" with the name of 340 | the file you copied into your media folder: 341 | 342 | ```css 343 | @font-face { 344 | font-family: myfont; 345 | src: url("_arial.ttf"); 346 | } 347 | ``` 348 | 349 | Only change the "arial" part, not the "myfont" part. 350 | 351 | After that, you can either change the font for the entire card, or for 352 | individual fields. To change the font for the entire card, simply locate 353 | the font-family: line in the .card section and change the font to 354 | "myfont". To change the font for only certain fields, please see the 355 | [Field Styling](#field-styling) instructions above. 356 | 357 | Please make sure the filenames match exactly. If the file is called 358 | arial.TTF and you write arial.ttf in your card templates, it will not 359 | work. 360 | 361 | ## Night Mode 362 | 363 | You can customize the way templates appear when night mode is enabled in 364 | the preferences screen. 365 | 366 | If you wanted a lighter grey background, you could use 367 | something like: 368 | 369 | ```css 370 | .card.nightMode { 371 | background-color: #555; 372 | } 373 | ``` 374 | 375 | If you have a "myclass" style, the following would show the text in 376 | yellow when night mode is enabled: 377 | 378 | ```css 379 | .nightMode .myclass { 380 | color: yellow; 381 | } 382 | ``` 383 | 384 | ## Fading and Scrolling 385 | 386 | Anki will automatically scroll to the answer by default. It looks for an 387 | HTML element with id=answer, and scrolls to that. You can place the id 388 | on a different element to adjust the scrolling position, or remove the 389 | id=answer to turn off scrolling. 390 | 391 | The question side of a card fades in by default. If you wish to adjust 392 | this delay, you can place the following at the top of your front card 393 | template: 394 | 395 | ```html 396 | 400 | ``` 401 | 402 | 100 (milliseconds) is the default; set to 0 to disable fading. 403 | 404 | ## Javascript 405 | 406 | As Anki cards are treated like web pages, it is possible to embed some 407 | Javascript on your cards via the card template. For a good reference 408 | please read [this post](https://forums.ankiweb.net/t/card-templates-user-input-101-buttons-keyboard-shortcuts-etc-guide/13756) 409 | in the forums. 410 | 411 | Because Javascript is an advanced feature and so many things can go 412 | wrong, **Javascript functionality is provided without any support or 413 | warranty**. We can not provide any assistance with writing Javascript, 414 | and can not guarantee any code you have written will continue to work 415 | without modification in future Anki updates. If you are not comfortable 416 | addressing any issues you encounter on your own, then please avoid using 417 | Javascript. 418 | 419 | Each Anki client may implement card display differently, so you will 420 | need to test the behaviour across platforms. A number of clients are 421 | implemented by keeping a long running webpage and dynamically updating 422 | parts of it as cards are reviewed, so your Javascript will need to 423 | update sections of the document using things like 424 | document.getElementById() rather than doing things like 425 | document.write(). 426 | 427 | Functions like window.alert may not be available. Anki will write 428 | javascript errors to the terminal, so you'll need to [view the console](https://addon-docs.ankiweb.net/console-output.html#console-output) to 429 | see them. To debug issues with JavaScript, you can use Chrome's 430 | [inspector](https://addon-docs.ankiweb.net/debugging.html#webviews). 431 | --------------------------------------------------------------------------------