Mindat Logo

Help with Formatted Text

Last Updated: 30th Sep 2012

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>


New: If you want to link to a synonym page, you'll find it won't work, linking to chalybite goes to the siderite page as you can see. The solution is to use the = without a second name, for example:

<m=>chalybite</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.
height - optional height in pixels.


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>


<PBOX> - Group 2,3 or 4 <PIC> thumbnails in a row


Sometimes you might want to have 2 or more thumbnails neatly arranged in a row, and PBOX does this. The PIC elements inside must be set to float=left for this to work. You set the WIDTH parameter to the number of photos you wish
to group, 2, 3 or 4.

Example:


Pic 1

Pic 2


<PBOX width=2><PIC id=18510 float=left>Pic 1</PIC><PIC id=18514 float=left>Pic 2</PIC></PBOX>




<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)

Commodity19801981198219831984
Zinc40004500460045604800
Copper1200016000165001500018000
Lead2200022500260002650024000
Cadmium859011012098


<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>

or (to show the formula for mineral ID 1576 - which is fluorite)

<f id=1576></f>

or (if you prefer to use the name)

<f name="Fluorite"></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:

011

<mi>0_11</mi>


<VID> - Embed a YouTube video



You can embed a video from YouTube 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. Note the original VIDEO tag is now VID as VIDEO is a HTML5 tag in its own right.



<vid>http://www.youtube.com/watch?v=9k22meEcTBM</vid>



<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:

bannerbannerbannerbanner


<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>





Article has been viewed at least 19864 times.

Comments

So to display pyrrhotite, one would use one caret per character in the subscript:
The formula for pyrrhotite is Fe1-xS (x=0 - 0.2)

David M. Maietta
12th Oct 2007 11:15pm
That's right!

Jolyon & Katya Ralph
12th Oct 2007 11:23pm
Apparently so! Now, some instinct had me put the space after pyrrhotite inside the tags. Was that necessary? I'll leave it outside:

The formula for putoranite is Cu1.1Fe1.2S2.

David M. Maietta
12th Oct 2007 11:28pm
Excellent. Now I'm going to tread out onto the thin ice of Unicode characters. First, I'll fire up Character Map and type:

The formula for Černýite is Cu2CdSnS4.

Next, I'll experiment with HTML character entity references inside of my <m> tags.

The formula for Černýite is Cu2CdSnS4.

David M. Maietta
13th Oct 2007 12:12am
So, the conclusion is, to make use of characters not found on one's keyboard, it is best to paste them right in (Č) instead of using the HTML (&#x010c;). Both will display correctly, but links will not work with the HTML character entity references.

David M. Maietta
13th Oct 2007 12:22am
That's correct David. Mindat uses unicode format for all internal text (possibly excluding messageboard).

Jolyon & Katya Ralph
13th Oct 2007 12:33am
It is best to do the copy paste (or use a unicode text editor) instead of html character entities. The entities tend not to sort correctly. It is also one of the reasons that adding sublocalities from a locality page is the easiest and best way to do that.

A good utf-8 text editor for windows:
http://www.babelstone.co.uk/Software/BabelPad.html

David Von Bargen
15th Oct 2007 3:30pm
Copying and pasting characters from the Windows "Character Map" tool works well.

Jolyon & Katya Ralph
15th Oct 2007 4:00pm
Three new options added. Firstly (and importantly), the <article> tag for linking between articles. And two tags <googleads> and <ads> for adverts that you can add to your articles IF YOU WANT TO!. Please, please, note. That there is absolutely NO requirement to do this. Only if you want to and you feel it's appropriate for your article. It helps us raise money.

Jolyon & Katya Ralph
18th Dec 2007 12:05am
Coming soon, the graph tag! A few bugs, but you can start playing with it now: default type is line graph if you leave type="bar" out.



