SlideShare a Scribd company logo
1 of 6
Easy Blogging With Emacs
Time after time I write technical blogs and articles that describe and summarise
my experiences. Nowadays all the blogging sites and tools offer WYSIWYG editors.
And it makes blogging so easy, right? Not for me! I always find WYSIWYG editing
tedious and frustrating.
Table Of Contents
• Why WYSIWYG sucks
• Org-mode of Emacs
• Installing Emacs
• Using org-mode for writing documents
• Publishing the document
• Converting the document to PDF
Why WYSIWYG Sucks
One reason is that you have to make manually every single change (no styles like
CSS for example), which makes the process tedious, error prone and inconsistent.
If you decide later to change some styles, you have to go all over the document
and modify all occurrences one by one… Oh man, better don't touch it at all!
But the worst thing about WYSIWYG is that actually its last name is WYGIANWYW
(What You Get Is Almost Never What You Want). I have struggled many times with
the editor because it would never understand correctly what I wanted and would
display a totally broken formatting (long live undo that comes quickly to the
rescue).
So, I'd rather write plain text HTML than use WYSIWYG editing, unless the
structure and formatting of the document is very simple. Maybe not everybody
finds WYSIWYG so difficult and annoying, but the technical blogs (articles,
documents, etc.) that I write are a bit long and with complex structure, and
WYSIWYG would never be suitable for me. I have also tried different wiki systems,
which in a sense are better than WYSIWYG, but still they are a bit simple and do
not support all the features that I need.
Org­Mode Of Emacs
After trying different tools and systems, I decided that the orgmode of Emacs is
the best for my needs. Quoting from its webpage:
"Org mode is for keeping notes, maintaining TODO lists, planning
projects, and authoring documents with a fast and effective plain-text
system."
So, among other things, org-mode can be used for authoring documents, that is
writing blogs, articles etc.
It has a wiki-like syntax that is lightweight but also complex (not-simple).
Combined with the editing power of Emacs it becomes a powerful tool for writing
blogs, articles and other docs. Then, it can be converted automatically to other
formats, like HTML, LaTeX, PDF, etc.
I will try to describe how I use it for my needs (writing blogs, articles, etc.)
Installing Emacs
On Ubuntu it can be installed like this: sudo apt-get install emacs On other
Linux systems it should be very easy too. If you are using Windows, then look at
the instructions on this page.
The latest versions of Emacs include org-mode by default, so there is no need to
do anything special for installing it. Just use the extension .org for the file and the
org editing mode will be enabled automatically.
Using Org­Mode For Writing Documents
Emacs is an advanced editing tool and org-mode has lots of features, however not
all of them are needed. For what we want to do (writing technical blogs and docs),
we need some very basic and simple things.
I will list the ones that I use most frequently:
• Paragraphs are marked by empty lines:
Paragraph1
Paragraph1 continued
Paragraph2
Paragraph2 continued
• Headings are marked by stars at the beginning of a line:
* Heading1
** Heading2
*** Heading3
** Heading2
* Heading1
** Heading2
• Ordered and unordered lists:
+ item-1
1. item-1.1
2. item-1.2
3. item-1.3
+ item-2
- item-2.1
- item-2.2
- item-2.3
+ item-3
• item-1
1. item-1.1
2. item-1.2
3. item-1.3
• item-2
1. item-2.1
2. item-2.2
3. item-2.3
• item-3
• Inline markup:
*bold*, /italic/, _underlined_, =code= and ~verbatim~
bold, italic, underlined, code and verbatim
• Hyperlink:
[[http://info.btranslator.org][B-Translator]]
B-Translator
• Preformatted:
#+BEGIN_EXAMPLE
Some example from a text file.
# +END_EXAMPLE
Some example from a text file.
It is so simple, intuitive and familiar, that you don't even need a tutorial and can
start using it right away.
You can find more about the markup that can be used, on the documentation of
org-mode (or try info org on the terminal).
As an example, you can see the org code of this document itself on gist: easy-
blogging-with-emacs.org
Publishing The Document
In order to publish the document, I do these steps:
1. First, convert it to HTML (with the emacs command: C-c C-e h).
2. Then open the generated HTML file in a browser.
3. And then copy/paste the content of the article from the browser to the
editor of the blog site.
I don't know why, but a copy/paste like this usually works very well. I use Blogger
for my blogs, but I think that it should work on other blog sites and WYSIWYG
editors as well.
After the copy/paste, I still have to do some minor manual corrections, but this is
much easier than writing the whole thing on the WYSIWYG editor.
Pay attention to these lines that are at the beginning of the org file:
#+OPTIONS: num:nil toc:t ^:nil f:nil TeX:nil LaTeX:nil
#+STYLE: <link href="css/org.css" rel="stylesheet"
type="text/css"/>
They control the look of the generated HTML file. The first one defines some
settings/options, like: don't number headers, generate a TOC, turn off TeX syntax
for subscripts, etc. More details and other options you can find on the
documentation for export settings.
The second line tells it which CSS file to use, so that the generated HTML looks
nice and beautiful. For a quick start, just download and use my org.css file, and
later you can customise it for yourself. For example, it defines the style of
preformatted text like this:
pre {
padding: 10px;
border: 1pt solid #AEBDCC;
border-radius: 5px;
background-color: #000000;
color: #eeeeee;
font-family: Ubuntu Mono, monospace, courier;
}
Converting The Document To PDF
Org-mode can convert directly to PDF. However there is no way (as far as I know)
to modify how the generated PDF file looks like. It always has the same standard
look of an old scientific paper (I guess that the conversion to PDF is done by
converting first to LaTeX).
I prefer to take another approach for generating PDF docs:
1. First I generate the HTML file (where I can control how it looks by
customising the CSS file).
2. Then I copy/paste from the browser to LibreOffice (yes, this copy/paste
works well too, preserving all the formatting and styles from HTML).
3. Finally save it as PDF. LibreOffice has a built-in PDF converter.
However, before the third step I do again some minor manual modifications. I also
define styles for headings, preformatted text, text body, etc.
One of the things that I change in LibreOffice/PDF document is the style of the
preformatted text. In the HTML version it is white font on a black background, and
this is good because it looks like a terminal. However PDF documents sometimes
can be printed and that style doesn't look nice on paper (and also it would
consume lots of ink), so I change it to black font on white background.
To apply the new style on a preformatted text, I select it, then from the list of
styles (on top-left) select "Clear formatting", then select the style "Preformatted
Text". I have to do this for all the preformatted texts. I do the same thing for
headings as well.
In order to not re-define the styles for each document, I open an old document,
replace its content with the new content, and then save it with a new name. This
will ensure that the styles of the new document are the same as the styles of the
old one. Maybe LibreOffice has some other means for defining the styles and
using them on each document, but I am not so familiar with LibreOffice and this
trick works anyway.
If you want to use my styles, you can download the .odt document from here and
use it as a template for your own docs.
Author: Dashamir Hoxha <dashohoxha@gmail.com>
Date: 12 July 2013
HTML generated by org-mode 6.33x in emacs 23
To apply the new style on a preformatted text, I select it, then from the list of
styles (on top-left) select "Clear formatting", then select the style "Preformatted
Text". I have to do this for all the preformatted texts. I do the same thing for
headings as well.
In order to not re-define the styles for each document, I open an old document,
replace its content with the new content, and then save it with a new name. This
will ensure that the styles of the new document are the same as the styles of the
old one. Maybe LibreOffice has some other means for defining the styles and
using them on each document, but I am not so familiar with LibreOffice and this
trick works anyway.
If you want to use my styles, you can download the .odt document from here and
use it as a template for your own docs.
Author: Dashamir Hoxha <dashohoxha@gmail.com>
Date: 12 July 2013
HTML generated by org-mode 6.33x in emacs 23

More Related Content

What's hot

Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...
Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...
Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...Peter Martin
 
Rapid application development with FOF
Rapid application development with FOFRapid application development with FOF
Rapid application development with FOFNicholas Dionysopoulos
 
Ansible Project Deploy (phpbenelux 2015)
Ansible Project Deploy (phpbenelux 2015)Ansible Project Deploy (phpbenelux 2015)
Ansible Project Deploy (phpbenelux 2015)Ramon de la Fuente
 
Digital Fabrication Studio v.0.2: Information
Digital Fabrication Studio v.0.2: InformationDigital Fabrication Studio v.0.2: Information
Digital Fabrication Studio v.0.2: InformationMassimo Menichinelli
 
JSUG - Spring by Christoph Pickl
JSUG - Spring by Christoph PicklJSUG - Spring by Christoph Pickl
JSUG - Spring by Christoph PicklChristoph Pickl
 
makefiles tutorial
makefiles tutorialmakefiles tutorial
makefiles tutorialvsubhashini
 
Build Automation of PHP Applications
Build Automation of PHP ApplicationsBuild Automation of PHP Applications
Build Automation of PHP ApplicationsPavan Kumar N
 
David Rey Lessons Learned Updating Content Licensing To Be Plone 3 Compat...
David Rey   Lessons Learned   Updating Content Licensing To Be Plone 3 Compat...David Rey   Lessons Learned   Updating Content Licensing To Be Plone 3 Compat...
David Rey Lessons Learned Updating Content Licensing To Be Plone 3 Compat...Vincenzo Barone
 
Django, What is it, Why is it cool?
Django, What is it, Why is it cool?Django, What is it, Why is it cool?
Django, What is it, Why is it cool?Tom Brander
 
Django - Python MVC Framework
Django - Python MVC FrameworkDjango - Python MVC Framework
Django - Python MVC FrameworkBala Kumar
 
Develop advance joomla! MVC Component for version 3
Develop advance joomla! MVC Component for version 3Develop advance joomla! MVC Component for version 3
Develop advance joomla! MVC Component for version 3Gunjan Patel
 
Composer & Drupal
Composer & DrupalComposer & Drupal
Composer & Drupaldrubb
 
Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)Michiel Rook
 
