LaTeX Tutorials and Examples
LaTeX Tutorials and Examples
LEARN LaTeX THROUGH EXAMPLES
About Latex A Brief History System Requirements Latex: Howto? My First Document Document Classes The Preamble Environments symbols Dummy Text Generation
About Latex A Brief History System Requirements Latex: Howto? My First Document Document Classes The Preamble Environments symbols Dummy Text Generation

Mega Menu 1

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Footer
Mega Menu 2

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Footer
Tutorials
Examples
Mega Menu 5

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Footer

Why Latex

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a tincidunt orci. Quisque blandit dolor enim, vitae aliquet est iaculis vel. Vestibulum sit amet bibendum massa, vel bibendum purus. Sed ipsum ante, aliquam in laoreet in, egestas id ante. Suspendisse ullamcorper odio fringilla lacus gravida, et sollicitudin urna condimentum. Etiam at lorem interdum, consectetur metus sit amet, sodales tortor. Donec non nisl et felis finibus auctor in at neque.
 

A Brief History of Latex

System Requirements

RIGHT CELL Right col

My First Document

The basic structure of a LaTeX document is illustrated by the following small example.
Example:

\documentclass{article}
\begin{document}
Hello World!
\end{document}
Try and use it

Note that every LaTeX document has to start with a Documentclass{}.
Every document also has a \begin{document} line and an \end{document} line. Between these two lines, the contents of the document are included.

Special char

Document Classes

The document’s overall class is defined with this command, which is normally the first command in a LaTeX source file.

\documentclass[options]{class}

The following document class names are built into LaTeX. (Many other document classes are available as separate packages; see Overview of LaTeX.)

article

For a journal article, a presentation, and miscellaneous general use.

book

Full-length books, including chapters and possibly including front matter, such as a preface, and back matter, such as an appendix (see Front/back matter).

letter

Mail, optionally including mailing labels (see Letters).

report

For documents of length between an article and a book, such as technical reports or theses, which may contain several chapters.

slides

For slide presentations—rarely used nowadays. The beamer package is perhaps the most prevalent (https://ctan.org/pkg/beamer). See beamer template, for a small template for a beamer document.

Standard options are described in the next section.

RIGHT CELL Right col

Preamble

Generation of Dummy Text

If we want dummy text in our document then we generally search for lorem ipsum text generators and copy-paste those texts/paragraphs in our document. In LaTeX, we don’t need to do such copy and paste thing. LaTeX has different packages which automatically generates dummy text in our document. You can generate them with just a few lines of code. 1) USING LIPSUM PACKAGE One of such package is the lipsum package. Lipsum package has access to 150 paragraphs of “Lorem ipsum” dummy text. lipsum[2-4] will print lorem ipsum paragraph 2 to 4. lipsum[1-1] will only print lorem ipsum paragraph 1. In the example below, lipsum package is used to print dummy text below chapter title. lipsum[2-4] prints lorem ipsum text from paragraph 2 to paragraph 4.
\documentclass{report}
\usepackage{lipsum}  
\begin{document}
\chapter{Introduction}
\lipsum[2-4]
\end{document}
2) USING BLINDTEXT PACKAGE There is another package named blindtext which can generate a single paragraph of dummy lorem ipsum text to even an entire document with the dummy text. \blindtext = This macro will generate a paragraph of dummy text \BlindText = This macro will generate multiple paragraphs (one page long) of dummy text \Blinddocument = This macro will generate an entire document of dummy text. If you specify documentclass as report then \Blinddocument will generate the document with multiple chapters, sections, subsections, paragraphs, and itemized lists. The below example contains LaTeX code that uses blindtext package to create an entire document with the dummy text. \documentclass{report} \usepackage{blindtext} \begin{document} % generates a paragraph of dummy lorem ipsum text %\blindtext % generates multiple paragraphs of dummy lorem ipsum text %\Blindtext % generates whole document with dummy lorem ipsum text \Blinddocument \end{document} Below is the output pdf generated from the above LaTeX code: Hope this helps. Thanks. LaTeX #dummy text #latex #lorem ipsum « LaTeX: How to write algorithm? LaTeX: How to add bibliography and references? » Recent Posts Backup & Restore Magento2 Database using N98-magerun2 Magento 2: Disable Admin Password Expiration/Change Magento2: Reset Admin 2FA (Two-Factor Authentication) Magento 2: ERR_TOO_MANY_REDIRECTS After Importing Database Magento2: Programmatically Create Custom Layout XML Most Viewed How to Calculate Inverter & Battery Backup Time? Very Simple Add, Edit, Delete, View (CRUD) in PHP & MySQL [Beginner Tutorial] Magento: How to get attribute name and value? GPG: Remove keys from your public keyring? LaTeX: Generate dummy text (lorem ipsum) in your document Categories Categories LaTeX: Better Print Quality Font with Charter The default font displayed in LaTeX document is good but if you want a better font which looks better in display and while printing... Dec 2, 2015 20 sec read LaTeX: Roman numbers in enumerate list and adjust space… In the enumerate list, the numbering by default is in Arabic form (1, 2, 3, 4, 5, etc.). You might need to show these... Nov 23, 2015 57 sec read LaTeX: Add Paragraph and Line Spacing The default report document generated by LaTeX is good. However, it looks a bit compact with not much space between lines and paragraphs. You... Nov 3, 2015 47 sec read © Copyright Mukesh Chapagain Blog | Privacy Policy
\documentclass{report}

\usepackage{blindtext}

\begin{document}

% generates a paragraph of dummy lorem ipsum text
%\blindtext 

% generates multiple paragraphs of dummy lorem ipsum text
%\Blindtext 

% generates whole document with dummy lorem ipsum text
\Blinddocument 

\end{document}

RIGHT CELL Right col

fontenc package Synopsis: \usepackage[font_encoding]{fontenc} or \usepackage[font_encoding1, font_encoding2, ...]{fontenc} Specify the font encodings. A font encoding is a mapping of the character codes to the font glyphs that are used to typeset your output. This package only applies if you use the pdflatex engine (see TeX engines). If you use the xelatex or lualatex engine then instead use the fontspec package. TeX’s original font family, Computer Modern, has a limited character set. For instance, to make common accented characters you must use \accent (see \accent) but this disables hyphenation. TeX users have agreed on a number of standards to access the larger sets of characters provided by modern fonts. If you are using pdflatex then put this in the preamble \usepackage[T1]{fontenc} gives you support for the most widespread European languages, including French, German, Italian, Polish, and others. In particular, if you have words with accented letters then LaTeX will hyphenate them and your output can be copied and pasted. (The optional second line allows you to directly enter accented characters into your source file.) If you are using an encoding such as T1 and the characters appear blurry or do not magnify well then your fonts may be bitmapped, sometimes called raster or Type 3. You want vector fonts. Use a package such as lmodern or cm-super to get a font that extends LaTeX’s default using vector fonts. For each font_encoding given as an option but not already declared, this package loads the encoding definition files, named font_encodingenc.def. It also sets \encodingdefault to be the last encoding in the option list. These are the common values for font_encoding. OT1 The original encoding for TeX. Limited to mostly English characters. OMS, OML Math symbols and math letters encoding.
Errors/Suggestions About
Why donate?

Powered by w3.css