-
-
Notifications
You must be signed in to change notification settings - Fork 41
Customization
You can refer to the following tutorial video for a general overview of the topics covered in this Wiki section:
Please understand that some of the points in the video might be out of date. You will always find the most recent information in this Wiki.
Image Occlusion Enhanced comes with a simple Options menu which you can access from Anki's main screen by going to Tools → Image Occlusion Enhanced Options:
Clicking on Ok will apply the settings. Hitting Close or closing the window will dismiss your changes. You can revert to the default options by clicking on Restore Defaults and confirming with OK.
The following options are available:
Colors
- Question mask: Color of the masks you're being tested on
- Other masks: Color of all other masks. This sets the initial color. The actual color can be customized from the Editor.
- Lines: Default color of lines drawn by the Line tool, e.g. for labels
Other Editor Settings
- Line width: Default width of lines drawn by the Line tool
- Label font: Default font used by the text tool. If the selected font is unavailable on your system the cards will automatically fall back to Helvetica, Arial, or any other default sans-serif font
- Label size: Default font size of the text tool
Custom Field Names
The entry fields provided in this section are the one and only way to rename the default fields. As the add-on needs to know which field names correspond to what data you will have to use this dialog to rename the default fields. If you rename these fields through Anki directly it will cause the add-on to stop working, prompting you to change them back.
Please note that this only applies to the default fields. Any fields you add manually can be freely renamed and rearranged in any way you wish.
Miscellaneous Settings
List of hidden fields
Comma-separated list of fields you would like to ignore when editing notes. If you add a field to this list it will be marked as note-specific, meaning that you can only edit it on a per-note basis.
A sample list could look like this: Remarks,Extra 1,Extra 2
. If you've customized your field names please make sure to use the modified name for this list. This list also works for any additional fields you might have added to your note type.
There are only a limited number of settings you can customize about the Image Occlusion Enhanced note type in this screen.
Things you can do
- Customize Fields (see below)
- Customize Cards (see below)
- Customize all LaTeX settings under "Options"
Things you can't do
- Rename the Image Occlusion Enhanced note type
- if you rename the note type all cards with the renamed type will not be recognized by the add-on and will lose the ability to be edited
- any new notes you create after renaming the note type will simply use a new Image Occlusion Enhanced note type
- Delete the Image Occlusion Enhanced note type
- This will delete all of your IO cards.
Default Fields
The default Image Occlusion Enhanced note type comes with 11 fields which are all necessary for the add-on to work properly:
- ID (hidden)
- Header
- Image
- Footer
- Remarks
- Sources
- Extra 1
- Extra 2
- Question Mask
- Answer Mask
- Original Mask
Customization of these fields outside the add-on options dialog is limited:
Things you can do
- Change the editing font and all other field-specific options such as:
- Sort by this field in the browser
- Remember last input
- Reverse text direction
- Rearrange the fields: This is possible, but you should always keep the
ID (hidden)
field in the first position. The field is hidden by default anyway, so there really should be no need for you to rearrange it, but here is a more detailed explanation of why moving this field is a bad idea:- The ID field contains a unique number that is used to identify each note and correlate it to its siblings. Having this set as your first field will prevent Anki from marking your notes as duplicates (as other fields like the
Header
orImage
might be identical across different notes) - A valid ID field is a prerequisite for editing existing notes. If you modify the field by accident you might lose the ability to edit your cards. For that reason the add-on will try to hide the field, but this only works if the ID field is the first field.
- The ID field contains a unique number that is used to identify each note and correlate it to its siblings. Having this set as your first field will prevent Anki from marking your notes as duplicates (as other fields like the
Things you can't do
- Delete any of the default fields
- Rename any of the default fields
- this is only possible through the add-on options dialog
Custom Fields
From version 1.0 and up the add-on fully supports custom fields. You can add as many fields to the note type as you want, and rearrange and rename them in any way you wish. Your custom fields will appear next to all other fields in the IO Editor.
The Image Occlusion Enhanced note type only comes with one card by default which is called IO Card. You can freely rename this card, but please don't add any additional cards to the note type as this might lead to issues down the line.
Other options you can fully customize in the "Cards" dialog:
- More → Deck Override
- More → Browser Appearance
The card templates can be fully customized as long you leave the following HTML snippets on both the front and back template intact:
<div id="io-wrapper">
<div id="io-overlay">{{Question Mask}}</div>
<div id="io-original">{{Image}}</div>
</div>
<div id="io-wrapper">
<div id="io-overlay">{{Answer Mask}}</div>
<div id="io-original">{{Image}}</div>
</div>
The same principle applies to the Styling field. Please don't edit any of the styles in the OCCLUSION CSS
section.
These are various styling tweaks for the Image Occlusion card template, some of which were submitted by IO users (thanks!). To apply any of these, simply copy the code and place it at the end of the Styling section in the IO Cards dialog.
Smaller Tweaks
Modification | CSS code |
---|---|
Always display images in their original size | img {max-width: none; max-height: none;} |
Scale images to the window width (including scaling up smaller images) | img {height: auto; width: 100%; max-width: none; max-height: none;} |
Styling Overhauls
Marginless centered cards
This modification centers the content of your IO cards in both directions and removes all margins, using the available screen real estate as efficiently as possible.
body {
margin: 0;
}
.card {
position: absolute;
width: 99%;
height: 99%;
display: -webkit-box;
-webkit-box-align: stretch;
-webkit-box-pack: center;
-webkit-box-orient: vertical;
}
img {
max-width: 100%;
max-height: 100%;
}
io-footer {
max-width: 100%;
margin-top: 0em;
margin: auto 0.5%;
}
.mobile .card img {
max-width: auto;
max-height: none;
}
.mobile .card {
width: 100%;
height: 100%;
margin: 0 auto;
}
.mobile #content {
margin: 0 auto;
}
If you run into any issues after modifying your note type or template you can try restoring it to default by following the instructions on the Troubleshooting page.
Here's a list of complementary add-ons for Anki that could be useful when working with IO:
- Frozen Fields: Allows you to mark fields as 'sticky' on the fly. Compatible with IO's two-way field sync.
- Maximum Images Height in Card Editor: Sets a maximum image height for all images in the browser and note editor. This should make it easier to get a quick overview of each IO note.
Image Occlusion Enhanced Wiki