HTML component: Difference between revisions

From SuperMemo Help
Jump to navigation Jump to search
(ADDED: Figure prefix)
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
HTML is the default [[Using text components | text component]] in SuperMemo. To be able to use it, you need Internet Explorer. If you want to use the HTML component in [[incremental reading]], you need Internet Explorer 6.0 or later.
HTML is the default [[Using text components|text component]] in SuperMemo. It is based on editing and rendering engines of Internet Explorer. As such it carries all the rendering power and compatibility range of this powerful Microsoft product. This also means that all bugs and shortcomings should also be familiar. The good news is that, in Windows 10, most of the old HTLM problems are gone.


There are five ways in which you are most likely to add HTML text to your collection ([[Levels |middle or professional level]]):
As all necessary Internet Explorer components are part of Windows, you do not need to worry about installing Internet Explorer. '''You can use any web browser while using SuperMemo'''.


# '''Notes''': if you would like to type in some notes that will later be processed with [[incremental reading]], use '''[[Edit menu | Edit]] : Add to category : HTML note''' (''Ctrl+H''). Alternatively, to use your own HTML template, use '''Edit : Add to category : Note''' (''Alt+N''). '''HTML note''' will use the predefined HTML topic template (same as the original ''Article'' template), while '''Note''' will use your default topic template of the current category. For example, after hearing a piece of science news on the radio, you may want to quickly type in a note to SuperMemo. Press ''Alt+N'' and type in the message.
There are 4 ways in which you are most likely to add HTML text to your [[Glossary:Collection|collection]] ('''Middle''' or higher [[Glossary:Level|level]]):
# '''Articles''': if you find an interesting article on the net, select it in your web browser and copy it to the clipboard (e.g. with ''Ctrl+C''). You can then paste the article stored in the clipboard to SuperMemo with ''Ctrl+N'' ('''[[Edit menu |Edit]] : Add to category : Article'''). '''Article''' is similar to '''Note'''. The difference is that '''Article''' will paste the text from the clipboard to your newly created element, whereas '''Note''' will create a ''blank'' new element.
 
# '''Multiple articles''': if you have a couple of articles opened in Internet Explorer, use '''[[Edit menu | Edit]] : Import web pages : All''' (''Shift+Ctrl+A''). Unless you fear the article may disappear from the net, import links rather than whole articles. If you overload [[incremental reading]] with thousands of articles, you may wait for months or years before an article comes to your attention. Using links keeps the size of your collection in check. Huge collections are processed more slowly, are more difficult to back up, and produce more garbage in search results. For more details, see [[Import web pages]].
# '''Notes''': if you would like to type in some notes that will later be processed with [[Glossary:Incremental_reading|incremental reading]], use '''[[Edit menu|Edit]] : [[Edit menu#Add a note|Add a note]]''' (''Alt+N''). For example, after hearing a piece of science news on the radio, you may want to quickly type in a note to SuperMemo. Press ''Alt+N'' and type in the message.
# '''Files''': if you have HTML files saved on your hard disk, use '''[[Edit menu | Edit]] : Add to category : HTML file'''. You can then select the file you wish to import from the dialog.
# '''Articles''': if you find an interesting article on the net, select it in your web browser and copy it to the clipboard (e.g. with ''Ctrl+C''). You can then paste the article stored in the clipboard to SuperMemo with ''Ctrl+N'' ('''[[Edit menu|Edit]] : [[Edit menu#Add a new article|Add a new article]]'''). '''Article''' is similar to '''Note'''. The difference is that '''Article''' will paste the text from the clipboard to your newly created [[Glossary:Element|element]], whereas '''Note''' will create a ''blank'' new element.
# '''Wikipedia''': if you want to import articles from Wikipedia, use '''[[Edit menu | Edit]] : Import web pages : Wikipedia''' (''Shift+Ctrl+W''). If there are any Wikipedia pages open in Internet Explorer, you will be able to select them from a dialog. Otherwise, enter the desired page's title and Wikipedia will be opened in a new page in Internet Explorer; SuperMemo will then open the '''Import web pages''' dialog to allow you to import the desired page. (Note that if Internet Explorer is not your default web browser (e.g. if you use Firefox), you must manually navigate to the page in Internet Explorer before you can add it to your collection using ''Shift+Ctrl+W''.)
# '''Multiple articles''': if you have a couple of articles opened in Internet Explorer, use '''[[Edit menu|Edit]] : [[Web import]] : All''' (''Shift+Ctrl+A''). Unless you fear the article may disappear from the net, import links rather than whole articles. If you overload [[Glossary:Incremental_reading|incremental reading]] with thousands of articles, you may wait for months or years before an article comes to your attention. Using links keeps the size of your [[Glossary:Collection|collection]] in check. Huge collections are processed more slowly, are more difficult to back up, and produce more garbage in search results. For more details, see [[Web import]].
# '''Wikipedia''': if you want to import articles from [http://en.wikipedia.org Wikipedia], use '''[[Edit menu|Edit]] : [[Web import]] : Wikipedia''' (''Shift+Ctrl+W''). If there are any [http://en.wikipedia.org Wikipedia] pages open in Internet Explorer, you will be able to select them from a dialog. Otherwise, enter the desired page's title and [http://en.wikipedia.org Wikipedia] will be opened in a new page in Internet Explorer; SuperMemo will then open the [[Web import|'''Web import''' dialog]] to allow you to import the desired page. (Note that if Internet Explorer is not your default web browser (e.g. if you use Firefox), you must manually navigate to the page in Internet Explorer before you can add it to your collection using ''Shift+Ctrl+W'')


