ABC Hints&Tips Overviews Reference Glossary Support
Contents : Overviews
Templates

Use templates to give your elements a given look

Templates in SuperMemo are used to create a number of similarly looking elements, e.g. with a given color, font, image, etc. The first thing to do with templates is to create the "common look". You can do it by creating an element containing all components that are common to all elements that will be created with the use of the template. All components should have their properties set in the way that is desired for the "common look" (e.g. color, font, position on the screen, etc.). You set the properties of components by using the component pop-up menu.

After creating the desired look, you can use Template : Save as template on the element pop-up menu (e.g. opened with Alt+F10). Save as template makes it possible to keep a "gallery of looks" for future use. Indeed, you can save any element as a template. Note that if you do not want particular texts, sounds or images being used in elements created with the template, delete them before saving the template. Saved templates are stored in the template registry that can be viewed with Search : Template on the main window's menu.

You can give an element a given look by applying a template. A template is loaded from the registry to any element with Template : Apply template (after you choose a template in the registry, click the Apply button at the bottom). Loading a template removes all existing components and attributes and makes the element look exactly like the element which was saved as a template.

Use category templates to switch between different looks

You can automatically give all elements in a given category a selected look. If you want a template to be always used when adding elements belonging to a given category, (1) use Tools : Categories, (2) go to the row corresponding with the selected category, (3) double-click on the Default template field, (4) link the template from template registry using the button Link, (5) close the categories window by clicking OK. This will make sure that your template is used each time you choose Edit : Add a new item or press Ctrl+A (only if the relevant category is selected as the current category in the category combo-box on the main window toolbar).

Use template merging to modify the element looks without changing its contents

If you would like to redesign items using a given template, you can use Template : Merge template (on element pop-up menu) or Node operations : Merge with template in the contents window (for all items or all topics in a given branch). Merge template keeps the contents of your current element and provides it with the look kept in the template.

Merge with template merges the element with a template from the template registry. The process of merging begins with loading the selected template. Then SuperMemo transfer all matching registry object from the old template to the new template. Please note that SuperMemo will not warn you if it cannot find a matching component. For example, if your element contains an image and you merge it with a template that does not have an image, the image will be deleted. There is not undo for merging templates. Use caution when using Merge with template, esp. when you merge a template with many element in one go.
Note that Merge with template has no effect on items if the template is a topic template (and vice versa). See also: Topics vs. items

Adding components to a group of existing elements

If you want to add new components to a group of elements, use Node operations : Add template. This will retain the old components and add new components from the added template. Add to template is similar to Merge with template but the contents of the new template is simply superimposed over the old template. This way, you can create a template with an image and add this image to selected elements by adding the image template. In merging templates, the number of components equals the number of components in the merged template, while in adding templates the number of components is a sum of components in the element and in the template.

Transferring template between collections

If you want to transfer templates (or single elements) between different collections, use Template : Save to file and Template : Load from file.


Frequently Asked Questions


Question:
How can I change the position of the question window on the screen?
Answer:
Alt-click the window twice. It will become draggable. Alternatively, you can choose Dragging mode on the question's pop-up menu or on the element pop-up menu (in the latter case, all components will become draggable). If you want to change this position permanently, you should use templates


(Eryk Horloza, Poland, June 3, 1997)
Question:
How can I keep different fonts for the question and the answer component in SuperMemo 98?
Answer:
The fastest way is:

  1. Add a new item with Ctrl+A
  2. On the pop-up menu of the question component choose Text : New font (or Links : Font if you have already defined the font)
  3. Select the appropriate question font
  4. Repeat steps 2 and 3 for the answer components
  5. On the element pop-up menu choose Template : Save as template. Remember the newly created template name for the next step
  6. In Tools : Options : Appending : Default item template type in the name of the new template
  7. Choose Ctrl+A again to see if your new template has been applied correctly

Now your new template with new fonts will be used each time you add a new item. Note, that you should rather use Tools : Categories rather than Tools : Options : Appending : Default item template if you have more than one category in the collection


(Janusz Murakowski, USA, Mar 18, 1999)
Question:
After using Apply template, my texts were deleted. I rather expected changing the look of my item
Answer:

To change the look use Merge with template instead


(David Mckenzie, New Zealand, Apr 8, 1998)
Question:
Is there any point in keeping collections separate?
Answer:

No. Once you master contents categories and templates, there is no point. You gain global search, global registries, global repetitions, global optimization, etc. This would not be advisable back in SuperMemo 7 as item difficulty measure (E-factor) was dependent on the average difficulty of items in the collection. Presently, the item difficulty measure (A-Factor, or absolute difficulty factor) is absolute and does not depend on the context in which an item is placed (see: Algorithm SM-8). Only the length of the first interval will significantly be affected by the average difficulty of items in the collection. However, this shall not bear dramatically on the speed of learning. Especially that variable forgetting index for individual items makes it possible to set different first intervals for whole contents categories or branches of the knowledge tree


