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: On markdown images Date: Sat, 1 May 2021 12:41:43 +0300 Message-ID: References: <874kfn292f.fsf@disroot.org> <87a6pfh1dj.fsf@zoho.eu> <875z03ffhm.fsf@zoho.eu> <87y2czc68z.fsf@zoho.eu> 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="11876"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.0.6 (2021-03-06) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 01 11:44:28 2021 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 1lcmAm-0002yu-RG for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 01 May 2021 11:44:28 +0200 Original-Received: from localhost ([::1]:53878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcmAl-0005Sn-Ux for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 01 May 2021 05:44:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49862) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcmAA-0005Qm-0t for help-gnu-emacs@gnu.org; Sat, 01 May 2021 05:43:50 -0400 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:54907) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcmA7-0004yB-5T for help-gnu-emacs@gnu.org; Sat, 01 May 2021 05:43:49 -0400 Original-Received: from localhost ([::ffff:154.231.162.22]) (AUTH: PLAIN securesender, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000046239.00000000608D22D0.000037EE; Sat, 01 May 2021 02:43:43 -0700 Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <87y2czc68z.fsf@zoho.eu> 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.23 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" Xref: news.gmane.io gmane.emacs.help:129266 Archived-At: * Emanuel Berg via Users list for the GNU Emacs text editor [2021-05-01 09:35]> > Maybe it is not, but I use Org export functions to get nice > > PDF documents that people practically use in the field. > > Are you even allowed to do that? Haha. > $ xelatex --version > XeTeX 3.14159265-2.6-0.999992 (TeX Live 2020/Debian) > > By LaTeX I mean "[the] language [that] is described in the book > LaTeX - A Document Preparation System." (latex(1)) I know that book. > > I have no idea why would README be in Markdown, but never > > mind. Unless one wants to expand it into HTML, readme looks > > better without Markdown. > > There are several reasons to do that but yes one is the > possibility to produce the material in various other formats. The original reason is none other but that Github wanted to display README files in better way but plain text. README was always traditionally plain text. Now people think it should be markdown. It is kind of deceptive. But purpose is to serve Github vendor. Like you say, it is readable, but it is also confusing to people who do now know the markup. > I think Markdown looks better than plain text in markdown-mode > (unbelievably not in vanilla Emacs, but I've already written > about that so no more about that), I think the syntax isn't > really disturbing anyone, it is also clear; apart from that > font lock makes it colorful as well. It is slow, markdown-mode is slow, I don't like it, but I have to deal with it. For simple documents is fine, for anything more complex it becomes slow. > > First began using it back in the same year when it was > > published, today almost everybody uses it. I had static > > website generation before any free software came up with it. > > Today there are many. At that time, before maybe 16 years, > > would I mention static website generation I would almost > > get stoned. > > What is that, it generates static webpages? From some other > data format, when that data is complete? IMO HTML is so > simple one can just as well do it manually so don't have to > bother with anything moving or still. 1. There is number of websites; for me or for people who I serve; maybe 64 or less, but that is what database says; 2. Each website may have different URLs, different server, different username/password, method of copy, different company name, maintainer and most importantly different HTML template; 3. Writing HTML by hand is taking more time then writin Markdown markup. Or Asciidoc, or Org, restructured text or similar. It saves time. 4. HTML templates have its menu, right? It has its heading, title, description, some footer stuff, those things are tiresome to be written by hand. They are best expanded from the known variables which I keep in the database. Website can have 1000+ pages, imagine writing each footer by hand, each menu by hand, each header and title by hand. Tiresome. > > Markdown and few other markups for HTML have one huge flaw > > that nobody talks about, it misses the size for pictures > > which in the end turns HTML invalid. That is why I never use > > any other Markdown but Discount markdown for images. It is > > anyway fastest. > > What do you mean "misses the size for pictures"? > > You are right people don't seem to talk about this problem. I think this is minimal valid SRC IMG tag in HTML: So far none markdown that I know but Discount markdown does not provide height, width attributes. This makes HTML invalid and in general can disturb the HTML display and accessibility. Such pages will not pass the test here: https://validator.w3.org/ See: http://www.pell.portland.or.us/~orc/Code/discount/ Specifying image sizes An image size is defined by adding an additional =widthxheight field to the image tag: ![dust mite](http://dust.mite =150x150) produces dust mite But the syntax: ![dust mite](http://dust.mite =150x150) is only common to this version of Markdown. Anyway, this is fastest Markdown and self contained, unlike others which are slow or huge in size like pandoc. Normal markdown expression would be: ![dust mite](http://dust.mite) But that produced invalid HTML: (rcd-markdown "![dust mite](http://dust.mite)") ⇒ "

\"dust

" While this produces valid HTML: (rcd-markdown "![dust mite](http://dust.mite =150x150)") ⇒ "

\"dust

" As a side note, I have a workflow when I wish to include many images at once, I can just mark them in Dired, and invoke a function that constructs the markup, insert into buffer and finished. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns Sign an open letter in support of Richard M. Stallman https://stallmansupport.org/ https://rms-support-letter.github.io/