General
1. Introduction
1.1. Purpose of this guide
This guide discusses the various aspects of writing documentation for Firebird. It is intended for people who want to help write documentation for the Firebird project, or who at least strongly consider doing so. After reading this guide, you’ll have all the necessary knowledge to start writing Firebird docs in our chosen format, AsciiDoc.
1.2. Assumed knowledge
Before reading this guide, check with yourself if you know:
-
What the firebird-documentation repository is.
-
What git is, and how to use a git client to download the current firebird-documentation repository.
-
How to build the current Firebird documentation from your downloaded firebird-documentation repository.
This knowledge is essential if you are going to contribute to our documentation project. If you feel unsure about one or more of these points, you should first read the Firebird Docbuilding Howto, and then come back here.
1.3. Topics discussed in this guide
We start off with some short chapters about:
-
The firebird-devel list.
-
Picking a subject.
-
Making an outline for your document-to-be.
-
A word or two on language and writing style.
-
Copyright and the Public Documentation License.
Next, we will show you how to add your finished doc to the Firebird project. Main topics in this section are:
-
Where to ask for commit rights if you don’t have them.
-
Dos and don’ts once you have received commit rights.
-
Committing your finished document to the firebird-documentation repository.
-
Publishing HTML and PDF versions on the Firebird website.
Then we introduce AsciiDoc:
-
AsciiDoc and Asciidoctor — an introduction
-
AsciiDoc authoring tools
-
Setting up an AsciiDoc doc
-
Frequently used AsciiDoc
Don’t worry if AsciiDoc doesn’t mean anything to you yet: the required knowledge can be learned in less than an hour, and chances are that you will benefit from this knowledge in other projects too, whenever you have to write technical documentation.
2. Where the docmakers meet
2.1. The subproject homepage
The homepage of the documentation subproject is here:
It contains news about our activities, links to the docs we’ve already published, plans for the future, etc.
2.2. The firebird-devel list
If you’re serious about writing docs for Firebird, the first thing you should do is subscribe to the mailing list where we discuss our plans and our work. This list is open to everybody, and is not only about writing documentation, but also Firebird development in general. Subscribing commits you to nothing. To subscribe, email to:
You’ll receive an email to confirm your subscription. If you don’t have a Google account, confirm by replying; if you do have a Google account, you can also use the button in the email.
Alternatively, you can subscribe on this webpage:
This method requires a Google account.
3. Picking a subject
These guidelines may help you in finding a subject to write about:
-
First make sure you know what’s already there – nobody’s waiting for three MS-SQL-to-Firebird conversion guides.
-
Then ask yourself what’s missing, and what may be useful for Firebird users in general, or perhaps just for a specific group.
-
Also ask yourself what you would like to write about. The most logical choice would be a topic you are familiar with, but you can also pick a subject you’d have to learn more about first (this is much more work of course, but a great learning experience if you’re willing to invest the time).
-
You don’t necessarily have to write an entire book, guide or article. Maybe there are already people working on a larger production, which you can contribute to. Maybe you can write one or more chapters for a book. Or maybe you can supply raw documentation material for a subject you know a lot about.
-
Talk about your ideas – or your search for ideas – on the firebird-devel list. The posting frequency can be very low at times, but rest assured that if you post there, your message will be read, and replied to.
4. Preparing to write: make an outline!
It’s always a good idea to make an outline before you start to write the actual text. Setting up an outline will help you to “get organized”; it reduces the chance of forgetting something vital, and it will make the actual writing job a lot easier.
You can follow these steps when making your outline:
-
Define exactly what you want your readers to learn from your work.
-
Divide the subject into logical units – chapters and/or sections and/or subsections.
-
Make sure the order of the units makes sense, especially for a howto, tutorial or user’s guide. That is: arrange the units in such a way that whatever the user has to do first, or understand first, also comes first in your documentation.
-
Present your outline on the firebird-devel list and ask for comments.
Once you are satisfied with your outline, look it over thoroughly and decide whether you have all the (raw) information you need to start writing. Ideally, you want to have all the information ready before you start to write, because sometimes a formerly unknown piece of information may lead you to choose a different document structure. You’d better have that information while you’re still in the outline phase, then.
5. Language and style
We now turn our attention to some other important docwriting aspects: language and style (in this section), and copyrights (in the next section).
5.1. Language
The Firebird community is a very diverse one, and made up of people with many different mother tongues. If you write your documentation in a language other than your own, you’ll probably make some mistakes. This is not catastrophical, but you should at least try to reduce the number of errors. Some strategies to help you with this are:
-
Use a dictionary! Simple, effective, and blissfully non-hightech.
-
When hesitating between two spellings of a word, or between several possible versions of an expression, google for the alternatives and look at their frequencies. Also follow some of the result links to see how native speakers use the word or expression in their texts.
-
Have a native speaker look over your text and correct it where necessary.
5.2. Style
Don’t expect a Style Guide here – I wouldn’t know how to write one anyway. Just some guidelines and tips:
-
Try to write in plain, everyday language wherever possible. Avoid difficult words if there’s a familiar, simple alternative.
-
Avoid long sentences (over 25 words) if you can; especially avoid two or more long sentences immediately after each other.
-
Be careful with constructs like double or triple negatives (“I can’t deny that I’m not displeased”) and passive voice (“Care should be taken…”). You don’t have to avoid them at all costs, but they can make a sentence harder to understand. To prevent that, use the positive (“I am pleased”) and the active voice (“Take care…”).
-
Use lists to enumerate a number of parallel items, for instance:
-
A collection of hints and tips.
-
A sequence of examples (like this one).
-
Steps to be followed in a procedure.
-
Alternative solutions to a problem.
But if there’s only a small number of short items, use a plain sentence instead: “My mother loves three men: John, Dick, and Dave.”
-
-
Don’t overuse exclamation marks. Never use multiple exclamation marks or question marks. This is annoying!!!!! Don’t you agree???
5.2.1. Docwriter’s block
Sometimes you know what you want to write, and you have all the words ready, but you can’t get the sentence started – you just don’t get it to flow. This is very frustrating and it can sometimes block the advance of your text for many minutes. And it’s all the more frustrating because you do know what you want to tell your readers, but you don’t seem to be able to produce a decent sentence. After many painful experiences of this kind, I’ve developed the following strategy (not that I think I’m the first):
-
Write down what you have to say in loose sentences and chunks of words. Never mind about style, never mind if it looks ugly. Just write down what you want to tell the reader; make sure it’s all there, and in the right order. If, while doing this, you notice that you feel unsure about something, include a remark at exactly that point. Make your remarks stand out from the surrounding text, e.g. <<like this>> or !LIKE THAT!
This may result in a text like:
git is a distributed version-control system (<<check!>>). Purpose: managing versions of source code. You can use it alone or with a group. You need a git client to use it. A git client is a program with which you can access a git repository (<<explain this term?>>). To find out if a git client is installed on your system, type “git” on the command line. If it’s not there, go to this URL to download it…. [etc., etc.]
-
If you have included any remarks, handle them first. Check if git really is a distributed version-control system (it is). Decide whether you should really explain the term “git repository” at this point (you should).
-
Now, go over the paragraph again and try to make the text flow more naturally wherever you can. Chances are that this will be a lot easier than you expected!
-
If it still looks a little clumsy, never mind – better clumsy and clear than smooth-flowing and fuzzy. Maybe you can revisit this passage later and see if you can nice it up some more.
This approach works well for me. So if you’re stuck in this way, try it out; hopefully it will help you too.
6. Copyright issues
Many people find legal issues boring, but this is an important section. Please read it thoroughly.
6.1. Your copyright and the PDL
If you contribute to the Firebird documentation subproject, your work will be included in the Open Source repository at GitHub. In January 2005, the Firebird doc team decided to release the documentation it develops under the Public Documentation License. Licensing your work under the PDL means that you retain the copyright, but you grant others certain rights:
- Free use
-
Everyone may use and distribute your work, for free or for money, as long as the license notice is kept intact.
- Right to modify
-
Everyone may modify and redistribute your work, as long as any modified versions are PDL-licensed too, the original license notice is kept intact, and the modifications are documented.
- Larger works
-
Everyone may incorporate your documentation (modified or not) in a larger work. The larger work as a whole need not be released under the PDL, but the license requirements must be fulfilled for the PDL-licensed parts.
What’s so nice about the PDL is that it provides the same rights and restrictions on the usage of our docs as the IPL and IDPL (Firebird’s code licences) do for the Firebird source code.
For the complete license text, see the links in the License Notice below;
the AsciiDoc source is in src/docs/asciidoc/licenses/pdl/public-documentation-license.adoc
See also Your copyright and the PDL in AsciiDoc.
6.1.1. How to apply the PDL to your work
In order to release your work under the PDL, add an appendix titled License Notice, with this text:
The contents of this Documentation are subject to the Public Documentation License Version 1.0 (the “License”); you may only use this Documentation if you comply with the terms of this License. Copies of the License are available at https://www.firebirdsql.org/pdfmanual/pdl.pdf (PDF) and https://www.firebirdsql.org/manual/pdl.html (HTML).
The Original Documentation is TITLE OF THE WORK.
The Initial Writer of the Original Documentation is INITIAL AUTHOR’S NAME.
Copyright © YEAR(S). All Rights Reserved. Initial Writer contact(s): EMAIL OR OTHER CONTACT ADDRESS(ES).
Everything that looks LIKE THIS must of course be replaced. If you are not the original author, you should leave his or her notice intact and append the following:
Contributor(s): NAME(S) + SHORT DESCRIPTION (COUPLE OF WORDS) OF CONTRIBUTION.
Portions created by CONTRIBUTOR’S NAME are Copyright © YEAR(S). All Rights Reserved. Contributor contact(s): EMAIL OR OTHER CONTACT ADDRESS(ES).
There may be several Contributor’s sections in the License Notice.
6.1.2. Including a Document History
If your contribution consists of more than a simple change or addition in one spot, also include an appendix called Document History before or after the License Notice.
If such an appendix already exists, always enter a description of your modification(s) in it.
Please note that even if there’s a Document History, you must still add a contributor’s section to the License Notice – but then you can fill in “see Document History” in place of the short description.
If you’re the original author, it’s also perfectly OK to include a Document History in the first version of a document, to serve as a starting point for future revisions. See the first revision element in the example below.
See also Including a Document History in AsciiDoc.
Below is a Document History example (output view, not source!). Notice the referral to GitHub: we are legally obliged to identify and date all changes. But since git already does that, we can simply alert the user to it and give a less extensive but nicer-to-read history in the document itself.
The exact file history is recorded in the firebird-documentation git repository; see https://github.com/FirebirdSQL/firebird-documentation
Revision History 1.0
2003
IBP
First publication of the free Quick Start Guide.
1.x
Jun 2004
IBP
Donated to Firebird Project by IBPhoenix.
2.0
2004
PV
Downgraded to Firebird 1.0
Added Classic vs. Superserver section.
Reorganised and corrected Disk Locations Table.
Added (new) screenshots.
Updated and completed information on Control Panel applets.
Added extra examples to “Expressions involving
NULL”.Various other corrections and additions.
6.1.3. A copyright notice at the start
License Notice and Document History both appear at the end of the document. If you want to make your copyright obvious right from the start, you may also include a short copyright notice in the document’s preamble.
Such a notice does not replace the License Notice and/or Document History – it’s an extra.
6.1.4. Attaching the entire Public Documentation License
Instead of providing the URL, you can also attach the entire PDL to your document.
This may especially be useful if your work is a book or long article and you expect (or hope) that people will print it and distribute hardcopies.
On a short document the PDL may be a little heavy, but it’s your call.
You can get the PDL’s AsciiDoc source from src/docs/asciidoc/licenses/pdl/public-documentation-license.adoc.
Please note that only the section with the license text itself (including the generic license notice) belongs to the PDL proper. The Introduction is not part of the license.
If you include the PDL in your document, you can fill in the blanks in section 5.2 of the license. But you may also leave them as they are (provided your name is in the License Notice) or just fill in “the Initial Writer” or “the Copyright holder”.
|
We recommend using the shorter notice and linking as described in How to apply the PDL to your work over including the full text. |
6.1.5. Translator’s notices
Translating a document is a form of modification. So, as a translator, you should:
-
List yourself as a Contributor in the License Notice, with a contribution description like e.g. "Translation into Russian". You may translate the License Notice into the target language if you wish, but you can also leave it in English or include it in both languages.
-
Add a revision element – in the target language – to the revision history in the Document History. For the revision number, you use the number of the revision that you’ve translated, followed by a hyphen and your language code, e.g. “
2.0-es” or “1.1-fr”: -
Add yourself to the author list in the preamble.
See also Translator’s notices in AsciiDoc.
6.1.6. Translating the PDL
You don’t have to translate the PDL itself. But if you do:
-
Add it as an independent document to your language’s docset, in a book called Licenses (but translate “Licenses” into your language).
-
In the translated Introduction to the PDL, explain that only the English version is legally binding, and include a link to the English version.
-
In any License Notice where you link to the translated PDL, also provide a link to the original PDL and make clear that this is the one that’s legally binding.
You can optionally also attach the translated PDL to the document itself, if you don’t mind the extra load and bloat.
6.2. Using material written by others
As we write our manuals, we can consult all kinds of other documentation – and so we should, because we want to achieve the best possible result. Any information we find in publicly available third-party manuals, user’s guides, tutorials etc. can be freely used in our own docs, but it is important not to confuse information with literal text. We cannot copy-and-paste text from other works into our own documentation, unless the author explicitly permits us to do so.
If you would like to use a piece of text written by somebody else, check the copyright notice of the work in question. If there isn’t one, the work is automatically copyrighted under the Berne convention and you must assume that it’s illegal to copy it – even partially. This is also true if the work is freely available! Not having to pay for a document does not imply that you can freely copy portions of text and republish them in a work of your own.
6.2.1. Borland InterBase manuals
The Borland InterBase 6 beta docs – although free – are not part of the InterBase package that was open-sourced in July 2000. We have asked Borland several times if we could use these docs “as if they fell under the InterBase Public License”, but they didn’t even bother to answer. So feel free to use this documentation set as a source of information, but don’t copy text from it.
6.2.2. PostgreSQL docs
PostgreSQL is another major open source database, with (not surprisingly) many similarities to Firebird, but also many differences. Depending on the kind of documentation you are going to write, it may be beneficial to base it on existing PostgreSQL docs. Be aware though that if you use PostgreSQL material, you MUST include their copyright notice in your document!
The PostgreSQL documentation homepage is here:
The most recent PostgreSQL license is currently at:
One nice thing about the PostgreSQL docs is that they are authored in DocBook, just like ours. However, they use DocBook SGML instead of XML, so some tweaking may be necessary. The DocBook SGML sources can be found here:
Or clone the entire Git tree, docs and all. For instructions, go to:
7. Adding your document to the firebird-documentation repository
When your doc is finished, and you have verified that it builds correctly, you want it added to the manual module. If this is your first contribution to the documentation project you’ll probably have agreed with the coordinators that you first submit it to them for review, or that you temporarily put up the HTML version on a website so that it can be discussed on the list. After that – and maybe after some corrections are made – the document can be committed to the module. If you have commit rights you can do this yourself; if not, one of the coordinators will do it for you.
There are two ways to contribute: use your own fork of the repository and create pull requests to ask to add those changes to the main repository, or ask for commit rights on the main repository.
7.1. Asking for commit rights
To receive commit rights you first need a GitHub user account. If you haven’t got one, register at https://github.com/. Then post a message to the firebird-devel mailing list stating your GitHub username and asking to be added to the Firebird project. The firebird-documentation subproject leader and several Firebird project admins follow the list; they will consider your request. As a general rule you should ask for commit rights after your first contribution (e.g. through a pull request), because the people who decide on your request need something to go by.
The following phrases currently all mean the same, by the way:
-
Being a project member.
-
Having commit rights.
-
Having read-write access to the repository.
7.2. Dos and don’ts if you have received commit rights
Once you are accepted as a project member, you will generally only have write access to the firebird-documentation repository.
Keep to the following rules:
-
If you have received broader access, don’t ever commit to other repositories unless the people in charge of those repositories explicitly ask you to do so.
-
Only commit work to the firebird-documentation repository if it concerns a task assigned to you. Even then, it’s good practice to announce your changes and additions on the mailing list first, so the other doccers have a chance to comment on it. After all, this is a collective effort.
-
If you think a new document or directory should be added, don’t just create and commit it, but propose it on the list.
-
When in doubt, ask on the list, or propose the change through a pull request.
In practice, things may be a bit more relaxed than stated here, especially where it concerns your own tasks. We don’t want you to feel unfree and you certainly shouldn’t get the feeling that you have to ask permission for every minor change you make. But we do want you to act responsibly, and we want to know from each other what we are doing. Besides, keeping in touch with each other is often inspirational. Together we can make this thing work!
7.3. Committing your work
Even if you are a project member, you can only commit changes from a local copy. Refer to the Docbuilding Howto if you don’t remember how to perform a git checkout.
|
This section is not intended as a full introduction to git and GitHub. If you are not familiar with git, we highly recommend reading documentation like Getting started with GitHub and other tutorials on git on the Internet. This section also don’t cover things like using branches, however it is highly recommend to use short-lived branches for changes, especially if you are going to contribute through pull requests. |
If some time has passed since your last checkout or update, perform an update before committing. This will get your local copy in sync with the repository and reduce the possibility of conflicts.
It is highly recommend to update before you start working on a new document.
You can do this using pull:
git pull
Once you are ready to commit, go to the firebird-documentation directory. If you use command-line git, type:
git commit -m "Short informational message here"
After the -m, and within quotes, you type a short message about this commit, e.g. "Added new functions to API Reference" or "Errors in isql tutorial fixed".
To make sure your local copy of the repository is up-to-date, and the history doesn’t become too tangled, we recommend updating and rebasing your local branch:
git fetch
git rebase origin/master
If there are conflicts, you will need to manually fix the conflicts before you can continue.
To send your changes to the remote repository, you will need to push them:
git push
Give your GitHub password when prompted, and all the changes you have committed will be sent to GitHub.
Your git client knows which server to contact;
this and other information is stored in the .git subdirectories that were created upon checkout.
If you use another git client, refer to its documentation.
|
After adding a new document, you must still perform a separate commit. This goes for command-line git and most (if not all) other git clients. |
8. Publishing your document on the Firebird website
|
In practice, not everyone has — nor needs — the access to publish to the site. When in doubt, ask the project coordinator (Mark Rotteveel) to publish on your behalf. |
In order to publish your document, you first have to build the HTML and PDF output. This is documented in the Firebird Docbuilding Howto. In the remainder of this section it is assumed that you have successfully built the HTML and PDF files.
8.1. Naming the PDF file
For the AsciiDoc toolchain — assuming the naming conventions established in Setting up your AsciiDoc doc are followed — the PDF file already has the right filename.
8.2. Uploading the documentation
If you have write access to the Firebird web server, make an SFTP connection to cms.firebirdsql.org port 3322.
Upload the files to /var/www/cms.firebirdsql.org/docroot/file/documentation.
If you don’t have access to the server, ask someone else to upload the document(s) for you, or — if you are a project member — ask for a username and password on the server.
The files produced by the AsciiDoc toolchain in build/docs/asciidoc/ should be uploaded directly into this documentation folder.
Do not apply a custom layout.
The documentation files are the target of redirects (from old documentation), so changing file names or locations will break those redirects.
That is, assuming a build folder looking like:
build
+-docs
+-asciidoc
+-html
| +-en
| +-firebirddocs
| | +-docwritehowto
| | +-firebird-docwriting-guide.html
| +-images
| +-firebirdlogo.png
| +-titleblackgill.gif
+-pdf
+-en
+-firebirddocs
+-docwritehowto
+-firebird-docwriting-guide.pdf
The uploaded directory structure should be:
documentation
+-html
| +-en
| +-firebirddocs
| | +-docwritehowto
| | +-firebird-docwriting-guide.html
| +-images
| +-firebirdlogo.png
| +-titleblackgill.gif
+-pdf
+-en
+-firebirddocs
+-docwritehowto
+-firebird-docwriting-guide.pdf
8.3. Updating the Firebird Documentation Index
We maintain the documentation index in the CMS of the Firebird website. To edit it, you need an account on https://cms.firebirdsql.org/cms.
AsciiDoc and Asciidoctor
Since May/June 2020, the Firebird documentation project has switched to AsciiDoc for its documentation. This section gives a short overview how AsciiDoc is used by the project.
9. AsciiDoc and Asciidoctor — an introduction
9.1. What is AsciiDoc
AsciiDoc is two things:
A mature, plain-text writing format for authoring notes, articles, documentation, books, ebooks, web pages, slide decks, blog posts, man pages and more.
A text processor and toolchain for translating AsciiDoc documents into various formats (called backends), including HTML, DocBook, PDF and ePub.
For more information, read What is AsciiDoc? Why do we need it?
9.2. What is Asciidoctor
Asciidoctor is a fast text processor and publishing toolchain for converting AsciiDoc content to HTML5, DocBook 5, EPUB3, PDF and other formats. Asciidoctor is the leading implementation of the AsciiDoc syntax, first introduced and implemented in the Python-based AsciiDoc project.
For more information, read What is Asciidoctor?
9.3. Where to get more information?
We will not provide a basic introduction of AsciiDoc and Asciidoctor here. We recommend consulting the well-written documentation of the Asciidoctor project.
The most important documentation in our opinion is:
- AsciiDoc Syntax Quick Reference
-
An overview of the AsciiDoc syntax you’ll likely need to structure and format a document.
- AsciiDoc Writer’s Guide
-
A comprehensive tutorial with examples that show you how to use the AsciiDoc syntax.
- Asciidoctor User Manual
-
The A to Z guide to Asciidoctor.
For all the documentation of the Asciidoctor project, go to https://asciidoctor.org/docs/.
9.4. Firebird documentation AsciiDoc code style
For consistency in our sources, we follow a set of practices for the code style of the documentation. In general, we follow the (draft) AsciiDoc Recommended Practices
9.4.1. Linebreaks
We specifically want to highlight the line breaking convention: a single sentence per line, no line breaks within a sentence. If a line becomes too long, take that as a hint to rewrite (if possible).
Converted documentation may not always adhere to this style due to limitations of the converter. These style inconsistencies should only be addressed when touching a paragraph for other reasons.
9.4.2. Section IDs
Although Asciidoctor generates section IDs from a section title, we recommend specifying a custom ID for each section.
An ID should start with the docId of the document. We recommend making the id a summary abbreviation of the section title. To avoid ambiguity, it is advisable to also include information on the parent section when this makes sense.
For the Firebird Language Reference — starting with version 6.0 — an alternative convention is used for IDs, instead of the docId, it uses the “family-id” langref as the prefix of ids, except for the top-level id, which will be the docId (e.g. `fblangref60).
See also 2025-01: Naming Convention Changes for Language Reference.
An ID does not need to be language-specific, that is it does not need to include the language-code. For historic reasons, existing documents in languages other than English may include the language-code in their IDs. These IDs should not be changed to preserve backwards compatibility (for example with links).
You can define a custom ID using:
[#a-custom-section-id]
== A section with custom id
This syntax offers more flexibility when you need to provide more options and attributes than just the ID compared to the alternative syntax:
[[a-custom-section-id]]
== A section with custom id
We recommend using the first syntax, but initially we (and our converter) used this second syntax.
9.4.3. Float vs discrete headings
AsciiDoctor allows you to define headings that are not part of the document outline (e.g. the TOC).
See also Discrete Headings (aka Floating Titles).
AsciiDoctor offers two roles to do this: float and discrete:
[float]
== Section heading with float
[discrete]
== Section heading with discrete
In the HTML output we generate the TOC dynamically using tocbot.
Unfortunately, tocbot allows us to only exclude a single class from the selection of headings.
To avoid the introduction of a separate custom role, we chose float as the role to use for these types of elements.
Do not use the discrete role to prevent it from showing up in the HTML TOC generated by tocbot.
|
We decided on |
9.4.4. Custom roles
During conversion from DocBook to AsciiDoc, the conversion tool has applied semantic roles to styled inline elements, for example:
but only with [term]_processing instructions_
This applies emphasis on the text “processing instructions”, where the emphasis has the role “term”. Semantic roles can be used to apply custom styles (for inline elements in HTML and PDF, and for block elements only in HTML).
|
AsciiDoc also defines a number of standard roles for inline elements, for example colors like For block elements, the syntax |
We currently do not use custom styling on custom roles, so in general, we recommend not to apply custom roles unless you have a clear need for additional styling. The additional mental overhead of deciding which roles to apply, or what they mean, is not worth the additional effort. However, leave existing roles in place unless you rewrite a specific paragraph and are sure the custom role is really unused.
9.4.5. Links
For links to external sites (especially those outside of the firebirdsql.org domain), make sure the link opens to a new page in the HTML rendering.
This can be achieved by adding ^ at the end of the link title:
see https://asciidoctor.org/docs/user-manual/[Asciidoctor User Manual^]
For more information see URLs in the Asciidoctor User Manual.
10. AsciiDoc authoring tools
AsciiDoc is a plain text format, so you can use any (plain text) editor you want. Just make sure it saves files as UTF-8.
However, there are tools that provide additional AsciiDoc syntax support like highlighting, completion, etc., and provide preview.
Examples of such tools are:
-
Visual Studio Code with the AsciiDoc extension by João Pinto.
-
IntelliJ IDEA with the AsciiDoc plugin
As IntelliJ is a complete (Java) IDE, this might be overkill for you.
This list is far from complete. If you’re using an editor and recommend it, please drop us a note on the firebird-devel mailing list.
11. Setting up your AsciiDoc doc
This section discusses the file layout for AsciiDoc sources, and how to create your documentation sources.
11.1. Project layout
The AsciiDoc sources of the firebird-documentation repository follows a specific structure:
src/asciidoc/-
This is the 'root' of the AsciiDoc sources.
src/asciidoc/<language>/-
Groups documents per language. The
<language>is the two letter language code (e.g.enfor English,frfor French, etc). src/asciidoc/<language>/<baseName>/-
Inside the language directory, documents are grouped by
<baseName>. Possible values for<baseName>are — currently — firebirddocs, papers, refdocs and rlsnotes. The baseName can be passed as an argument to the--baseNameparameter of the AsciiDoc tasks. The AsciiDoc tasks default to thefirebirddocsbase.The baseName should be the same in all languages.
src/asciidoc/<language>/<baseName>/<docId>/-
Inside the base, use a directory per book or article. The name of the directory is the docId which can be passed as an argument to the
--docIdparameter of the AsciiDoc tasks.The docId can be the same in all languages.
For flexibility, you can have a deeper folder structure, for example
src/asciidoc/<language>/<baseName>/folder1/folder2/<docId>.The intermediate folders can be docIds themselves if they contain AsciiDoc source files.
src/asciidoc/<language>/<baseName>/<docId>/<documentName>.adoc-
The documentName should preferably be a nice (human-friendly) and clear name as it is also used for the output files. As an example, although this book has the docId docwritehowto, its documentName is firebird-docwriting-guide. See Other file naming conventions for more information.
A book or article can consist of a single AsciiDoc file, or multiple AsciiDoc files. When a book or article consists of multiple files, there should be a single root file (
<documentName>.adoc). The root file includes one or more asciidoctor fragment files, or possibly other root files.Linking to another root file can be useful if you want to create an aggregate document, but also want to publish the included document individually.
src/asciidoc/<language>/<baseName>/<docId>/<fragmentName>.adoc-
The fragment files should start with an underscore (
_). We recommend that the rest of the fragmentName is equal to the ID of the top-level section of that document.The use of
_as a prefix is a convention established by the asciidoctor tools, and will prevent files to be processed both individually and as part of a larger document.For reasons of organization — for large or complex documents — further nested directories inside the
<docId>directory is possible. Fragments can also include other fragments.
For example, the English Firebird 2.5 Language Reference is located in src/asciidoc/en/refdocs/fblangref25.
This means its baseName is refdocs and its docId is fblangref25.
It has the following files (not all files listed):
firebird-25-language-reference.adoc-
root file
_fblangref25-intro.adoc-
fragment with the introduction chapter
_fblangref25-appx01-supplement.adoc-
fragment with an appendix with supplementary information
- …
-
etcetera
Be aware that since the Firebird 6.0 Language Reference (fblangref60), the naming convention for the Language Reference IDs and its fragment files has changed from the normal convention (as illustrated above using fblangref25).
It now uses:
firebird-60-language-reference.adoc-
root file
_langref-intro.adoc-
fragment with the introduction chapter
_langref-appx01-supplement.adoc-
fragment with an appendix with supplementary information
- …
-
etcetera
11.1.1. Images
Store images per language in src/asciidoc/<language>/images.
Put images shared by multiple documents in the root of this directory, images shared only in a specific base in src/asciidoc/<language>/images/<baseName>, and images for a specific document in src/asciidoc/<language>/images/<baseName>/<docId>.
In other words, the structure inside the images folder follows the structure inside the <language> folder for the documentation sources.
A document has to explicitly define the imagesdir location.
Given the documentation structure, its value should normally be ../../images (so :imagesdir: ../../images).
For deeper nested directory structures, explicitly defining this in each document allows for deviation from the defined structure if necessary.
Images linked from documents are — by default — relative to this directory.
|
This convention stores images per language. The build tasks do not provide access to the English images in other languages. Although this leads to duplicate files in the repository, this is not a real problem given how git works. When updating images, or when writing documentation in a different language, you need to check if you need to update images in other languages, or copy images from English to other languages. |
11.2. Start of a document
11.2.1. Document header
The header of a (root) document has a document title, optional subtitle, optionally followed by additional metadata like authors, document revision and release date.
For an in-depth look at the document header, see Header in the Asciidoctor User Manual.
The document title can have an ID, just like normal sections. If the file is a root document, the ID should be equal to the docId (as identified by the parent directory name). Although not strictly necessary, adding this ID is helpful when a document might be included in another, aggregate, document.
[#document-id]
= Document title: document subtitle
Author One; Author Two
1.0, 21 May 2020
|
The Asciidoctor HTML renderer does nothing special with the subtitle. The Asciidoctor PDF renderer styles the subtitle different from the main title. |
This title information is followed by a list of attributes:
The header of a (root) document should normally include the following attributes:
:doctype: book (1) :sectnums: (2) :sectanchors: (3) :toc: left (4) :toclevels: 3 (5) :outlinelevels: 6:0 (6) :icons: font (7) :experimental: (8) :imagesdir: ../../images (9)
| 1 | Defines the document type (normally book or article) |
| 2 | Enables section numbering |
| 3 | Adds section anchors in HTML output to easily get a link to a section |
| 4 | Add a TOC (Table Of Contents), in HTML output the TOC will be added left, the PDF builds override this setting with value macro |
| 5 | Generate TOC three levels deep (NOTE: TOC in HTML has been customized and ignores this setting) |
| 6 | Generate outline (PDF bookmarks) with maximum depth of 6, initially collapsed |
| 7 | Use admonition icons |
| 8 | Enable experimental features |
| 9 | Relative path to the directory with images |
For correct rendering of the TOC in PDF, add a toc::[] macro at the position in the document where the TOC should be rendered.
|
For easy copying without the callouts:
:doctype: book :sectnums: :sectanchors: :toc: left :toclevels: 3 :outlinelevels: 6:0 :icons: font :experimental: :imagesdir: ../../images
11.2.2. Document preamble
The text immediately following the header, but before the first section is the preamble. The preamble can be used for additional copyright information, etc.
We recommend putting the toc::[] macro at the end of the preamble, so the preamble is rendered before the TOC in PDF documents.
For an in-depth look at the preamble, see Preamble in the Asciidoctor User Manual.
11.2.3. Document parts and sections
Following the preamble, you define the various parts (only available in doctype book) and sections.
|
Make sure not to nest sections too deep.
The maximum supported depth of sections is 5 (for a total of 6, level 0 for document header and parts, and level 1 - 5 for sections).
Deeper levels are — marginally — supported in the HTML output, as long as appropriate styles have been defined.
However, in the PDF output, going beyond section 5 will result in the sections not being rendered, but simply shown as a number of When level 5 is reached, try to restructure your document to reduce nesting, or switch to using block or paragraph titles or discrete headings at the same level as the parent section. |
For an in-depth look at sections, see Sections in the Asciidoctor User Manual.
12. Frequently used AsciiDoc
For an in-depth coverage of AsciiDoc, consult the AsciiDoc Syntax Quick Reference and the AsciiDoctor User Manual. This section covers either project-specific usage or patterns, and things we think are important to reinforce.
If you think something is missing or unclear, let us know on the firebird-devel list.
12.1. Your copyright and the PDL in AsciiDoc
See also Your copyright and the PDL.
12.1.1. Including a Document History in AsciiDoc
See also Including a Document History
AsciiDoc itself doesn’t have special features for a document history. We use a simple table for this purpose:
[%autowidth, width="100%", cols="4", options="header", frame="none", grid="none", role="revhistory"]
|===
4+|Revision History
|1,0
|12 Sep 2005
|PV
a|First version
|1.1
|5 Dec 2005
|PV
a|Added information on COALESCE
Corrected some spelling errors
|===
The use of a| allows the full use of AsciiDoc syntax within the table cell.
Apply this for all description cells, even if they are single line, to avoid rendering differences between rows.
Please abbreviate the month name in the date element, as the date column in the PDF output is rather narrow.
If you open the AsciiDoc source of an existing DocBook document (one of the .adoc files in src/docs/asciidoc) in your favourite editor, you can easily copy-and-paste the Document History and License Notice into your own document.
Don’t copy the examples given above;
copy the real appendices at the end of the document, and edit them to fit your work.
12.1.2. A copyright notice at the start in AsciiDoc
See also A copyright notice at the start
License Notice and Document History both appear at the end of the document. If you want to make your copyright obvious right from the start, you may also include a short copyright notice in the document’s preamble, like this:
Copyright (C) 2003-2004 Firebird Project and all contributing authors, under the https://www.firebirdsql.org/manual/pdl.html[Public Documentation License Version 1.0].
Please refer to the <<docid-license,License Notice in the Appendix>>
Such a notice does not replace the License Notice and/or Document History – it’s an extra.
12.1.3. Translator’s notices in AsciiDoc
See also Translator’s notices,
Translating a document is a form of modification. So, as a translator, you should:
-
List yourself as a Contributor in the License Notice, with a contribution description like e.g. "Translation into Russian". You may translate the License Notice into the target language if you wish, but you can also leave it in English or include it in both languages.
-
Add a row – in the target language – to the table in the Document History. For the revision number, you use the number of the revision that you’ve translated, followed by a hyphen and your language code, e.g. “
2.0-es” or “1.1-fr”:[%autowidth, width="100%", cols="4", options="header", frame="none", grid="none", role="revhistory"] |=== 4+|Revision History ...previous revisions... |1.1 |5 Dec 2005 |PV a|Added information on COALESCE Corrected some spelling errors |1.1-fr |13 Déc 2005 |AM a|Traduction en français |=== -
Add yourself to author list at the beginning of the document, like this:
= Guía de NULL en Firebird Paul Vinkenoog; Víctor Zaragoza 2.0-es, 22 de julio de 2005If your first name or last name contains space, replace them with an underscore (
_), see also Author and Email.Notice the document version (
2.0-es): make sure it’s the same as in the Document History.
DocBook
In May/June 2020, the Firebird documentation project switched to using AsciiDoc and Asciidoctor. Some of our older — unmaintained — documentation is still in DocBook XML.
13. Do Not Modify DocBook — Migrate to AsciiDoc
In general, the DocBook sources should no longer be updated or built[1]. If you want to add or update content of something that is still DocBook XML, that is a signal it needs to be migrated to AsciiDoc instead. Contact us on firebird-devel or through the firebird-documentation issue tracker so we can migrate it for you (or help you migrate it).
Appendices
Appendix A: Document History
The exact file history is recorded in the firebird-documentation git repository; see https://github.com/FirebirdSQL/firebird-documentation
| Revision History | |||
|---|---|---|---|
0.1 |
17 Jan 2004 |
PV |
First incomplete draft published under the title Writing Documentation for Firebird (aka Firebird Docwriting Howto). |
0.2 |
27 Jan 2004 |
PV |
First complete version. (Entered into CVS 31 Jan 2004) |
1.0 |
8 Mar 2004 |
PV |
First official release on Firebird website. |
1.1 |
26 Feb 2005 |
PV |
The following changes have accumulated between March 2004 and Feb. 2005: Changed title to Firebird Docwriting Guide. Added section on PostgreSQL docs. Added note on non-DocBook contributions. Explained term well-formed XML. Made DocBook benefits list more concise. Changed recommendation on section vs. sectN elements. Dropped Updated info on non-monospaced literallayout. Added section on PDL and how to include a License Notice and Document History. Numerous minor improvements. Added document history and revision number. Licensed this work under the Public Documentation License. |
1.1.1 |
8 April 2005 |
PV |
Added paragraph on |
1.2 |
10 Feb 2006 |
PV |
Changed all <sectN> elements in the source structure to <section>. Changed docbuildhowto DocBook XML Characteristics: removed “plaintext” remark. Added note about XSLT. DocBook XML authoring tools: divided into two subsections; warned against ConText UTF-8 issue; added info on SciTE; added warning about saving as 8-bit; altered first para on dedicated XML tools; added Oxygen; removed Altova Authentic; updated/altered Altova XMLSpy information. Writing your DocBook doc: renamed to Setting up your DocBook doc; changed 2nd para; moved 3rd para (“Please read the subsection…”) to Elements we use frequently; changed “subsection on hierarchical elements” link to normal text in the relocated para. Creating the Document: changed set/book introduction; updated master doc example; added UTF-16 note; added information on placement of files belonging to alternative base sets. Typing text: minor changes to first and last para. Elements we use frequently: promoted to top-level section, following Setting up your DocBook doc; changed tip before first subsection to normal para, altering its first sentence; split Hierarchical elements in subsections, and edited/added LOTS of stuff; added subsection on HTML tables; heavily edited the “quote - literal” section; added subsections on images and paragraph headers. Non-DocBook aspects of the writing process: disappeared, all subsections have been promoted to top level; its first para is now in Language and style, and edited. Copyrights: renamed Copyright issues and added an introductory para. Respecting others' copyrights: renamed Using material written by others. The first para is split in two, and edited. The para about Borland docs is now in a subsection, with the first words removed. Using PostgreSQL docs is now also a subsection of Using material written by others, and renamed PostgreSQL docs. Your copyright and the PDL: extensive editing, reorganisation of subsections, and additions. Committing your work: included |
1.2.1 |
11 May 2006 |
PV |
Corrected start tag in bridgehead example (removed /). |
1.2.2 |
25 Jan 2007 |
PV |
Elements we use frequently: Mentioned |
1.3 |
5 May 2007 |
PV |
Topics discussed in this guide: Added new item to the last list. Links: Removed note about offset hot zones (fixed in FOP 0.93). Program listings, screens, literal layout, and examples: Removed note about non-monospaced HTML tables: Assigned id.
Wrapped processing instructions in a PDF rendering of large tables: New section. Style: Slight rewording in 3rd list item. Publishing your document on the Firebird website: New section. License notice: © 2004–2006 → 2004–2007. |
1.4 |
12 Jun 2016 |
PV |
Where the docmakers meet :: The subproject homepage: updated URL. Where the docmakers meet :: The Atkin news interface: Removed this subsection. Copyright issues :: Using material written by others :: PostgreSQL docs: updated the last two URL’s and the text line in between. License notice: © 2004–2007 → 2004–2016. |
1.5 |
11 January 2020 |
MR |
Update instructions for git usage. |
1.6 |
21 May 2020 |
MR |
Convert document to AsciiDoc and some minor copy-editing |
2.0 |
23 May 2020 |
MR |
Rearranged order of documentation: general information in first part General; added AsciiDoc information in part AsciiDoc and Asciidoctor; legacy DocBook information is now in part DocBook. Rewrote chapter Publishing your document on the Firebird website Some general copy-editing. |
2.1 |
23 May 2020 |
MR |
Updated link to Firebird Docbuilding Howto |
2.2 |
23 May 2020 |
MR |
Removed caution from chapter Publishing your document on the Firebird website about being outdated |
2.2.1 |
06 Jun 2023 |
MR |
Replaced firebird-docs references with firebird-devel |
2.3 |
07 Jul 2025 |
MR |
Documented alternative section ID naming convention for the Firebird Language Reference |
2.4 |
30 May 2026 |
MR |
Removed (most) DocBook related sections and other mentions |
Appendix B: License notice
The contents of this Documentation are subject to the Public Documentation License Version 1.0 (the “License”); you may only use this Documentation if you comply with the terms of this License. Copies of the License are available at https://www.firebirdsql.org/pdfmanual/pdl.pdf (PDF) and https://www.firebirdsql.org/manual/pdl.html (HTML).
The Original Documentation is titled Firebird Docwriting Guide.
The Initial Writer of the Original Documentation is: Paul Vinkenoog.
Copyright © 2004–2026. All Rights Reserved. Initial Writer contact: paulvink at users dot sourceforge dot net.
Contributor: Mark Rotteveel – see document history.
Portions created by Mark Rotteveel are Copyright © 2020-2026. All Rights Reserved. Contributor contact: mark at lawinegevaar dot nl.
