<< Chapter < Page Chapter >> Page >
This is the second installment of the CNXML language tutorials. It is designed to give a more comprehensive look at the CNXML tags and explain some more advanced uses of the language. Includes helpful examples of CNXML tags, extending the module created in The Basic CNXML tutorial.

Example

As is often the case in textbooks, authors will include examples in the middle of a chapter or section. For thisreason CNXML provides a tag that allows an author to include examples in a document. The example tag has a unique id attribute and can contain most tags as children, the first being an optional title . For specifics you should always consult the CNXML Spec .

<example id='tboneexam'><figure id='tbonefig'><title>T-Bone Steak</title><media id="image-example" display="block" alt="A T-bone Steak."><image type='image/jpg' src='tbone.jpg'/></media></figure></example>

Figure

The figure tag provides the structure for creating a figure within a document. They can contain eithertwo or more subfigure tags, or a single media , table , or code tag.

The figure tag has two attributes:

  • id - a unique ID, required
  • orient - defines how multiple subfigure s are to be displayed. It takes two values, vertical or horizontal , and will default to horizontal .

The optional first tag of the figure tag is title which is used to title a figure.

The title tag is followed by any of the tags listed above; however, the most commonly used tag is media,which is used to include any sort of media such as images, video, music, or java applets. The media object tags have two requiredattributes:

  • src - the location of the displayed media
  • mime-type - defines the type of media being displayed, which can be any valid MIME type.
    • audio - audio/mp3, audio/wav, etc.
    • video - video/qt, video/mov, etc.
    • image - image/png, image/gif, etc.
    • application - application/PostScript, application/x-java-applet, etc.

The final tag is the optional caption which is used to add a small caption to the figure.

<figure id='tbone'><title>T-Bone Steak</title><media id="image-example" display="block" alt="A T-bone Steak."><image mime-type='image/jpeg' src='tbone.jpg'/></media><caption>Upon successful completion of these documents, you should be able to grill a steak that looks just as good!</caption></figure>

Subfigure

The subfigure tag is used when you want to include more than one media , code or table within the same figure .

The usage of the subfigure tag is similar to that of figure . It has an optional id attribute, an optional first child title tag, a single media , code or table , followed by an optional caption .

Now the orient attribute for figure becomes very important. orient lets you specify whether the subfigures should be displayed side-to-side or one on top of the other.

<figure orient='horizontal' id='horfig'><title>Steaks</title><subfigure id='subfigtbone1'><title>T-Bone</title><media id="image-example" display="block" alt="A T-bone Steak."><image type='image/jpeg' src='tbone.jpg'/></media></subfigure><subfigure id='subfingnystrip1'><title>New York Strip</title><media id="image-example" display="block" alt="A NY Strip."><image mime-type='image/jpeg' src='ny_strip.gif'/></media></subfigure><caption>Upon successful completion of these documents, you should be able to grill a steak that looks just as good!</caption></figure> Or <figure orient='vertical' id='verfig'><title>Steaks</title><subfigure id='subfigtbone2'><title>T-Bone</title><media id="image-example" display="block" alt="A T-bone Steak."><image mime-type='image/jpeg' src='tbone.jpg'/></media></subfigure><subfigure id='subfig2'><title>New York Strip</title><media id="image-example" display="block" alt="A NY Strip."><image mime-type='image/jpeg' src='ny_strip.jpg'/></media></subfigure><caption>Upon successful completion of these documents, you should be able to grill a steak that looks just as good!</caption></figure>

Questions & Answers

what is microbiology
Agebe Reply
What is a cell
Odelana Reply
what is cell
Mohammed
how does Neisseria cause meningitis
Nyibol Reply
what is microbiologist
Muhammad Reply
what is errata
Muhammad
is the branch of biology that deals with the study of microorganisms.
Ntefuni Reply
What is microbiology
Mercy Reply
studies of microbes
Louisiaste
when we takee the specimen which lumbar,spin,
Ziyad Reply
How bacteria create energy to survive?
Muhamad Reply
Bacteria doesn't produce energy they are dependent upon their substrate in case of lack of nutrients they are able to make spores which helps them to sustain in harsh environments
_Adnan
But not all bacteria make spores, l mean Eukaryotic cells have Mitochondria which acts as powerhouse for them, since bacteria don't have it, what is the substitution for it?
Muhamad
they make spores
Louisiaste
what is sporadic nd endemic, epidemic
Aminu Reply
the significance of food webs for disease transmission
Abreham
food webs brings about an infection as an individual depends on number of diseased foods or carriers dully.
Mark
explain assimilatory nitrate reduction
Esinniobiwa Reply
Assimilatory nitrate reduction is a process that occurs in some microorganisms, such as bacteria and archaea, in which nitrate (NO3-) is reduced to nitrite (NO2-), and then further reduced to ammonia (NH3).
Elkana
This process is called assimilatory nitrate reduction because the nitrogen that is produced is incorporated in the cells of microorganisms where it can be used in the synthesis of amino acids and other nitrogen products
Elkana
Examples of thermophilic organisms
Shu Reply
Give Examples of thermophilic organisms
Shu
advantages of normal Flora to the host
Micheal Reply
Prevent foreign microbes to the host
Abubakar
they provide healthier benefits to their hosts
ayesha
They are friends to host only when Host immune system is strong and become enemies when the host immune system is weakened . very bad relationship!
Mark
what is cell
faisal Reply
cell is the smallest unit of life
Fauziya
cell is the smallest unit of life
Akanni
ok
Innocent
cell is the structural and functional unit of life
Hasan
is the fundamental units of Life
Musa
what are emergency diseases
Micheal Reply
There are nothing like emergency disease but there are some common medical emergency which can occur simultaneously like Bleeding,heart attack,Breathing difficulties,severe pain heart stock.Hope you will get my point .Have a nice day ❣️
_Adnan
define infection ,prevention and control
Innocent
I think infection prevention and control is the avoidance of all things we do that gives out break of infections and promotion of health practices that promote life
Lubega
Heyy Lubega hussein where are u from?
_Adnan
en français
Adama
which site have a normal flora
ESTHER Reply
Many sites of the body have it Skin Nasal cavity Oral cavity Gastro intestinal tract
Safaa
skin
Asiina
skin,Oral,Nasal,GIt
Sadik
How can Commensal can Bacteria change into pathogen?
Sadik
How can Commensal Bacteria change into pathogen?
Sadik
all
Tesfaye
by fussion
Asiina
what are the advantages of normal Flora to the host
Micheal
what are the ways of control and prevention of nosocomial infection in the hospital
Micheal
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Connexions tutorial and reference (中文指導及參考 - chinese). OpenStax CNX. Mar 09, 2006 Download for free at http://cnx.org/content/col10340/1.2
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Connexions tutorial and reference (中文指導及參考 - chinese)' conversation and receive update notifications?

Ask