Making PDFs with Vulgar

How to make PDFs with Vulgar and Overleaf.com

Vulgar outputs your dictionary in a LaTeX file, which can be uploaded to Overleaf to generate a PDF download.

What's LaTeX?

LaTeX is a typesetting code for creating professional documents, like books and academic papers. Overleaf is a free online compiler (generator) of LaTeX files. Vulgar generates a LaTeX dictionary template which automatically formats everything, including creating page headers with first and last word entries. Overleaf allows you to upload these files and generate the PDFs, as well as edit and manage your languages.

Quick steps:

1. Make an account at Overleaf.com
2. Go to the Vulgarlang PDF Template link - this template contains font files required for phonetic symbols
3. Click Menu

4. Copy Project to your profile

5. Using Vulgar, generate your langauge and Save language as... PDF (.tex) file

6. Back in ShareLaTeX, Click Upload

7. Select and upload the .tex file from your computer
8. Click into the file on the side panel, then press Recompile
9. Download PDF

How to Edit your Overleaf Project

Note that lines of code that start with the percentage sign % are comments. These lines are ignored by the computer when compiling. You can read the comments in the Dictionary Template to get an idea of what each line does.

Editing entries

If you scroll down to around line 161 you will start to see the entry code. This code should match the beginning of your dictionary at section A (unless your language doesn't have the letter A). The following code

\ce {a}{/a/}{\p n. \et number}
\ce {aa}{/aˈa/}{\p adv. \et together}
\ce {afa}{/ˈafa/}{\p adj. \et serial; \p adv. \et much}

creates

The command \ce stands for Conlang Entry. This command takes three sections which are enclosed by {curly brackets}. Whatever is in the first curly brackets applies the bold blue Noto-Sans font. This is the conlang word. The next curly brackets in the pronunciation in IPA and applies whatever the IPA font is (Charis SIL by default). The third curly brackets is the translation information. This section automatically gets put on a new line and indented, but it doesn't apply any font formatting by default. Instead, font formatting commands are invoked inside the brackets: the \p command stands for part-of-speech and is invoked before every part-of-speech abbreviation to apply an italic font. \et is the font formatting for English translation, which in the default case, is the same as the IPA font.

Feel free to alter any of the content inside these curly brackets, and even insert a whole new \ce in the dictionary. Be aware the template will not automatically alphabetise your entry, nor will it translate your word in the English to Conlang section. You have to do that yourself. In the English to Conlang section, the commands are basically exactly the same but with slightly different names:

\ee {abandon}{}{\p v. \ct nopax}

\ee stands for English entry, and \ct stands for conlang translation. These are the exact same font styles as the conlang entry by default, but they have different commands in case users want to upload a conlang font (see next section). Also note that the English section has an empty IPA section.

How to change font styles of colors

The font styling begin on line 28. The first few lines call some packages that are required for working with Unicode symbols and imported fonts. On line 32, the document sets the main font of the document, which is what the PDF will default to if no other font information is given:

\setmainfont{NotoSans-Regular.ttf}

Note that NotoSans-Regular.ttf has already been uploaded in the template. Without this uploaded the PDF will not compile properly. If you have a different font you want to use in the project, you first need to upload it to your Overleaf project, under the Menu heading, then change the font in the command to exactly what it has been uploaded as.

Let's examine the font style for the English translation:

\newfontfamily{\et}{CharisSILR.ttf}

This translates to: create a new font command, call it \et, and give it the font file CharisSILR.ttf. This font will only apply if the \et command is written before the text you want it to apply to.

The conlang word command, \cw, takes NotoSans-Bold.ttf font file, and also has some color information.

\newfontfamily{\cw}[Color=wordColor]{NotoSans-Bold.ttf}

Just above on line 22 we have the color formatting, where we can see exactly what 'wordColor' is:

\definecolor{wordColor}{RGB}{29,119,168}

Translates to: Define a new color, called it wordColor, and give it the RGB color value of 29, 119, 168. You can use this page to pick RGB colors.

(Be aware that this style of LaTeX formatting is using the fontspec package, which is a little different from the default way of changing the colors, size, etc. So if you ever want to Google "how to change LaTeX font size", try instead "how to change fontspec font size").

Custom conlang fonts

If you have a custom conlang font, something like Tolkien's Tengwar, you'll first need to upload it to the project. Next you'll need to change the fonts for conlang word (\cw) and conlang translation (\ct) to your font.

Your custom font may not match the size of the other fonts. To change the font size you add SizeFeatures={Size=20} to the style settings inside the square brackets, changing the size number appropriately. If the font doesn't have any extra style settings, you must type in the square brackets.

\newfontfamily{\ct}[SizeFeatures={Size=20}]{myCustomFont.ttf}

If it already has color settings, add inside the brackets, comma separated.

\newfontfamily{\cw}[Color=wordColor,SizeFeatures={Size=20}]{myCustomFont.ttf}

Chapter headings and sections

If you go to line 150, you'll see comments that say CONLANG to ENGLISH, a chapter heading and a section heading (probably for A).

%-------------------
% CONLANG to ENGLISH
%-------------------


\chapter{Tatsian - English}

\needspace{20\baselineskip}

\section*{A}

\begin{multicols}{3}

You can add a new chapter by writing \chapter{My new chapter}. LaTeX will automatically add this chapter and page number to the table of contents.

You can add a new section by writing \section*{My new section}. The asterisks stops LaTeX from automatically numbering the section and adding it to the table of contents.

Just above this, the template has an Introduction, Phonology and Grammar chapter commented out. Feel free to uncomment these and begin writing information on your language.

%\chapter{Introduction}

% Write book introduction here.

%\chapter{Phonology}

% Write Phonology information here.

%\chapter{Grammar}

% Write grammar information here.

Writing paragraphs

Writing basic paragraphs in LaTeX is normally straight forward: simply separate your paragraphs by two lines and LaTeX automatically does paragraph indenting.

However, the Vulgar template has paragraph indenting turned off so that the word entries stay flush against the left side of the columns. I recommend using quadruple backslash \\\\ to create two new lines for your paragraph separation:

\chapter{Introduction}

This is paragraph. This is paragraph. This is paragraph. This is paragraph. This is paragraph. This is paragraph. This is paragraph.

This technically creates a new paragraph, but does not indent.

\\Double backslash creates a new line.
\\\\Quadruple backslash may create a more desired paragraph.

\forceindent This is paragraph with a forced indent. This is paragraph with a forced indent. This is paragraph with a forced indent. This is paragraph with a forced indent. This is paragraph with a forced indent.

Creates

Note that \forceindent is a custom command that creates a new paragraph with small indent.

Another way to achieve paragraph spacing is to manually set the paragraph spaces to 1 line using \setlength{\parskip}{1em}. However you will want to set the paragraph space back to zero before the actual dictionary starts with \setlength{\parskip}{0em}.

Bold text

To make some text bold, wrap it in curly brackets and use \b, eg: {\b Here is my bold text}

Making grammar tables

The following code

\begin{table}[h!]
\centering
\caption*{Spanish definite article}
\label{my-label}
\begin{tabular}{|l|l|l|}
\hline
         & Masculine & Feminine \\ \hline
Singular & el & la \\ \hline
Plural & los & las \\ \hline
\end{tabular}
\end{table}

creates this:

& signs separate the cells. Double backslash \\ is used to force rows onto new lines, and \hline is used to add a horizontal line separating the rows.

In the \begin{tabular}{|l|l|l|} line, the {|l|l|l|} defines more of the layout. The pipe symbols | create vertical lines separating the cells, and l stands for align column left. This can be changed to r for right and c for center.