all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Gottfried <gottfried@posteo.de>
To: Jean Louis <bugs@gnu.support>,
	"help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: text formating
Date: Tue,  7 Feb 2023 17:25:24 +0000	[thread overview]
Message-ID: <2f46bb4e-f7ae-63ab-8374-a70419bea8f0@posteo.de> (raw)
In-Reply-To: <Y9jEiPXJmnf1KkQ3@protected.localdomain>


[-- Attachment #1.1.1: Type: text/plain, Size: 4919 bytes --]

Hi Jean,

a side question:
................................................................
I installed markdown and Asccidoc in my distro GNU Guix, in order to try 
it out.

...................................................................
but markdown can be used only in installing "ReText" or "ghostwriter"


How do you use them in Emacs?

The same with Asccidoc.

...................................................................
How can I bind that function to some key like C-c a ?

> (defun rcd-markdown-preview ()
>>    "Preview Markdown."
>>    (interactive)
>>    (let* ((output (rcd-markdown (buffer-string)))
>> 	 (file (concat (buffer-file-name) "-MD.html")))
>>      (with-temp-file file (insert output))
>>      (browse-url file)))

> Then you bind that function to some keyy, like C-c a  


thanks for help

Gottfried




Am 31.01.23 um 08:34 schrieb Jean Louis:
> * Gottfried <gottfried@posteo.de> [2023-01-29 15:08]:
>> I would like to have a text editing of the headings e.g.: to
>> increase the font, may be to make them bold.
> 
> You probably wish to have printed representation with increased font,
> or bold text, and other markup.
> 
> Emacs is text editor, and unlike desktop publishing sofware, it may
> visually represent bold fonts, enlarged fonts, but it is not WYSIWYG
> or What You See Is What You Get.
> 
> You would need to use some processor, to process your markup.
> 
> Normally you would use this workflow:
> -------------------------------------
> 
> 1. Edit text
> 
> 2. Invoke some processor to convert to some other format and file
> 
> 3. Preview the new file
> 
>> What options do I have as an emacs newbie?
> 
> You have got Markdown, Asciidoc, Kotl, Org mode, Jemdoc,
> reStructuredText, txt2tags, Djot, Wikitext, LaTeX and other options.
> 
>> I would like to use this file regularly, so in creating a LaTex file
>> I would always have the LaTex formating visible, which is not so
>> nice.
> 
> I understand that. You need something simpler.
> 
> - Markdown can be used to convert to HTML but by using `pandoc' also
>    to many other formats, such as PDF
> 
> - Asciidoc is more expressive than Markdown, can give PDF and HTML
> 
> - Org is Emacs built-in, very easy to learn and expressive
> 
>> I don't need to print it for the moment, then through LaTex and
>> converting it to HTML etc would surely make a nice printout.
> 
> Using Markdown or Org is very simple. There exists already
> `markdown-mode'
> 
> I use following function to process text with Markdown.
> 
> (defun rcd-markdown (text &rest args)
>    "Markdown processing"
>    (let ((markdown (executable-find "markdown")))
>      (cond (markdown
> 	   (cond (text
> 		  (apply 'rcd-command-output-from-input markdown (append (list text) args)))
> 		 (t ""))
> 	   (t (user-error "Command `markdown' not available"))))))
> 	
> And I use
> 
> Discount – a C implementation of the Markdown markup language:
> http://www.pell.portland.or.us/~orc/Code/discount/
> 
> for reasons that it is more expressive, it provides table of contents
> and valid HTML, and is fastest.
> 
> Then you could the following preview function:
> 
> (defun rcd-markdown-preview ()
>    "Preview Markdown."
>    (interactive)
>    (let* ((output (rcd-markdown (buffer-string)))
> 	 (file (concat (buffer-file-name) "-MD.html")))
>      (with-temp-file file (insert output))
>      (browse-url file)))
> 	
> Then you bind that function to some keyy, like C-c a
> 
> Then while writing, you only press `C-c a' and browser opens showing
> you the HTML.
> 
> You could learn here:
> https://www.markdownguide.org/
> 
> Then you got Emacs Org mode, you can learn it by using Org manual, it
> is similar to Markdown with many features.
> 
>> Could I use my "fundamental enriched text" in org-mode? , would I
>> have the possibility to increase the fonts of some words and
>> headings e.g.?
> 
> Enriched text is not for that purpose. it is only text, enriched, and
> I guess it was meant for e-mails. But yes, I suppose that it is
> possible to extend enriched text to make universal output of it, like
> from enriched text to PDF, that should be possible, but such program
> does not exist that I know.
> 
>> The text formating in Emacs is not so easy as I thought.
> 
> Beautiful and highly expressive documents have been made by Emacs,
> once you start creating it, it will become easier, as with
> understanding and training comes the result.
> 
> To make font larger in Org mode you just use:
> 
> \large{My text here}
> 
> 
> Then you have Asciidoctor:
> 
> Asciidoctor | A fast, open source text processor and publishing toolchain for converting AsciiDoc content to HTML5, DocBook, PDF, and other formats.:
> https://asciidoctor.org/
> 

-- 
Kind regards

Gottfried



[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3191 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  parent reply	other threads:[~2023-02-07 17:25 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-29 12:06 text formating Gottfried
2023-01-30 20:28 ` H. Dieter Wilhelm
2023-01-31  7:34 ` Jean Louis
2023-01-31 11:23   ` Ulrich Deiters
2023-01-31 12:43     ` Jean Louis
2023-02-02 13:52   ` Gottfried
2023-02-02 14:30     ` Eli Zaretskii
2023-02-02 15:40       ` [External] : " Drew Adams
2023-02-02 20:12       ` Jean Louis
2023-02-03  7:30         ` Eli Zaretskii
2023-02-03  9:08           ` Jean Louis
2023-02-03 17:24             ` Emanuel Berg
2023-02-04 15:24               ` Jean Louis
2023-02-04 21:44                 ` Emanuel Berg
2023-02-07 17:25   ` Gottfried [this message]
2023-02-07 22:28     ` Jean Louis
2023-02-08 16:49       ` Gottfried
2023-02-08 19:37         ` Jean Louis
2023-02-08 20:18           ` [External] : " Drew Adams
2023-02-09 14:59           ` Gottfried
2023-02-09 15:27             ` [External] : " Drew Adams
2023-02-09 16:59               ` Gottfried
2023-02-09 17:13                 ` Drew Adams
2023-02-09 18:10                   ` Gottfried
2023-02-09 18:26                     ` Jean Louis
2023-02-09 19:12                       ` Drew Adams
2023-02-10  4:18                         ` Jean Louis
2023-02-09 19:11                     ` Drew Adams
2023-02-11 15:25                       ` Gottfried
2023-02-11 16:10                         ` tomas
2023-02-11 19:17                           ` Jean Louis
2023-02-11 16:56                         ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2f46bb4e-f7ae-63ab-8374-a70419bea8f0@posteo.de \
    --to=gottfried@posteo.de \
    --cc=bugs@gnu.support \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.