Mindat.org uses a special simplified version of HTML tags for creating your blogs, articles and content, which we call Mindat Markup Language (MML). It's used in a lot of places on mindat.org now, including locality descriptions, articles, blogs and member home pages.
You don't need to understand HTML to create articles and blogs on mindat, so, by typing a normal block of text without any special codes at all, it should appear fine on screen. (If you do understand HTML, the primary difference between mindat.org markup and HTML is that you do not need to encode line breaks.)
There are a few simple standard HTML codes you can use such as <b> for bold, and <u> for underline, and some special ones we have created that will help you add images, tables, chemical formulae, etc. to your pages. Check out Jolyon's blog for hints and tips for how to make the most of this powerful system.
Each of the special them require you to enter special tag codes, such as <pic> into your text. These are automatically replaced with the special content listed below.
These grey boxes below give you examples that you can copy/paste or type in to your articles to try out the commands
<M> - Link to Mineral Pages
This is a simple tag that allows you to add a link from a mineral name to the correct page on mindat.org - it's much simpler than trying to add in a link manually.
Example:
This text has a link to
galena, when you click it, you go straight to the page on mindat.org relating to galena (note that I did not add the tag to the second use of the mineral name. The code to add the link is very simple:
<m>galena</m>
In this example, we want to highlight the word
opalized and link it to the mineral opal, we do this by adding
=opal into the m tag as shown here:
<m=opal>opalized</m>
<L> - Link to Locality Pages
This is a simple tag that allows you to add a link to a locality page. You need the ID for the locality page.
Example:
This links to the page for Wheal Gorland
<l id=939>This links to the page for Wheal Gorland</l>
<PIC> - Adding Photos and Images
You can add any image that has been uploaded to mindat.org to your pages by getting the image ID number and adding a PIC tag. By default, it adds a small thumbnail image box that links to the full photo, but you can use parameters to insert a larger version of the image.
The <pic>tag takes the following parameters:
id - the ID of the mindat.org photo to be displayed
float - optional position (left or right). Default is centered.
width - optional width in pixels, or 100% for full width.
Examples:
Each example is followed by the code
in bold used to generate it. You can copy/paste this and change the ID number if you want to use the same type of image in your pages.
My Pic
<pic id=18513>My Pic</pic>
Note that in this example, the text continues after the image on a new line.
The picture floated left
<pic id=18509 float=left>The picture floated left</pic>
Note that the text wraps around the image, so you can use this to embed images into your text. You can use the <c> tag to start a new block of text below the image if you do not want it to wrap (see below).
The picture floated right
<pic id=17887 float=right>The picture floated right</pic>
Three images floated left
are shown together
in one row.
<pic id=17886 float=left>Three images floated left</pic><pic id=18507 float=left>are shown together</pic><pic id=18508 float=left>in one row.</pic>
Note that floated images 'stack together' onto the same line, so you can use this to create your own little gallery pages.
Larger Version using width setting
<pic id=18510 width=400>Larger Version using width setting</pic>
You can also combine the width and the float parameters if you wish.
At 100% width
<pic id=18514 width=100%>At 100% width</pic>
<ARTICLE> - Adds a link to an article
If you want to add a link to an article (maybe to chain articles together, or to reference an article in the description text on a locality page), you can use the Article tag. The id parameter is the ID number for the article. You'll see that as part of the URL when you view an article, so for example, with this article:
http://www.mindat.org/article.php/
113/The+Mines+of+Sterling+Hill%2C+Ogdensburg%2C+New+Jersey
the ID number would be 113 (emphasised above).
Example:
This is a link to Daniel Russell's article on Sterling Hill
<article id=113>This is a link to Daniel Russell's article on Sterling Hill</article>
<C> - Clears space after a floating image
If you use floating images (see below), you might need to start other content below this, so that it isn't affected by the floating image. Before your block of content you want BELOW the floating images, start with a <C> tag. This will probably only make sense to you once you start playing with floating images. When you do, and things go strange, you'll remember to come back, read this, and try this out!
<DATA> - Add a table of data
The DATA tag allows you to create a table of data using a simple list of comma-separated values.
You can also use
separator=";" inside the data open tag (so it would appear <data title="My title" separator=";">, in this example the ; character, but you can try others) if you want to set a different character to the comma for the separator value in tables. This is important if you need to actually display a comma within a value, which you might want to do when formatting numbers, for example.
Example:
Table 1. Ore Production by year (tonnes) |
| Commodity | 1980 | 1981 | 1982 | 1983 | 1984 |
|---|
| Zinc | 4000 | 4500 | 4600 | 4560 | 4800 |
|---|
| Copper | 12000 | 16000 | 16500 | 15000 | 18000 |
|---|
| Lead | 22000 | 22500 | 26000 | 26500 | 24000 |
|---|
| Cadmium | 85 | 90 | 110 | 120 | 98 |
|---|
|
<data title="Table 1. Ore Production by year (tonnes)">
Commodity,1980,1981,1982,1983,1984
Zinc,4000,4500,4600,4560,4800
Copper,12000,16000,16500,15000,18000
Lead,22000,22500,26000,26500,24000
Cadmium,85,90,110,120,98
</data>
<FOOTNOTE> - Adds a numbered footnote to your article
This tag lets you add a numbered footnote such as this one
[1]. You add the footnote where you want the numeric reference to show, and then you later use <listfootnotes> (see below) to show them as one list (usually at the bottom of the article
[2]).
Here is the code used to add the two footnotes listed in the above paragraph:
This tag lets you add a numbered footnote such as this one<footnote>This is our first footnote</footnote>. You add the footnote where you want the numeric reference to show, and then you later use <listfootnotes> to show them as one list (usually at the bottom of the article<footnote>This is another footnote.
<LISTFOOTNOTES> - Print a list of footnotes
This is a simple tag, it prints out a list of footnotes that have been entered using the <FOOTNOTE> tag (see above). Normally you would put a <h> heading before this and put it at the end of your article. Here is how it looks:
Footnotes
| 1. | This is our first footnote |
| 2. | This is another footnote |
<H>Footnotes</H><LISTFOOTNOTES>
<QUOTE> - Add a quotation box
This is simply a formatted box for text - the same one we use on this page to show the source code that you need to paste into your articles. You can use these boxes very efficiently for things such as quotations from other articles, for example:
My first specimen was this pebble containing some very rough
Quartz crystals, from Tintagel in Cornwall, which I found when I was 6 years old in the summer of 1976. It was a family holiday to Cornwall, we were staying in a bungalow in the village of Egloshayle, near Wadebridge. Looking at the specimen more recently, I noticed it had dozens of tiny but perfect
Anatase crystals throughout it! Here is a macro photo taken by my brother of one of these sub-millimetre crystals.
<quote>Putting your text in here will make it use one of these grey boxes</quote>
<H> - Adding Headings
You can use the <h> tag to add headings to your articles. The line above is an example of a heading created in this way. An example of using this would be:
<h>This is my heading</h>
<TOC> - Adding a Table of Contents
The Table of Contents at the top of this article (the white box) lists all the headings you have created within your article and adds handy short links to them, very useful in a long article such as this. Use the <toc> tag along with the heading you wish to use, for example:
<toc>The Table of Contents</toc>
<F> - Adding chemical formula
Mindat.org uses a special coding system to write chemical formulae so that they can be displayed correctly by the site, and this tag allows you to display a formula using this system.
Examples:
CaF2
<f>CaF^2</f>
Fe2+Fe3+2O4
<f>Fe#2+#Fe#3+#^2O^4</f>
<MI> - Miller Index formatting
If you want to add a reference to a miller index, you know you have to put an overbar character over certain numbers. This can be done by using <mi> and preceeding every character that requires an overbar with a _.
Example:
0
11
<mi>0_11</mi>
<VIDEO> - Embed a YouTube (or similar) video
You can embed a video from YouTube or Google Video using this tag. It has parameters of float=left or float=right as with <pic>. Inside the tag listed below, replace the code with the YouTube URL of the video that you wish to show in your page.
<video>http://www.youtube.com/watch?v=9k22meEcTBM</video>
<video>http://video.google.com/videoplay?docid=1286648075084716620</video>
<ADS> - Adds mindat.org banner ads to an article
I decided that it would not be compulsary to add mindat.org banner adverts to your
articles, but if you want to, you can choose to add them. Why would you do this? Well, it helps promote those dealers who support mindat.org. But you absolutely don't have to do this - it's primarily for my use. But if you want to put one or two banners on your article or blog then you're free to do so.
Example:
<ads>
<GOOGLEADS> - Adds Google text ads to an article
Again, this is entirely up to you, but if you want to put google text adverts within your article this helps mindat.org raise revenue. I might use it from time to time, but it's entirely up to you if you want to use it or not.
Example:
<googleads>
The formula for pyrrhotite is Fe1-xS (x=0 - 0.2)
David M Maietta
12th Oct 2007 11:15pm