<graph title="A graph!" ytitle="tons" xtitle="year" ystart=0 type="bar">1980=400,1981=486,1982=474,1983=599,1984=675,1985=636,1987=980,1988=1040,1989=1300,
1990=1250,1991=1544,1992=1099,1993=1677,1994=2040</graph>

Jolyon & Katya Ralph
6th Jan 2008 1:32am
Hi Jolyon,
Are there tags for formating the text inside a table (and overriding the default)? (alignment, line breaks, background color etc...)
How could I display a ',' in a table ?

best regards,
Dominik

Dominik Schläfli
21st Mar 2008 6:02pm
Ooh, I have some exploring and playing to do!

Gail Spann
16th Jun 2008 5:29am
Awesome!!
Can't wait to start playing with it!!

Chris

Chris Mavris
10th Oct 2008 2:15pm
Hi Jolyon,

Can you insert a link to a photograph without inserting the photograph itself? Can you insert a link to a url?

Bob

Robert Meyer
21st Feb 2009 10:50pm
I want to post an artickle with photos from the Kongsberg Mineral Symposium 2009. Must the photos first be published on Mindat, or can I create a folder on MY PAGE before I insert them in the text? If so, how is this done?

OT. Ljøstad
27th May 2009 9:54pm
I want to refer to:
http://www.mindat.org/mesg-15-107213.html
but can find no way to make it clickable. In the postings one justs copies in the path and magically you get a blue clickable Mindat in the published post that takes you there

Rob Woodside
2nd Jun 2009 4:37pm
I would like to make the title a larger bold font - how do i do this? Also how do I make subheadings and subsubheadings, etc., picked up by the table of contents?

How do I specify indents for lists and outlines?

Matt Zukowski
27th Jul 2009 11:55pm
Rob, to do an external link, here is an example:

This is a link: google!

Note the double quotes are important.

Robert Simonoff
3rd Sep 2009 2:32am
Sorry Rob about the above - wasn't trying to be a wise guy, but I did not know the tags were going to be interpreted.

To do an external link, use
<a href="http://www.google.com>Google!</a>


To specify indents for lists, use an example like this:
<ul>
<li>Entry 1</li>
<ul>
<li>Entry 2</li>
</ul>
</ul>



Robert Simonoff
3rd Sep 2009 2:46am
To do headings (and sub and sub sub) try the following:

<h1>This is a top level heading</h1>

<h2>This is a sub heading</h2>

<h3>This is a sub sub heading</h3>


Robert Simonoff
3rd Sep 2009 2:48am

Can I add video to my Mindat homepage or the article on this locality.
I used the command form:
but do not see the video - which I do a mistake?

Regards Slavo

Slavomír Šimko
10th Jul 2010 11:16am
doesn't work...

Thanks!


Alessandro Cantamessa
4th Jan 2011 1:21pm
PIC - Adding Photos and Images
How can I add to a blog the image http://www.mindat.org/forum.php?file,55,file=27744,filename=1098.jpg?
pic 27744 doesn't work...

Thanks!



Alessandro Cantamessa
4th Jan 2011 1:40pm
I have an article in pdf format that I would like to post to my home page. Can this be done?

Ronald J. Pellar
24th Feb 2012 8:05pm

In order to leave comments to this article, you must be registered
Mineral and/or Locality  
Search Google  
Copyright © Jolyon Ralph and Ida Chau 1993-2014. Site Map. Locality, mineral & photograph data are the copyright of the individuals who submitted them. Site hosted & developed by Jolyon Ralph. Mindat.org is an online information resource dedicated to providing free mineralogical information to all. Mindat relies on the contributions of thousands of members and supporters. Mindat does not offer minerals for sale. If you would like to add information to improve the quality of our database, then click here to register.
Current server date and time: December 18, 2014 11:32:50
Mineral and Locality Search
Mineral:
and/or Locality:
Options
Fade toolbar when not in focusFix toolbar to bottom of page
Hide Social Media Links
Slideshow frame delay seconds