[LinuxFocus-icon]
Home  |  Map  |  Index  |  Search

News | Archives | Links | About LF

convert to palmConvert to GutenPalm
or to PalmDoc

[Photo of the Author]
by Joe Templatewriter
<joe(at)joe.org>

About the author:

Here you write a little paragraph about you. What you do, who you are etc...



Translated to English by:
Joe Translator <joe2(at)dictionary.org>

Content:

 

The LinuxFocus Article Template Format

[Illustration]

Abstract:

In the "Abstract chapter" you write a little summary about your article:
This article is an example article which shows how to use the the LinuxFocus article template format. This format is used as a internal format for EVERY article. We call the format also meta format as it is only the internal format.
The format described in this document is valid from version lfparser-0.6 on.

 

What is the template format?

At LinuxFocus we use an internal html file format. This is a very simple html file which can then easily be converted into the final article format. We call this template format also meta file format.

 

What is a meta file format?

A meta file format is something that is only used during development and it is not intended to be the final format in which documents are published. The advantage of such a file format is that you can change the layout of the final articles without the need to re-write the articles. It is also easier to feed information about the articles into a database as the articles have a in the meta file format a very strict structure.

The LinuxFocus meta file article format is simple but powerful and flexible.

A number of different possibilities exist for the definition of such a meta file format. Here are some possibilities:

All these possibilities are valid alternatives but we wanted something for LinuxFocus that is self contained (all information in one file), easy to use and well known to everybody.

The LinuxFocus article meta file format is plain HTML but with a special structure. The format is such that it can be viewed with any browser (no special tags) and is very simple (no nested constructs).

 

When should I use this meta file format?

The LinuxFocus HTML meta file format is the official format since June 1999. Every article is internally handled in that format. It is the file format used during translation of the articles. All articles must be written in that format. It is only before publishing that they get converted. The program lfparser ( http://main.linuxfocus.org/~guido/dev/lfparser.html) is used to check and convert an article form the meta file format into the final format.

 

How does the file meta file format look like?

The LinuxFocus HTML meta file format is plain html but starts with a number of headings with clearly defined order and heading level.
  1. title of the article on heading level 1
  2. ArticleCategory on heading level 4 followed by one of the valid LinuxFocus article categories. The lfparser program will also tell you what the categories are if you get them wrong.
  3. AuthorImage on heading level 4 followed by a <IMG SRC...> tag with an image of the author.
  4. TranslationInfo on heading level 4 with the following syntax:
    <H4>TranslationInfo:[Author and translation history]</H4>
    <P>original in en <A HREF="mailto:joe@joe.org">Joe Templatewriter</A> </P>
    <P>en to es <A HREF="mailto:joe2@joe.org">Joe Translator</A> </P>
    <P>de to es <A HREF="mailto:jim@jim.com">Jim Jimmy</A> </P>

    Please note that the "original in" and the "to" must not be translated. The de, es, fr, cn, nl, ... are the different languages as known from domain names according to ISO-standard 3166.
  5. AboutTheAuthor on heading level 4 followed by a short biography about the author.
  6. Abstract on heading level 4 followed an abstract of the article. The abstract is just a normal html paragraph.
  7. ArticleIllustration on heading level 4 followed by a <IMG SRC...> tag with a title page image for the article.
  8. ArticleBody on heading level 4. After this tag the actual article comes as a normal html article. You should arrange your chapter headings on H2 or H3 heading level. This will make it possible to generate the index automatically. Please note that the heading tags <H2>, <H3> may not contain any other tags like <FONT...> etc...
  9. An additional feature of the lfparser is that you can write anywhere in the article body _LF_ and it will expand to LinuxFocus in the final article.

As you see it is a number of simple heading and the actual article body is just plain html. You can write there what ever you want. For you as an author of an article the meta file format is much easier to use than the final article structure as it does not have any complex tables and nested structures.

   

What article categories are available?

Under the keyword <H4>ArticleCategory:</H4> you say to which category your article belongs.
The ArticleCategory can have one of the following values:

Forum, Applications, Hardware, Webdesign, System Administration, Software Development, Graphics, UNIX Basics, Kernel Corner, Interviews, Community

 

Software and Tools

A perl program called lfparser exists to check and convert a LinuxFocus meta format article into the final format. You should run this program every time when you write, translate or updated an article. You can think of lfparser as a compiler that takes meta file html articles as input and produces the final article.

lfparser can be down loaded free from http://main.linuxfocus.org/developer/~guido/dev/lfparser.html

As the author of an article you can also get templates from the above link.

To run lfparser you need only a working installation of perl 5.004 or higher. Perl is included in every distribution of Linux®. Therefore you just unpack the tar archive in which lfparser is delivered (tar zxvf lfparser-X.Y.tar.gz) and you can use it right away.

 

Talkback form for this article

Every article has its own talkback page. On this page you can submit a comment or look at comments from other readers:
 talkback page 

Webpages maintained by the LinuxFocus Editor team
© Joe Templatewriter, FDL
LinuxFocus.org

Click here to report a fault or send a comment to LinuxFocus
Translation information:
de --> -- : Joe Templatewriter <joe(at)joe.org>
de --> en: Joe Translator <joe2(at)dictionary.org>
es --> fr: Guido Socher (homepage)

2002-03-03, generated by lfparser version 2.27