Node JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web AppNode JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web AppEdureka!
 
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016Codemotion
 

What's hot (20)

Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...
Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...
Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...
 
Rapid application development with FOF
Rapid application development with FOFRapid application development with FOF
Rapid application development with FOF
 
Ant User Guide
Ant User GuideAnt User Guide
Ant User Guide
 
Maven 3.0 at Øredev
Maven 3.0 at ØredevMaven 3.0 at Øredev
Maven 3.0 at Øredev
 
Ansible Project Deploy (phpbenelux 2015)
Ansible Project Deploy (phpbenelux 2015)Ansible Project Deploy (phpbenelux 2015)
Ansible Project Deploy (phpbenelux 2015)
 
Installing AtoM with Ansible
Installing AtoM with AnsibleInstalling AtoM with Ansible
Installing AtoM with Ansible
 
Digital Fabrication Studio v.0.2: Information
Digital Fabrication Studio v.0.2: InformationDigital Fabrication Studio v.0.2: Information
Digital Fabrication Studio v.0.2: Information
 
JSUG - Spring by Christoph Pickl
JSUG - Spring by Christoph PicklJSUG - Spring by Christoph Pickl
JSUG - Spring by Christoph Pickl
 
makefiles tutorial
makefiles tutorialmakefiles tutorial
makefiles tutorial
 
