{"action":"opened","issue":{"url":"https://api.github.com/repos/CleverMind6/LatexGuide/issues/1","repository_url":"https://api.github.com/repos/CleverMind6/LatexGuide","labels_url":"https://api.github.com/repos/CleverMind6/LatexGuide/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/CleverMind6/LatexGuide/issues/1/comments","events_url":"https://api.github.com/repos/CleverMind6/LatexGuide/issues/1/events","html_url":"https://github.com/CleverMind6/LatexGuide/issues/1","id":179555910,"number":1,"title":"Main","user":{"login":"CleverMind6","id":20045083,"avatar_url":"https://avatars.githubusercontent.com/u/20045083?v=3","gravatar_id":"","url":"https://api.github.com/users/CleverMind6","html_url":"https://github.com/CleverMind6","followers_url":"https://api.github.com/users/CleverMind6/followers","following_url":"https://api.github.com/users/CleverMind6/following{/other_user}","gists_url":"https://api.github.com/users/CleverMind6/gists{/gist_id}","starred_url":"https://api.github.com/users/CleverMind6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CleverMind6/subscriptions","organizations_url":"https://api.github.com/users/CleverMind6/orgs","repos_url":"https://api.github.com/users/CleverMind6/repos","events_url":"https://api.github.com/users/CleverMind6/events{/privacy}","received_events_url":"https://api.github.com/users/CleverMind6/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-27T17:13:49Z","updated_at":"2016-09-27T17:13:49Z","closed_at":null,"body":"\\documentclass[11pt]{article}\r\n\\usepackage[utf8]{inputenc}\r\n\\usepackage{geometry, graphicx, amsmath, amssymb, amsthm}\r\n\\usepackage[dvipsnames]{xcolor}\r\n\r\n\\geometry{margin=1in}\r\n\\renewcommand{\\baselinestretch}{1.5}\r\n\\setlength{\\parskip}{0.5em}\r\n\r\n\\definecolor{darkblue}{RGB}{0,0,100}\r\n\r\n\\title{Latex Display}\r\n\\author{Osama Kawish}\r\n\\date{}\r\n\r\n\\begin{document}\r\n\r\n\\begin{titlepage}\r\n\\clearpage\\maketitle\r\n\\thispagestyle{empty}\r\n\\end{titlepage}\r\n\\color{darkblue}\r\n\\section{Introduction}\r\nThis is essentially what you may call a LaTeX portfolio. It is to display everything I understand about Latex.\r\n\r\n\\section{Basics}\r\nEvery Latex document should at the least have the following general form:\r\n\r\n\\begin{verbatim}\r\n    \\documentclass[<Main Font Size>]{<Document Style>}\r\n    \r\n    \\begin{document}\r\n    % Place Text here.\r\n    \\end{document}\r\n\\end{verbatim}\r\n\r\nAnything that comes before the \\verb|\\begin{document}| is called the \\textbf{preamble} of the document. Thus, the line \\verb|\\documentclass[<Main Font Size>]{<Document Style>}| is considered part of the preamble. Anything in between \\verb|\\begin{document}| and \\verb|\\end{document}| is the main part of the document, the part where the writing is actually done.\r\n\r\nFor beginners, the easiest document style is the \\textsf{article}. In this Latex document, I am using a font size of 11pt. Therefore, the first line of this document is this:\r\n\r\n\\begin{verbatim}\r\n    \\documentclass[11pt]{article}\r\n\\end{verbatim}\r\n\r\nThe margin I prefer on pages is 1 inch on each side. To do this, we have to add the \\textsf{geometry} package and fix the geometry of the page by adding the following to the preamble:\r\n\r\n\\begin{verbatim}\r\n    \\usepackage{geometry}\r\n    \\geometry{margin=1in}\r\n\\end{verbatim}\r\n\r\nThe line \\verb|\\usepackage{geometry}| adds the geometry package and allows us to use commands from that package. \r\n\r\nThe concept of the \\textit{preamble} should be clear once I provide the full code for someone who wishes to write an \\textit{article} with a margin of 1 inch.\r\n\r\nThe following is the code required for such a setup.\r\n{\\color{ForestGreen}\r\n\\begin{verbatim}\r\n    \\documentclass[11pt]{article}\r\n    \r\n    \\usepackage{geometry}\r\n    \\geometry{margin=1in}\r\n    \r\n    \\begin{document}\r\n    \r\n    \\end{document}\r\n\\end{verbatim}}\r\nAs said, we include all this code \\textit{in the preamble}, that is, before the \\verb|\\begin{document}| line.\r\n\r\nThe preamble is to style the general structure of the entire document. Styling specific parts of the document is typically done within the code of the document itself, to be shown later.\r\n\r\nGenerally, when we want multiple packages, we can do this in two ways. Say we want to use both \\textsf{package1} and \\textsf{package2} in our Latex document.\r\n\r\nOne method is to add each package separately, as in the following manner:\r\n\\begin{verbatim}\r\n    \\usepackage{package1}\r\n    \\usepackage{package2}\r\n\\end{verbatim}\r\n\r\nHowever, a `shortcut' can be taken in the following manner:\r\n\\begin{verbatim}\r\n    \\usepackage{package1, package2}\r\n\\end{verbatim}\r\nAdding either code to our preamble will do the trick. Other packages will become useful eventually, once we need to add math, pictures, or colours to our Latex document.\r\n\r\nFinally, \\textbf{comments} are added to the text using the percent sign \\texttt{\\%}. These can be added anywhere. They are often used to keep ourselves reminders or to sometimes display professionalism to show what each part of the code is about. \r\n\r\nComments are generally \\textit{not} part of the document.\r\n\r\n{\\color{ForestGreen}\r\n\\begin{verbatim}\r\n    % Everything below here -------\r\n    \\documentclass[11pt]{article}\r\n    \r\n    \\usepackage{geometry}\r\n    \\geometry{margin=1in}\r\n    % to here ---------------------\r\n    % was all part of the preamble.\r\n    \r\n    % Everything from here --------\r\n    \\begin{document}\r\n    \r\n    \\end{document}\r\n    % to here----------------------\r\n    % was the main text.\r\n    \r\n    % None of the lines starting with `%' are shown in the outputted document.\r\n\\end{verbatim}}\r\n\r\n\\section{Text}\r\n\r\n\\section{Math}\r\n\r\n\\section{Images}\r\n\r\n\\section{Frames}\r\n\r\n\\section{Title Page}\r\n\r\n\\section{Colour}\r\n\r\n\r\n\\end{document}\r\n"}}
{"actor":{"display_login":"CleverMind6"}}