From: Jean Louis <bugs@gnu.support>
To: help-gnu-emacs@gnu.org
Subject: On markdown images
Date: Sat, 1 May 2021 12:41:43 +0300 [thread overview]
Message-ID: <YI0iVwFbkJFLcl27@protected.localdomain> (raw)
In-Reply-To: <87y2czc68z.fsf@zoho.eu>
* Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [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:
<src imag="file.jpg" height="120" width="100" alt="My file"/>
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)") ⇒ "<p><img src=\"http://dust.mite\" alt=\"dust mite\" /></p>
"
While this produces valid HTML:
(rcd-markdown "![dust mite](http://dust.mite =150x150)") ⇒ "<p><img src=\"http://dust.mite\" height=\"150\" width=\"150\" alt=\"dust mite\" /></p>
"
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/
next prev parent reply other threads:[~2021-05-01 9:41 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-22 14:43 How to tame compiler? Jean Louis
2021-04-22 14:46 ` Stefan Monnier
2021-04-22 15:47 ` Jean Louis
2021-04-22 16:06 ` Jean Louis
2021-04-30 13:31 ` Jorge P. de Morais Neto
2021-04-30 19:38 ` rcd-template-eval - was " Jean Louis
2021-04-30 19:48 ` rcd-template-eval, much is in Org mode Jean Louis
2021-04-30 20:06 ` Tassilo Horn
2021-04-30 22:08 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-04-30 23:04 ` Org mode rant Jean Louis
2021-05-01 0:46 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-01 6:10 ` Jean Louis
2021-05-01 6:34 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-01 9:41 ` Jean Louis [this message]
2021-05-01 9:59 ` On markdown images Yuri Khan
2021-05-01 10:18 ` Jean Louis
2021-05-01 11:09 ` Yuri Khan
2021-05-01 11:25 ` Jean Louis
2021-05-02 19:30 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-03 5:43 ` Yuri Khan
2021-05-03 17:08 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-03 23:22 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-04 2:39 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-01 5:00 ` Org mode rant Bastien
2021-05-01 5:10 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-01 9:16 ` Jean Louis
2021-05-01 10:06 ` Bastien
2021-05-01 10:42 ` Jean Louis
2021-05-01 10:10 ` Bastien
2021-05-01 11:19 ` Jean Louis
2021-05-01 13:48 ` [External] : " Drew Adams
2021-05-01 14:05 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-01 10:10 ` Bastien
2021-04-30 20:23 ` eval myths - Re: How to tame compiler? Jean Louis
2021-04-30 22:11 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-04-30 23:07 ` Jean Louis
2021-05-01 0:28 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-01 8:13 ` tomas
2021-04-30 22:06 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-04-30 22:20 ` Stefan Monnier
2021-04-30 22:31 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-04-30 22:50 ` Stefan Monnier
2021-04-30 22:56 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-01 0:44 ` Michael Heerdegen
2021-05-01 3:49 ` Stefan Monnier
2021-05-01 4:55 ` Michael Heerdegen
2021-05-01 6:34 ` Jean Louis
2021-05-01 13:38 ` Stefan Monnier
2021-05-01 16:19 ` Jean Louis
2021-05-02 5:41 ` Michael Heerdegen
2021-05-02 7:37 ` Jean Louis
2021-05-02 7:45 ` Jean Louis
2021-05-02 9:06 ` tomas
2021-05-02 11:18 ` Jean Louis
2021-05-02 12:24 ` tomas
2021-05-02 18:17 ` Jean Louis
2021-05-02 12:06 ` Stages of WWW development compared to Emacs Lisp development Jean Louis
2021-05-02 16:51 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-02 18:37 ` Jean Louis
2021-05-02 16:45 ` How to tame compiler? Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-02 22:29 ` Stefan Monnier
2021-05-02 23:14 ` Jean Louis
2021-05-03 1:58 ` Eduardo Ochs
2021-05-03 6:51 ` Eval in templates - " Jean Louis
2021-05-01 4:53 ` Michael Heerdegen
2021-05-01 7:05 ` Jean Louis
2021-05-01 7:59 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-01 6:03 ` Jean Louis
2021-05-01 6:17 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-02 5:58 ` Michael Heerdegen
2021-05-02 6:54 ` Jean Louis
2021-05-03 21:39 ` Jean Louis
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YI0iVwFbkJFLcl27@protected.localdomain \
--to=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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).