Difference between revisions of "Support:Documents:Examples:Instructions for Adding Your Own Example"

From COMKAT wiki
Jump to navigation Jump to search
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Write some introduction to your example here.
+
== User access to create pages ==
 +
You will have to [http://comkat.case.edu/comkat/comkat_wiki/index.php?title=COMKAT_wiki:About contact us] and get a sysop access to be allowed to create pages on this wiki.  (The main reason we do not automatically grant sysop access to everyone is we want to avoid being targets for inappropriate material.)
 +
 
 +
== Create an example page ==
 +
First, determine a page name for your example, such as "Instructions for Adding Your Own Example". The complete page name would be "Support:Documents:Examples:Instructions for Adding Your Own Example" in this case. Copy and paste the complete page name into the search box next to the "Go to" button. Click "Go to". You will be guided to a new page with no content in it. In the editing box of this page, write your example.
 +
 
 +
== Edit the example page ==
 +
==== Text ====
 +
Write some introduction to your example.
 +
==== Code ====
 +
You can put code in a different format by putting the text between <nowiki><pre></nowiki> and <nowiki></pre></nowiki> tags to make it look like this:
  
 
<pre>
 
<pre>
Line 8: Line 18:
  
  
 +
Edit the current page to see how this is done.
 +
 +
==== Figures ====
 
Remember to include figures and plots in your example to make it look pretty and convey information.
 
Remember to include figures and plots in your example to make it look pretty and convey information.
 
To insert a figure, create a figure file in png (preferred) or other graphic format.   
 
To insert a figure, create a figure file in png (preferred) or other graphic format.   
Line 17: Line 30:
 
ylabel('y-axis label')
 
ylabel('y-axis label')
 
xlabel('x-axis label')
 
xlabel('x-axis label')
 +
set(1,'PaperPosition',[0.25 2.5 3 2])
 
print -dpng ExampleFigure.png
 
print -dpng ExampleFigure.png
 +
</pre>
 +
 +
 +
Next, upload the image file ("upload file" at the bottom of any wiki page) giving it a unique name. 
 +
  
 +
Use double-square brackets to insert the figure into the page
 +
 +
 +
[[Image:ExampleFigure.png]]
 +
 +
 +
 +
== Edit the example index page to include your example in the list ==
 +
Add your new example to the list of examples on the [http://comkat.case.edu/comkat/comkat_wiki/index.php?title=Support:Documents:COMKAT_Examples example index page] by adding a line like this to the index page:
 +
<pre>
 +
[http://comkat.case.edu/comkat/comkat_wiki/index.php?title=Support:Documents:Examples:Instructions_for_Adding_Your_Own_Example The title of you example]
 
</pre>
 
</pre>
  
 +
Within the brackets, the first part is the URL address to your example page. Then you type your example title following that address. On the index page it will look like:
  
Next, upload the image giving it a unique name.  Use double-square
+
[http://comkat.case.edu/comkat/comkat_wiki/index.php?title=Support:Documents:Examples:Instructions_for_Adding_Your_Own_Example The title of you example]
[[Image:Example.png]]
 
  
  
  
[[Image:ExampleFigure.png]]
+
That is it.  It is so simple that even a caveman (or professor) can do it.

Latest revision as of 00:54, 9 March 2008

User access to create pages

You will have to contact us and get a sysop access to be allowed to create pages on this wiki. (The main reason we do not automatically grant sysop access to everyone is we want to avoid being targets for inappropriate material.)

Create an example page

First, determine a page name for your example, such as "Instructions for Adding Your Own Example". The complete page name would be "Support:Documents:Examples:Instructions for Adding Your Own Example" in this case. Copy and paste the complete page name into the search box next to the "Go to" button. Click "Go to". You will be guided to a new page with no content in it. In the editing box of this page, write your example.

Edit the example page

Text

Write some introduction to your example.

Code

You can put code in a different format by putting the text between <pre> and </pre> tags to make it look like this:

For text that you want to appear as part of a MATLAB function or program, encase it inside a "pre" block.
Line 2 of pre block
    Line 3 (indented) of pre block.


Edit the current page to see how this is done.

Figures

Remember to include figures and plots in your example to make it look pretty and convey information. To insert a figure, create a figure file in png (preferred) or other graphic format.

figure
plot(1:10)
title('Example Figure')
ylabel('y-axis label')
xlabel('x-axis label')
set(1,'PaperPosition',[0.25 2.5 3 2])
print -dpng ExampleFigure.png


Next, upload the image file ("upload file" at the bottom of any wiki page) giving it a unique name.


Use double-square brackets to insert the figure into the page


ExampleFigure.png


Edit the example index page to include your example in the list

Add your new example to the list of examples on the example index page by adding a line like this to the index page:

[http://comkat.case.edu/comkat/comkat_wiki/index.php?title=Support:Documents:Examples:Instructions_for_Adding_Your_Own_Example The title of you example]

Within the brackets, the first part is the URL address to your example page. Then you type your example title following that address. On the index page it will look like:

The title of you example


That is it. It is so simple that even a caveman (or professor) can do it.