Latex hse - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor PDF

Title Latex hse - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
Course Diskrete Wahrscheinlichkeitstheorie (IN0018)
Institution Technische Universität München
Pages 19
File Size 639.8 KB
File Type PDF
Total Downloads 89
Total Views 149

Summary

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Arcu cursus vitae congue mauris rhoncus aenean vel elit. Quam vulputate dignissim suspendisse in est. Elementum tempus egestas sed sed. Semper eget duis at tellus at urna. Cons...


Description

Notes about (Based on the HSE course) 1. Purpose of this document and last revision of this document ................................................................. 2 2. Why Latex is useful ................................................................................................................................... 2 3. Document structure .................................................................................................................................. 2 3.1 Content structure................................................................................................................................ 2 3.2 Tex File structure................................................................................................................................. 3 4. Common aspects for all Latex commands ................................................................................................ 3 5. TexStudio useful Features......................................................................................................................... 5 6. Some Preamble Examples ......................................................................................................................... 7 7. Commands ................................................................................................................................................ 9 7.1 General Content Commands............................................................................................................... 9 7.2 Math Content Commands................................................................................................................. 10 7.3 Specific Letters and Math Operators ................................................................................................ 12 7.4 Graphics and Tables Latex Operators ............................................................................................... 13 7.4 Automatic Content Generation Command ....................................................................................... 15 7.5 Special Commands for Articles ......................................................................................................... 16 7.6 Special Commands for Presentations ............................................................................................... 17 8. References .............................................................................................................................................. 19 8.1 Learning materials............................................................................................................................. 19 8.2 IDE for Latex markup language ......................................................................................................... 19 8.2 Auxiliary Tools and Software ............................................................................................................19 8.3 Reference tables ............................................................................................................................... 19

1

1. Purpose of this document and last revision of this document These notes are mostly based on the Latex Course from the High School of Economics [1]. To create these notes other materials [2],[3],[4] have also been used . But the most important inspiration have been obtained from [1]. Dat Date e aand nd au auth th thor or 04-APR-2020, Konstantin Burlachenko 04-APR-2020, Konstantin Burlachenko 30-APR-2020, Konstantin Burlachenko 16-MAY-2020, Konstantin Burlachenko

Co Comm mm mmen en entt Initial draft Fix English grammar Some updates with new commands Update reference section

2. Why Latex is useful The main ideology of Latex is “Think more about the content”. LaTeX is a high-quality typesetting system. LaTeX is the de facto standard for the communication and publication of scientific documents. Due to a huge number of open-source packages and customizing, the possibilities with LaTeX are endless. The people from the computer science background can be considering Latex as Domain Specific Language for typographic work.

3. Document structure 3.1 Content structure In term of sections information in the Latex, the document is structured typically in the following way. The concepts are listed from bigger concepts to a more detailed one. Structural part of document Part

