LaTeX

You can use LaTeX format to write problem statements, comments and other content at Eolymp.

LaTeX is a markup language and a package of TeX macros for high-quality document design. This format is quite popular in academic circles and is often used to write statements for computer science problems.

Eolymp uses its own LaTeX document display system, optimized for browser display, so some features of the language are not supported.

Documents in LaTeX format are created in a standard text editor. The text of the document is automatically divided into paragraphs, and special commands allow you to apply formatting to the text.

Basic syntax

Paragraphs

By default, all text becomes a paragraph. Single new line symbols are ignored. Paragraphs should be separated by a blank line, i.e. use two new line symbols to start a new paragraph.

Heading

You can define a heading using \heading command, use a parameter to specify level of the heading between 1 and 6.

Emphasis

You can add emphasis to a fragment of text by making it bold or italic, use \textbf and \textit commands to emphasize a fragment of text.

You can insert links by using \url{...} or \href{...}{...} commands.

Images

You can embed images using \includegraphics{url}.

You can simply drag and drop the image into the input field and the system will upload the image to the Eolymp server and add the required markup to the message.

Video

You can embed video using \includemedia{url} command.

Code fragments

Sometimes you might need to reference a variable or a function name in your text, use \texttt or \verb command to highlight the fragment using monospaced font and special styling.

Verbatim command \verb|...| has special syntax, instead of typical curly brakets {}, the command can be followed by any symbol which will be used to enclose verbatim fragment, for example \verb|...|, \verb#...# or \verb%...%.

You can also insert larger code fragments in your messages using lstlisting environment. Optionally, you can specify language using 'language' option.

Math and formulas

If you like to add a mathematical expression or a formula to your message, you may use math mode. Similar to code fragments, you can use inline math expressions denoted with a single $ symbol, or insert larger math blocks by wrapping them in a pair of $$ sequences.

The expressions themselves are written using LaTeX math format and rendered using KaTeX library. Learn more about expressions supported by KaTeX at their website.

Or, insert math blocks using a pair of $$ symbols.

Quote

Use quote environment to create a quote fragment.

Advanced syntax

In some, larger documents, such as posts and pages, you can use extended syntax.

Tables

You can insert table using tabluar environment, use & to separate cells and \\ to separate rows.

You can specify table spec in the additional parameter to control alignment and borders. Each letter in the table spec refers to alignment in the column, you can use: l (left), c (center) or r (right). Add | if you want to show borders. Few examples,

  1. {ccc} - three columns centrally aligned, no borders

  2. {|c|c|c|} - three columns centrally aligned with borders

  3. {|l|c|r|} - three columns, first is aligned left, second is aligned centrally, third is aligned to the right, with borders

Wrap tabluar into center environment to center it, or in flex to stretch table to entire page width.

Admonitions

Admonitions allow you to emphasize a fragment of a document or place additional information. To add an admonition, use admonition environment.

Use additional parameters type and title to specify admonition type and override title.

Tabs

Add tabs to display few variants of the same content in a compact manner.

Layout

You can combine and display content in grid, row and column layouts. You can combine different layouts to achieve more complex placements. There are three main types of layouts:

  1. column - layout places children in a single column with a small gap between them

  2. row - layout places children in a single row with a small gap between them

  3. grid - layout places children across a grid with 2, 4 or 6 columns

You can use any elements inside layout block, but layouts work best with div and card elements.

Layouts automatically adopt to the smaller screen sizes to ensure all elements have sufficient space.

Text alignment

You can align the content of the document using a special block.

Widgets

You can post a list of tasks, competitions or other information using widgets. Widgets are only available on site pages.