• Show Text Formating
  • Show Text Formating

    1. General Text formatting

    This page shows, some text formatting features.

    As you would expect, making single words bold or multiple words is quite easy to to. Same for emphasizing single words or multiple words.
    Use \tt for monospace fonts.
    Use \br for linebreaks.

    You can also underline text or mark some text as inserted. Yes those are different things. For example one css style might tint inserted text green while not changing the color of a simple underlined though text.

    Text descripting an ui element is drawn bold.

    You can highlight some text like you have used a textmarker.

    Also you can mark some text as deleted or strike some text through. Yes those are different things. For example one css style might tint deleted text red while not changing the color of a simple stroke though text.

    Abbreviations are also easy to handle. so the user can known the difference between a KNN and a KNN

    2. Programmer specific formatting

    2.1 Keyboard Shortcuts

    If you want to highlight a part of your documentation as a keyboard shortcut, you can use the commands

    • \shortcut
    • \key

    Use \shortcut{\key{some-key}} for shortcuts consisting of only one key. For example Escape.
    Use \shortcut{\key{first-key}+\key{second-key}+...+\key{last-key}} if your Shortcut consists of multiple keys. For example the well known shortcut for copying content to the clipboard: Ctrl+c.
    Another example with three keys: Ctrl+Shift+P.

    2.2 Math

    Mathjax is integrated. Inline formulas \(y^2>2\cdot x^{\sqrt4}\) are supported.

    \[\int_{x=0}^{42} x\;dx \ne \sum_{i=1}^{n} \frac{1}{\sqrt{i}}\]

    Note: You don't have to worry about html special html characters, because qdoc will escape the special html characters like <, or >. So for example the qdoc code \math{a<b>c</b>c} will result in the following formula: \(a<b>c</b>c\).
    Instead you have to use double backslashes if you are using the $$ ... $$, \[ ... \] or \( ... \) command directly. For example you need to type in $$\\sqrt{n}$$ to get $$\sqrt{n}$$

    3. Miscellaneous

    4.1 Images

    Look, a cat! :D

    I have downloaded this image from pixabay.com

    Inline images Look, a cat! :) are possible.

    4.2 HTML

    4.2.1 \div

    You can easily add div sections to the html output easily.

    For example, the following commands

    \div{class="alert alert-success"}
    \b Yay, successfully demonstration of the \\div command :D
    \enddiv

    will result in

    Yay, successfully demonstration of the \div command :D

    4.3 Tables

    AB
    a b cdefg
    CD
    h i jk l m
    o p qr s t u
    vxw
    x y z
    two rowsa
    b

    4.4 Quotes

    Some Text before the quotation.

    This is a quote. This is a quote. This is a quote. This is a quote. This is a quote.

    Some Text after the quotation.

    Source

    This is the source for the current page:

    /*! \page showcase-text-formating.html
    \ingroup showcase
    
    \title Show Text Formating
    
    \brief Different Text Formatting. Also Math Formulas and Images.
    
    \previouspage Showcase Macros
    \nextpage Show Code Formating
    
    \section1 1. General Text formatting
    
    This page shows, some text formatting features.
    
    As you would expect, making single words \b bold or \b{multiple words} is quite
    easy to to. Same for \e emphasizing single words or \e{multiple words}.
    \br
    Use \\tt for \tt{monospace} fonts.
    \br
    Use \\br for linebreaks.
    
    You can also \underline{underline} text or mark \ins{some text as inserted}. Yes those are different things. For example one css style might tint inserted text green while not changing the color of a simple underlined though text.
    
    Text descripting an \uicontrol{ui element} is drawn bold.
    
    You can \mark{highlight some text} like you have used a textmarker.
    
    Also you can mark \del{some text as deleted} or strike \s{some text through}. Yes those are different things. For example one css style might tint deleted text red while not changing the color of a simple stroke though text.
    
    Abbreviations are also easy to handle. so the user can known the difference between a \abbr{Künstliches Neuronales Netz}{KNN} and a \abbr{K Nearest Neighbor}{KNN}
    
    \section1 2. Programmer specific formatting
    
    \section2 2.1 Keyboard Shortcuts
    If you want to highlight a part of your documentation as a keyboard shortcut, you
    can use the commands
    \list
    \li \c \shortcut
    \li \c \key
    \endlist
    
    Use \c{\shortcut{\key{some-key}}} for shortcuts consisting of only one key. For example \shortcut{\key{Escape}}.
    \br
    Use \c{\shortcut{\key{first-key}+\key{second-key}+...+\key{last-key}}} if your Shortcut consists of multiple keys. For example the well known shortcut for copying
    content to the clipboard: \shortcut{\key{Ctrl}+\key{c}}.
    \br
    Another example with three keys: \shortcut{\key{Ctrl}+\key{Shift}+\key{P}}.
    
    \section2 2.2 Math
    
    \keyword including math
    
    Mathjax is integrated. Inline formulas \math{y^2>2\cdot x^{\sqrt4}} are supported.
    
    \mathline{\int_{x=0}^{42} x\;dx \ne \sum_{i=1}^{n} \frac{1}{\sqrt{i}}}
    
    \note You don't have to worry about html special html characters, because qdoc will escape
    the special html characters like \c{<}, or \c{>}. So for example the qdoc code
    \c{\math{a<b>c</b>c}} will result in the following formula: \math{a<b>c</b>c}.
    \br
    Instead you have to use double backslashes if you are using the
    \c{$$ ... $$}, \c{\[ ... \]} or \c{\( ... \)} command directly. For example you need to
    type in \c$$\\sqrt{n}$$ to get $$\\sqrt{n}$$
    
    \section1 3. Miscellaneous
    
    \section2 4.1 Images
    
    \image qdoc/showcase/images/cat.jpg Look, a cat! :D
    \caption I have downloaded this image from \l{https://pixabay.com/en/cat-silhouette-cats-silhouette-694730/}{pixabay.com}
    
    Inline images \inlineimage qdoc/showcase/images/cat.jpg Look, a cat! :)
    are possible.
    
    \section2 4.2 HTML
    
    \section3 4.2.1 \\div
    
    You can easily add div sections to the html output easily.
    
    For example, the following commands
    
    \quotefromfile showcase/showcase-text-formating.qdoc
    \skipuntil \section3 4.2.1 \\div
    \skipuntil will result in
    \printto \section
    
    will result in
    
    \div{class="alert alert-success"}
    \b Yay, successfully demonstration of the \\div command :D
    \enddiv
    
    \section2 4.3 Tables
    
    \table
    \header
      \li A
      \li B
    \row
      \li a b c
      \li defg
    \header
      \li C
      \li D
    \row
      \li h i j
      \li k l m
    \row
      \li o p q
      \li r s t u
    \row
      \li v
      \li xw
    \row
      \li{2,1} x y z
    \row
      \li{1,2} two rows
      \li a
    \row
      \li b
    \endtable
    
    \section2 4.4 Quotes
    
    Some Text before the quotation.
    
    \quotation
    This is a quote. This is a quote. This is a quote. This is a quote. This is a quote.
    \endquotation
    
    Some Text after the quotation.
    
    \section1 Source
    
    This is the source for the current page:
    
    \quotefile showcase/showcase-text-formating.qdoc
    
    */