The SocialTexy syntax

The SocialTexy syntax

The ICT.social network uses the SocialTexy syntax for writing articles. It's a markup language similar to MarkDown or to the one which Wikipedia uses. It's derived from the Texy! project which we extended by several more marks. We don't use WYSIWYG editors like TinyMCE since they produce lots of unwanted markups and would mess with source codes and other precise parts of our articles.

Texy! syntax

This part is derived from the original Texy! syntax.

Paragraphs

Syntax

The first paragraph

The second paragraph.
The second sentence of the second paragraph.
 This is the third sentence which will be on the new line.

Result

Your page
localhost

Headings

First-level heading
###################

Second-level heading
********************

Third-level heading
===================

Fourth-level heading
--------------------

Result

Your page
localhost

Source codes

Syntax

/---code cpp
#include<stdio.h>

main()
{
    printf("Hello World");
}
\---

Result

#include<stdio.h>

main()
{
    printf("Hello World");
}

Special blocks

Syntax

/---html
<strong>This text is strong.</strong>**This text is not strong.**
\---

/---text
<strong>This text is not strong.</strong>**This text is not strong either.**
\---

/---comment
This is a comment which users cannot see.
\---

Result

Your page
localhost

Quotes

Syntax

> If it's on the Internet, then it must be true, and you can't question it.

Abraham Lincoln .>

Result

If it's on the Internet, then it must be true, and you can't question it.

Abraham Lincoln

Links

Syntax

"Google":https://www.google.com
See Google:[https://www.google.com]

Or using references:
[google]: https://www.google.com

Visit [google]

Result

Your page
localhost

Images

[* folder/image.png .(Alternative text) *]

[* folder/image.png .(Aligned left) <]
[* folder/image.png .(Aligned right) >]

.<>
[* folder/image.png .(Centered image) *]

Result

Tables

Syntax

| First name    | Last name     |
|---------------|---------------|
| Homer     | Simpson   |
| John      | Smith     |

Result

First name Last name
Homer Simpson
John Smith

Phrases

Syntax

**Strong text**
**emphasized text**
2^3
x_1

Result

Strong text emphasized text 23 x1

Lists

Syntax

- Item1
- Item2
- Item3

1) First
2) Second
3) Third

a) First
b) Second
c) Third

A) First
B) Second
C) Third


I) First
II) Second
III) Third

Result

  • Item1
  • Item2
  • Item3
  1. First
  2. Second
  3. Third
  1. First
  2. Second
  3. Third
  1. First
  2. Second
  3. Third
  1. First
  2. Second
  3. Third

Others

This reference is not complete yet, please, visit https://texy.info/…tax-podrobne#… for more information ...

Social constants

Warning! Tokens in this article are written using invisible spaces to prevent them being processed. If you just copy them to your article, it might not work, re-type them, please.

Console blocks

To avoid messing with screenshots, which are difficult to maintain, you can wrap text output to make it look like an actual console window.

{‌TITLE}

Specifies the console title. The default title will be used if not specified.

Run your app by pressing F5 and you should see a console window like this:

/---console csharp
{‌TITLE}Your first C# .NET app{‌/TITLE}
Hello world!
\---

Browser blocks

As same as a console window, you can generate a web browser window. The code will be displayed in an isolated sandbox.

{‌URL}

You can specify the URL using the URL token.

{‌TITLE}

You can specify the title using the TITLE token.

Our web will not look like this:

/---browser
{‌URL}localhost{‌/URL}
{‌TITLE}You first page{‌/TITLE}
<p>Hello world!</p>
\---

Compiler blocks

Real-time code compilers for different languages can be easily inserted into articles as compiler blocks.

{‌HIDE}

We declare a function like this:

/---code cpp
void function
{
    printf("Hello");
}
\---

And then you call it like this in your code:

/---compiler cpp
{‌HIDE}
void function
{
    printf("Hello");
}
{‌/HIDE}
main()
{
    function();
}
\---

{*_CONSOLE} and {*_CONSOLE/}

Replace * with the programming language.

/---compiler csharp
{‌CSHARP_CONSOLE}
Console.WriteLine("Hello world");
{‌/CSHARP_CONSOLE}
\---

will be translated to:

/---compiler csharp
{‌HIDE}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OnlineApp
{
    class Program{
        static void Main(string[] args) {
        // Your code snippet
{‌/HIDE}
Console.WriteLine("Hello world");
{‌HIDE}
        }
    }
}
{‌/HIDE}
\---

Article constants

{‌PREVIOUS_URL} and {‌NEXT_URL}

In the "previous lesson":[{‌PREVIOUS_URL}] ...

... In the "next lesson":[{‌NEXT_URL}] we'll...

{‌PREVIOUS} and {‌NEXT}

Render title and link to the previous resp. next article.

[endpreview]

In this premium article, we'll...[endpreview]

{‌DOMAIN}

Inserts the current domain, like "ict.social".

{‌DESCRIPTION}

Inserts the current article description.

[screenshots] and

Screenshots of software articles are generated at the end of the article. The position can be specified by entering the [screenshots] constant:

...

Screenshots
###########
[screenshots]

Some other text...

{‌REFERENCES}

Inserts a reference slideshow to a given place in the article.

kbd

If you want to talk about pressing keys, use the <kbd> and </kbd> to do so:

Press <kbd>Enter</kbd>

Result

Press Enter

Conventions

  • Although Texy! supports HTML markup, don't use it.
  • Don't use other heading syntax than specified here.

 

 

Article has been written for you by David Capka
Avatar
Do you like this article?
No one has rated this quite yet, be the first one!
The author is a programmer, who likes web technologies and being the lead/chief article writer at ICT.social. He shares his knowledge with the community and is always looking to improve. He believes that anyone can do what they set their mind to.
Unicorn College The author learned IT at the Unicorn College - a prestigious college providing education on IT and economics.
Activities (13)

 

 

Comments

To maintain the quality of discussion, we only allow registered members to comment. Sign in. If you're new, Sign up, it's free.

No one has commented yet - be the first!