-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
338 lines (298 loc) · 19.4 KB
/
index.html
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
<title>Accessible RMarkdown Writer</title>
<link rel="stylesheet" href="src/bootstrap/css/bootstrap.min.css" >
<link rel="stylesheet" href="src/open-iconic/font/css/open-iconic-bootstrap.min.css" >
<link rel="stylesheet" href="src/cookiealert.css" >
<link href="src/styles.css" rel="stylesheet"/>
<script src="src/bootstrap/js/jquery-3.3.1.min.js"></script>
<script src="src/bootstrap/js/popper.min.js"></script>
<script src="src/bootstrap/js/bootstrap.min.js"></script>
<script src="src/js.cookie.min.js"></script>
<script src="src/bibtex_js.js"></script>
<script src="src/classes.js"></script>
<script src="src/main.js"></script>
</head>
<body>
<div id="header_wrapper">
<header class="wrapper clearfix" aria-label="header" id="header">
<div class="container relative">
<!--
<div id="psu_icon_wrapper">
<div id="psu_text_overlay">
<a href="http://psu.edu" title="The Pennsylvania State University" class="psu-link">Penn State</a>
</div>
<img alt="Penn State University" title="Penn State University" src="src/psu_logo.png">
</div>
//-->
<div id="title_wrapper" class="text-center">
<h1 class="title">Accessible RMarkdown Writer</h1>
</div>
</div>
</header>
<!--
<nav id="topnav" role="navigation" aria-label="primary navigation">
<ul id="topnavul" role="menubar">
<li class="active"><a href="/">Home</a></li>
<li><a href="about.html">About</a></li>
</ul>
</nav>
//-->
</div>
<main id="main">
<div class="container margin_top">
<div id="blurb" class="mb-5">
<h2>About</h2>
<p>The Accessible RMarkdown Writer is a tool that creates documents in various formats based on RMarkdown text. </p>
<p>It is designed to make the process of creating scientifically rigorous PDF, Word, and other types of documents easier for people with disabilities. Other ways of creating complex documents from text exist, such as LaTeX, but they are considerably more difficult to use, and require much higher levels of proficiency to be able to use properly. </p>
<p>RMarkdown is quite simple. It is essentially Markdown (a common formatting syntax) with the added ability to add inline R code. In addition, this tool has added features to customize the YAML headers and easily add BibTeX citations. </p>
<p>For more information, to tell us about issues, or to suggest additional features, please join our mailing list at <a href="https://www.freelists.org/list/arow">freelists.org/list/arow</a>.</p>
<h2>Instructions</h2>
<p>For basic use, type something in the text box, choose your output filename and the file types, and hit the submit button.</p>
<p>For more advanced use, there are a number of tools. In the main text area, you may type Markdown text (for help, check out a <a href="https://commonmark.org/help/">quick reference guide on Markdown</a>, or the <a href="https://daringfireball.net/projects/markdown/syntax">full Markdown syntax</a>), R code (by putting ```{r} above and ``` below your code), and insert a variety of symbols by using the menu above the text area (searchable by the shortcut Alt + /). For other options, click on the Advanced Options button where you can add custom YAML headers and manage citations. Citations are done using the citation manager; upload a citation BibTeX file or manually insert one, and the citations will be available from the Insert menu above the main text area or by the shortcut Alt + C (be sure to use proper citation style, <a href="http://www.bibtex.org/">more information on BibTeX citations here</a>).</p>
<p>This system requires JavaScript.</p>
<hr>
</div>
<div class="clearfix"></div>
<div id="input">
<div class="mb-3">
<h3 class="sr-only" id="menu_label">Text Options</h3>
<div class="btn-group float-right" id="edit_menu" role="group" aria-labelledby="menu_label"></div>
<h3 class="float-left" id="rmd_text_heading"><label for="rmd_text">Main text area</label></h3>
</div>
<div>
<div>
<textarea id="rmd_text"># Introduction
This is the first paragraph.
This is the second paragraph.
# Body
## Table Example
See the table below:
Left | Center | Right
:--- | :---: | ---:
value1 | value2 | value3
## Math Example
$\sum_{n=1}^{10} n^2$
## Text Formatting
This is **bolded** text.
This is *italics*.
Superscript: ^superscript^
Subscript: ~subscript~
## Listing Items
### Unordered List
* Apple
* Orange
* Grapes
### Ordered List
1. First item
2. Second item
3. Third item
## Figure Demo Using R
```{r histogram_test, fig.caption="Histogram of Ozone."}
hist(airquality$Ozone, col="blue")
```
# Conclusion
Thank you and good bye!
# References
</textarea>
</div>
</div>
<p class="form-group"><label for="rmd_name">File name</label><input type="text" id="rmd_name" class="form-control" value="MyFile"></p>
<div class="inline_divs" id="output_choices">
<p>Create which file types?</p>
<div class="col-sm-1"><label for="choice_html">html</label><input type="checkbox" class="format_choice margin_lr" id="choice_html" checked></div>
<div class="col-sm-1"><label for="choice_docx">docx</label><input type="checkbox" class="format_choice margin_lr" id="choice_docx"></div>
<div class="col-sm-1"><label for="choice_pdf">PDF</label><input type="checkbox" class="format_choice margin_lr" id="choice_pdf"></div>
<div class="col-sm-1"><label for="choice_pptx">pptx</label><input type="checkbox" class="format_choice margin_lr" id="choice_pptx"></div>
<div class="col-sm-1"><label for="choice_epub">EPUB3</label><input type="checkbox" class="format_choice margin_lr" id="choice_epub"></div>
<div class="col-sm-1"><label for="choice_custom">Custom</label><input type="checkbox" class="format_choice margin_lr" id="choice_custom"></div>
</div>
<p class="text-center mt-3"><button class="btn btn-default" id="advanced_options_trigger" aria-expanded="false" aria-controls="advanced_options_wrapper">Show Advanced Options</button></p>
<div class="clearfix"></div>
<p class="text-center"><button class="btn btn-primary" id="main_submit">Submit</button></p>
</div>
<div id="live_visual" aria-hidden="true">
</div>
<nav id="output" aria-label="Output File">
</nav>
<div id="system_message">
</div>
<div id="live_sr_search" aria-live="polite" class="sr-only" aria-atomic="true">
</div>
<div id="search_storage" class="hidden">
</div>
<div id="live_sr" aria-live="polite" class="sr-only">
</div>
<div id="live_sr_assertive" aria-live="assertive" class="sr-only">
</div>
</div>
</main>
<div class="modal fade" id="bibtex_modal" tabindex="-1" role="dialog" aria-labelledby="bibtex_modal_title" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="bibtex_modal_title">Update Bibtex</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p class="alert alert-secondary" role="alert"><button data-toggle="collapse" data-target="#bibtex_explanation" aria-expanded="false" aria-controls="bibtex_explanation" title="What is BibTeX and how would it be used?" class="invis_button">What is BibTeX and how would it be used?</button></p>
<div class="collapse" id="bibtex_explanation">
<div class="jumbotron">
<p><a href="http://www.bibtex.org/" target="_blank">BibTeX</a> is tool for managing references. Raw BibTeX is text that contains information about one or more specific references, and is used here to more easily cite references in the main text area.</p>
<p>The way this works is to first add or update the text to be used (or by uploading a file) by using the interface on this dialog window. From there, the system will remember the set of references and they will be available for use. When typing in the main text area (the area labeled as Main file contents), you can hit Alt + Shift + R or use the menu above to add a reference. This will bring up an interface to choose the reference wanted from the available list, and insert it. </p>
<p>After inserting a reference, the text will look something like this:</p>
<div class="card card-body">
<p>Some text some text some text [@reference]</p>
</div>
<p>This will come out in the final rendered documents depending on the format, but will look something like:</p>
<div class="card card-body">
<p>Some text some text some text (Referenced Author, 211-215)</p>
</div>
<p>Note that square brackets should be used here to properly create the citation.</p>
</div>
</div> <!-- end explanation //-->
<div>
<div class="form-group">
<label for="bibtex_csl_type">Choose the citation style</label>
<select class="form-control" id="bibtex_csl_type">
<option data-cit_yaml="apa6">APA (American Psychological Association) 6th edition</option>
<option data-cit_yaml="mla8">MLA (Modern Language Association) 8th edition</option>
<option data-cit_yaml="chicago17">Chicago Manual of Style 17th edition</option>
<option data-cit_yaml="harvard-cite-them-right">Harvard Cite Them Right 10th edition</option>
<option data-cit_yaml="acm">ACM (Association for Computing Machinery)</option>
<option data-cit_yaml="ieee">IEEE (Institute of Electrical and Electronics Engineers)</option>
</select>
</div>
<div class="form-group">
<label for="bibtex_upload_file">Upload a BibTeX file (.bib or .bibtex)</label>
<input type="file" class="form-control-file" id="bibtex_upload_file">
</div>
<div>
<ul id="bib_list" class="list-group margin_bottom">
<li id="bib_list_template" class="hidden list-group-item"><span class="bib_filename">myfile.txt</span> <span class="bib_file_length badge badge-primary"></span><button class="btn btn-sm btn-secondary bib_delete margin_lr float-right" role="button"><i class="oi oi-trash" aria-hidden="true" title="Delete this file"></i><span class="sr-only"> Delete this file</span></button></li>
</ul>
</div>
<div class="form-group">
<label for="bibtex_textarea">Add BibTeX manually</label>
<textarea class="form-control" id="bibtex_textarea"></textarea>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Done</button>
</div>
</div>
</div>
</div> <!-- end bibtex_modal //-->
<div class="modal fade" id="citation_modal" tabindex="-1" role="dialog" aria-labelledby="citation_modal_title" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="citation_modal_title">Insert Citation</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="input-group mb-3">
<div class="input-group-prepend">
<button class="btn btn-outline-secondary" type="button" id="citation_clear_filter" title="Clear Filter"><i class="oi oi-x" aria-hidden="true"></i><span class="sr-only"> Clear Filter</span></button>
</div>
<input type="text" class="form-control" aria-label="Filter reference list" placeholder="Filter" id="citation_filter">
</div>
<div>
<ul class="list-group" id="citation_list">
<li class="list-group-item">No references found, try adding some first.</li>
</ul>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div> <!-- end citation_modal //-->
<div class="modal fade" id="error_modal" tabindex="-1" role="dialog" aria-labelledby="error_modal_title" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="error_modal_title">Error</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div> <!-- end error_modal //-->
<div class="modal fade" id="cant_submit_modal" tabindex="-1" role="dialog" aria-labelledby="cant_submit_modal_title" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="cant_submit_modal_title">Can't Submit Yet</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>Before submitting, make sure you've selected at least one file type to create, have a file name, and have some text in the main input area.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div> <!-- end cant_submit_modal //-->
<div class="modal fade" id="advanced_modal" tabindex="-1" role="dialog" aria-labelledby="advanced_title" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="advanced_title">Advanced Options</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="form-group" id="advanced_options_wrapper">
<div>
<h3 id="custom_yaml_label">Custom Header YAML</h3>
<p>Add your custom YAML here. More information on YAML can be found on the <a href="https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html" target="_blank">Ansible YAML syntax page</a>. Also note that if you want to add output changes, check the custom file type box in the file type area. If you're not sure what to put here, leave it blank.</p>
<p><textarea id="custom_yaml" aria-labelledby="custom_yaml_label">
title: ""
author: ""
date: ""
</textarea>
</div>
<div class="mb-3">
<button class="btn btn-default" id="reset_page">Reset Page</button>
</div>
<div>
<h3>BibTeX Citations</h3>
<p>Add a set of BibTeX citations to be able to be used in the main text area.</p>
<p><button type="button" class="btn btn-default" id="bibtex_popup_trigger" data-toggle="modal" data-target="#bibtex_modal">Manage BibTeX</button></p>
</div>
<hr>
</div> <!-- end advanced options //-->
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div> <!-- end advanced_modal //-->
<input type="hidden" id="output_id" value="0" />
</body>
</html>