Skip to content

Edition Configuration

Roberto Rosselli Del Turco edited this page Oct 20, 2024 · 13 revisions

Edition Configuration (edition_config.json) allows to set the configuration options closely related to the digital edition, such as its title, the edition level(s), etc.

Edition main information

  • editionTitle: string. Choose a title for your edition. If you want to allow the translation of the title, use the proper key of the locale json file. If you leave it blank the title from <titleStmt> or, if this is empty, the default 'EVT Viewer' title will be shown.
  • badge: string. The badge text to be visualized following the edition title, it should be a short text string such as alpha, experimental, etc.
  • editionHome: string. If you specify an external web site there will be a link pointing to it.

Edition levels

  • availableEditionLevels: EditionLevel[]. Select which edition levels you want to be available in your edition. You can deactivate a view mode both by deleting it and by setting to false the property enable (the latter being the suggested method).

Technical details for development

  • Each edition level should be indicated as follows:
    {
      id: 'diplomatic' | 'interpretative' | 'critical'; 
      label: string;
      title?: string;
      enable?: boolean;
    }

  • defaultEdition: 'diplomatic' | 'interpretative' | 'critical'. Select which edition level you want your edition to open on. Note that it must be an active edition level!

View modes

  • availableViewModes: ViewMode[]. Select which view modes you want to be available in your edition. You can deactivate a view mode either by deleting it or by setting the property ​enable​ to ​false​ (suggested method).

Technical details for development

  • Each view mode should be indicated as follows:
    {
      id: 'readingText' | 'imageText' | 'textText' | 'collation' | 'textSources' | 'textVersions';
      icon: string;
      iconSet?: 'evt' | 'far' | 'fas';
      label: string;
      enable?: boolean;
    }

  • defaultViewMode: 'readingText' | 'imageText' | 'textText' | 'collation' | 'textSources' | 'textVersions'. Select which view mode you want to your edition to open on. Note that it must be an active mode!

Global tools

  • showLists: boolean. Indicate whether button for lists (named entities, relations, events, etc.) should be available or not.

Named entities

  • namedEntitiesLists: Partial<NamedEntitiesLists>. Customize the list of available named entities to be highlighted and to be shown among entities lists, by changing the default list label (to be shown when no <head> is defined for the list) and/or by deleting/deactivating one or more element in the list. At the moment EVT can work only with list of person (<listPerson>), list of places (<listPlace>), list of organizations (<listOrg>), list of events (<listEvent>) and list of relations (<listRelation>). If you need a new kind of named entity to be handled just notify the EVT Development Team.

Technical details for development

  • This parameter could be defined as follows (none of the parameter is mandatory).
    {
        persons: NamedEntitiesListsConfig; // for list of persons `<listPerson>`
        places: NamedEntitiesListsConfig; // for list of places `<listPlace>`
        organizations: NamedEntitiesListsConfig; // for list of organizations `<listOrg>`
        relations: NamedEntitiesListsConfig; // for list of relations `<listRelation>`
        events: NamedEntitiesListsConfig; // for list of events `<listEvent>`
    }
    where NamedEntitiesListsConfig is an object defined as follows:
    {
       defaultLabel: string;
       enable: boolean;
    }

  • entitiesSelectItems: EntitiesSelectItemGroup[]. Customize the list of available entities to be highlighted by adding a new element to this list: for each element you should define a tagName, which is the XML tag that identify the entity, a label that will be shown in the selector and a color that will be used to highlight the entity within the text. If you don’t need an entity that is already inserted in this list you can delete it or just use the property enable set to false (suggested choice).

Technical details for development

  • Each item group should be defined as follows:
    {
        label: string;
        items: EntitiesSelectItem[];
        enable?: boolean;
    }
  • And each item should be defined as follows:
    {
        label: string;
        value: string;
        color?: string;
        enable?: boolean;
    }
    the value will be used to identify the items to be selected, thus you should indicate the tag name and eventual attributes in the form tagName[attribute='value'] (e.g. "persName[type='episcopus']"). Multiple values should be divided by a comma (e.g. "placeName,geogName").

Prose/Verses

  • proseVersesToggler: boolean. Indicate whether to activate or not the button to toggle text from prose flow to verses flow.
  • defaultTextFlow: 'prose' | 'verses'. Indicate which flow you want to activate for the text as default.
  • verseNumberPrinter: number. Indicates the multiplier for the visualization of verses numbers.

Critical edition

  • notSignificantVariants: string[]. Array of string that should be used to identify not significant variants: element(s) of attribute(s) you used to encode variants that are not significant and you do not want to appear in the main critical apparatus (f.i. ​​, ​ or ​@type=orthographic​). Please divide values using commas.

[ WIP ]