|
| 1 | +===================== |
| 2 | + Quick notes on writing a tutorial |
| 3 | +===================== |
| 4 | + |
| 5 | +New tutorials should be prepared in Markdown rather than HTML if possible. |
| 6 | + |
| 7 | +* Create a new directory in MDtutorials (./MDtutorials/<newtutorial>) for the |
| 8 | + tutorial (or combine into an existing directory), |
| 9 | + |
| 10 | +* Create file for the tutoral as ./MDtutorials/<newtutorial>/<tutorialfile>.md |
| 11 | + <newtutorial> and <tutorialfile> will commonly be the same, but need not be so. |
| 12 | + |
| 13 | + The final tutorial will be placed in |
| 14 | + https://advancedphotonsource.github.io/GSAS-II-tutorials/<newtutorial>/<tutorialfile>.html |
| 15 | + |
| 16 | +* Images for the tutorial should be placed in subdirectory imgs, ./MDtutorials/<newtutorial>/imgs |
| 17 | + |
| 18 | +* data files needed for the tutorial should be placed in subdirectory ./MDtutorials/<newtutorial>/data |
| 19 | + |
| 20 | + |
| 21 | +The tutorial .md file should start with: |
| 22 | + |
| 23 | + --- |
| 24 | + title: "Tutorial: Changing the GSAS-II Font Size" |
| 25 | + --- |
| 26 | + <!--- Don't change the HTML version of this file; edit the .md version --> |
| 27 | + |
| 28 | +* Sections should be labeled with |
| 29 | + |
| 30 | + ## Intro |
| 31 | + |
| 32 | + and, subsections with |
| 33 | + |
| 34 | + ### Subsection title |
| 35 | + |
| 36 | + Sections and subsections will be numbered; subsubsections (etc.) will not be numbered. |
| 37 | + Place a blank line before and after the section label |
| 38 | + |
| 39 | + |
| 40 | +* For links, use: [displayed text](http://url) |
| 41 | + |
| 42 | +* For figures, which will be sized at 400px max and will be placed at the right margin, use: |
| 43 | + |
| 44 | +  |
| 45 | + |
| 46 | + Place a blank line before and after the figure |
| 47 | + |
| 48 | + |
| 49 | +* If needed, where a figure will be sized and placed manually, use HTML directly: |
| 50 | + |
| 51 | + <img src="./imgs/nuc_struct.png" alt="nuclear structure" style="width:500px;"> |
| 52 | + |
| 53 | + |
| 54 | +* Equations can be specified with MathJax: |
| 55 | + |
| 56 | + Er${}_2$Ge${}_2$O${}_7$ |
| 57 | + P$4_1 2_1 2$ |
| 58 | + |
| 59 | +* Tables can be created using pipe characters |
| 60 | + |
| 61 | + | `FontSize_incr` | Example | |
| 62 | + | :---: | ------------------------------------- | |
| 63 | + | 0 |  | |
| 64 | + | 3 |  | |
| 65 | + |
| 66 | + See markdown docs for other mechanisms to create tables |
| 67 | + |
| 68 | +* To provide a link to a location within the tutorial, define an anchor at the location to be referenced |
| 69 | + |
| 70 | + <a name=myanchor></a> |
| 71 | + |
| 72 | + then the link to to this will be |
| 73 | + |
| 74 | + here is some text [with a link](#myanchor) provided |
| 75 | + |
| 76 | + |
| 77 | +* End the document with a table with the date and author(s): |
| 78 | + |
| 79 | + ---- |
| 80 | + | | |
| 81 | + | ---: | |
| 82 | + | Brian Toby | |
| 83 | + | January 10, 2025 | |
| 84 | + |
| 85 | +* When the tutorial is complete, update GSASII/tutorialIndex.py to include the new tutorial |
0 commit comments