| Differences between revisions 44 and 80 (spanning 36 versions) | Back to page |
|
Size: 5532
Comment:
|
← Revision 80 as of 12:25PM, Jul 02, 2014 ⇥
Size: 7376
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 1: | Line 1: |
| <<TableOfContents>> = Slide show is cool = |
#pragma footnote-style plain # default; to use superscript use "sup" ## page was renamed from MoinMoin in Griffin == Slide show is cool == |
| Line 6: | Line 8: |
| = MathJax in Griffin = | In order to make a page slide show friendly, you will need to divide contents in small chunks using ''level 1'' headings as in {{{ = <title> = }}} Note also that anything before the first level 1 heaving will not show up in the slide show mode. == MathJax in Griffin == |
| Line 22: | Line 30: |
| Notice that, in the second and the third methods, no line breakage is allowed within the math environment. To avoid this ugliness and the lack of readability, the parser must be called more formally, as shown in the following example. (~-By the way, note that !MathJax is just a HTML post-processor, and !MoinMoin is told to simply pass the raw text marked as mathjax format (using any of these methods described here) to !MathJax, and so, an interesting side effect is that, ''any'' HTML markup can be included with the mathjax parser environment. The example below includes such a markup.-~) | Notice that, in the second and the third methods, no line breakage is allowed within the math environment. To avoid this ugliness and the lack of readability, the parser must be called more formally, as shown in the following example. (~-By the way, note that !MathJax is just a HTML post-processor, and !MoinMoin is told to simply pass the raw text marked as mathjax format (using any of these methods described here) to !MathJax, and so, an interesting side effect is that, ''any'' HTML markup can be included in the mathjax parser environment. The example below includes such a markup.-~) |
| Line 38: | Line 46: |
| = LaTeX parser in Griffin (deprecated) = | == LaTeX == |
| Line 40: | Line 48: |
| It is also possible to use a latex parser, instead of a !MathJax parser. However, this is not recommended. The latex parser is kept for some special page like [[Moin Moin in Griffin (Old)|this one]], where you can read more about the deprecated latex parser, if you insist. | Check out <<ln(http://en.wikibooks.org/wiki/LaTeX, this wonderful book on the web)>> if you are not familiar with LaTeX, or even if. |
| Line 42: | Line 51: |
| = Custom macros in Griffin = | == LaTeX parser in Griffin (deprecated) == It is also possible to use a latex parser, instead of a !MathJax parser. However, this is not recommended. The latex parser is kept for some special page like [[MoinMoin in Griffin (Old)|this one]], where you can read more about the deprecated latex parser, if you insist. == Custom macros in Griffin == |
| Line 46: | Line 59: |
| = Linking URLs = | == Linking URLs == |
| Line 64: | Line 77: |
| = Linking DOIs = | == Linking DOIs == |
| Line 83: | Line 96: |
| = Linking Attachments = | == Linking attachments == |
| Line 85: | Line 98: |
| la, lia (to do -- need to document) | Image files and other files are stored as attachments in Moin. They can then be included in the page by using macros such as {{{lia}}} or {{{la}}}. Note that these are custom macros at griffin. |
| Line 87: | Line 100: |
| = Citing References (Bibtex etc.) = | 1. First, upload your file by using the {{{AttachFile}}} action. This action can be activated by clicking on the {{{A}}} link above, or by the keystroke {{{a}}} anywhere in a page. 1. Once you have an attachment file, you can link to it by something like {{{<<lia(test.png, clickable = True, scale = 0.5)>>}}} or {{{<<la(test.pdf, "My cool pdf file")>>}}}. In the first case, we are using the {{{lia}}} macro (link image attachment), and in the second case, we are using the {{{la}}} macro (link attachment). * ~-Note the lack of space between {{{la}}}/{{{lia}}} and {{{(}}}. That ''is'' significant! That is, there should not be any space between the macro name and the parenthesis.-~ * ~-For {{{lia}}}, the argument {{{clickable}}} is true by default. So, in the above example, it is not necessary.-~ 1. To align an image at the center of the line is a bit tricky. You can accomplish this by {{{ <<c>> <<lia(test.png, scale = 0.8, align = "center")>> <<c(1)>> }}} Here, {{{c}}} is a simple macro for center-aligning, and its optional argument, specified in the last line here, indicates whether it is ending the center-aligning or not (as opposed to beginning it). == Citing references (Bibtex etc.) == |
| Line 91: | Line 118: |
| This is the best way in the long run, actually. — [[Gweon]], ~-''<<DateTime(2011-06-30T11:27:43-0700)>>''-~ | == Raw html markups == |
| Line 93: | Line 120: |
| = Raw html markups = | h<<fn(Hey, here is a simple name!)>> |
| Line 95: | Line 122: |
| h | == Signing the document == |
| Line 97: | Line 124: |
| = Signing the document = | If you like to leave a signature, after you edit a file, or, more frequently, after you make a comment to an existing page, you can write @``SIG@. This will expand to your user name and a time stamp. |
| Line 99: | Line 126: |
| If you like to leave a signature, after you edit a file, or, more frequently, after you make a comment to an existing page, you can write {{{ @``SIG@ }}} This will expand to your user name and a time stamp. = Odds and Ends = |
== Odds and ends == |
| Line 111: | Line 132: |
| Do you want to write '\$'? Well, then all you have to remember is the number 36! Or, you can also escape \$ (this behavior is provided by !MathJax, an HTML (post-)processor). | Do you want to write '\$'? Well, then all you have to remember is the number 36! Or, you can also escape \$ (this behavior is due to the use of !MathJax, an HTML post-processor, in Griffin). |
| Line 116: | Line 137: |
---- |
Slide show is cool
I find it cool, anyway. For this reason, the "SS" link is provided at top of every page. If you click it, a slide show version of the page will be displayed. Use arrow keys to navigate. Or space bar, which is equivalent to the down arrow. Use the escape key to get out of the slide show mode. Or, if you move your mouse to the top of the window, a menu will appear.
In order to make a page slide show friendly, you will need to divide contents in small chunks using level 1 headings as in
= <title> =
Note also that anything before the first level 1 heaving will not show up in the slide show mode.
MathJax in Griffin
As of June 7, 2011, MathJax has been installed in Griffin and it seems to work fine. MathJax is an HTML processor that recognizes LaTeX markups.
To use MathJax, inline expressions can be enclosed by a pair of \$'s (the expression \( ... \) is not allowed, as it seems to conflict with MoinMoin). Displayed math formulas can come in a pair of $$'s, or \[ ... \]. However, this method restricts only a single line input (the output can be multiple lines) due to the MoinMoin inserting HTML tags before MathJax can go interpret formulas. The solution for more complex expressions is to call the mathjax parser explicitly. Here are some examples.
Here is an in-line math: $y = 20$.
- Lorentz equation!
$$\begin{align} \dot{x} & = \sigma(y-x) \\ \dot{y} & = \rho x - y - xz \\ \dot{z} & = -\beta z + xy \end{align}$$
- Lorentz equation, again!
\[\begin{align} \dot{x} & = \sigma(y-x) \\ \dot{y} & = \rho x - y - xz \\ \dot{z} & = -\beta z + xy \end{align}\]
Notice that, in the second and the third methods, no line breakage is allowed within the math environment. To avoid this ugliness and the lack of readability, the parser must be called more formally, as shown in the following example. (By the way, note that MathJax is just a HTML post-processor, and MoinMoin is told to simply pass the raw text marked as mathjax format (using any of these methods described here) to MathJax, and so, an interesting side effect is that, any HTML markup can be included in the mathjax parser environment. The example below includes such a markup.)
Lorentz equation — "correctly" done!
Lorentz Equation
\[ \begin{align} \dot{x} & = \sigma(y-x) \\ \dot{y} & = \rho x - y - xz \\ \dot{z} & = -\beta z + xy \end{align} \]
LaTeX
Check out this wonderful book on the web if you are not familiar with LaTeX, or even if.
LaTeX parser in Griffin (deprecated)
It is also possible to use a latex parser, instead of a MathJax parser. However, this is not recommended. The latex parser is kept for some special page like this one, where you can read more about the deprecated latex parser, if you insist.
Custom macros in Griffin
New macros have been added to Griffin to make it quick to include URL links, DOI links, and attachments, etc.
Linking URLs
A URL can be linked like this.
<<ln(http://www.jstor.org/stable/1734697,"A must read by PWA.")>> This lovely article is both deep and popular <<lnfn(http://www.jstor.org/stable/1734697,"A must read by PWA.")>>. This lovely article is both deep and popular <<lnfn(http://www.jstor.org/stable/1734697,"Science 4 August 1972: Vol. 177 no. 4047, pp. 393-396. 'More is Different'.")>>.
This results in the following.
This lovely article is both deep and popular [1].
This lovely article is both deep and popular [2].
Linking DOIs
A DOI can be linked like this.
<<doi(10.1126/science.177.4047.393,"A must read by PWA.")>> This lovely article is both deep and popular <<doifn(10.1126/science.177.4047.393,"A must read by PWA.")>>. This lovely article is both deep and popular <<doifn(10.1126/science.177.4047.393,"Science 4 August 1972: Vol. 177 no. 4047, pp. 393-396. 'More is Different'.")>>.
This results in the following.
This lovely article is both deep and popular [3].
This lovely article is both deep and popular [4].
As an aside, this article is NOT accessible through OCA if I use the Science link (the DOI link), but it IS accessible through OCA if I use JSTOR.org link. This is a useful thing to know as far as papers published in Science are concerned.
Linking attachments
Image files and other files are stored as attachments in Moin. They can then be included in the page by using macros such as lia or la. Note that these are custom macros at griffin.
First, upload your file by using the AttachFile action. This action can be activated by clicking on the A link above, or by the keystroke a anywhere in a page.
Once you have an attachment file, you can link to it by something like <<lia(test.png, clickable = True, scale = 0.5)>> or <<la(test.pdf, "My cool pdf file")>>. In the first case, we are using the lia macro (link image attachment), and in the second case, we are using the la macro (link attachment).
Note the lack of space between la/lia and (. That is significant! That is, there should not be any space between the macro name and the parenthesis.
For lia, the argument clickable is true by default. So, in the above example, it is not necessary.
- To align an image at the center of the line is a bit tricky. You can accomplish this by
<<c>> <<lia(test.png, scale = 0.8, align = "center")>> <<c(1)>>Here, c is a simple macro for center-aligning, and its optional argument, specified in the last line here, indicates whether it is ending the center-aligning or not (as opposed to beginning it).
Citing references (Bibtex etc.)
cite (to do -- need to document)
Raw html markups
h [5]
Signing the document
If you like to leave a signature, after you edit a file, or, more frequently, after you make a comment to an existing page, you can write @SIG@. This will expand to your user name and a time stamp.
Odds and ends
Do you want to write '&' but the parser refuses to do so? Then, try
&
Do you want to write '\$'? Well, then all you have to remember is the number 36! Or, you can also escape \$ (this behavior is due to the use of MathJax, an HTML post-processor, in Griffin).
$
Research in the Gweon Group