aboutsummaryrefslogtreecommitdiffstats
path: root/examples/example.fmark
blob: 933942325ad2f04c0f579161bad04f298abff311 (plain)
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# FMark Example

## Table of contents
<!-- Relative links do not work in VS code, use Create HTML File. -->

%%TOC depth=2

## Macros

### Macro Example 1
<script type="text/javascript">
 
    function loadCSS(filename){
       var file = document.createElement("link");
       file.setAttribute("rel", "stylesheet");
       file.setAttribute("type", "text/css");
       file.setAttribute("href", filename);
       document.head.appendChild(file);

    }

</script>

{% macro input(text)

<form action="/html/tags/html_form_tag_action.cfm" method="post">
<textarea name="comments" id="comments" style="width:92%;height:140px;padding:2%;font-size:1.2em;border:12px outset #6DB72C;">
{{text}}
</textarea><br>
<input type="submit" value="Submit">
</form>

%}

{{ input(This is the text to be inputted into the Textbox) }}


### Macro Example 2
{% macro make_table(00;01;02;10;11;12;20;21;22) 

|{{00}}|{{01}}|{{02}}|
|---|---|---|
|{{10}}|{{11}}|{{12}}|
|{{20}}|{{21}}|{{22}}|

%}

{% macro default_table(10';11';12';20';21';22')
{{ make_table(default;table;contents;{{10'}};{{11'}};{{12'}};{{20'}};{{21'}};{{22'}}) }}
%}

{{ default_table(hi;my;name;is;FMark;hi) }}

## Including files

{{ include test.fmark }}

## Spreadsheet functionality

|This|is|FMark|
|---|---|---|
|=5|=3|=SUM{[1,0]:[1,1]}|
|=5%3|=[1,0]*[1,1]/((7-4)+2)|=AVG{[1,0]:[1,2]},2|

## Standard Markdown

### Styling

*Emphasis* or _Emphasis_

**Bold** or __bold__

***Both*** or ___both___

~~strikethrough~~

Note: _underscores_ must have a space on either side.

# Heading 1

## Heading 2

### Heading 3

#### Heading 4

##### Heading 5

###### Heading 6

### Lists

Ordered List:

1. First
2. Second
    1. Nested First
    2. Nested Second
3. Third

Unordered List:

* First
* Second
    * Nested First
    * Nested Second
* Third

Unordered List 2:

- First
- Second
    - Nested First
    - Nested Second
- Third

### Links

[Google](http://www.google.com)

<!-- Images produce correct HTML but don't display in VS Code-->
![image](test_img.jpg)

<!-- Relative links do not work in VS code, use Create HTML File -->
<a href="#this-header"> Relative link. </a>

### HTML passthrough
<!-- HTML is left unchanged. -->
<h2 id="this-header"><a href="broken-link"> A broken link. </a></h2>

## LateX maths

$$2* \begin{pmatrix} 
x_{00} & x_{01} & x_{01} \newline 
x_{10} & x_{11} & x_{11} \newline 
x_{20} & x_{21} & x_{21} \end{pmatrix}$$

## Footers

%%RefStyle= Harvard

### Simple footnote

Here are some[^1] words, and more words[^2].

### Simple footnote[^3] accepted in headers

[^2], A few lines to _explain_ the words. 
      Another line to **explain** the words.

[^1], Footnotes are sorted by ID numbers.

[^3], I'm a footnote in a header!

### References

All footnotes are collected and displayed at the end of the document[^Smith].
The style of references are set at the top of the document.[^Miller]

[^Smith], type = Book, author = FMark Smith, year = 2018, title = An Introduction to FMark

[^Miller], type=Website, author=Markie Miller, year = 2017, title = A Website on FMark,
access = 2018-03-22, url = www.example.com/website_on_stuff

Note: Simple footnotes takes numerical IDs, and references need alphabetical IDs.

Look the footers are rendered in order below this line.