-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdemo.txt
101 lines (84 loc) · 3.01 KB
/
demo.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
%pyGroff, A tiny Syntax guide
@Subhaditya Mukherjee
# Intro
pyGroff is a tiny wrapper around groff which will let you create professional pdfs and documents in almost markdown syntax. This document is an example as well as a syntax list for easy reference. As you can see, it is also being generated by pyGroff.
# Arguments possible
## Required
- -f : input file path
- -o : output file name. (Dont give path!)
## Optional
- -l : Language string. (Default is python)
- -t : Add TOC (Default true)
- -i : Are there images (Default true)
- -d : Delete intermediates (Default true)
- -df : Different date format (Default "%B %d, %Y")
- -c : Add cover page (Default true)
- -t : Title for cover page
- -w : Convert to word (Default False)
# Image
!drag.jpg
# Main syntax
## General
*Note that you have to remove the <>
~% <title> : Adds a title like the one in this document
~@ <author> : Author name
~< <text> : move to the center (left is default)
~> <text> : move to the right
~# <text> : Heading level 1
~## <text> : Heading level 2.. and so on
~- <text> : Lists
~ : if you want to use one of the above in a sentence but do not want it to be formatted. Like this document.
~* <text> : bold
~/ <text> : italics
~_ <text> : underline
~+ <text> : New page
~^: Superscript
^(Note that this should be in a new line)
## Advanced
~| <text> : Table. Format is |[title](1;3;4;5;6,1;3;4;8;9). Separate rows with , and lines with ;
~! <image name.jpg> : Make sure it is in the same directory. Or specify the full path. Note that it will be converted to .eps format.
~) <code> : Python code, in quotes like : "import numpy as np; z = np.random.rand(3,3);print(z)" . Please separate lines by ;
~= <equation> : One equation per line. For more examples refer below
## Need a cover page?
*Use the arguments
- -c True
- -n "Your name"
- -t "Project title"
- -d This is optional. But it can be another date format
# Limitations for now
- If you have added a title and an author, you must add a body or you will get errors
- Formatting can only be applied to the whole row
- If you are using < or > , please leave a line gap
- If you see any numbering/formatting not working, just leave a line gap. It should mostly work out. If not. File an issue
# What about code
)import numpy as np;z = np.random.rand(3,3); print(z)
# What about tables
|[Who is cool](me;me;me;you, 1;1;1;1)
# What about equations
## Further syntax specification for easier equations
- != : not equals
- >= : greater than or equals (etc etc)
- sup : superscript
- sub : subscript
- over : divided by
- pi
- for any greek letter : just spell it out. Put spaces before and after
- cdot : circle dot
- del : grad symbol
- grad : grad symbol
- sum : sum symbol { write as from {i=1} etc }
- int : integral
- inf : infinity
- partial : partial differential symbol
- half : 1/2
- prod : product symbol
- union
- inter : intersection
## Some examples
= a sup 3 over b sup 5
= x=3+5x-=3 + gamma
= a sup 3 sup 5 * 600
= 7 gamma + 10 delta = 100
= f ( theta ) = .8 pi r
= sum from {i=1} to inf sub 1 = 1000x
> Thank you