all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Juan Manuel Macías" <maciaschain@posteo.net>
To: orgmode <emacs-orgmode@gnu.org>
Subject: Re: About 'inline special blocks'
Date: Mon, 20 Jun 2022 19:06:26 +0000	[thread overview]
Message-ID: <87bkunb1e5.fsf@posteo.net> (raw)
In-Reply-To: <t8q8t8$2vd$1@ciao.gmane.io> (Max Nikulin's message of "Mon, 20 Jun 2022 23:57:12 +0700")

Max Nikulin writes:

Hi Maxim,

Max Nikulin writes:

> I would like to stress that styles can not be a rescue in some
> important cases. Let's leave aside ad hoc final tuning of formatting.
> In the case of HTML export there are still <img alt="Description"> and
> <a href="..." title="Description"> attributes that are namely
> per-object, not part of style.

You are right, but my question is: Could there be a similar use case
within inline special blocks? Keep in mind that this (for now,
hypothetical) element type would be intended only for very short
segments of text within the paragraph. I don't find a scenario where
it's worth overloading that with options and attributes, IMHO.

I believe that direct formatting (as a rule of composition and not as an
exception), which comes ---I suppose--- from the use and abuse of word
processors, is the great cancer for the consistency of the documents,
where a guiding style and a series of constants must prevail. Of course,
I do not deny that it is often necessary to do a post-process and adjust
exceptions. There are always exceptions. In the case of LaTeX and
ConTeXt, TeX is powerful enough to deal with exceptions also at a high
level, due to its high degree of automation. And LuaTeX, even more so. A
simple example to automatically adjust the width of the caption in
figures with a simple lua function in LuaLaTeX:

#+begin_src latex
\begin{luacode*}
  function caption_width ( text )
  text = string.gsub ( text, "(\\includegraphics.+)", "\\sbox0{%1}")
  text = string.gsub ( text, "(\\caption{.+})", "\\begin{minipage}{\\wd0}\\usebox0%1\\end{minipage}")
  return text
  end
\end{luacode*}
    \newcommand\CaptionAutoWidth{\directlua{luatexbase.add_to_callback
	( "process_input_buffer" , caption_width , "caption_width" )}}
\AtBeginDocument{\CaptionAutoWidth}
#+end_src


However, note that I speak in general terms. It is difficult to get rid
of manual intervention one hundred percent. But the question is whether
it's worth adding fine-tuning options to an element as "specialized" as
inline special blocks. Of course, LaTeX is more flexible and you can
always change a variable on the fly. You can do something like:

#+begin_src latex
\definecolor{foo}{HTML}{FF0000}
\definecolor{var}{HTML}{7CFC00}
\def\mycolor{foo}
\newcommand\mytextcolor[1]{%
  \textcolor{\mycolor}{#1}}
\begin{document}
lorem \mytextcolor{ipsum dolor}
\def\mycolor{var}
lorem \mytextcolor{ipsum dolor}
#+end_src

html/css seems more rigid and I'm not that familiar with it. Perhaps
there is more uses case where the existence of ad hoc attributes and
options would be justified? And, in any case, how to implement it
without the paragraph becoming unreadable? The solution that Ihor
commented on in a past post of using identifiers for each inline block
would be fine (and maybe it could be used also for the attributes of the
links within the paragraph).

>> in html:
>> <name>contents></name>
>
> Concerning <name> vs. <span class="name">, is it the same for
> assistive technologies like screen readers to add
> <strong>text</strong> (or <b>text</b>) and <span
> class="strong">text</span> with "font-weight: bolder;" in CSS?

"<name>contents></name>": it was my confusion, sorry. I already explained
it here: https://list.orgmode.org/8735g0tnoh.fsf@posteo.net/

Best regards,

Juan Manuel 


  reply	other threads:[~2022-06-20 19:09 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-23 14:30 About 'inline special blocks' Juan Manuel Macías
2022-05-23 15:20 ` Kaushal Modi
2022-05-23 21:06   ` Juan Manuel Macías
2022-05-24  2:36     ` Tim Cross
2022-05-24  2:51       ` Timothy
2022-05-24  6:54         ` Eric S Fraga
2022-05-26  7:30           ` Christian Moe
2022-05-24 15:09         ` Max Nikulin
2022-05-25  7:22           ` Ihor Radchenko
2022-05-25 17:05             ` Max Nikulin
2022-05-26  2:54               ` Merging paragraphs separated by comment lines during export (was: About 'inline special blocks') Ihor Radchenko
2022-05-24  3:56       ` About 'inline special blocks' Ihor Radchenko
2022-05-24 14:05         ` João Pedro
2022-05-26  4:56           ` Ihor Radchenko
2022-05-26 11:30             ` João Pedro
2022-05-26 12:20               ` Ihor Radchenko
2022-05-26 17:35                 ` João Pedro
2022-05-26 21:22                   ` About opening issues vs email [Was: About 'inline special blocks'] Kaushal Modi
2022-05-27  4:24                     ` Ihor Radchenko
2022-05-27  4:36                     ` João Pedro
2022-05-25 13:55         ` About 'inline special blocks' Juan Manuel Macías
2022-06-17  6:28         ` Ihor Radchenko
2022-06-17 19:49           ` Juan Manuel Macías
2022-06-19 12:47   ` Juan Manuel Macías
2022-06-19 19:30     ` Christian Moe
2022-06-19 20:15       ` Juan Manuel Macías
2022-06-19 22:18     ` Tim Cross
2022-06-20 16:57     ` Max Nikulin
2022-06-20 19:06       ` Juan Manuel Macías [this message]
2022-06-21 16:39         ` Max Nikulin
2022-06-21 18:19           ` Juan Manuel Macías
2022-06-20 22:46       ` Tim Cross
2022-06-26  4:07         ` Org mode export accessibility (was: About 'inline special blocks') Ihor Radchenko
2022-06-26  6:29           ` Tim Cross
2022-06-26 10:46             ` Org mode export accessibility Juan Manuel Macías
2022-06-26 10:54               ` Ihor Radchenko
2022-06-27 14:40                 ` T.V Raman
2022-06-30  7:53                   ` Ihor Radchenko
2022-07-07 14:18                     ` briangpowell
2022-07-07 14:42                       ` T.V Raman
2022-07-08  4:38                         ` Ihor Radchenko
2022-07-08 13:55                           ` T.V Raman
2022-07-09  3:39                             ` Ihor Radchenko
2022-07-09 13:20                               ` T.V Raman
2022-09-30 11:07                         ` Max Nikulin
2022-09-30 13:29                           ` T.V Raman
2022-09-30 16:43                             ` Max Nikulin
2022-09-30 16:55                               ` T.V Raman
2022-10-01  4:36                             ` Ihor Radchenko
2022-10-01 14:59                               ` T.V Raman
2022-10-02  2:54                               ` Org source in PDF (Re: Org mode export accessibility) Max Nikulin
2022-10-02  3:50                                 ` Timothy
2022-07-07 14:43                       ` Org mode export accessibility T.V Raman
2022-07-07 15:37                       ` T.V Raman
2022-07-08  4:33                       ` Ihor Radchenko
2022-07-08 13:54                         ` T.V Raman

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=87bkunb1e5.fsf@posteo.net \
    --to=maciaschain@posteo.net \
    --cc=emacs-orgmode@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.