REMARK Documentation

Core tags reference!

Basic tags

<link!>

This custom tags is like an advanced < A href ="" > macro. internally, it pushes any link path through the file ! tag, so that it makes refering to other pages easier.

It also looks cleaner within the html code, cause you don't have the obscure < A >tag in the code.

examples:

<link! %path/to/page/index.html>
  <link! %otherpage.html label>
  <link! %path/to/page/index.html "label of link">
  <link! "#pagelink" "label of link">
  <link! %otherpage.html <img! %images/link-otherpage.jpeg>>

Note in the last example how many of the tags are intelligent. We use an img! tag as the link visuals. Most custom tags are compatible and can be nested, when their return data is obviously compatible.

<modified!>

Simply puts the date and time of last change brought to SOURCE file... modifying your custom tags or remarking the whole site wont change this date.

<date!>

Simply puts the date at the moment of parsing... remarking any page (even if it has not changed itself) WILL change this date.

<time!>

Simply puts the by time (hour:minutes) at the moment of parsing... remarking any page (even if it has not changed itself) WILL change this date.

<file!>

Powerfull tag which allows to generate page-relative paths using any pseudo-absolute path. whenever you use a file! tag, you should specify the destination path as an absolute path from the root of your site, without specifiying the initial "/".

The main advantage is that your source pages use absolute paths, but the destinations use relative ones, which are much more flexible.

example:

<file! %root/dir/file.html>
<file! %index.html>

The last example, would be a handy link to your site's root page, wherever you site is installed or even when using your site directly on disk:

I built the file! tag so that I could use my whole site directly from my Hard drive before copying to the webserver. Using the relative path scheme, I do not need to change once single thing within my site, and its web ready.

When building site menus, this tag becomes your most trusted friend. Cause you do not need to edit any link in a master menu, and can still keep the advantages of using relative paths within the resulting html files. For image menus, this easily allows you to keep you paths as %images/label.jpg for example, which will point to the root images dir, but when parsed, each file will have a number of ../ appended in front (ex: ../../%images/label.jpg), to ensure that you don't need to use real root paths which are very hard to use in real life, and force you to be using the web server while you are working on your site.

In the image useage case, this means all pages use the sames images in cache.

Note that using a URL or real absolute path WILL be kept as-is.

<tag!>

the <tag!> tag allows you to quickly surround text by a pair of <> characters.

<tag! toc!> is simply easier to read and edit than  &lt;toc!&gt; , for example

<img!>

This is obviously a tag which wraps around the html image tag. All it really does is use the path you specify and wrap it within a file! tags, but explicitely returns an <img> html tag. This is a shorthand which keeps your whole site using pseudo-absolute paths. This allows you to VERY easily always use the ROOT images/ directory, instead of trying to copy all the images locally to your subdirs.

ex:

<img! %images/mylogo.jpg>

<clr!>

the <clr!> tag colorizes the font which it encloses.

ex:

<p! <clr! red warning! > this is a red warning!>

gives:

warning! this is a red warning!

Special tags

The following tags work slightly different than other tags, either cause they are handled within the remark parser directly, or because they have implemented more or less of the api, providing for more flexible dialecting.

<toc!>

This tag, if you generate it within your site's custom tag, will be replaced after all other tags are parsed.

This means that if you wish to accumulate data for later usage, then you can do so. Once the whole page (or site) is parsed, you can generate the table of content which is always included after all else.

There will eventually be a more flexible way of allowing processing levels in tags, so that you can define tags which are always parsed before or after others.

Generally, you pair your <toc!> tag with other tags like <title!> or <subject!>

<css-p-tag!>

This is a very different and very practical tag, which is a shortcut to use css without hassle.

Basically, within the core.rtag file, you will see the following lines which are the start of the tag's definition:

;---------
;- CSS-P-PTAG (css classes)
;---------
css-p-tag: make has-rtag! [
  tag-ids: [ "subject!" "banner!" "page-banner!" "title!" "section!" "chapter!"]

Each string within the tags-ids block is a valid tag you can use. They are actually <p> tags which will automatically add the class ="XXXX" code by themselves, obviously the class being the string within the block, and that being the tag name in the html.

Note that you can simply edit the labels in the block to add or remove available tags.

Here is an example of how to use the above tags within your html:

<subject! This is the item's subject...>
<banner! Some banner text!>

you should then have corresponding entries in your css file:

P.subject {border-bottom: 1px, solid, black;}
P.banner {  background-color: gray;}

Note that within the block and the html file, there are "!" at the end of the tag names and in this rare instance, they ARE needed.

Within the css file, you musn't use the "!" character.

<code!>

This tag leaves its content as-is. This is a special tag which is non-persistent. Being non-persistent means that its content IS NOT reparsed, so even if you place custom tags or rebol code or anything, all of the content will stay as-is. Note that it is built over the pre tag, so any new-line and extra long-line are left as-is.

example:

rebol []

print "hello world"
print [<P> Example of tags being left alone </p>]



last updated: 21-Feb-2007/16:21:27-5:00