Giter VIP home page Giter VIP logo

tagged_text's Introduction

tagged_text

Agnostic Markdown Tagged{Text} and static site generator. I wrote this in 2016 for my personal website. [http://www.etcutmp.com]

Introduction

The Tagged{Text} markdown format is described here. The python code to process such files is in taggedtext.py. The static site generator uses tagged{text} for the web content (see 'input' directory). The generated html files are produced in the 'output' directory'.

P{
This is a I{simple} example of B{Tagged{Text}}. Here is a program:

  Code<<_EOF_
  main()
  {
	  printf("Hello, World!\n");
  }
  _EOF_

}

P{Click LINK{here URL{http://wwww.url.com?abc90} to visit site.}
P{Escape chars: '\{' and '\}' and '\\'}

This example demonstrates every feature of Tagged{Text}. A Tagged{Text} document is broken down into the following constructs:

Tags:

These are introduced via the use of curly braces, preceeded by a tag name.

Heredocs:

There is one Heredoc in this example, with its own tag name Code. Heredocs allow blocks of text to be introduced which will not be interpreted.

Words:

Words are any whitespace seperated text that is not a Tag or a Heredoc.

Escape Characters:

The escape character is the backslash . It may only preceed the characters {, }, < and .

White-space:

White-space is used to delimit words and the beginning of tags and heredocs. Whitespace conists of space, tab and newline characters. Except for delimiting constructs whitespace is stripped from the Tagged{Text} tree. Only in heredocs is whitespace preserved.

Tagged{ Text} is a file format for tagging and organizing text with tags. These tags can be whatever the author wishes them to be. For example the I{...} tag used in the example above could mean "italics".

This diagram shows how the tagged{text} example above was parsed into a tree:

"TaggedText Tree"

LaTeX vs Tagged{Text}

Here is a LaTeX document with comments:

% This is a simple sample document. Note that everything that
% comes after a % symbol is treated as comment and ignored when the
% code is compiled.

\documentclass{article}

\usepackage{amsmath}

\title{Simple Sample}
\author{My Name}
\date{\today}

% The preamble ends with the command \begin{document}
\begin{document}
\maketitle
    
\section{Hello World!}
    
\textbf{Hello World!} Today I am learning \LaTeX.
\LaTeX{} is a great program for writing math. I can write in
line math such as $a^2+b^2=c^2$ %$ tells LaTexX to compile as math.
I can also give equations their own space: 

\begin{equation}
        \gamma^2+\theta^2=\omega^2
\end{equation}

If I do not leave any blank lines \LaTeX{} will continue  this
text without making it into a new paragraph.  Notice how there
was no indentation in the text after equation (1).  
Also notice how even though I hit enter after that sentence and
here $\downarrow$
\LaTeX{} formats the sentence without any break.  Also   look
how      it   doesn't     matter          how    many  spaces     I
put     between       my    words.
For a new paragraph I can leave a blank space in my code. 

\end{document}

I always liked the appearance of TeX and LaTeX while editing them, so Tagged{Text} was made to look similar:

%{ This is a simple sample document. Note that everything that
comes after a % symbol is treated as comment and ignored when the
code is compiled. }

documentclass{article}

usepackage{amsmath}

title{Simple Sample}
author{My Name}
date{today{}}

%{ The preamble ends with the command begin{document} }
begin{document}
maketitle{}
    
section{Hello World!}
    
textbf{Hello World!} Today I am learning LaTeX{}.
LaTeX{} is a great program for writing math. I can write in
line math such as $${a^2+b^2=c^2} %{ $ tells LaTeX to compile as math.}
I can also give equations their own space: 

equation<<END
    gamma^2+theta^2=omega^2
END

If I do not leave any blank lines LaTeX{} will continue  this
text without making it into a new paragraph.  Notice how there
was no indentation in the text after equation (1).  
Also notice how even though I hit enter after that sentence and
here $${downarrow}
LaTeX{} formats the sentence without any break.  Also   look
how      it   doesn't     matter          how    many  spaces     I
put     between       my    words.
For a new paragraph I can leave a blank space in my code. 

end{document}

tagged_text's People

Contributors

kjs452 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.