(Doug Edmunds, USA, Nov 4, 1997)
Question:
How can I globally change the layout of question, answer, font, background color, etc.
Answer:
Do as follows:

  1. Create a new template with your new layout (make sure the number and the order of components are the same as in the original template).
  2. Save the template with Template : Save as template (on the element pop-up menu)
  3. In the contents window, choose the branch that should be changed
  4. On the contents pop-up menu choose Node operations : Merge template and select the new template
  5. Only text, images, sound files, etc. will be retain in the merging operation. All the rest will be taken from the new template

Warning! Make a back-up copy of your collection beforehand. If you miss a component in the new template, it will be removed from all elements in the node! There is not undo operation here


(Tomasz Chudy, Poland, Oct 17, 1998)
Question:
How can I globally change the color of element background in the whole collection?
Answer:
You should do the following (only if you use question-and-answer templates throughout your collection or if you use other uniform templates):

  1. Create a new element (e.g. with Ctrl+A)
  2. Change the color of element background with Color (available from the element pop-up menu in the element window)
  3. Save the newly created element as a template with Template : Save as template (available on the element pop-up menu in the element window)
  4. Merge all elements in the collection with the new template by means of Node operations : Template : Merge with template (available on the contents pop-up menu in the contents window)

Important: create a backup copy before you proceed. Merge template is irreversible!


(Peter J. Cool, The Netherlands, Oct 7, 1998)
Question:
I would like to interchange all question and answer pairs of my collection. How can I do it?
Answer:
You should do the following (only if you use question-and-answer templates throughout your collection):

  1. Create a new element (e.g. with Ctrl+A)
  2. Change the order of the element components with Components : Component order (available from the element pop-up menu in the element window)
  3. Save the newly created element as a template with Template : Save as template (available from the element pop-up menu in the element window)
  4. Merge all elements in the collection with the new template by means of Node operations : Template : Merge with template (available from the contents pop-up menu in the contents window)

Important: create a backup copy before you proceed. Merge template is irreversible!


(Tomoki Takahashi, Japan, Feb 6, 1999)
Question:
I would like to learn English with questions asked in Japanese. How can I do it?
Answer:
You have to (1) create your own template with the Japanese font in the question field (you can use Text : New Font to change the question font in the standard template), (2) save the template with Template : Save as template and (3) set the saved template as the default item template in Tools : Options : Appending : Default item template.
After this, each time you choose Add new (or press Ctrl+A), your questions will be generated in Japanese and answers will retain standard look (you can also swap English with Japanese by using Edit : Swap components)
Although you cannot change the writing direction in SuperMemo text components from yokogaki to tategaki, you can include it via OLE from Japanese Word or use utilities such as ATOK or Microsoft IME that comes with Windows. With ATOK you can change from the English to the Japanese input mode. It is fully compatible with SuperMemo: 1) You type the pronunciation of a word from the keyboard, 2) press Space, and 3) select the appropriate kanji(s) from the list showing those matching the input sounds combination


(Brian DeMio, USA, Jan 10, 1999)
Question:
I changed the template for the questions so that I have a purple background and yellow fonts. Everything is fine with that part.
After I entered in an element (question and answer) I hit Ctrl+A to put in a new one. The question from the previous element keeps popping up in the new elements where you are supposed to input answers. How can I fix this?
Answer:
Please make sure that when you save your template there are no texts in text components. You have to simply override your current template


(Krzysztof Morawski, Poland, Dec 28, 1998)
Question:
I am learning Norwegian. Until recently, SuperMemo has automatically chosen appropriate titles for my elements; however, for some time now, it has been choosing Norsk as the title for all elements (Norsk is a text included in a text component displayed as a label on each page). How can I make SuperMemo choose the right title (in my case, Polish word used as the question)?
Answer:
SuperMemo will automatically generate the title from the first text component in the component order. Your Norsk component is clearly first in the component order in your template. Choose Component order on the element menu and drag the component with your question text to the first position. Then choose OK and save your element in a new template (choose the same template name as before, i.e. default item template name)


(David K. Harris, Peking University, Oct 23, 1998)
Question:
I would like to underline important words in my elements, but have not yet figured out how to change the font of individual words within components
Answer:
You should use RTF components instead of text components. In an RTF component, select the text to underline and click the underline icon on the Edit toolbar. If you want all your elements to use RTF components instead of text components, save your RTF components in a template and make this template default in Tools : Options : Appending : Default item template


(Helmut Fritz, Germany, Oct 19, 1998)
Question:
Why do templates store texts used by text components? Each time I use Apply Template I have to delete those texts
Answer:
Occasionally you may need to store texts or pictures in your templates. Save your template again after deleting the texts