PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.27.2
Code Block Pro – Beautiful Syntax Highlighting v1.27.2
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / samples / latex.sample

latex.sample in Code Block Pro – Beautiful Syntax Highlighting 1.27.2, at build/shiki/samples/latex.sample

32 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 % This is a simple sample document. For more complicated documents take a look in the exercise tab. Note that everything that comes after a % symbol is treated as comment and ignored when the code is compiled.
2
3 \documentclass{article} % \documentclass{} is the first command in any LaTeX code. It is used to define what kind of document you are creating such as an article or a book, and begins the document preamble
4
5 \usepackage{amsmath} % \usepackage is a command that allows you to add functionality to your LaTeX code
6
7 \title{Simple Sample} % Sets article title
8 \author{My Name} % Sets authors name
9 \date{\today} % Sets date for date compiled
10
11 % The preamble ends with the command \begin{document}
12 \begin{document} % All begin commands must be paired with an end command somewhere
13 \maketitle % creates title using information in preamble (title, author, date)
14
15 \section{Hello World!} % creates a section
16
17 \textbf{Hello World!} Today I am learning \LaTeX. %notice how the command will end at the first non-alphabet charecter such as the . after \LaTeX
18 \LaTeX{} is a great program for writing math. I can write in line math such as $a^2+b^2=c^2$ %$ tells LaTexX to compile as math
19 . I can also give equations their own space:
20 \begin{equation} % Creates an equation environment and is compiled as math
21 \gamma^2+\theta^2=\omega^2
22 \end{equation}
23 If I do not leave any blank lines \LaTeX{} will continue this text without making it into a new paragraph. Notice how there was no indentation in the text after equation (1).
24 Also notice how even though I hit enter after that sentence and here $\downarrow$
25 \LaTeX{} formats the sentence without any break. Also look how it doesn't matter how many spaces I put between my words.
26
27 For a new paragraph I can leave a blank space in my code.
28
29 \end{document} % This is the end of the document
30
31 % From https://guides.nyu.edu/LaTeX/sample-document
32