Skip to content

Ui Configuration

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

Ui Configuration (ui_config.json) allows to set the configuration closely related to the UI, such as the default language, the default/available theme(s), etc.

Languages

  • localization: boolean. Decide whether to have localization buttons to allow language change at runtime.
  • defaultLocalization: 'it' | 'en'. Decide which language should be used as the default.
  • availableLanguages: Language[]. Customize the languages you want to set as available for the translation of the User Interface (just the UI!) by adding their codes in this list. At the moment we support just English ('en') and Italian ('it'). If you want to add the support for a new language, just add a new new_language_code.json inside the i18n directory and a new_language_code.png image inside the images folder.

Technical details for development

  • Each language in the configuration should be defined as follows:
    {
        code: 'it' | 'en';
        label: string;
        enable: boolean;
    }

  • enableNavBar: boolean. Select if you want to activate (true) or not (false) the navigation bar at the bottom of the screen.
  • initNavBarOpened: boolean. If the navigation bar is active (see previous setting), sets its initial status: with true it will be shown when the edition is loaded, with false it will be hidden until the user decides to show it.
  • thumbnailsButton: boolean. Select if you want to activate (true) or not (false) the thumbnail button in the navigation bar.
  • viscollButton: boolean. Select if you want to activate (true) or not (false) the VisColl button in the navigation bar. (Note that VisColl functionality is still a work in progress)
  • theme: 'neutral' | 'modern' | 'classic'. Select the default color theme to be used when loading your edition.

Custom bibliographic styles

Custom bibliographic styles are supported in EVT3. The properties described below affects the visualization of structured <bibl> and <biblStruct> encoded in the edition for the display in the "Bibliography" tab in the Project Info window. There a 3 default bibliographic styles: chicago, apa and mla. Users can create their custom styles by creating an entry in the allowedBibliographicStyles property.

  • defaultBibliographicStyle: 'chicago' | 'apa' | 'mla' | .... Select the default bibliographic style (by the BibliographicStyle id property, see below) to be used when visualizing the bibliographic entries in the Project Info window.
  • allowedBibliographicStyles: { [key: string]: BibliographicStyles }. Contains all the bibliographic styles that affects the visualization of bibliographic entries. Each bibliographic style in the configuration should be structured as follows:
 id: string;
 label: string;
 enabled: boolean;
 propsOrder: BibliographicProperties[];
 properties?: Partial<{
   propsDelimiter?: string;
   authorStyle?: Partial<{
     forenameInitials?: boolean;
     delimiter?: string;
     lastDelimiter?: string;
     order?: Array<'forename' | 'surname'>;
     maxAuthors?: number;
   }>;
   publicationStyle?: Partial<{
     citingAcronym?: 'all' | 'none' | Array<'issue' | 'volume' | 'page'>;
     includeEditor?: boolean;
     inBrackets?: Array<'issue' | 'volume' | 'page'>;
   }>;
   dateInsidePublication?: boolean;
   titleQuotes?: boolean;
   emphasized?: BibliographicProperties[];
   inBrackets?: BibliographicProperties[];
 }>;
}

BibliographicProperties values

  • author. Display information about authors, specifically those marked with the <author> tag in the TEI/XML encoding.
  • date. Display the publishing date article, specifically those marked with the <date> tag in the TEI/XML encoding.
  • title. Display the title of the article, specifically those marked with the <title> tag in the TEI/XML encoding.
  • editor. Display the editor of the bibliographic entry, specifically those marked with the <editor> tag in the TEI/XML encoding.
  • publication. Display the publication information of the bibliographic entry. This property currently also displays <citedRange> and <biblScope> with @unit values such as volume, issue, page.
  • pubPlace. Display the publication place of the bibliographic entry, specifically those marked with the <pubPlace> tag in the TEI/XML encoding.
  • publisher. Display the publisher information of the bibliographic entry, specifically those marked with the <publisher> tag in the TEI/XML encoding.
  • doi. Display the DOI of the bibliographic entry, specifically those marked with the <idno type="doi"> tag in the TEI/XML encoding. These values can be omitted to make space to a completely customized style (for example, one could insert only author and title).

properties attributes

For fully flexibility and customization, this object allows the customization of certain visualization aspects of the aforementioned properties, such as the delimiter used between properties (e.g. using ; rather than ,). This styling is completely optional, and can be omitted completely as there are default values. The properties object can have the following properties:

  • propsDelimiter: string. Default value: ,. Decide the delimiter that split two bibliographic properties.
  • authorStyle. Object that styles the author bibliographic property. It includes:
    • forenameInitials: boolean. Default: false. Select if you want to only display the forename's initial for all authors (only works if the <forename> tag is used inside the <author>).
    • delimiter: string. Default: ,. Decide which delimiter to use to divide authors.
    • lastDelimiter: string. Default: and. Decide which delimiter to use for the last author (es. Tizio, Caio and Semprone).
    • maxAuthors: number. Default: there is no limit. Decide to limit the amount of authors displayed (a et. al. will be displayed).
  • publicationStyle. Object that styles the publication bibliographic property. contains the following properties:
    • citingAcronym: 'all' | 'none' | Array<'issue' | 'volume' | 'page'>. Default: 'none'. Decide whether all, none or some citing ranges values should have the unit acronym as a prefix. CitingRanges allowed values are issue, volume and page.
    • includeEditor: boolean. Default: false. Decide if the editor information should be inserted near the publication information. If this properties is set to true, inserting editor in the propsOrder should be avoided.
    • inBrackets: Array<'issue' | 'volume' | 'page'>. Default: []. Decide if any citing range should be inserted into brackets.
  • dateInsidePublication: boolean. Default: false. Decide whether the date should be inserted into the publication property. If this properties is set to true, inserting editor in the propsOrder should be avoided.
  • titleQuotes: boolean. Default: false. Decide whether the title property should be surrounded by double quotes (").
  • emphasized: BibliographicProperties[]. Default: []. Decide whether any property should be emphasized like this.
  • inBrackets: BibliographicProperties[]. Default: []. Decide whether any property should be surrounded by brackets (like this).

If you need a different customization to be handled just notify the EVT Development Team.