<div class="center">
<div class="center">


[[Image:Incremental_reading_Mnemonic_cues2.jpg|800px|center|SuperMemo: A topic about henipavirus in the HTML component on the left and 4 images taken from it with Download images (Ctrl+F8) in their individual image components on the right]]
[[Image:Incremental_reading_Mnemonic_cues2.jpg|800px|SuperMemo: A topic about henipavirus in the HTML component on the left and 4 images taken from it with Download images (Ctrl+F8) in their individual image components on the right]]


<blockquote>
<blockquote>


'''''Figure:''' A topic with an article about <span style="color: maroon;">henipavirus</span> in the HTML component on the left and 4 images taken from the article with '''Download images''' (Ctrl+F8) (available on the [[Component menu | component context menu]]), which downloaded, localized, and tiled them in their individual image components on the right. These 4 images will propagate to all extracts and cloze deletions ultimately produced from this article.''
'''''Figure:''' A [[Glossary:Topic|topic]] with an article about <span style="color: maroon;">henipavirus</span> in the HTML component on the left and 4 images taken from the article with '''[[Component menu#Download images|Download images]]''' (Ctrl+F8) (available on the [[Component menu|component context menu]]), which downloaded, localized, and tiled them in their individual image [[Glossary:Component|components]] on the right. These 4 images will propagate to all [[Glossary:Extract|extracts]] and [[Glossary:Cloze_deletion|cloze deletions]] ultimately produced from this article.''


</blockquote>
</blockquote>
Line 21: Line 22:
</div>
</div>


