Edit

Syntax

Paragraphs

Lorem ipsum dolor sit amet,
still the same paragraph.

Second paragraph
<p>Lorem ipsum dolor sit amet, still the same paragraph.</p>

<p>Second paragraph</p>
Lorem ipsum dolor sit amet,
 still the same paragraph, but wrapped with element `<br>`
 using one space befero
<p>Lorem ipsum dolor sit amet,<br>
still the same paragraph, but wrapped with element <code>&lt;br&gt;</code><br>
one space before</p>

Centered or colored by modifier:

.{color:blue}
Lorem ipsum dolor sit amet.

.<>
Lorem ipsum dolor sit amet.
<p style="color:blue">Lorem ipsum dolor sit amet.</p>

<p style="text-align:center">Lorem ipsum dolor sit amet.</p>

Headings

One way:

Main title
**************

Subtitle
==========

Second way:

=== Main title ===

## Subtitle ##

## or same subtitle
<h2>Main title</h2>

<h3>Subtitle</h3>

Horizontal line

Texy knows four ways:

--------

********

Code

/---code php
  function reImage($matches) {
    $content = $matches[1];
    $align = $matches[5];
    $href = $matches[6];
  }
\---

Syntax can be highlighted by third party module

function reImage($matches) {
  $content = $matches[1];
  $align = $matches[5];
  $href = $matches[6];
}
<pre class="src-php"><code><span class="php-keyword1">function</span> reImage(<span class="php-var">$matches</span>) {
  <span
class="php-var">$content</span> = <span class="php-var">$matches</span>[<span class="php-num">1</span>];
  <span
class="php-var">$align</span> = <span class="php-var">$matches</span>[<span class="php-num">5</span>];
  <span
class="php-var">$href</span> = <span class="php-var">$matches</span>[<span class="php-num">6</span>];
}</code></pre>

Disable Texy

/---html
  <em>test</em>: **this is not strong**
\---


/---text
  <em>test</em>: **this is not strong**
\---

You can also disable Texy for a part of inline text by using double apostrophe '':

Example: ''**this is not strong**''

Div

/---div .[header]

  content of div

\---
<div class="header">
	<p>content of div</p>
</div>

Nested divs:

/---div .[header]

  ## This is a header.

  /---div
    nested div
  \---

  Texy is sexy!

\---
<div class="header">
	<h6>This is a header.</h6>

	<div>
		<p>nested div</p>
	</div>

	<p>Texy is sexy!</p>
</div>

Block quotes

> This is a blockquote with two paragraphs.
>
> 640 K should be enough for everyone
>
>:http://www.microsoft.com
<blockquote cite="http://www.microsoft.com">
	<p>This is a blockquote with two paragraphs.</p>

	<p>640 K should be enough for everyone</p>
</blockquote>

Nested block quote:

> This is header
> ******
>
> > Lorem ipsum dolor sit amet.
> > Vestibulum enim wisi
>
> Back to the first level.
<blockquote>
	<h2>This is header</h2>

	<blockquote>
		<p>Lorem ipsum dolor sit amet. Vestibulum enim wisi</p>
	</blockquote>

	<p>Back to the first level.</p>
</blockquote>
Look at homepage:[http://texy.info].

Do you know "Nette":http://nette.org?

"Write me":me@example.com
<p>Look at <a href="http://texy.info">homepage</a>.</p>

<p>Do you know <a href="http://nette.org">Nette</a>?</p>

<p><a href="mailto:me&#64;example.com">Write me</a></p>

References

[homepage]: http://texy.info/ Texy .(homepage)
[la trine]: http://latrine.dgx.cz

This is [homepage]

Look at [this site | la trine]
<p>This is <a href="http://texy.info/" title="homepage">Texy</a></p>

<p>Look at <a href="/en/la-trine">this site</a></p>

Images

[* image.gif *]
<div><img src="//texy.info/git/www/image.gif" alt=""></div>

Aligned images:

[* image.gif <] Left-aligned image. Lorem ipsum ...

[* image.gif >] Right-aligned image. Curabitur quam ...
<p><img src="//texy.info/git/www/image.gif" alt="" class="left"> Left-aligned image. Lorem ipsum …</p>

<p><img src="//texy.info/git/www/image.gif" alt="" class="right"> Right-aligned image. Curabitur quam …</p>

With dimensions

[* image.gif 10x20 *]
<div><img src="//texy.info/git/www/image.gif" alt="" width="10" height="20"></div>

With on-mouse-over event

[* image.gif | image-over.gif *]
<div><img src="//texy.info/git/www/image.gif" alt="" onmouseover="this.src='//texy.info/git/www/image-over.gif'"
onmouseout="this.src='//texy.info/git/www/image.gif'"
onload="var i=new Image();i.src='//texy.info/git/www/image-over.gif';if(typeof preload=='undefined')preload=new Array();preload[preload.length]=i;this.onload=''"></div>

With modifiers

[* image.gif .(alt text)[foto] *]
<div><img src="//texy.info/git/www/image.gif" class="foto" alt="alt text"></div>

Image using references

What a beautiful girl [* picture*] !
What a beautiful girl <img src="images/image.gif"
alt="my girl" /> !

Images with description

[* image.gif *] *** This is *description* under image
<div class="figure"><img src="//texy.info/git/www/image.gif" alt="">
	<p>This is <i>description</i> under image</p>
</div>

Phrases

*emphasis*

**strong emphasis**

***stronger emphasis***

^^superscript^^ vs. __subscript__

Quotes: >>Lorem Ipsum Dolores<<:www.lipsum.com

Cite: As ~~Frank Borland~~ said, ...
<em>emphasis</em>

<strong>strong emphasis</strong>

<strong><em>stronger emphasis</em></strong>

<sup>superscript</sup> vs. <sub>subscript</sub>

Quotes: <q cite="http://www.lipsum.com">Lorem Ipsum Dolores</q>

Cite: As <cite>Frank Borland</cite> said, ...

emphasis

strong emphasis

stronger emphasis

^^superscript^^ vs. __subscript__

Quotes: Lorem Ipsum Dolores

Cite: As ~~Frank Borland~~ said, …

With modifiers

**strong and green .{color:green}** like Hulk
<strong style="color:green;">strong and green</strong> like Hulk

strong and green like Hulk

Direct HTML tags

This <strong class=info>is strong</strong> text.
<br> This is not.
This <strong class="info">is strong</strong> text.
<br /> This is not.

Lists

-   Red
-   Green
-   Blue
<ul>
    <li>Red</li>

    <li>Green</li>

    <li>Blue</li>
</ul>
  • Red
  • Green
  • Blue

Ordered

1)  One
2)  Two
3)  Three

