2021.05.27 2021.06.10 Amenoum MATERRA documentation. dox 1 MATERRA Documentation Setup
NOTE: MATERRA should be installed in a root directory of a domain or a subdomain, otherwise it will be necessary to manually modify file references (links) in js files.
1. Copy the contents of the public_html folder to your website root directory (generally public_html),
2. if you plan to allow user registration, copy [the empty] materra_db folder to the same directory holding the public_html folder (or update users/users.settings.inc.php DB_USERS constant with a path where you want users database to be stored),
3. run setup.php (ie. by visiting https://yourwebsite.org/setup.php where yourwebsite.org should be replaced with your domain or subdomain name).
Optional (changing settings): Changing settings (for cache, etc.) is done by editing files ending with settings.inc.php (ie. check.settings.inc.php). Each such file affects only specific function or area of the website (ie. check.settings.inc.php provides settings for check.php which is used to check for updates, one can open .php files in a text editor to see what they are used for). One may also want to edit files ending with header.inc.php, as these contain webpage headers.
Note that, even if enabled, user registration will not be possible before the admin account is registered. Admin id (username) must be specified in users/users.settings.inc.php, by updating the ADMIN_ID constant. Afterwards, you can use ID command in MATERRA to change your id to specified admin id and then REG command to register the account. Chapter Usage updated. Usage Usage of MATERRA is simple. Type "?" or "help" (without quotes) in the command line interface (CLI) for a list of commands and additional help on usage. While MATERRA supports creation, editing and upload of webpages through the web interface, prior to upload, content is stored in local browser storage which may not be reliable. Thus, for any serious work it is recommended to use a text editor (ie. Notepad++) to create and edit webpages.
UPDATE: As of version 2021.10.24, MATERRA includes a text/html editor which has support for MATERRA tags and makes writing and upload of webpages much easier.
Creation of webpages in a text editor Apart from the main page (/index.html), webpages in MATERRA do not have to have a html header/footer. However, this is recommended as it will enable direct access to the webpage. This header should look like this: Here, WEBPAGE_TITLE should be replaced with the actual title of a webpage. If html header is added, the html footer should be added too: The article should then be written in between (between the starting (<body>) and closing (</body>) body tag). It is not required, but it is also recommended to define author name, keywords and other details using specific tags, like this: Use log_id tag only if you want MATERRA to generate a page header showing article creation date, date of last update and author name. The content of the tag (in this case '22') is irrelevant and can be left empty. Here is a list of tags that may be used here:
log_datedate of article creation
log_updatedate of last updateby default, this is filled automatically and should be left empty
log_mtimefile modification dateby default, this is filled automatically and should be left empty
log_authorauthor namecan contain additional tags - log_address and log_email, specifying affiliation or address and email, this data is used in LaTeX generation.
In case of multiple authors, use one log_author tag for each author.
log_descshort description of the workuseful if writing a log type webpage, this will then be used in log index
log_categorycategoryuseful for log type webpages, used in log index if categories are enabled
log_keywordswords to highlightcase sensitive, these phrases will be highlighted (bold) in the article
log_clsdocument class, ie. articleused in LaTeX generation
cite_yearyear of publicationused for citations, by default, year will be extracted from log_update or log_date, so it is unnecessary to specify this if log_date is specified
cite_doialternative link to articleused for citations
cite_contriban address for contributionsthis can be a wallet or web (URL) address for support
set_body_numberingcontrols auto-numbering of chaptersset to 0 to turn off automatic numbering
set_body_classsets the CSS class name for the body, controls page designsome of defined classes are scientific, log, blog, however, currently there's no much difference between these apart from title color, this can be changed in main.css file
Chapter Defining title and subtitle updated. Defining title and subtitle A title and subtitle should be defined like this: Here, div tag, containing the subtitle, is optional.
UPDATE: This has been simplified. From version 2021.09.22, title and subtitle can be defined using a single title tag:
Writing content After title definition, article content should be enclosed in a spirit tag, like this: Use sub1 tag for main chapters and sub2 and sub3 tags for sub-chapters. The no_numbering attribute is optional and it will leave the chapter unnumbered. Tag sub2 should always follow after sub1, while sub3 should always follow after sub2, otherwise the system might get confused. For synonyms, just use the = sign, as shown in the example. Content will be formatted automatically. To start a new paragraph, start the sentence on a new line and make sure there is one empty space character after the last sentence. Added chapter Text color. Text color You can use color tag to color text, example: Color should be specified with the code attribute, as a html color code or named color (as defined by CSS). If you actually use the word for named color in text, you can omit the code attribute, as in the 3rd example above. Writing equations To write equations, use the e tag and mathjax (tex/latex) syntax. Ie. this: will produce: $\displaystyle E = {m \over \sqrt{1 - {\beta}^2}} c^2 \tag{1.1}$ References Use a html tag for references, ie.: will produce:

For more consult Yukawa, Proca

Here, href attribute is used for a link to cited work. The attribute should be present for offline works too, but it should be left empty in that case (href=""). The attribute data-notitle set to 1 signals the engine to use content specified in title attribute when generating references, rather than the content of a tag (Yukawa, Proca).
From version 2021.10.07 data-notitle is 1 by default if title is specified.
For regular links add attribute noref with value of 1 to the a tag (noref="1"). Lists and tables Use ul html tag for unnumbered (bulleted) lists, ol tag for numbered lists and table for tables, ie.: produces:
• item 1
• item 2
1. item 1
2. item 2