• On The Road

    A Soldier's Song

    • Textism - A better guide to formatting in Nature Network

      Sunday, 09 Sep 2007 - 19:24 UTC

      Thank Bronwen Dekker for telling me Textism, a product of TextPattern. Now I have I believe the most complete list of formatting skills. The following instruction requires a basic knowledge of HTML or other marked-up language.

      1. Blocks

      Note:

      1. All block modifiers are ended with a dot;
      2. An empty line should be added both before and after a block to separate the style with the rest of the text.

      h4. Header 4

      Header 4

      Note:

      1. You can have up to 6 levels of headers (h1. to h6.)
      2. Headers can be alternatively defined by # symbol. See the former post.

      ——
      p. paragraph

      paragraph

      Note: Applied by default.
      ——
      bq. block quotation

      block quotation

      bq.:http://citation.url Text...

      Text…

      Note: Like adding a cite attribute to the blockquote tag
      ——
      Ref[1]
      Ref1

      fn1. Footnote 1

      1 Footnote 1

      Note:

      1. Try clicking the reference superscript.
      2. You can have up to 100 items of footnotes.

      ——
      # Numeric List
      ## Numeric List

      1. Numeric List
        1. Numeric List

      ——
      * Bullet List
      ** Bullet List

      • Bullet List
        • Bullet List

      2. Applying Attributes

      In HTML coding, block tags such as p and span can have attributes assigned. The block modifiers above can also have some attributes corresponding to HTML coding.

      2.1 Class and ID

      Plain parentheses () inserted between block syntax and the closing dot-space indicate classes and ids:
      p(hector). paragraph
      Adding a class named hector to the p tag.
      ——
      p(#fluid). paragraph
      Adding an id named fluid to the p tag.
      ——
      p(hectorfluid). paragraph@
      Adding both at the same time.

      2.2 Style

      Curly brackets {} insert arbitrary CSS style.
      p{color:red}. paragraph

      paragraph

      ——
      #{color:blue} one
      # two

      1. one
      2. two

      ——
      %{color:green}style a phrase%
      style a phrase
      The % modifier defines a span tag

      Note: Only some style syntaxes are supported.

      2.3 Language

      Square brackets [] insert language attributes.
      %[fr]phrase
      phrase
      This modifier adds a lang attribute whose value equal to fr to the span tag.

      3. Tables

      Separate different cells in a row with |. Each line defines a row. The width of each column is defined by the widest cell in it. The width of the table is defined by the sum of all columns. You can have different number of cells between rows, but you cannot defined an empty cell for space holder.

      @ |a|simple|table|row| @
      @ |And|Another|(oops an additional cell)|table|row|@
      |a|simple|table||row|
      |And|Another|(oops an additional cell)|table|row|

      ——

      |_. A|_. table|_. header|_.row|
      |A|simple|table|row|

      A table header row A simple table row

      Each cell of the header row is defined by a block modifier with an ending dot, so an empty line is needed before the table.

      4. Phrase modifiers

      _emphasis_
      emphasis

      ——
      __italic__
      italic

      ——
      *strong*
      strong

      ——
      **bold**
      bold

      ——
      ??citation??
      citation
      This modifier adds a cite tag

      ——
      -deleted text-
      -deleted text-

      ——
      +inserted text+
      inserted text

      ——
      ^13^C NMR
      ^13^C NMR

      ——
      H~2~O
      H~2~O

      ——
      ==*no text tile*==
      *no text tile*

      ——
      The result of:
      "Nature(hover tooltip)":http://www.nature.com
      is:
      Nature
      A plain parentheses define the tooltip showing when you hover the link. It is optional.

      ——
      The result of:
      !http://network.nature.com/images/topnav_global_bg.gif(Nature Network)!:http://network.nature.com
      is:
      Nature Network
      The parentheses and the link are optional.

      5. Symbols

      A limited number of HTML tag is supported directly, so at least you can type all the >HTML 4.0 Entities.

      @ Inclusion complex of poly(ε-caprolactone) and α-cyclodextrin @
      Inclusion complex of poly(ε-caprolactone) and α-cyclodextrin

      ——
      @ Temperature was controlled at 70±0.1°C @
      Temperature was controlled at 70±0.1°C

      6. Final Words

      Not all syntax of Textism is available in Nature Network. For example, all text alignment definition s are not supported in NN. However, some syntax such as the # method to define header are not of Textism, so it seems that NN uses a combined text formatting system. There are still much to exploit.

      Last updated: Sunday, 09 Sep 2007 - 19:24 UTC

      • Comments

        • Date:
          Monday, 10 Sep 2007 - 11:26 UTC
          Egon Willighagen said:

          The ^13^C NMR example does not properly show up in the example… but it does in the preview of this item, though.

        • Date:
          Monday, 10 Sep 2007 - 11:28 UTC
          Egon Willighagen said:

          Oh, what about applets, like Jmol ?

        • Date:
          Monday, 10 Sep 2007 - 12:03 UTC
          Andrew Sun said:

          Thank you for pointing out the problem. It is fixed now.

          The Java applets as well as ActiveX and Flash media need allowance of the object tag which is not available in the current formatting system. The limited/non HTML editors implemented here and some other blogging system like MSN Spaces are believed to help conserving the tidiness and safety of the website. So if the system doesn’t provide an ‘insert’ button for theses objects you cannot add them by code pasting.

        • Date:
          Monday, 10 Sep 2007 - 20:37 UTC
          Hilary Spencer said:

          Thanks for this reference, Andrew!
          The Textism site also has a useful preview feature with a quick list of abbreviations on the right.

        • Date:
          Thursday, 26 Jun 2008 - 12:41 UTC
          Heather Etchevers said:

          Totally useful – long after the initial post. ’Twill be my reference. Thanks.

        • Date:
          Friday, 03 Oct 2008 - 18:11 UTC
          Lei Xu said:

          Can you tell me how to divide a text to several paragraphs? “p.paragraph” seems doesn’t work

        • Date:
          Friday, 03 Oct 2008 - 18:21 UTC
          Maxine Clarke said:

          Hi again Lei – this may be a bug so I have reported it in the “what’s wrong forum”: http://network.nature.com/groups/whats-wrong/forum/topics


Search blogs

web feed Want a blog?

Submit this post to

Advertisement