Meaning Parts of books, like volume. “Article” does not have such a concept. \par \part{P t{P t{Par ar artt N Naame me}} - Command creates an enumerated part \par \part* t* t*{n {n {nam am ame} e} - Command creates not enumerated part

Chapter

Such a concept is presented in books and reports, an article does not have such a concept. \ch \chap ap apter{ ter{ ter{Ch Ch Chap ap apter ter Nam Name} e} - Command creates enumerated chapter \ch \chap ap apter* ter* ter*{n {n {nam am ame} e} - Command creates not enumerated chapter

Section

It’s the main concept of the article to start new sections in the document \se \sectio ctio ction n {{Se Se Secti cti ction on N Nam am ame} e} - Command creates an enumerated section \se \sectio ctio ction* n* n*{S {S {Sect ect ection ion N Nam am ame e no nott en enu ume mera ra rated ted ted}} – Command creates not enumerated section

Subsection

2

Rule of thumb if you don’t want to numerate section use extra *. Part of the section if you want to layout text conceptually in finer granularity \sub \subse se secti cti ction on on{Su {Su {Subs bs bse ectio ction n Na Name me me}}

SubSubSection Paragraph

SubParagraph

Name of sub-sub section. \sub \subsu su subs bs bsec ec ection tion tion{S {S {Sub ub ub-s -s -sub ub se sectio ctio ction n na name me me}} \par \paraagra graph ph \par \paraagra graph* ph* \sub \subp par aragr agr agrap ap aph h \sub \subp par aragr agr agrap ap aph* h*

3.2 Tex File structure File which store instructions to create a final document (presentation, article, book, etc.) has extension *.tex and from point of view of filesystem are text (not binary) files. From birds-eye-view *.tex files have the following structure. \do \docu cu cume me ment nt ntcla cla classs{...} % Declares document type

Commands placed here are called the preamble. They contain commands which affect all document. Some examples: % Include some popular American Math Society packages. \usepackage{amsmath,amssymb,amsfonts,amsthm} % This is the encoding for the document text file. \usepackage[utf8]{inputenc} \be \begin gin gin{document}

From this place you insert commands relative to document content. \en \end d{document} You can store comments or temporary text underneath \end{document} command. They don't have implications in the result document from the point of view of final generated PDF document.

4. Common aspects for all Latex commands When you use Latex you create text content and also provide Latex system with commands which are intermixed with content. You need special commands, for example, for the purpose of creating tables or formulas. There are a lot of commands in Latex. But there are common aspects of all commands which I have found for myself while looking into the course [1]. And let's start from them. Aspect \co \comm mm mman an and d 3

Description Notation to write command

{}

Curly braces are used to separate arguments in commands

\{ \}

You should use backslashes if you really want to output curly braces

\si \sim m

Tilda symbol ~ is reserved in TEX, so it’s more easier to use this command. The notation to write command with several arguments

\co \comm mm mman an and_ d_ d_na na nam me {{ar ar argu gu gume me men nt-1} {ar {argu gu gum men enttt-2} 2}

How include Greek letters?

Opti Option on on--1: Have a keyboard with Greek letters Opti Option on on--2: Use specific commands like \alp alpha ha

New Line

A newline is treated as a space symbol. “Sp “Spac ac ace e ssym ym ymbol bol bols” s” inside math equations are ignored. Several “Space symbols” inside text are reduced to a single space.

\\

Forcing the movement of text to a new line without creating a new paragraph. The double new line in source *.tex file (via typing “Enter” two times) creates a new line but also starts a new paragraph.

\co \comm mm mman an and* d*

Very often in Latex, each command has alternative command notation, but with star “*” The * notation removes counting. The reference to the object can be created via \lab \label{ el{ el{un un uniqu iqu ique e na nam me} e}. You can reference only to numerating objects. Reference to the labeled object can be created via \eqr \eqref ef ef, \ref \ref, \pa \pager ger geref ef commands.

mm mm,cm ,cm ,cm,i,i,in n

em, ex

4

Absolute units for size Definition of sizes in millimeters, centimeters, and inches. This is the absolute size which does not depend on paper size or scales. Relative units for size em - Width of letter “M” in current font. ex – Height of letter “X” in current font.

\pa \page ge gewid wid width th \tex \texth th thei ei eight ght \tex \textwi twi twidth dth

Width of page. Height of text. Width of text

Another page metric concepts can be checked here: https://en.wikibooks.org/wiki/LaTeX/Page_Layout

% TThis his is a si singl ngl ngle e lin line e co com mmen entt

Single comment line

% Envi Environ ron ronm men entt b blo lo lock ck \be \begin gin gin{en {en {env. v. v.na na name me me}} % Som Some e te text xt an and d co comm mm mman an and ds \end \end{e {e {env nv nv.n .n .nam am ame} e}

Latex includes separate commands which are intermixed with text content, but also allow to have special "environment blocks" dedicated to tables, formulas, etc.

\,

Small space between nearby letters. Useful during typing title of the work.

5. TexStudio useful Features Here I will list some features of TexStudio which are useful during create Latex documents in it. TexStudio can be considered as IDE for Latex.

5

Action

Implication

Wiz Wizard ard ard-> -> ->Qu Qu Quic ic ickk TTab ab abul ul ular ar

Creating a table via using the graphical wizard

Lat Latexexex->M >M >Man an anip ip ipula ula ulate te Tab Table le less

Wizard provides the functionality to add row or column into the table and things like that

Bibli Bibliogr ogr ograp ap aph hyy->Ar >Ar >Articl ticl ticle e

Generate bibliographic description which should be saved in a file with extension *.bip

Lat Latexexex->Li >Li >List st Env Enviro iro iron nmen ments ts

Latex code generation for lists

Hov Hoverin erin eringg the cu curs rs rsor or ov over er tth he start startin in ingg sym symb bol of in inlin lin line em mat at ath h mod mode e

Hovering the cursor over the starting symbol of inline math mode, $, or over \begin{equation}. TexStudio gives a preview of a math equation.

Sele Select ct La Late te texx Te Test st with mo mous us use e and ty type pe F7

It’s a shortcut for “G “Go o to PD PDF” F” F”. This command highlight part in final PDF document which is correspond for this command.

F5 F6

Compile Latex to PDF and update preview Compile Latex to PDF

CTR CTRL+T L+T

Comment/Uncomment selected lines

CT CTR RL+ L+B B

Insert “\t \t \text ext extbf bf bf” command to make selected text as bol bold d

CTR CTRL+I L+I

Insert “\t \t \texti exti extitt” command to make selected text as italic

CTR CTRL+Z L+Z

Undo previous command

CTR CTRL+ L+ L+K K

Remove current line with latex commands

CTR CTRL+ L+ L+FF

One CTRL+F is standard search in document. If you will press CTRL+F, then will input search text, and then you will press CTRL+F one more time then it will bring to search all occurrences of search word in tex file.

Opti Option on ons-> s-> Conf Config ig igur ur ure-> e-> Buil Build-> d-> Def Defaul aul aultt Bibl Biblio io iogrp grp grpah ah ahic ic Too Tooll --> > Bib Biber er File File-> -> ->Ne Ne New w Fro From m Te Temp mp mpla la late te 6

More better bibliography tool which works with Unicode fine

Create a Latex document from one of the templates which are provided by TexStudio.

“La “Latex tex tex”” iin nm main ain me menu nu

Contains a lot of useful commands for Latex

Wizard Wizard ard-> -> ->Qu Qu Quic ic ickSt kSt kStart art Wiz Wizard ard ard-->Q >Qui ui uickB ckB ckBe eam amer er

Create default article, book, etc. via selecting specific options in the wizard

Wiz Wizard ard ard-> -> ->M Math athAs As Assis sis sista ta tant nt

Allow draw formula with mouse and generate Latex code for it

Sym Symbo bo bols ls in the lef leftt pa panel nel

There is a big pallet of special symbols from which it’s possible to select There is just button to open PDF, not in previewer with built-in zoom, But in PDF Reader Auto-completion feature, like in programming IDE. Observe different shortcuts for different wizards, etc. And ability to setup own shortcuts

Ope Open n PD PDFF in PD PDFF Vi Vie ewer CTR CTRL+S L+S L+Sp pace Opti Option on ons-> s-> Conf Config ig igur ur ure e TTexS exS exStu tu tudi di dio-> o-> Sho Short rt rtCu Cu Cuts ts Help Help-> -> ->La La Latex tex Re Refe fe fere re rence nce

Usefull one big page reference with different Latex commands, grouped into categories. “LaTeX2e unofficial reference manual”

6. Some Preamble Examples Preamble contains command to turn on specific packages, provide meta-information about document, setup various layout and anything relative to specific book style, journal, etc.

Command \ma \math th thtoo too tools ls lsse se set(sh t(sh t(show ow owo onlyr nlyref ef efs= s= s=tru tru true) e)

Description Show only formulas numbers for which we have reference via \eqr \eqref ef

\doc \docu umen menttcla class[ ss[ ss[a4p a4p a4pap ap ape er, 112 2pt, le leqno qno qno]{ ]{ ]{art art articl icl icle} e}

Numerate equations and make numerations from the left

\doc 12pt, \docu umen menttcla class[ ss[ ss[a4p a4p a4pap ap ape er, 12pt, leqn leqno, o, o,tw tw twoco oco ocolu lu lumn mn mn]{ ]{ ]{ar ar articl ticl ticle} e}

Create two column article

\use \usepa pa pack ck ckage age age{gr {gr {grap ap aph hicx icx}}

Include package related to work with graphics features

\use \usepa pa pack ck ckage age age{a {a {ams ms msm math ath,a ,a ,ams ms mssy sy symb mb mb,a ,a ,amsf msf msfon on onts, ts, ts,am am amst st sth hm}

Packages related to mathematics into *.tex document

\titl \title{ e{ e{Firs Firs Firstt do doc} c}

This is the title.

\au \autho tho thor{J r{J r{Jan an ane} e}

The name of the Author(s)

7

\th \thanks anks anks{e {e {extr xtr xtraa cre credi di dits} ts}

Useful if you need to thank an institution in your article.

\da 201 \date{ te{ te{Fe Fe Febru bru bruar ar aryy 201 014} 4} \use \usepa pa pack ck ckage age age{e {e {exts xts xtsize ize izes} s}

Allow use non-standard font sizes

\use \usepa pa pack ck ckage age age{g {g {geo eo eome me metr tr try} y} \geo \geom metr etry{ y{ y{top top top=2 =2 =25 5mm mm}} \geo \geom metr etry{b y{b y{bo otto ttom= m= m=35 35 35m mm} \geo etr 5m } \geom metry{l y{l y{left= eft= eft=3 35mm m \geo \geom metr etry{r y{r y{righ igh ight= t= t=2 20m 0mm} m} \ us usep ep epack ack ackag ag age e {fa {fancy ncy ncyhdr hdr hdr}} \ pa pages ges gestyl tyl tyle e {fa {fanc nc ncy} y} \ re rene ne newco wco wcom mmand {\ h hea ea eadru dru drule le lewid wid width th th}} {{0m 0m 0mm m} \ lfoo lfoott {Bo {Botto tto ttom m LLeft} eft} \ rfo rfoo ot {Lo {Low wer righ right} t} \ rh rhea ea ead d {{Top Top Ri Righ gh ght} t} \ ch chead ead {{Top Top in th the e cen cente te ter} r} \ lh lhead ead {u {upp pp pper er lef left} t} % \ cfo cfoot ot {L {Low ow ower er in the cen center ter ter}} % By d defa efa efaul ul ult, t, h her er ere e is th the ep page age n num um umbe be berr

Simple way to setup margins

\use \usepa pa pack ck ckage age age{s {s {sets ets etsp pace ace}} % in inter ter lin line e dis distan tan tance ce %\o %\one ne neh halfsp alfspaacin cingg % x1 x1..5 %\d %\dou ou ouble ble blesp sp spaci aci acing ng % x2 %\si %\singl ngl ngles es esp pacin acingg % x1

Specify inter line distance. It’s a distance between adjacent lines in final document

\use \usepa pa pack ck ckage age age{l {l {lastp astp astpaage}

Obtain number of pages in document

\use \usepa pa pack ck ckage age age{h {h {hyp yp yperr err erref ef ef}}

Create real hyper-reference inside document. Now you can click into various references created with \ref like commands.

Headers and footers. Thickness of the ruler that marks out the header

\hyp \hyper er erse se setup tup tup{} {} allow to setup colors for different links mode used in hyper-links \ren \rene ewco wcom mma man nd{\f d{\faamily milyde de defa fa fault ult ult}{\sd }{\sd }{\sde efau fault} lt}

Setup default font without serifs (Like Arial)

\use \usepa pa pack ck ckage age age{c {c {cm map} % SSear ear earch ch in PD PDFF \use \usepa pa pack ck ckage age age{m {m {mat at atht ht htext ext ext}} % A Allllllow ow Ru Russi ssi ssian an le lette tte tters rs iin n equ equatio atio ation ns \use \usepa pa pack ck ckage age age[u [u [utf tf tf8]{i 8]{i 8]{inp np npu uten tenc} c} % So Sour ur urcce fi file le eenco nco ncod din ingg \use te % E codi \usepa pa pack ck ckage age age[T [T [T2A 2A 2A]{fo ]{fo ]{fon ntenc} nc} En ncoding ng \use \usepa pa pack ck ckage age age[e [e [engl ngl nglis is ish,r h,r h,rus us ussia sia sian n]{ba ]{babe be bel} l} % LLoc oc ocali ali aliza za zation tion

Turn on Russian letters processing inside TEX document (Encoded in UTF-8 format)

8

\fren \french ch chsspa pacin cin cingg

7. Commands There are a lot of commands in Latex. The classification used below is only my classification to easily navigate between different commands in future.

7.1 General Content Commands Command \doc \docu umen menttcla class ss {{cl cl class} ass}

Description Article - Usual article Report - Usual report Book - Template for book Beamer - Presentation slides

\lab \label{ el{ el{na na nam me}

Attach label to any part of document

\ref{ \ref{n nam ame} e}

Reference to label

\pa \pager ger geref{ ef{ ef{na na nam me}

Reference to the page with the label

\eqr \eqref ef ef{n {n {nam am ame} e}

Reference to equation

% sing single le lin line e co com mment

Comment for the whole line, ending with newline

Spa Space ce cess in si singl ngl ngle e liline ne ne..

Several spaces equivalent to single space

Ne New w PPar ar aragr agr agrap ap aph h

Please leave one or more single lines to make new paragraph.

\be \begin gin gin{c {c {cent ent enter} er} Im Images ages ages,, TTab ab ables les les,, ffor or ormu mu mulas las he here re wi willll be align aligne ed to center \end \end{c {c {cen en enter ter ter}}

cen center ter - alignment horizontally by the center of the page flus flushl hl hleft eft - alignme...


Similar Free PDFs