/[svn]/doc/docbase/writing_docs/01_writing_docs.html
ViewVC logotype

Diff of /doc/docbase/writing_docs/01_writing_docs.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2739 by schoenebeck, Tue Apr 28 19:33:56 2015 UTC revision 3083 by schoenebeck, Mon Jan 9 19:23:58 2017 UTC
# Line 124  Line 124 
124        Creating a new article for this site is as simple as creating a new text        Creating a new article for this site is as simple as creating a new text
125        file and adding following text:        file and adding following text:
126      </p>      </p>
127      <code l="html">      <code lang="html">
128  <h1>My First Article</h1>  <h1>My First Article</h1>
129  <p>  <p>
130    This is the first paragraph.    This is the first paragraph.
# Line 297  Line 297 
297        somewhere in your article a headline called "Conclusion of Topic", then        somewhere in your article a headline called "Conclusion of Topic", then
298        this particular paragraph of your article may be directly linked to from        this particular paragraph of your article may be directly linked to from
299        other articles or other sites with an URL like        other articles or other sites with an URL like
300        <code>http://doc.linuxsampler.org/path/to/your/article/#conclusion_of_topic</code>.        <code lang="none">http://doc.linuxsampler.org/path/to/your/article/#conclusion_of_topic</code>.
301        If you want to override this behavior, because you rather want to use your        If you want to override this behavior, because you rather want to use your
302        own ID for a paragraph of your article, then simply set the desired ID with        own ID for a paragraph of your article, then simply set the desired ID with
303        your headline:        your headline:
304      </p>      </p>
305      <code>      <code lang="html">
306  <h3 id="my_conclusion">Conclusion of topic</h3>  <h3 id="my_conclusion">Conclusion of topic</h3>
307      </code>      </code>
308            
# Line 365  Line 365 
365    This is the first paragraph. Just before the picture.    This is the first paragraph. Just before the picture.
366  </p>  </p>
367    
368  <img src="some_picture.png" caption="??footnote??" title="??tooltip-text??">  &lt;img src="some_picture.png" caption="??footnote??" title="??tooltip-text??"&gt;
369    
370  <p>  <p>
371    This is the next paragraph, just after the picture.    This is the next paragraph, just after the picture.
# Line 387  Line 387 
387        </p>        </p>
388      </example>      </example>
389      <p>      <p>
390        You also don't have to care about the size of the image. If the image        You also don't have to worry about the size of the image. If the image
391        resolution is largen than the width of the article would currently require        resolution is larger than the width of the article would currently require
392        on the user's screen, then the image will automatically be downscaled to        on the user's screen, then the image will automatically be downscaled to
393        fit the width of the article. It is recommended though to keep the width        fit the width of the article. It is recommended though to keep the width
394        of images approximately below 1200px, just to not waste too much repository space        of images approximately below 1200px, just to not waste too much repository space
# Line 491  Line 491 
491        <code>&lt;code&gt;</code> tags like this:        <code>&lt;code&gt;</code> tags like this:
492      </p>      </p>
493      <code>      <code>
494  &lt;code&gt;  &lt;code lang="??language??"&gt;
495    
496    ??source-code??    ??source-code??
497        
498  &lt;/code&gt;  &lt;/code&gt;
499      </code>      </code>
500      <p>      <p>
501        Syntax highlighting is automatically generated for you, according to the        Syntax highlighting is automatically generated for you. That way you don't
       programming language or markup language used by you. That way you don't  