Build Automation of PHP Applications
Build Automation of PHP ApplicationsBuild Automation of PHP Applications
Build Automation of PHP Applications
 
Django
DjangoDjango
Django
 
David Rey Lessons Learned Updating Content Licensing To Be Plone 3 Compat...
David Rey   Lessons Learned   Updating Content Licensing To Be Plone 3 Compat...David Rey   Lessons Learned   Updating Content Licensing To Be Plone 3 Compat...
David Rey Lessons Learned Updating Content Licensing To Be Plone 3 Compat...
 
Django, What is it, Why is it cool?
Django, What is it, Why is it cool?Django, What is it, Why is it cool?
Django, What is it, Why is it cool?
 
Django - Python MVC Framework
Django - Python MVC FrameworkDjango - Python MVC Framework
Django - Python MVC Framework
 
Develop advance joomla! MVC Component for version 3
Develop advance joomla! MVC Component for version 3Develop advance joomla! MVC Component for version 3
Develop advance joomla! MVC Component for version 3
 
Composer & Drupal
Composer & DrupalComposer & Drupal
Composer & Drupal
 
Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)
 
Node JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web AppNode JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web App
 
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016
 
Bootstrap4 x pages
Bootstrap4 x pagesBootstrap4 x pages
Bootstrap4 x pages
 

