ELCode Help


ELCode is a special set of tags to format an ELOG entry. It is similar to HMTL, but simpler. Tags are enclosed in braces [ and ] rather than < and >. Some tags change the formatting of the text like boldface, size and color, while other tags allow the embedding of URLs and images. The ELCode tags are similar to the BBCode tags, sometimes also referred as vB code.

Text formatting


Following tags in ELCode allow the basic formatting of the text:

TagKeyboard shortcutMeaning
[b]Hello[/b] CTRL+B will become bold text like Hello
[u]Hello[/u] CTRL+U will become underlined text like Hello
[i]Hello[/i] CTRL+I will become italics text like Hello
[color=red]Hello[/color] or
[color=#FF0000]Hello[/color]
will both become Hello. One can either speciy a well know color name like white, red, green, lightgreen, or a hexadecimal RGB value, where the first two digits (00 - FF) are for the red component, the second for the green and the third for the blue part.
[size=5]Hello[/size] will become text like Hello. The size of the text in pixels ranges from 1 to 29. Here are some examples: size=1, size=2, size=3, size=4, size=5, size=6.
[font=comic]Hello[/font] will change the text font. Here are some examples: comic, courier, arial, tahoma, times, verdana
[center]Hello[/center]
will put the text in the center
[h1]Hello[/h1]
[h2]Hello[/h2]
[h3]Hello[/h3]
CTRL+H will become a heading of level 1, level 2 or level 3
[line] will become a horizontal line such as

Tags can be nested, such as

[size=5][color=red][b]Hello[/b][/color][/size]

which would produce Hello. Note that tags have to be nested correctly, things like

[b][color=red]This is wrong![/b][/color]

are incorrect, since the [b] tag is opened first and therefore must be closed last, after the closing [/color] tag, such as in

[b][color=red]This is correct[/color][/b]

Escape character


Sometimes one does not want ELCode tags to be interpreted, like in a discussion forums where one wants to explain some tags for example. In order to avoid interpretation of tags, one puts a backslash "\" in front of the tag, like \[b] instead of [b].

Anchor


An anchor can be put into an entry with [anchor]anchor_name[/anchor]. This is equivalent to a HTML anchor like <a name="anchor_name"></a>. Such anchors can be referenced inside an entry with elog:<id>#anchor_name where <id> is the ID number of the entry (the number from the left column in the list display).

Smileys


Smileys, or Emoticons, are small graphical images which can be used to express some feeling using a short code, e.g. :) means happy. They are converted by elog automatically into small graphical images, such as



:) :( ;)
:)) :D ?-)
;( :] :O
8-)8o X(
:P

Quoting


There are two ways of quoting, with a reference and without:

  • Enclosing some text with [quote]Original Text[/quote] produces a quote without reference such as:

    Quote:
    Original Text

  • Enclosing some text with [quote="Mr. Bean"]Original Text[/quote] produces a quote with reference such as:

    Mr. Bean wrote:
    Original Text

    Note that it is mandatory to enclose the reference "Mr. Bean" in quotation marks.

Fixed width text [CTRL+O]


To output text with fixed width using a Courier-type font, enclose it in

[code]Hello[/code]

This might be useful in computer code listings or tables to increase the readability, like

Item                Price     Availability
====                =====     ============

Apples               0.50     1000
Grapefruits          2.50     100
Sun-dried Tomatos   12.50     20

versus

Item Price Availability
==== ===== ============

Apples 0.50 1000
Grapefruits 2.50 100
Sun-dried Tomatos 12.50 20

Note that all other ELCode tags are disabled inside the [code] tags. This might be helpful to display some program code or similar which contains characters which would wrongly be interpreted as tags or smileys. If this behaviour is not wanted, like if some program code should be annotated with bold face etc. the tags [code1]...[/code1] can be used which allows other ELCode tags inside.

Lists [CTRL+L]


An unordered list can be created with the tags [list][/list] like

[list]
[*]Ocean
[*]Forest
[*]Desert
[/list]

to produce

  • Ocean
  • Forest
  • Desert

A new list item starts with [*], which can be entered via the keyboard shortcut CTRL-N. In an ordered list one can specify what is used before each item. To create a numbered list one can use [list=1][/list]:

[list=1]
[*]Ocean
[*]Forest
[*]Desert
[/list]

to produce

  1. Ocean
  2. Forest
  3. Desert

for an alphabetical list [list=a][/list] like

[list=a]
[*]Ocean
[*]Forest
[*]Desert
[/list]

to produce

  1. Ocean
  2. Forest
  3. Desert

Other possibilities are [list=A] for capital letters and [list=I] for Roman numbering.

Tables


Tables can be created with the tags [table][/table] like

[table border="1"]
One|Two
|-
Three|Four
[/table]

to produce

OneTwo
ThreeFour

The parameters after [table ...] are directly used in the HTML <table> tag. To increase the cell padding, on can add for example

[table border="1" cellpadding="20"]
One|Two
|-
Three|Four
[/table]

to produce

OneTwo
ThreeFour

Table headings are not supported, but can be simulated by embedding the cell contents with a [B]...[/B] tag.

Creating links


Hyperlinks or Uniform Resouce Locators (URLs) can be created in various ways:

  • Any syntactically correct URL gets automatically transformd into a link, even without any leading http:// in front of it. So midas.psi.ch/elog gets converted into midas.psi.ch/elog and http://www.cern.ch gets converted to http://www.cern.ch.

  • To specify an URL explicitly, enclose it in [url]www.cern.ch[/url]

  • If the link should contain some text different from the URL, specify it with [url=http://www.cern.ch]Text[/url] like in

    Go to [url=http://www.cern.ch]CERN[/url]

    which will produce:

    Go to CERN

  • The same works for email addresses. They can be used like in [email]john.doe@domain.org[/email] or simply as john.dow@domain.org which will be converted automatically into john.doe@domain.org.

Embedding images [CTRL+M]


There are two ways to embed images in the text:

  • Images can be embedded in the text with the [img]URL[/img] tags, where the URL must point to an image availabe on the internet. Note that this only works for images which are accessible through a web browser. Images on your local hard disk cannot be accessed from outside unless you don't run a public web server. You can for example embed the elog logo with:

    [img]http://midas.psi.ch/elogs/elog.png[/img]

    which produces

  • You can upload an image as an attachment in your elog entry and link to it with

    [img]elog:/1[/img]

    where elog:/1 stands for the first attachment, elog:/2 for the second etc. If you reference your attached images in this way, they are not shown again at the end of the entry.

Other keyboard shortcuts

  • CTRL+P: Preview
  • CTRL+ENTER: Submit
It should be noted that keyboard shortcuts do not work properly in all browsers. They have been successfully tested in Firefox.
ELOG Home Page