a)  One
b)  Two
c)  Three

A)  DOS
B)  Windows
C)  Linux

I)  Yesterday
II)  Today
III)  Tomorrow
<ol>
    <li>One</li>

    <li>Two</li>

    <li>Three</li>
</ol>

<ol style="list-style-type:lower-alpha;">
    <li>One</li>

    <li>Two</li>

    <li>Three</li>
</ol>

<ol style="list-style-type:upper-alpha;">
    <li>DOS</li>

    <li>Windows</li>

    <li>Linux</li>
</ol>

<ol style="list-style-type:upper-roman;">
    <li>Yesterday</li>

    <li>Today</li>

    <li>Tomorrow</li>
</ol>
  1. One
  2. Two
  3. Three
  1. One
  2. Two
  3. Three
  1. DOS
  2. Windows
  3. Linux
  4. Yesterday
  1. Today
  2. Tomorrow

Nested lists

a)  Bird
  I)  Bird
    -   Red
    -   Green
    -   Blue
  II)  McHale
  III)  Parish
b)  McHale
c)  Parish
      1)  Bird
      2)  McHale
      3)  Parish
  1. Bird
    1. Bird
      • Red
      • Green
      • Blue
    2. McHale
    3. Parish
  2. McHale
  3. Parish
    1. Bird
    2. McHale
    3. Parish

Definition list

Concert Divokej Bill:
    - when: 9. 12. 2004
    - where: Brno
    - Price: EUR 26
<dl>
    <dt>Concert Divokej Bill</dt>

    <dd>when: 9. 12. 2004</dd>

    <dd>where: Brno</dd>

    <dd>Price: EUR 26</dd>
</dl>
Concert Divokej Bill
when: 9. 12. 2004
where: Brno
Price: EUR 26

With modifiers

.{color:red}
PHP:    .{color:blue}
  - PHP: Hypertext Preprocessor .{color:green}
  - A scripting language
  - Personal Home Pages
PHP
PHP: Hypertext Preprocessor
A scripting language
Personal Home Pages

Modifiers

These types of modifiers are available:

  • (title) descriptive, used as attribute title or alt (for images)
  • [class1 class2 #id] determine class and/or ID
  • {class:blue} direct CSS style
  • {target:_blank} direct HTML attribute
  • horizontal alignment:
    • left <
    • right >
    • center <>
    • justify =
  • vertical alignment: (for tables)
    • top ^
    • middle –
    • bottom _
Centered using modifier  .<>

Another example .{color:blue; lang: cs}
<p style="text-align:center">Centered using modifier</p>

<p style="color:blue" lang="cs">Another example</p>

Quick-corrects

- very long words division (with respect for language rules). Example: antidisestablishmentarianism
- clickable emails and URL www.dgx.cz, dave@dgx.cz (emails are obfuscated against spambots)
- "national" 'typographic' quotes
- divider vs. dash: 10-15 vs. north-west
- em-dash: one -- two
- dimension sign 10 x 20
- nonbreakable spaces in phone numbers +420 776 552 046
- acronym NATO((North Atlantic Treaty Organisation))
- abbr "et al."((and others))
- quickCorrects like this(TM) this(R) or this(C)
- arrows <- and -> and <->
- ellipsis...
- preserve HTML entities
- and many others :-)
  • very long words division (with respect for language rules). Example: antidisestablishmentarianism
  • clickable emails and URL www.dgx.cz, dave@dgx.cz (emails are obfuscated against spambots)
  • “national” ‘typographic’ quotes
  • divider vs. dash: 10–15 vs. north-west
  • em-dash: one – two
  • dimension sign 10 × 20
  • nonbreakable spaces in phone numbers +420 776 552 046
  • acronym NATO
  • abbr et al.
  • quickCorrects like this™ this® or this(C)
  • arrows ← and → and ← >
  • ellipsis…
  • preserve HTML entities
  • and many others :-)