Viewers also liked

Building a Gateway Server
Building a Gateway ServerBuilding a Gateway Server
Building a Gateway ServerDashamir Hoxha
 
An Algorithm for Incremental Multi-Resolution Modeling
An Algorithm for Incremental Multi-Resolution ModelingAn Algorithm for Incremental Multi-Resolution Modeling
An Algorithm for Incremental Multi-Resolution ModelingDashamir Hoxha
 
phpWebApp presentation
phpWebApp presentationphpWebApp presentation
phpWebApp presentationDashamir Hoxha
 
The Digital Signature and the X.509/OpenPGP Authentication Models
The Digital Signature and the X.509/OpenPGP Authentication ModelsThe Digital Signature and the X.509/OpenPGP Authentication Models
The Digital Signature and the X.509/OpenPGP Authentication ModelsDashamir Hoxha
 

Viewers also liked (6)

Udhëzuesi i Kturtle
Udhëzuesi i KturtleUdhëzuesi i Kturtle
Udhëzuesi i Kturtle
 
Building a Gateway Server
Building a Gateway ServerBuilding a Gateway Server
Building a Gateway Server
 
An Algorithm for Incremental Multi-Resolution Modeling
An Algorithm for Incremental Multi-Resolution ModelingAn Algorithm for Incremental Multi-Resolution Modeling
An Algorithm for Incremental Multi-Resolution Modeling
 
phpWebApp presentation
phpWebApp presentationphpWebApp presentation
phpWebApp presentation
 
The Digital Signature and the X.509/OpenPGP Authentication Models
The Digital Signature and the X.509/OpenPGP Authentication ModelsThe Digital Signature and the X.509/OpenPGP Authentication Models
The Digital Signature and the X.509/OpenPGP Authentication Models
 
phpWebApp article
phpWebApp articlephpWebApp article
phpWebApp article
 

Similar to Easy Blogging With Emacs

Easy Blogging With Emacs
Easy Blogging With EmacsEasy Blogging With Emacs
Easy Blogging With EmacsDashamir Hoxha
 
Lesson4.9 a u4l2 html
Lesson4.9 a u4l2 htmlLesson4.9 a u4l2 html
Lesson4.9 a u4l2 htmlLexume1
 
Web Development From the Ground Up, a Series for Novice ...
Web Development From the Ground Up, a Series for Novice ...Web Development From the Ground Up, a Series for Novice ...
Web Development From the Ground Up, a Series for Novice ...webhostingguy
 
(Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS (Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS Dave Kelly
 
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateBlog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateSean Burgess
 
Structuring your CSS for maintainability: rules and guile lines to write CSS
Structuring your CSS for maintainability: rules and guile lines to write CSSStructuring your CSS for maintainability: rules and guile lines to write CSS
Structuring your CSS for maintainability: rules and guile lines to write CSSSanjoy Kr. Paul
 
Html interview-questions-and-answers
Html interview-questions-and-answersHtml interview-questions-and-answers
Html interview-questions-and-answersMohitKumar1985
 
How to customise Joomla
How to customise JoomlaHow to customise Joomla
How to customise JoomlaTim Plummer
 

Similar to Easy Blogging With Emacs (20)

Easy Blogging With Emacs
Easy Blogging With EmacsEasy Blogging With Emacs
Easy Blogging With Emacs
 
Joomla tempates talk
Joomla tempates talkJoomla tempates talk
Joomla tempates talk
 
A109 base code html
A109 base code   htmlA109 base code   html
A109 base code html
 
Markup For Dummies (Russ Ward)
Markup For Dummies (Russ Ward)Markup For Dummies (Russ Ward)
Markup For Dummies (Russ Ward)
 
Html Tutorial
Html Tutorial Html Tutorial
Html Tutorial
 
Lesson4.9 a u4l2 html
Lesson4.9 a u4l2 htmlLesson4.9 a u4l2 html
Lesson4.9 a u4l2 html
 
Html
HtmlHtml
Html
 
Week 2-intro-html
Week 2-intro-htmlWeek 2-intro-html
Week 2-intro-html
 
Creating a basic joomla
Creating a basic joomlaCreating a basic joomla
Creating a basic joomla
 
Web Development From the Ground Up, a Series for Novice ...
Web Development From the Ground Up, a Series for Novice ...Web Development From the Ground Up, a Series for Novice ...
Web Development From the Ground Up, a Series for Novice ...
 
INTRODUCTIONS OF HTML
INTRODUCTIONS OF HTMLINTRODUCTIONS OF HTML
INTRODUCTIONS OF HTML
 
Joomla Templates101
Joomla Templates101Joomla Templates101
Joomla Templates101
 
(Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS (Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS
 
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateBlog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
 
Structuring your CSS for maintainability: rules and guile lines to write CSS
Structuring your CSS for maintainability: rules and guile lines to write CSSStructuring your CSS for maintainability: rules and guile lines to write CSS
Structuring your CSS for maintainability: rules and guile lines to write CSS
 
Class1slides
Class1slidesClass1slides
Class1slides
 
Oreilly
OreillyOreilly
Oreilly
 
Html interview-questions-and-answers
Html interview-questions-and-answersHtml interview-questions-and-answers
Html interview-questions-and-answers
 
How to customise Joomla
How to customise JoomlaHow to customise Joomla
How to customise Joomla
 
HTML & CSS.ppt
HTML & CSS.pptHTML & CSS.ppt
HTML & CSS.ppt
 

More from Dashamir Hoxha

Easy Blogging With Emacs -- Cheatsheet
Easy Blogging With Emacs -- CheatsheetEasy Blogging With Emacs -- Cheatsheet
Easy Blogging With Emacs -- CheatsheetDashamir Hoxha
 
Autobiography of Benjamin Franklin
Autobiography of Benjamin FranklinAutobiography of Benjamin Franklin
Autobiography of Benjamin FranklinDashamir Hoxha
 
IT Strategy of Albanian Customs
IT Strategy of Albanian CustomsIT Strategy of Albanian Customs
IT Strategy of Albanian CustomsDashamir Hoxha
 
Strategjia për IT-në e Doganës Shqiptare
Strategjia për IT-në e Doganës ShqiptareStrategjia për IT-në e Doganës Shqiptare
Strategjia për IT-në e Doganës ShqiptareDashamir Hoxha
 
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS169.1x Software as Service
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS169.1x Software as ServiceCertificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS169.1x Software as Service
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS169.1x Software as ServiceDashamir Hoxha
 
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS188.1x Artificial Intelli...
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS188.1x Artificial Intelli...Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS188.1x Artificial Intelli...
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS188.1x Artificial Intelli...Dashamir Hoxha
 
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS169.2x Advanced Software ...
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS169.2x Advanced Software ...Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS169.2x Advanced Software ...
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS169.2x Advanced Software ...Dashamir Hoxha
 
Certificate -- Dashamir Hoxha -- edX/MITx -- 6.00x Introduction to Computer S...
Certificate -- Dashamir Hoxha -- edX/MITx -- 6.00x Introduction to Computer S...Certificate -- Dashamir Hoxha -- edX/MITx -- 6.00x Introduction to Computer S...
Certificate -- Dashamir Hoxha -- edX/MITx -- 6.00x Introduction to Computer S...Dashamir Hoxha
 
PPPoE With Mikrotik and Radius
PPPoE With Mikrotik and RadiusPPPoE With Mikrotik and Radius
PPPoE With Mikrotik and RadiusDashamir Hoxha
 
PPPoE With Mikrotik and Radius
PPPoE With Mikrotik and RadiusPPPoE With Mikrotik and Radius
PPPoE With Mikrotik and RadiusDashamir Hoxha
 
Using OpenFire With OpenLDAP
Using OpenFire With OpenLDAPUsing OpenFire With OpenLDAP
Using OpenFire With OpenLDAPDashamir Hoxha
 
Managing HotSpot Clients With FreeRadius
Managing HotSpot Clients With FreeRadiusManaging HotSpot Clients With FreeRadius
Managing HotSpot Clients With FreeRadiusDashamir Hoxha
 
SugarCE For Small And Medium Enterprises
SugarCE For Small And Medium EnterprisesSugarCE For Small And Medium Enterprises
SugarCE For Small And Medium EnterprisesDashamir Hoxha
 
B-Translator as a Software Engineering Project
B-Translator as a Software Engineering ProjectB-Translator as a Software Engineering Project
B-Translator as a Software Engineering ProjectDashamir Hoxha
 

More from Dashamir Hoxha (14)

Easy Blogging With Emacs -- Cheatsheet
Easy Blogging With Emacs -- CheatsheetEasy Blogging With Emacs -- Cheatsheet
Easy Blogging With Emacs -- Cheatsheet
 
Autobiography of Benjamin Franklin
Autobiography of Benjamin FranklinAutobiography of Benjamin Franklin
Autobiography of Benjamin Franklin
 
IT Strategy of Albanian Customs
IT Strategy of Albanian CustomsIT Strategy of Albanian Customs
IT Strategy of Albanian Customs
 
Strategjia për IT-në e Doganës Shqiptare
Strategjia për IT-në e Doganës ShqiptareStrategjia për IT-në e Doganës Shqiptare
Strategjia për IT-në e Doganës Shqiptare
 
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS169.1x Software as Service
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS169.1x Software as ServiceCertificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS169.1x Software as Service
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS169.1x Software as Service
 
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS188.1x Artificial Intelli...
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS188.1x Artificial Intelli...Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS188.1x Artificial Intelli...
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS188.1x Artificial Intelli...
 
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS169.2x Advanced Software ...
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS169.2x Advanced Software ...Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS169.2x Advanced Software ...
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS169.2x Advanced Software ...
 
Certificate -- Dashamir Hoxha -- edX/MITx -- 6.00x Introduction to Computer S...
Certificate -- Dashamir Hoxha -- edX/MITx -- 6.00x Introduction to Computer S...Certificate -- Dashamir Hoxha -- edX/MITx -- 6.00x Introduction to Computer S...
Certificate -- Dashamir Hoxha -- edX/MITx -- 6.00x Introduction to Computer S...
 
PPPoE With Mikrotik and Radius
PPPoE With Mikrotik and RadiusPPPoE With Mikrotik and Radius
PPPoE With Mikrotik and Radius
 
PPPoE With Mikrotik and Radius
PPPoE With Mikrotik and RadiusPPPoE With Mikrotik and Radius
PPPoE With Mikrotik and Radius
 
Using OpenFire With OpenLDAP
Using OpenFire With OpenLDAPUsing OpenFire With OpenLDAP
Using OpenFire With OpenLDAP
 
Managing HotSpot Clients With FreeRadius
Managing HotSpot Clients With FreeRadiusManaging HotSpot Clients With FreeRadius
Managing HotSpot Clients With FreeRadius
 
SugarCE For Small And Medium Enterprises
SugarCE For Small And Medium EnterprisesSugarCE For Small And Medium Enterprises
SugarCE For Small And Medium Enterprises
 
B-Translator as a Software Engineering Project
B-Translator as a Software Engineering ProjectB-Translator as a Software Engineering Project
B-Translator as a Software Engineering Project
 

Recently uploaded

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 

Easy Blogging With Emacs

  • 1. Easy Blogging With Emacs Time after time I write technical blogs and articles that describe and summarise my experiences. Nowadays all the blogging sites and tools offer WYSIWYG editors. And it makes blogging so easy, right? Not for me! I always find WYSIWYG editing tedious and frustrating. Table Of Contents • Why WYSIWYG sucks • Org-mode of Emacs • Installing Emacs • Using org-mode for writing documents • Publishing the document • Converting the document to PDF Why WYSIWYG Sucks One reason is that you have to make manually every single change (no styles like CSS for example), which makes the process tedious, error prone and inconsistent. If you decide later to change some styles, you have to go all over the document and modify all occurrences one by one… Oh man, better don't touch it at all! But the worst thing about WYSIWYG is that actually its last name is WYGIANWYW (What You Get Is Almost Never What You Want). I have struggled many times with the editor because it would never understand correctly what I wanted and would display a totally broken formatting (long live undo that comes quickly to the rescue). So, I'd rather write plain text HTML than use WYSIWYG editing, unless the structure and formatting of the document is very simple. Maybe not everybody finds WYSIWYG so difficult and annoying, but the technical blogs (articles, documents, etc.) that I write are a bit long and with complex structure, and WYSIWYG would never be suitable for me. I have also tried different wiki systems, which in a sense are better than WYSIWYG, but still they are a bit simple and do not support all the features that I need. Org­Mode Of Emacs After trying different tools and systems, I decided that the orgmode of Emacs is the best for my needs. Quoting from its webpage: "Org mode is for keeping notes, maintaining TODO lists, planning projects, and authoring documents with a fast and effective plain-text system." So, among other things, org-mode can be used for authoring documents, that is writing blogs, articles etc.
  • 2. It has a wiki-like syntax that is lightweight but also complex (not-simple). Combined with the editing power of Emacs it becomes a powerful tool for writing blogs, articles and other docs. Then, it can be converted automatically to other formats, like HTML, LaTeX, PDF, etc. I will try to describe how I use it for my needs (writing blogs, articles, etc.) Installing Emacs On Ubuntu it can be installed like this: sudo apt-get install emacs On other Linux systems it should be very easy too. If you are using Windows, then look at the instructions on this page. The latest versions of Emacs include org-mode by default, so there is no need to do anything special for installing it. Just use the extension .org for the file and the org editing mode will be enabled automatically. Using Org­Mode For Writing Documents Emacs is an advanced editing tool and org-mode has lots of features, however not all of them are needed. For what we want to do (writing technical blogs and docs), we need some very basic and simple things. I will list the ones that I use most frequently: • Paragraphs are marked by empty lines: Paragraph1 Paragraph1 continued Paragraph2 Paragraph2 continued • Headings are marked by stars at the beginning of a line: * Heading1 ** Heading2 *** Heading3 ** Heading2 * Heading1 ** Heading2 • Ordered and unordered lists: + item-1 1. item-1.1 2. item-1.2 3. item-1.3 + item-2 - item-2.1
  • 3. - item-2.2 - item-2.3 + item-3 • item-1 1. item-1.1 2. item-1.2 3. item-1.3 • item-2 1. item-2.1 2. item-2.2 3. item-2.3 • item-3 • Inline markup: *bold*, /italic/, _underlined_, =code= and ~verbatim~ bold, italic, underlined, code and verbatim • Hyperlink: [[http://info.btranslator.org][B-Translator]] B-Translator • Preformatted: #+BEGIN_EXAMPLE Some example from a text file. # +END_EXAMPLE Some example from a text file. It is so simple, intuitive and familiar, that you don't even need a tutorial and can start using it right away. You can find more about the markup that can be used, on the documentation of org-mode (or try info org on the terminal). As an example, you can see the org code of this document itself on gist: easy- blogging-with-emacs.org Publishing The Document In order to publish the document, I do these steps: 1. First, convert it to HTML (with the emacs command: C-c C-e h). 2. Then open the generated HTML file in a browser. 3. And then copy/paste the content of the article from the browser to the editor of the blog site. I don't know why, but a copy/paste like this usually works very well. I use Blogger for my blogs, but I think that it should work on other blog sites and WYSIWYG
  • 4. editors as well. After the copy/paste, I still have to do some minor manual corrections, but this is much easier than writing the whole thing on the WYSIWYG editor. Pay attention to these lines that are at the beginning of the org file: #+OPTIONS: num:nil toc:t ^:nil f:nil TeX:nil LaTeX:nil #+STYLE: <link href="css/org.css" rel="stylesheet" type="text/css"/> They control the look of the generated HTML file. The first one defines some settings/options, like: don't number headers, generate a TOC, turn off TeX syntax for subscripts, etc. More details and other options you can find on the documentation for export settings. The second line tells it which CSS file to use, so that the generated HTML looks nice and beautiful. For a quick start, just download and use my org.css file, and later you can customise it for yourself. For example, it defines the style of preformatted text like this: pre { padding: 10px; border: 1pt solid #AEBDCC; border-radius: 5px; background-color: #000000; color: #eeeeee; font-family: Ubuntu Mono, monospace, courier; } Converting The Document To PDF Org-mode can convert directly to PDF. However there is no way (as far as I know) to modify how the generated PDF file looks like. It always has the same standard look of an old scientific paper (I guess that the conversion to PDF is done by converting first to LaTeX). I prefer to take another approach for generating PDF docs: 1. First I generate the HTML file (where I can control how it looks by customising the CSS file). 2. Then I copy/paste from the browser to LibreOffice (yes, this copy/paste works well too, preserving all the formatting and styles from HTML). 3. Finally save it as PDF. LibreOffice has a built-in PDF converter. However, before the third step I do again some minor manual modifications. I also define styles for headings, preformatted text, text body, etc. One of the things that I change in LibreOffice/PDF document is the style of the preformatted text. In the HTML version it is white font on a black background, and this is good because it looks like a terminal. However PDF documents sometimes can be printed and that style doesn't look nice on paper (and also it would consume lots of ink), so I change it to black font on white background.
  • 5. To apply the new style on a preformatted text, I select it, then from the list of styles (on top-left) select "Clear formatting", then select the style "Preformatted Text". I have to do this for all the preformatted texts. I do the same thing for headings as well. In order to not re-define the styles for each document, I open an old document, replace its content with the new content, and then save it with a new name. This will ensure that the styles of the new document are the same as the styles of the old one. Maybe LibreOffice has some other means for defining the styles and using them on each document, but I am not so familiar with LibreOffice and this trick works anyway. If you want to use my styles, you can download the .odt document from here and use it as a template for your own docs. Author: Dashamir Hoxha <dashohoxha@gmail.com> Date: 12 July 2013 HTML generated by org-mode 6.33x in emacs 23
  • 6. To apply the new style on a preformatted text, I select it, then from the list of styles (on top-left) select "Clear formatting", then select the style "Preformatted Text". I have to do this for all the preformatted texts. I do the same thing for headings as well. In order to not re-define the styles for each document, I open an old document, replace its content with the new content, and then save it with a new name. This will ensure that the styles of the new document are the same as the styles of the old one. Maybe LibreOffice has some other means for defining the styles and using them on each document, but I am not so familiar with LibreOffice and this trick works anyway. If you want to use my styles, you can download the .odt document from here and use it as a template for your own docs. Author: Dashamir Hoxha <dashohoxha@gmail.com> Date: 12 July 2013 HTML generated by org-mode 6.33x in emacs 23