If you want to import an HTML file to an existing HTML component, right-click the HTML component, and choose [[Component menu#Import file | '''Import file''']]. Pick the file in the dialog box and choose '''OK'''. Your HTML file will be displayed in the HTML component. '''Import file''' does not import files linked to by the imported file. However, you can import an entire website located on your hard disk or local network if you use '''Links : External file''' on the HTML component menu. In such a case, the HTML file will remain in its original location and retain all relative links.
If you want to import an HTML file to an existing HTML component, right-click the HTML component, and choose '''[[Component menu#File|File]] : [[Component menu#Import file|Import file]]'''. Pick the file in the dialog box and choose '''OK'''. Your HTML file will be displayed in the HTML component. '''[[Component menu#Import file|Import file]]''' does not import files linked to by the imported file. However, you can import an entire website located on your hard disk or local network if you use '''[[Component menu#Links|Links]] : External file''' on the HTML [[component menu]]. In such a case, the HTML file will remain in its original location and retain all relative links.
 
If you would like to edit an HTML text in your favorite HTML editor, press ''Ctrl+F9'' (or choose '''[[Component menu#File|File]] : Edit file''' from the HTML [[component menu]]) and your HTML code will open in the HTML editor registered for editing HTML files in Windows. To preview an article in your web browser, ''Ctrl+click'' the HTML component or press ''F9'' (or choose '''[[Component menu#File|File]] : View file''' from the HTML [[component menu]]).


If you would like to edit an HTML text in your favorite HTML editor, press ''Ctrl+F9'' (or choose '''File : Edit file''' from the HTML [[component menu]]) and your HTML code will open in the HTML editor registered for editing HTML files in Windows. To preview an article in your web browser, ''Ctrl+click'' the HTML component or press ''F9'' (or choose '''File : View file''' from the HTML [[component menu]]).
== Inserting hyperlinks ==


'''Inserting hyperlinks'''
The most useful hyperlink will connect keywords with other elements in SuperMemo. To create inter-element hyperlink in HTML:
# display target element in SuperMemo
# copy its number to the clipboard (e.g. by using ''Ctrl+G'')
# select the linking keyword in the linking element
# paste the element number


To insert hyperlinks that would point to other elements, registry texts, HTML files, URL addresses on the Internet, registry images, etc., read about the option [[HTML link menu | '''Insert HTML link''']] (HTML [[component menu]]).
To insert hyperlinks that would point to other [[Glossary:Element|elements]], registry texts, HTML files, URL addresses on the Internet, registry images, etc., read about the option [[HTML link menu|'''Insert HTML link''']] (HTML [[component menu]]).


The HTML component can interpret JavaScript. If you know some JavaScript commands, you can enhance your SuperMemo presentation with scripted HTML components.
The HTML component can interpret JavaScript. If you know some JavaScript commands, you can enhance your SuperMemo presentation with scripted HTML components.


See also:
== See also ==


* [http://supermemo.com/help/faq/html.htm FAQ: Using HTML in SuperMemo]
* [https://super-memory.com/help/faq/html.htm FAQ: Using HTML in SuperMemo]
* [[Using text components | Text components]]
* [[Using text components|Text components]]
* [http://supermemo.com/help/faq/texts.htm FAQ: Text components]
* [https://super-memory.com/help/faq/texts.htm FAQ: Text components]

Revision as of 17:43, 5 August 2019

HTML is the default text component in SuperMemo. It is based on editing and rendering engines of Internet Explorer. As such it carries all the rendering power and compatibility range of this powerful Microsoft product. This also means that all bugs and shortcomings should also be familiar. The good news is that, in Windows 10, most of the old HTLM problems are gone.

As all necessary Internet Explorer components are part of Windows, you do not need to worry about installing Internet Explorer. You can use any web browser while using SuperMemo.

There are 4 ways in which you are most likely to add HTML text to your collection (Middle or higher level):

  1. Notes: if you would like to type in some notes that will later be processed with incremental reading, use Edit : Add a note (Alt+N). For example, after hearing a piece of science news on the radio, you may want to quickly type in a note to SuperMemo. Press Alt+N and type in the message.
  2. Articles: if you find an interesting article on the net, select it in your web browser and copy it to the clipboard (e.g. with Ctrl+C). You can then paste the article stored in the clipboard to SuperMemo with Ctrl+N (Edit : Add a new article). Article is similar to Note. The difference is that Article will paste the text from the clipboard to your newly created element, whereas Note will create a blank new element.
  3. Multiple articles: if you have a couple of articles opened in Internet Explorer, use Edit : Web import : All (Shift+Ctrl+A). Unless you fear the article may disappear from the net, import links rather than whole articles. If you overload incremental reading with thousands of articles, you may wait for months or years before an article comes to your attention. Using links keeps the size of your collection in check. Huge collections are processed more slowly, are more difficult to back up, and produce more garbage in search results. For more details, see Web import.
  4. Wikipedia: if you want to import articles from Wikipedia, use Edit : Web import : Wikipedia (Shift+Ctrl+W). If there are any Wikipedia pages open in Internet Explorer, you will be able to select them from a dialog. Otherwise, enter the desired page's title and Wikipedia will be opened in a new page in Internet Explorer; SuperMemo will then open the Web import dialog to allow you to import the desired page. (Note that if Internet Explorer is not your default web browser (e.g. if you use Firefox), you must manually navigate to the page in Internet Explorer before you can add it to your collection using Shift+Ctrl+W)

SuperMemo: A topic about henipavirus in the HTML component on the left and 4 images taken from it with Download images (Ctrl+F8) in their individual image components on the right

Figure: A topic with an article about henipavirus in the HTML component on the left and 4 images taken from the article with Download images (Ctrl+F8) (available on the component context menu), which downloaded, localized, and tiled them in their individual image components on the right. These 4 images will propagate to all extracts and cloze deletions ultimately produced from this article.

If you want to import an HTML file to an existing HTML component, right-click the HTML component, and choose File : Import file. Pick the file in the dialog box and choose OK. Your HTML file will be displayed in the HTML component. Import file does not import files linked to by the imported file. However, you can import an entire website located on your hard disk or local network if you use Links : External file on the HTML component menu. In such a case, the HTML file will remain in its original location and retain all relative links.

If you would like to edit an HTML text in your favorite HTML editor, press Ctrl+F9 (or choose File : Edit file from the HTML component menu) and your HTML code will open in the HTML editor registered for editing HTML files in Windows. To preview an article in your web browser, Ctrl+click the HTML component or press F9 (or choose File : View file from the HTML component menu).

Inserting hyperlinks

The most useful hyperlink will connect keywords with other elements in SuperMemo. To create inter-element hyperlink in HTML:

  1. display target element in SuperMemo
  2. copy its number to the clipboard (e.g. by using Ctrl+G)
  3. select the linking keyword in the linking element
  4. paste the element number

To insert hyperlinks that would point to other elements, registry texts, HTML files, URL addresses on the Internet, registry images, etc., read about the option Insert HTML link (HTML component menu).

The HTML component can interpret JavaScript. If you know some JavaScript commands, you can enhance your SuperMemo presentation with scripted HTML components.

See also