Difference between revisions of "FAQ Editing"

From crtc.cs.odu.edu
Jump to: navigation, search
m (How to insert code snippets with syntax highlight)
(How to insert formulas ?)
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
== How to create a new page ==
+
== How to create a new page ? ==
 
On the browser address bar type :
 
On the browser address bar type :
 
<code> cepm.cs.odu.edu/<name of page> </code>
 
<code> cepm.cs.odu.edu/<name of page> </code>
Line 7: Line 7:
 
== How does formatting work ? ==  
 
== How does formatting work ? ==  
 
[https://www.mediawiki.org/wiki/Help:Formatting  https://www.mediawiki.org/wiki/Help:Formatting]
 
[https://www.mediawiki.org/wiki/Help:Formatting  https://www.mediawiki.org/wiki/Help:Formatting]
 +
 +
== How to insert images ? ==
 +
<code> <nowiki> [[File:filename.extension|options|caption]] </nowiki> </code>
 +
 +
see also:
 +
 +
[https://www.mediawiki.org/wiki/Help:Images https://www.mediawiki.org/wiki/Help:Images]
 +
 +
== How to insert formulas ? ==
 +
Write it in latex and convert it to image and upload it as usual.
 +
 +
One way is to use an online service like http://quicklatex.com/
 +
 +
Tip: in the image page add the latex code for future reference
 +
 +
== How to (easily) create tables ? ==
 +
[http://www.tablesgenerator.com/mediawiki_tables http://www.tablesgenerator.com/mediawiki_tables]
 +
 +
== How to convert mediawiki tables to Latex tables ==
 +
save the table in a text file and then use pandoc
 +
 +
<code> pandoc <input_file.txt> -f mediawiki -t latex --standalone -o <output_file.tex> </code>
  
 
== How to insert code snippets with syntax highlight ? ==
 
== How to insert code snippets with syntax highlight ? ==
Line 12: Line 34:
  
 
example:
 
example:
 +
<div style="border:1px solid #ccc>
 
<source>
 
<source>
 
<syntaxhighlight lang="python" line='line'>
 
<syntaxhighlight lang="python" line='line'>
Line 24: Line 47:
 
</syntaxhighlight>
 
</syntaxhighlight>
 
</source>
 
</source>
 +
</div>
 
<syntaxhighlight lang="python" line='line'>
 
<syntaxhighlight lang="python" line='line'>
 
def quickSort(arr):
 
def quickSort(arr):
Line 37: Line 61:
 
For more see  [https://www.mediawiki.org/wiki/Extension:SyntaxHighlight https://www.mediawiki.org/wiki/Extension:SyntaxHighlight]
 
For more see  [https://www.mediawiki.org/wiki/Extension:SyntaxHighlight https://www.mediawiki.org/wiki/Extension:SyntaxHighlight]
  
== How to insert citations ==
+
== How to insert citations ? ==
 
Wrap reference inside <code><nowiki> <ref> </ref> </nowiki></code>
 
Wrap reference inside <code><nowiki> <ref> </ref> </nowiki></code>
 +
 
example:
 
example:
 
+
<div style="border:1px solid #ccc>
 
<source>
 
<source>
The Sun is pretty big.<ref>E. Miller, ''The Sun'', (New York: Academic Press, 2005), 23-5.</ref> The Moon, however, is not so big.<ref>''R. Smith, "Size of the Moon", ''Scientific American'', 46 (April 1978): 44-6.</ref>
+
The Sun is pretty big.<ref>E. Miller, ''The Sun'', (New York: Academic Press, 2005), 23-5.</ref>  
 +
The Moon, however, is not so big.<ref>''R. Smith, "Size of the Moon", ''Scientific American'', 46 (April 1978): 44-6.</ref>
  
 
<references />
 
<references />
 
</source>
 
</source>
 
+
</div>
The Sun is pretty big.<ref>E. Miller, ''The Sun'', (New York: Academic Press, 2005), 23-5.</ref> The Moon, however, is not so big.<ref>''R. Smith, "Size of the Moon", ''Scientific American'', 46 (April 1978): 44-6.</ref>
+
The Sun is pretty big.<ref>E. Miller, ''The Sun'', (New York: Academic Press, 2005), 23-5.</ref>  
 +
The Moon, however, is not so big.<ref>''R. Smith, "Size of the Moon", ''Scientific American'', 46 (April 1978): 44-6.</ref>
  
 
=== References===
 
=== References===
 
<references />
 
<references />
 +
 
For more see [https://www.mediawiki.org/wiki/Extension:Cite#Usage https://www.mediawiki.org/wiki/Extension:Cite#Usage]
 
For more see [https://www.mediawiki.org/wiki/Extension:Cite#Usage https://www.mediawiki.org/wiki/Extension:Cite#Usage]

Latest revision as of 13:00, 7 September 2018

How to create a new page ?

On the browser address bar type : cepm.cs.odu.edu/<name of page> or cepm.cs.odu.edu/<namespace> : <name of page>

How does formatting work ?

https://www.mediawiki.org/wiki/Help:Formatting

How to insert images ?

[[File:filename.extension|options|caption]]

see also:

https://www.mediawiki.org/wiki/Help:Images

How to insert formulas ?

Write it in latex and convert it to image and upload it as usual.

One way is to use an online service like http://quicklatex.com/

Tip: in the image page add the latex code for future reference

How to (easily) create tables ?

http://www.tablesgenerator.com/mediawiki_tables

How to convert mediawiki tables to Latex tables

save the table in a text file and then use pandoc

pandoc <input_file.txt> -f mediawiki -t latex --standalone -o <output_file.tex>

How to insert code snippets with syntax highlight ?

Warp them in <syntaxhighlight> </syntaxhighlight> tags

example:

<syntaxhighlight lang="python" line='line'>
def quickSort(arr):
	less = []
	pivotList = []
	more = []
	if len(arr) <= 1:
		return arr
	else:
		pass
</syntaxhighlight>
def quickSort(arr):
	less = []
	pivotList = []
	more = []
	if len(arr) <= 1:
		return arr
	else:
		pass

For more see https://www.mediawiki.org/wiki/Extension:SyntaxHighlight

How to insert citations ?

Wrap reference inside <ref> </ref>

example:

The Sun is pretty big.<ref>E. Miller, ''The Sun'', (New York: Academic Press, 2005), 23-5.</ref> 
The Moon, however, is not so big.<ref>''R. Smith, "Size of the Moon", ''Scientific American'', 46 (April 1978): 44-6.</ref>

<references />

The Sun is pretty big.[1] The Moon, however, is not so big.[2]

References

  1. E. Miller, The Sun, (New York: Academic Press, 2005), 23-5.
  2. R. Smith, "Size of the Moon", Scientific American, 46 (April 1978): 44-6.

For more see https://www.mediawiki.org/wiki/Extension:Cite#Usage