spaces:

- vkládání nezalomitelných mezer za jednopísmennc ptedložky (v aut> u okna)
- ned>litelnc mezery u telefonních čísel +420 776 552 046
vkládání nezalomitelných mezer za jednopísmennc ptedložky (v&nbsp;aut> u&nbsp;okna)

ned>litelnc mezery u&nbsp;telefonních čísel +420&nbsp;776&nbsp;552&nbsp;046

Poznámka: Nahrazování se obvykle tídí dalšími pravidly, kterc určují, kdy symbol nahradit a kdy ne. Naptíklad šipka -> nemůže být na konci tádku atd. Proto nebuďte ptekvapeni, když v n>kterých ptípadech Texy náhradu neprovede. Pokud to považujete za chybu, dejte mi v>d>t.

Zkratky, akronymy

Používá se zápisu s dvojitou kulatou závorkou:

jednoslovnc: NATO((North Atlantic Treaty Organisation))

víceslovnc: "et al."((a další))
jednoslovnc: <acronym title="North Atlantic Treaty Organisation">NATO</acronym>

víceslovnc: <acronym title="a další">et al.</abbr>

Poznámka: mezi ABBR a ACRONYM se nerozlišuje.

Klikatelnc URI

Automatický ptevod URI do klikatelnc formy (včetn> emailů)

další informace na www.dgx.cz a takc ...

další informace na www.dgx.cz a takc …

Rozd>lení velmi dlouhých slov

Velmi zajímavá a důležitá funkce Texy. Dlouhá slova mohou narušit vzhled stránky, proto je vhodnc prohlížeči naznačit, kde je může zalomit. Texy tyto místa hledá s ptihlcdnutím k národním zvyklostem, tedy slovo rozd>luje podle slabik:

nejneobhospodatovávateln>jšími
nejneobhospoda&shy;továvateln>jší&shy;mi</p

Poznámka: limit dclky slova je volitelný

Poznámka: současnc prohlížeče na jádru Gecko (Mozilla, Firefox) jsou k naznačencmu d>lení slepí. Doufám, že vývojáti tento nedostatek brzy odstraní. Nebo zkuste tohle

Tabulky

Ptíklad jednoduchc tabulky, sloupce se odd>lují znakem |

| first col | second col | third col
| Adam      | Eva        | Franta

A výsledek je:

first col second col third col
Adam Eva Franta

Hlavičku tabulky můžeme definovat tímto zápisem:

|-----------------------------
| First Name | Last Name | Age
|----------------------------
| Jesus      | Christ    | 33
| Cecilie    | Svobodova | 74
First Name Last Name Age
Jesus Christ 33
Cecilie Svobodova 74

Pokud hlavičku netvotí tádek (tádky), můžeme ji definovat na úrovni bun>k. Stačí vložit hv>zdičku ihned po znaku |

|* First Name | Jesus    | Cecilie
|* Last Name  | Christ   | Svobodova
|* Age        | 33       | 74
First Name Jesus Cecilie
Last Name Christ Svobodova
Age 33 74

Sloučení sloupců

všimn>te si zdvojencho ||

|-----------------------------
| Name                  || Age
|----------------------------
| Jesus      | Christ    | 33
Name Age
Jesus Christ 33

Sloučení tádků

Všimn>te si znaku ^ symbolizujícího sm>r nahoru:

|-----------------------------
| First Name | Last Name | Age
|----------------------------
| Bill                  || 50
|^                       | 52
| Jim        | Beam      | 70
First Name Last Name Age
Bill 50
52
Jim Beam 70

Modifikátory

Platí tato pravidla:

  • modifikátor ovliv_ující celou tabulku se vkládá bezprosttedn> pted tabulku
  • ovliv_ující tádek se vkládá na konec tádku
  • ovliv_ující sloupec se vkládá na začátek bu_ky (vlevo v bu_ce)
  • a nakonec ovliv_ující bu_ku se vkládá na konec bu_ky (pravo v bu_ce)

Podívejte se na ptíklad.

.(people)
| .{color: green} first col | second col      .>| third col | .{font-style:italic}
| Adam                      | Eva .{color: blue}| Franta    |

Zde je:

  • .(people) modifikátor tabulky
  • .{color: green} modifikátor sloupce
  • .{font-style:italic} modifikátor tádku
  • .{color: blue} a takc .> modifikátor bu_ky

Takže výsledná tabulka vypadá takto:

first col second col third col
Adam Eva Franta