From 9ecd1797da2fe967780331c9238cecbd900e28d6 Mon Sep 17 00:00:00 2001 From: Toshio Sekiya Date: Mon, 11 Jan 2021 23:32:09 +0900 Subject: [PATCH] Bug fixed. Readme_for_developers.md is modified. --- Rakefile | 35 +++++++++++-- Readme.md | 10 +++- Readme_for_developers.md | 103 +++++++++++++++++++++++++++++++-------- lib/lib_sec_file.rb | 31 ++++++++---- lib/lib_src2md.rb | 2 +- src/sec7.src.md | 4 +- src2md.rb | 21 ++++++++ 7 files changed, 166 insertions(+), 40 deletions(-) create mode 100644 src2md.rb diff --git a/Rakefile b/Rakefile index 692b144..031d8d5 100644 --- a/Rakefile +++ b/Rakefile @@ -23,6 +23,26 @@ end CLEAN.append(*mdfilenames) CLEAN << "Readme.md" +# Abstract +abstract=<<'EOS' +This tutorial illustrates how to write C programs with Gtk4 library. +It focuses on beginners so the contents are limited to basic things such as widgets, GObject, signal, menus and build system. +Please refer [Gnome API reference](https://developer.gnome.org/) for further topics. + +This tutorial is under development and unstable. +Even though the examples written in C language have been tested on gtk4 version 4.0, +there might exist bugs. +If you find any bugs, errors or mistakes in the tutorial and C examples, +please let me know. +You can post it to [github issues](https://github.com/ToshioCP/Gtk4-tutorial/issues). +EOS + +abstract_html_array = abstract.gsub(/\[([^\]]*)\]\(([^\)]*)\)/,"\\1").split("\n\n") +abstract_html_array.map! { |s| s.gsub(/[^\n]\z/,"\n").gsub(/\A/,"

\n").gsub(/\z/,"

\n") } +abstract_html = abstract_html_array.join + +abstract_latex = abstract.gsub(/\[([^\]]*)\]\(([^\)]*)\)/, "\\href{\\2}{\\1}") + # Headers or a tail which is necessary for html files. header=<<'EOS' @@ -71,12 +91,13 @@ file_index =<<'EOS'

Gtk4 Tutorial for beginners

-This tutorial is under development and unstable. -You should be careful because there exists bugs, errors or mistakes. +@@@ abstract