Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

latexteada
latexteada

Posted on

The Document: Lists and Multicolumn

Hello, before starting this new post I want to give you an advertisement:

This is the last post withgeneral content, this is, basic stuff. In the next post, I am going to start withTables

I will not start with math yet because sometimes, or at least in my experience when you are doing maths in LaTeX you may need tables, so it is better to know before something about tables and figures before math stuff.

Said that let's begin :)

Lists

We need to know something important before beginning

  • We just can nest to 4 levels in a list
  • We declare a new element with\item

There are three kinds of lists in LaTeX

Unordered List

The command for an unordered list isitemize, here is an example

ul

The output is
Screenshot from 2021-02-09 21-05-20

Ordered List

The command for an ordered list isenumerate, here is an example

ol

The output is
Screenshot from 2021-02-09 21-19-50

Ordered and Unordered List

As I said at the beginning, we can mix ordered and unordered list but we just can nest to 4 levels, here is an example
ou

The output is
Screenshot from 2021-02-09 21-21-56

I encourage you to play with these environments :)

Description List

Sometimes we want tostand out some words, for example, when we are writing some definitions. We can reach this with thedescription environment, here is an example

des
The output is
Screenshot from 2021-02-09 21-24-03

Multicolumn file

Entire document

If we want a double-columned document we need to put

\documentclass[twocolumn]{typeOfDocument}
Enter fullscreen modeExit fullscreen mode

At the beginning of the document, we can put the paper size and font size in the dame square brackets

Some text

We need to import themulticol package and put the text that we want in themulticols environment, this has two arguments

\begin{multicols}{n}
Enter fullscreen modeExit fullscreen mode

Wheren is the number of columns, we can add some options

  • To set the spacing between columnssetlength{\columnsep}{Xmm} this must be in the preamble
  • To set a column separator (vertical line between columns)\setlength{\columnseprule}{Xmm} this must be in the preamble,X is the width of the line
  • To move the content to a new column\columnbreak
    • Between the\columnbreak instruction and the text must be anenter in your code

Here is an example

mul
The output is
Screenshot from 2021-02-09 21-47-21

Trymulticols* instead ofmulticols and see what happens

That is all for today. Thank you :)

Do not forget to follow me on Twitter@latexteada

See you

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Hello, this is where I am going to give some base briefs of LaTeX
  • Location
    México
  • Work
    Student
  • Joined

More fromlatexteada

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp