Talk:Wiki Editing Hints: Difference between revisions
(How do we handle in Text keywords?) |
Fred Knutson (talk | contribs) (Added in discussion point for code blocks, as well as a proposed alternative.) |
||
(One intermediate revision by one other user not shown) | |||
Line 11: | Line 11: | ||
* This snippet will show the message- "Ready" on status bar. You can set property '''''statusHint''''' in any widget. | * This snippet will show the message- "Ready" on status bar. You can set property '''''statusHint''''' in any widget. | ||
* The '''QAction''' class encapsulates this concept. It allows programmers to define an action in one place. | * The '''QAction''' class encapsulates this concept. It allows programmers to define an action in one place. | ||
== Selfreferred articles == | |||
A lot of articles are written in a subjective manner. Should these articles be rewritten for a neutral stand? There are no authors left within the wiki-context, which kind of makes the 'I did find' or 'I always asked myself' and similar idiom kind of surreal. | |||
== Code Blocks == | |||
Currently, <code> blocks are used. <code> is meant for single line code snippets and should be embedded within a <pre> tag for multi line code blocks<ref name="HTML5: Edition for Web Authors">[https://www.w3.org/TR/2011/WD-html5-author-20110809/the-code-element.html]</ref>. The result is as follows: | |||
<pre><code> | |||
#include <something.h> | |||
int main() | |||
{ | |||
return 0; | |||
} | |||
</code></pre> | |||
As can be seen, the <code> tags are shown, but the text is formatted over multiple lines. | |||
However, using <syntaxhighlight lang="cpp"> will cause the text to be formatted and colored. The result is as follows: | |||
<syntaxhighlight lang="cpp"> | |||
#include <something.h> | |||
int main() | |||
{ | |||
return 0; | |||
} | |||
</syntaxhighlight> | |||
This section may be relevant to [[Editing Talk:Wiki Editing Hints|Handling in-text keywords]] as the examples where <tt> are used should possibly be switched to <code> based on their needs. | |||
<references /> |
Latest revision as of 18:26, 19 April 2017
Handling in-text keywords
I've seen a lot of different usage on when to use Italic, Bold, I+B and also <tt>. The main reason is for distinguishing different symbols in blocktexts. The question is, when should we use italic, bold, both or <tt> tag?
I'll just set some examples:
From Editing How to Use QPushButton
- An instance of QPushButton is created. Signal released() is connected to slot handleButton() which changes the text and the size of the button.
From QtWhitepaper (pretty much edited by myself)
- Qt applications can be built visually using Qt Designer, a flexible user interface builder with support for IDE integration.
- This snippet will show the message- "Ready" on status bar. You can set property statusHint in any widget.
- The QAction class encapsulates this concept. It allows programmers to define an action in one place.
Selfreferred articles
A lot of articles are written in a subjective manner. Should these articles be rewritten for a neutral stand? There are no authors left within the wiki-context, which kind of makes the 'I did find' or 'I always asked myself' and similar idiom kind of surreal.
Code Blocks
Currently, <code> blocks are used. <code> is meant for single line code snippets and should be embedded within a <pre> tag for multi line code blocks[1]. The result is as follows:
<code> #include <something.h> int main() { return 0; } </code>
As can be seen, the <code> tags are shown, but the text is formatted over multiple lines.
However, using <syntaxhighlight lang="cpp"> will cause the text to be formatted and colored. The result is as follows:
#include <something.h>
int main()
{
return 0;
}
This section may be relevant to Handling in-text keywords as the examples where <tt> are used should possibly be switched to <code> based on their needs.