The Alpheios Reading Tools and Perseids Treebank Template can be used together to augment the features provided by the Alpheios Reading tools for treed texts.
Trees published via the Treebank Template can be used by Alpheios to:
The treebank functionality will work with Alpheios version 3.3.x and later, whether it is accessed through Browser Extensions or the Embedded library. If you are publishing your own page anyway, however, we recommend using the Embedded library as it provides greater flexibility as well as support for mobile devices. See the Alpheios Embedded Library Tutorial for detailed instructions.
NOTE: In the above example we specify to use whatever is the
latest available version of the Alpheios code by referencing the
@latest tag in the URLs. This ensures that your
page automatically gets updated with new versions of Alpheios as they
are released. While Alpheios releases are normally backwards-compatible and
this should not create any problems for your page, if you want to have tighter
control over when your site gets Alpheios code updates, you can specify the exact
version of the Alpheios code to use, rather than using the
tag. You can find a full list of available versions at the NPM
package pages for the Alpheios Embedded Library and its companion package
(clicking on the
Versions tab). See the following example:
To signal to Alpheios that a tree is available for a chunk of text on the page,
you need to add some attributes to the top level parent element for the text.
This can be any element that encompasses all of the text which is treed, but
it's simplest to use the
<body> tag. The attributes you need to add are:
data-alpheios_tb_app_version="3.1.0"(You can find the version in the
package.jsonof your treebank-template repository. Although this is currently used for documentation purposes only, we require it in case in the future we need to adjust the Alpheios features available based upon the version of the template application used.)
data-alpheios_tb_url=https://your.github.io/repo-name/embed/DOC/SENTENCE(use the appropriate values for your repository)
Next, you need to tell Alpheios what treebank document corresponds to the text. This is done by adding the
data-alpheios_tb_doc attribute to the parent element of the chunk of text. Note that it is
possible to align text chunks from different documents on the same page.