latex
play

LaTeX Eng. Sultan Rushdan Software Resources To run LaTeX on your - PowerPoint PPT Presentation

Introduction to LaTeX Eng. Sultan Rushdan Software Resources To run LaTeX on your PC you need to download and install LaTeX Engine: https://miktex.org/download graphical tool for LaTeX editing https://www.texstudio.org/ OR


  1. Introduction to LaTeX Eng. Sultan Rushdan

  2. Software Resources To run LaTeX on your PC you need to download and install LaTeX Engine: https://miktex.org/download graphical tool for LaTeX editing https://www.texstudio.org/ OR http://www.winedt.com/download.html

  3. Learning Resources for learning resources I recommend the following book and tutorial: https://en.wikibooks.org/wiki/LaTeX https://www.LaTeX-tutorial.com/tutorials/

  4. LaTeX File structure \documentclass[options]{class} Preamble(contains commands that affect the entire document.) \begin{document} ... \end{document} Example: \documentclass[12pt,a4paper,oneside] {article}

  5. Classes of document Article For articles in scientific journals, presentations, short reports, program documentation, invitations, ... IEEEtran For articles with the IEEE Transactions format. Proc A class for proceedings based on the article class. Report For longer reports containing several chapters, small books, thesis, ... Book For real books. Slides For slides. The class uses big sans serif letters. Memoir For changing sensibly the output of the document. It is based on the book class, but you can create any kind of document with it Letter For writing letters. Beamer For writing presentations.

  6. Options 10pt, 11pt, Sets the size of the main font in the document. If no option is specified, 12pt 10pt is assumed. a4paper, Defines the paper size. The default size is letterpaper; However, many letterpaper European distributions of TeX now come pre-set for A4, not Letter, and this is also true of all distributions of pdfLaTeX. Besides that, a5paper, b5paper, executivepaper, and legalpaper can be specified. Fleqn Typesets displayed formulas left-aligned instead of centered. Leqno Places the numbering of formulas on the left hand side instead of the right. titlepage, Specifies whether a new page should be started after the document title or notitlepage not. The article class does not start a new page by default, while report and book do. Twocolumn Instructs LaTeX to typeset the document in two columns instead of one. twoside, Specifies whether double or single sided output should be generated. The oneside classes article and report are single sided and the book class is double sided by default. Note that this option concerns the style of the document only. Landscape Changes the layout of the document to print in landscape mode. openright, Makes chapters begin either only on right hand pages or on the next page openany available. This does not work with the article class, as it does not know about chapters. The report class by default starts chapters on the next page available and the book class starts them on right hand pages.

  7. Page Parameters size and parameters of page is defined using geometry package which can be used as following: \usepackage[options]{geometry} usepackage command is written in preamble

  8. Page Parameters Examples: \usepackage[a4paper,margin=1in]{geomet ry} \usepackage{geometry} \geometry{legalpaper,margin=2in} \usepackage[top=1in,bottom=1.25in, left=1.25in,right=1.25in]{geometry} \usepackage[a4paper,margin=2.54cm]{geo metry}

  9. LaTeX Environment Commands in LaTeX is performed be defining environment. Environment in LaTeX is defined and begins by command \begin{Env. Name} and terminated using command \end{Env. Name}

  10. LaTeX Environment Examples: \begin{document} ... \end{document} \usepackage{lscape} \begin{landscape} ... \end{landscape}

  11. Page numbering by default LaTeX uses arabic numeral for page numbering. page numbering can be setting using \pagenumbering{num_style} command where num_style is: arabic: for arabic numerals (1,2,3,...). roman: for lower case roman numerals (i,ii,iii,...) Roman: for upper case roman numerals (I,II,III,...) alph: for lower case alphabetical numbering (a,b,c,...) Alph: for upper case alphabetical numbering (A,B,C,...)

  12. Text formatting Spaces \newpage : will start new page in LaTeX document \\ or \newline : will start new line \hspace{50pt or 5cm or 2in} for horizontal space

  13. Text formatting Text Alignment: Full justified is the Default setting in LaTeX. For left alignment use flushleft environment \begin{flushleft} text \end{flushleft} For right alignment flushright environment \begin{flushright} text \end{flushright} For centering use center environment \begin{center} text \end{center}

  14. Text formatting Font format For italic text \emph{text} or \textit{text} For bold text \textbf{text} For normal text \textnormal{ text }

  15. Text formatting Font format For underline \underline{under line text} or \usepackage{soul} \ul{underlined} underlined For strikethrough text \usepackage{soul} \st{strikethrough text} strikethrough text

  16. Multicolumns . By default the LaTeX document is single column document. To create multicolumn document: \usepackage{multicol} \begin{multicols}{2} \end{multicols}

  17. Multicolumns . By default columns are balanced. To create unbalanced columns: \begin{multicols*}{2} To end the column at current location and begin new column. \columnbreak

  18. Multicolumns . To set the space between columns \setlength{\columnsep}{30pt or cm or in} To set a vertical line between columns \setlength{\columnseprule}{1pt} Note: these commands are written in preamble

  19. Document Title Title object contains three parts: title, author and date which can be set as the following: \title{this is a test of LaTeX} \author{sultan rushdan \thanks{ instructor at philadelphia university}} \date{date} if the braces in date left empty then no date will display

  20. Document Title title, author and date parameters are set in preamble so they are not displayed in document, To display these information in document use command \maketitle inside decument Environment. \begin{document} \maketitle \end{document}

  21. LaTeX document structure Documents in LaTeX can divided to the following levels: Command Level Comment \part{part} -1 only books and reports \chapter{chapter} 0 only books and reports \section{section} 1 not in letters \subsection{subsection} 2 not in letters \subsubsection{subsubsection} 3 not in letters \paragraph{paragraph} 4 not in letters \subparagraph{subparagraph} 5 not in letters

  22. LaTeX document structure Example: \part{part introduction} \chapter{chapter introduction} \section{section introduction} \subsection{subsection introduction} \subsubsection{sub-subsection introduction} \paragraph{paragraph introduction} \subparagraph{sub-paragraph introduction}

  23. LaTeX document structure By default Part, Chapter, Section and subsection are numbered using Arabic Numerals. Subsubsection, paragraph and subparagraph are not numberd. To control the depth of numbering: \setcounter{tocdepth}{<depth>}

  24. LaTeX document structure To unnumber the heading of components (parts, chapter, sections, ,…) asterisk symbol can be added as following: \section*{section two} \subsubsection*{sub-subsection tow}

  25. LaTeX document structure To control Numbering format: \renewcommand{\thesection}{\arabic {section}--} which means the section numbering will be in Arabic numerals followed by --

  26. LaTeX document structure More Numbering options: \renewcommand{\thesection}{\roman{sec tion}-} (i-,ii-,iii-,iv-,v-) \renewcommand{\thesection}{\Roman{sec tion}.} (I.,II.,III.,IV.,V.) \renewcommand{\thesection}{(\alph{sec tion}).}((a).,(b).,(c).,(d).) \renewcommand{\thesection}{\Alph{sect ion}-}(A-,B-,C-,D-)

  27. Items Items are unordered list (bullet, star , dash) defined in itemize environment \begin{itemize} \item first \item second \item third \item fourth \end{itemize}

  28. Multilevel item list \begin{itemize} \item third second first \item first \item third second \begin{itemize} second \item first first \end{itemize} \item first second \end{itemize} \end{itemize} \item fourth \item second \begin{itemize} \item third \item fourth first \begin{itemize} \item fourth second \item third first \end{itemize} \item third second \end{itemize} \begin{itemize}

  29. Multilevel item list To control the itemized numbering \renewcommand{\labelitemi}{$\circ$} the item numbering will be circles \renewcommand{\labelitemii}{$\bulle t$} \renewcommand{\labelitemiii}{$\ast$ }

  30. Enumeration Enumeration are Ordered list. Numbering of items like 1,2,3 or a,b,c or i,ii,iii \begin{enumerate} \item first \item second \item third \item fourth \end{enumerate }

  31. Multi level Enumeration \ begin{enumerate} \item first \begin{enumerate} \item first first \begin{enumerate} \item first first first \begin{enumerate} \item first first first first \item first first first second \end{enumerate} \item first first second \end{enumerate} \item first second \item first third \end{enumerate} \end{enumerate }

  32. Multi level Enumeration Up to 4 level The default numbering scheme is: • Arabic number (1, 2, 3,...) for Level 1 • Lowercase letter(a, b, c,...)for Level 2 • Lowercase Roman numeral(i, ii, iii,...) for Level 3 • Uppercase letter (A, B, C, ...) for Level 4.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend