From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Re: text formating Date: Tue, 31 Jan 2023 10:34:32 +0300 Message-ID: References: <3b5f0e6f-fba9-400c-da28-a63de55649a8@posteo.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7850"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.2.9+54 (af2080d) (2022-11-21) Cc: "help-gnu-emacs@gnu.org" To: Gottfried Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 31 08:40:18 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pMlFa-0001nB-0J for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 31 Jan 2023 08:40:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMlEj-0000g7-Bo; Tue, 31 Jan 2023 02:39:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMlEh-0000Yz-Rc for help-gnu-emacs@gnu.org; Tue, 31 Jan 2023 02:39:23 -0500 Original-Received: from stw1.rcdrun.com ([217.170.207.13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMlEe-0006F4-Pv for help-gnu-emacs@gnu.org; Tue, 31 Jan 2023 02:39:23 -0500 Original-Received: from localhost ([::ffff:154.228.136.227]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000010394F.0000000063D8C5A8.00001D09; Tue, 31 Jan 2023 00:39:19 -0700 Mail-Followup-To: Gottfried , "help-gnu-emacs@gnu.org" Content-Disposition: inline In-Reply-To: <3b5f0e6f-fba9-400c-da28-a63de55649a8@posteo.de> Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142565 Archived-At: * Gottfried [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/ -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/