Workshop: A new icon for linked paragraphs

In sources books with translation it might come in handy to have the text of the original and a translation linked together. The book might be so constructed that there is first the original part, a transcription, and after that a translation with additional comments and footnotes. In that case, this is more than a side by side layout, but something that is two parts of consecutive text, but with references to each other.

Situation

The print version

For the print version the decision was made to have a chapter-to-chapter link instead of linking to the paragraphs, so a text was inserted after the heading that points to the parallel chapter.

Since the original source keeps all the information of linking from paragraph to paragraph, the online version should profit from that.

Starting at the end

Looking at the publication platform, it was rather obvious that an icon margin could be used for that purpose: If a paragraph was linked to another, an icon beside it would notify the reader, and if he clicked on it, a popup, similar to those of the bookmark icons, would provide a link to the parallel part.

On the side of the publication platform it would require the following changes:

  • adding an icon to the webdesign

  • extending the javascript to provide functionality

  • adding a rule to the template to display the icon

  • extending the model for a field for the link

Looking at the beginning

TEI

Looking at the source text and its conversions the question was what scripts were to be extended to include the functionality. In the TEI source, the paragraphs were equipped with @corresp and @xml:id attributes, required for the linking. Through the various steps (tei2imxml, imxml2django), these attributes were retained. So the functionality could be inserted into the last step, imxml2django. The @corresp attribute was resolved to an @href attribute with a concrete link that would work on the platform (by linking to chapter and paragraph).

EOATeX

This feature was also implemented for the EOATeX track. A new command was added to the pre_xml.tex:

% \EOApararef{id=hypertarget}{corresp=hyperlink}
\newcommand*{\EOApararef}[2]{
  \begin{xmlelement}{EOApararef}\end{xmlelement}
  \AddAttToLast{xml:id}{#1}
  \AddAttToLast{corresp}{\##2}
  }

Which creates a new element whose attributes are written to the parent paragraph tag in the postprocessing in eoatex2imxml.

Meeting in the middle

Finally, the publication import script would need to pick up the @href and write it into the new field in the model.

Extending the webdesign

The webdesign can easily be modified to feature new icons in the sidebar. An icon needs to be created, as well as added functionality in the javascript and instructions in the css file.