502        have to waste time on how to display source code nicely, and rather        have to waste time on how to display source code nicely, and rather
503        concentrate on the content of your article. Like with images, you can        concentrate on the content of your article instead.
504          You should provide the intended programming language of your source code sample
505          with <code>??language??</code>.
506          Obviously it is exhausting to supply such a <code lang="none">lang</code>
507          attribute with every single code sample, especially if you are just referring
508          to a single code token within your paragraphs. So you don't have to do that.
509          If you omit the <code lang="none">lang</code> attribute, then our site's
510          software will automatically use the language defined by you with one of
511          the previous code blocks. You may also disable automatic syntax highlighting
512          with <code lang="html">&lt;code lang="none"&gt;</code>, which will cause
513          that code block to appear simply in monochrome color.
514        </p>
515        <p>
516          Like with images, you can
517        decide in which context the source code shall appear in your article,        decide in which context the source code shall appear in your article,
518        as described next.        as described next.
519      </p>      </p>
# Line 511  Line 523 
523        <ul>        <ul>
524          <li><a href="nksp.html">NKSP real-time instrument script language</a></li>          <li><a href="nksp.html">NKSP real-time instrument script language</a></li>
525          <li>HTML markup language</li>          <li>HTML markup language</li>
526            <li><a href="sfz.html">SFZ File Format</a></li>
527        </ul>        </ul>
528        If you need another source code language, just tell        If you need another source code language, just tell
529        <a href="http://www.linuxsampler.org/developers.html#Schoenebeck">Christian</a>        <a href="http://www.linuxsampler.org/developers.html#Schoenebeck">Christian</a>
# Line 525  Line 538 
538        on its own between the paragraph blocks. Here is an example for the        on its own between the paragraph blocks. Here is an example for the
539        <a href="nksp.html">NKSP script language</a>.        <a href="nksp.html">NKSP script language</a>.
540      </p>      </p>
541      <code>      <code lang="html">
542  <p>  <p>
543    Paragraph just before the source code block.    Paragraph just before the source code block.
544  </p>  </p>
545  &lt;code&gt;  &lt;code lang="nksp"&gt;
546  on init  on init
547    @foo := "A message"    @foo := "A message"
548    message(@foo)    message(@foo)
# Line 571  end on Line 584  end on
584        do that: simply put the code block into the paragraph text block of your        do that: simply put the code block into the paragraph text block of your
585        HTML file:        HTML file:
586      </p>      </p>
587      <code>      <code lang="html">
588  <p>  <p>
589    A variable is assigned with NKSP like this &lt;code&gt;$foo := 5&lt;/code&gt;, in this    A variable is assigned with NKSP like this &lt;code&gt;$foo := 5&lt;/code&gt;, in this
590    case you are assigning &lt;code&gt;5&lt;/code&gt; to the integer variable &lt;code&gt;$foo&lt;/code&gt;.    case you are assigning &lt;code&gt;5&lt;/code&gt; to the integer variable &lt;code&gt;$foo&lt;/code&gt;.
# Line 602  end on Line 615  end on
615            
616      <h3>Metaphors</h3>      <h3>Metaphors</h3>
617      <p>      <p>
618        You might have noticed, we have used a special kind of <code>??place-holder??</code> for        You might have noticed, we have used a special kind of <code lang="html">??place-holder??</code> for
619        human-readable portions in source code before, which shall outline to the reader        human-readable portions in source code before, which shall outline to the reader
620        that it is not actually "real" source code, but just reflecting its semantic meaning.        that it is not actually "real" source code, but just reflecting its semantic meaning.
621        Simply put the respective pseudo-code into a pair of two question marks,        Simply put the respective pseudo-code into a pair of two question marks,
622        like so:        like so:
623      </p>      </p>
624      <code>      <code lang="html">
625  &lt;code&gt;  &lt;code&gt;
626  on init  on init
627    declare const $i = \?\?some-value\?\?    declare const $i = \?\?some-value\?\?
# Line 641  end on Line 654  end on
654        If you want to add links in your article to another article or to some        If you want to add links in your article to another article or to some
655        other website, then you just use an ordinary HTML link tag pair:        other website, then you just use an ordinary HTML link tag pair:
656      </p>      </p>
657      <code>      <code lang="html">
658  <p>  <p>
659    This paragraph contains &lt;a href="../nksp.html"&gt;a link to another article&lt;/a&gt;    This paragraph contains &lt;a href="../nksp.html"&gt;a link to another article&lt;/a&gt;
660    and to &lt;a href="http://www.linuxsampler.org"&gt;another website&lt;/a&gt;.    and to &lt;a href="http://www.linuxsampler.org"&gt;another website&lt;/a&gt;.
# Line 671  end on Line 684  end on
684        An article file on our site usually has the following        An article file on our site usually has the following
685        file name form:        file name form:
686      </p>      </p>
687      <code>      <code lang="none">
688  ??number-prefix??_??unique-name??.html  ??number-prefix??_??unique-name??.html
689      </code>      </code>
690      <p>      <p>
# Line 694  end on Line 707  end on
707        Technical terms and abbreviations are often used in articles to reduce        Technical terms and abbreviations are often used in articles to reduce
708        the amount of text for transmitting some kind of information about a        the amount of text for transmitting some kind of information about a
709        certain topic to the reader. You might want to emphasize technical terms and abbreviations        certain topic to the reader. You might want to emphasize technical terms and abbreviations
710        in your article, by wrapping the term into a pair of <code><i></code> HTML        in your article, by wrapping the term into a pair of <code lang="html"><i></code> HTML
711        tags. On our site this will not only show the term in a special unified        tags. On our site this will not only show the term in a special unified
712        font style (currently italic), but it allows you also to define the        font style (currently italic), but it allows you also to define the
713        meaning of the term <b>once</b>. Which goes like this:        meaning of the term <b>once</b>. Which goes like this:
# Line 704  end on Line 717  end on
717       <p>       <p>
718        You may define a new term like this:        You may define a new term like this:
719      </p>      </p>
720      <code>      <code lang="html">
721  <p>  <p>
722    He left the bar and jumped right into his    He left the bar and jumped right into his
723    &lt;i title="A very large vehicle."&gt;Mega Liner&lt;/i&gt;    &lt;i title="A very large vehicle."&gt;Mega Liner&lt;/i&gt;
# Line 856  end on Line 869  end on
869        The only thing that changed compared to the regular note, is the "class"        The only thing that changed compared to the regular note, is the "class"
870        attribute of the note tag.        attribute of the note tag.
871      </p>      </p>
872        
873        <h2>Directory Listings</h2>
874        <p>
875          Software components often have a certain kind of directory structure.
876          For readers of your articles is it way easier to perceive directory
877          structures if they are displayed in a visual appropriate way. There are
878          two specials tags you can use for this purpose:
879        </p>
880        <code lang="html">
881    &lt;dir&gt;/
882      &lt;dir&gt;home
883        &lt;dir&gt;bob
884          &lt;file&gt;README.txt&lt;/file&gt;
885          &lt;file&gt;foo.sh&lt;/file&gt;
886        &lt;/dir&gt;
887      &lt;/dir&gt;
888      &lt;dir&gt;tmp
889        &lt;file&gt;bla.tmp&lt;/file&gt;
890      &lt;/dir&gt;
891    &lt;/dir&gt;
892        </code>
893        <example>
894          <dir>/
895            <dir>home
896              <dir>bob
897                <file>README.txt</file>
898                <file>foo.sh</file>
899              </dir>
900            </dir>
901            <dir>tmp
902              <file>bla.tmp</file>
903            </dir>
904          </dir>
905        </example>
906        <p>
907          Currently for each file the same icon will be displayed. This might change
908          in future, i.e. a an automatic different icon could be picked by the
909          site's software according to the respective file name extension.
910        </p>
911    
912      <h2>Extensions</h2>      <h2>Extensions</h2>
913      <p>      <p>
914        This is almost the end of this article. You are still seeking for features        This is almost the end of this article. You are still seeking for features
# Line 872  end on Line 924  end on
924        You are at the end of our tour introducing our documentation system.        You are at the end of our tour introducing our documentation system.
925        You may now start writing your first article. Once you are done with it,        You may now start writing your first article. Once you are done with it,
926        simply        simply
927        <a href="http://www.linuxsampler.org/developers.html">        <a href="http://www.linuxsampler.org/developers.html">send your article to some of us</a>,
928          send your article to some of us        or request an account to our Subversion repository, so you can
       </a>, or request an account to our Subversion repository, so you can  
929        manage articles of our documentation site on your own.        manage articles of our documentation site on your own.
930      </p>      </p>
931      <p>      <p>

Legend:
Removed from v.2739  
changed lines
  Added in v.3083

  ViewVC Help
Powered by ViewVC