This example demonstrates how to popup information derived from a link. The three examples are Roman numerals, abbreviations and metric-to-English unit conversion. It was based on a version from an earlier life:
Weyer, Stephen A.; Borning, Alan H. A prototype electronic encyclopedia. ACM Transactions on Office Information Systems. TOOIS 3(1): 63-88; January, 1985. (reprinted in Scanlon, Eileen and O'Shea, Tim (eds.) Educational computing. pp. 271-296. John Wiley, New York; 1986).
Since these "links" are defined locally via NewtonScript methods, be sure to set i:General:NewtonScript:Compile; this is very similar to the newtscape/exs/mapworld.htm, newtatut.htm, and crypto/crypex02.htm examples, but this extracts actual linked range from the paragraph, so there can be multiple links in a paragraph (rather than just using the entire paragraph).
Currently, this example is 2.x-only, but it could work on 1.x with a few modifications (LSearch, LFetch, CharPos, IsString, ReorientToScreen, -country.htm, etc.). Also, this example works only in Newt's Cape, though it would be easy to create files entitled roman.htm, abbrev.htm, metric.htm, country.htm that would provide a simple note (like those for crypex01.htm, crypex02.htm). The ° character entity should work in most newer browsers.
Future: more flexible measurement matching, popup just large enough for text and closer to pen tap, currency,...?
It is the year MCMLXXXXVII AD. The UN has declared a state of emergency related to global warming. The average temperature has risen to a toasty 30° C; this has resulted in a 8 cm rise in sea level, causing widespread flooding of coastal areas. Please choose a country where you would like to move.
This document (in all its formats) is © 1997-2007. Steve Weyer. All Rights Reserved Worldwide. You are free to incorporate this into your own documents, but I would appreciate an acknowledgement of Newt's Cape and the example.
Last updated: Dec 2000