Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
leolca committed Oct 1, 2021
1 parent 123c069 commit 45b42b5
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

This repository contains the LaTeX templates for the journal [Texto Livre](https://periodicos.ufmg.br/index.php/textolivre/) and the final articles after the peer review and editorial process.

The file ```textolivre.cls``` implements the LaTeX class to create PDFs and the file ```textolivre-html.cls``` implements the LaTeX class to create HTMLs. To create a new article using the template, use the file ```article.tex``` as a starting point and read the instructions it provides. The template files should not be edited. If you require an additional package, inserted it directly in the header of your ```.tex``` file.
The file ```textolivre.cls``` implements the LaTeX class to create PDFs and the file ```textolivre-html.cls``` implements the LaTeX class to create HTMLs. To create a new article using the template, use the file ```article.tex``` as a starting point and read the instructions it provides. The template files should not be edited. If you require an additional package, insert it directly in the header of your ```.tex``` file.

## creating your ```article.tex```
Copy the example file ```article.tex``` and use it as your starting point. Note that, the ```.tex``` file must be encoded in UTF-8. Use the journal document class ```textolivre```:
Copy the example file ```article.tex``` and use it as your starting point. Note that the ```.tex``` file must be encoded in UTF-8. Use the journal document class ```textolivre```:
```
\documentclass{textolivre}
```
The class provides the template for portuguese, english, spanish and french. The default behaviour is to select portuguese as the manuscript main language. You may switch to different language by specifying it as a paremeter when loading the class.
The class provides the template for portuguese, english, spanish and french. The default behaviour is to select portuguese as the manuscript main language. You may switch to a different language by specifying it as a parameter when loading the class.
```
\documentclass[english]{textolivre}
```
Expand All @@ -21,17 +21,17 @@ cat template/textolivre.cls | sed -n -e 's/\(^\\RequirePackage\)\(\[[-,a-z0-9=]*
```
As a result, we see that the packages already included are: *abstract, adjustbox, amsmath, amsfonts, amssymb, amsthm, authblk, biblatex, caption, subcaption, cleveref, cmbright, csquotes, datetime2, enumitem, etoolbox, xpatch, fancyhdr, footmisc, geometry, graphicx, hyperref, hyperref, listings, longtable, booktabs, tabularx, colortbl, mfirstuc, polyglossia, relsize, setspace, textpos, titlesec, totpages, translations, xcolor, xstring*.

Any other additional package might be included in the preambule of your ```.tex``` file.
Any other additional package might be included in the preamble of your ```.tex``` file.

#### language support
Multilanguage support is included through the ```polyglossia``` package. The main language should be setted when loading the class. The class will also set a secondary (and terciary language, if necessary). Other languages might be used by means of the ```\setotherlanguage{...}``` command. The text in language, other than the default one, should comes inside this language environment. Read the instruction in the template usage example provided. For further information on ```polyglossia``` package, visit https://ctan.org/pkg/polyglossia.
Multilanguage support is included through the ```polyglossia``` package. The main language should be setted when loading the class. The class will also set a secondary (and tertiary language, if necessary). Other languages might be used by means of the ```\setotherlanguage{...}``` command. The text in language, other than the default one, should come inside this language environment. Read the instruction in the template usage example provided. For further information on the ```polyglossia``` package, visit https://ctan.org/pkg/polyglossia.

#### title, author, abstract, keywords
Provided the title of the document using the standard ```\title``` command and the title in other language using the command ```\othertitle``` defined in the template. You might use ```\othertitle``` as many times as desired (usually just once and three times seldom).

Authors are inserted using the ```authblk``` package. For more information on the package, visit https://www.ctan.org/pkg/authblk. You might also provide the author ORCID by the ```\orcid``` command (see the usage in the example file).

To create multiple abstracts use the environment ```polyabstracts```. For the abstract using the default language, just provided it using the usual ```abstract``` environment. For an abstract in another language, use the language environment provided by polyglossia. You may use as many abstracts as you need. See the example:
To create multiple abstracts use the environment ```polyabstracts```. For the abstract using the default language, just provide it using the usual ```abstract``` environment. For an abstract in another language, use the language environment provided by polyglossia. You may use as many abstracts as you need. See the example:

```
\begin{polyabstract}
Expand All @@ -54,7 +54,7 @@ To create multiple abstracts use the environment ```polyabstracts```. For the ab
The example above also shows the usage of ```keywords```. Use ```\sep``` between words.

### compiling your document
Use XeLaTeX to compile you document using the commmand:
Use XeLaTeX to compile you document using the command:
```
xelatex article.tex
```
Expand All @@ -63,19 +63,19 @@ If a PDF/A is required, compile using:
```
xelatex -shell-escape -output-driver="xdvipdfmx -z 0" article.tex
```
note that we have opted (```-z 0```) to suppress compression in XMP Metadata packet, in orther to create a PDF/A compliant.
note that we have opted (```-z 0```) to suppress compression in XMP Metadata packet, in order to create a PDF/A compliant.

```-shell-escape``` is required by ```pdfx```. See the package documentation: https://ctan.org/pkg/pdfx. If you don't feel save using it, you need to comment the PDF/A block in the end of the template file (```textolivre.cls```).
```-shell-escape``` is required by ```pdfx```. See the package documentation: https://ctan.org/pkg/pdfx. If you don't feel safe using it, you need to comment the PDF/A block in the end of the template file (```textolivre.cls```).

#### bibliography
Use ```biber``` to generate a bibliography in LaTeX. Biber has full Unicode support, that means you ```.bib``` might has any unicode character.
Use ```biber``` to generate a bibliography in LaTeX. Biber has full Unicode support, that means your ```.bib``` might have any unicode character.
```
biber article
```

#### creating a PDF/A compliant file
Fill in the metadata information in your ```.tex``` file. See the example file.
You will also need to install tha package ```icc-profiles``` and convert all images to PDF/A files.
You will also need to install the package ```icc-profiles``` and convert all images to PDF/A files.
To convert a PDF figure into a PDF/A version, use the following command in ```gv```:
```
gs -dPDFA -dBATCH -dNOPAUSE -sColorConversionStrategy=UseDeviceIndependentColor -dCompatibilityLevel=1.4 -sDEVICE=pdfwrite -sProcessColorModel=DeviceCMYK -dPDFACompatibilityPolicy=2 -sOutputFile=figure-a.pdf figure.pdf
Expand Down Expand Up @@ -112,7 +112,7 @@ make4ht -e build.lua -c textolivre.cfg -u -x article "fn-in,mathml,mathjax"
```
French manuscrits also require the file ```gloss-french.4ht``` available at the template folder. See https://tex.stackexchange.com/questions/580456/error-when-using-polyglossia-french-and-make4ht

The HTML generated by ```make4ht``` has many breaklines which as misinterpreted by some tools (like Marcalyc). If you need to remove them and any other cleaning/prettifying, use ```tidy```. The following command might be used to remove breaklines
The HTML generated by ```make4ht``` has many breaklines which have been misinterpreted by some tools (like Marcalyc). If you need to remove them and any other cleaning/prettifying, use ```tidy```. The following command might be used to remove breaklines
```
tidy -m --output-xhtml --break-before-br --wrap 0 article.html 2> errs.txt
```
Expand Down

0 comments on commit 45b42b5

Please sign in to comment.