unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to justify a line of text in the GUI?
@ 2022-11-14 15:28 Evan Aad
  2022-11-15  0:14 ` Emanuel Berg
  2022-11-15 12:40 ` Eli Zaretskii
  0 siblings, 2 replies; 5+ messages in thread
From: Evan Aad @ 2022-11-14 15:28 UTC (permalink / raw)
  To: help-gnu-emacs

When composing a bilingual document that combines a right-to-left
language, such as Hebrew, with a left-to-right language, such as
English, is there a way to justify a line of text to the right or to
the left in the GUI when the text in that line contains no letters of
the alphabet?

For example, when writing a mathematical text in Hebrew, intended be
typeset by the TeX system, the following display-mode equation may
occur:
$$
x+y=z
$$

In this case the Emacs GUI would right-justify the first pair of
dollar signs, whereas the next two lines would be left-justified. This
causes a disruption of the logical cohesiveness of the LaTeX code. Is
there a way that I could left-justify the first pair of dollar signs?



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to justify a line of text in the GUI?
  2022-11-14 15:28 How to justify a line of text in the GUI? Evan Aad
@ 2022-11-15  0:14 ` Emanuel Berg
  2022-11-15 17:54   ` Evan Aad
  2022-11-15 12:40 ` Eli Zaretskii
  1 sibling, 1 reply; 5+ messages in thread
From: Emanuel Berg @ 2022-11-15  0:14 UTC (permalink / raw)
  To: help-gnu-emacs

Evan Aad wrote:

> In this case the Emacs GUI would right-justify the first
> pair of dollar signs, whereas the next two lines would be
> left-justified. This causes a disruption of the logical
> cohesiveness of the LaTeX code.

But the LaTeX source is compiled into a document, while Emacs
is how it looks when editing that source?

It's never gonna look even remotely the same, and you don't
want it to.

Even HTML is 'compiled' in a way, by the browser.

Now you made me think ...

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to justify a line of text in the GUI?
  2022-11-14 15:28 How to justify a line of text in the GUI? Evan Aad
  2022-11-15  0:14 ` Emanuel Berg
@ 2022-11-15 12:40 ` Eli Zaretskii
  1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2022-11-15 12:40 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Evan Aad <oddeveneven@gmail.com>
> Date: Mon, 14 Nov 2022 17:28:24 +0200
> 
> When composing a bilingual document that combines a right-to-left
> language, such as Hebrew, with a left-to-right language, such as
> English, is there a way to justify a line of text to the right or to
> the left in the GUI when the text in that line contains no letters of
> the alphabet?
> 
> For example, when writing a mathematical text in Hebrew, intended be
> typeset by the TeX system, the following display-mode equation may
> occur:
> $$
> x+y=z
> $$
> 
> In this case the Emacs GUI would right-justify the first pair of
> dollar signs, whereas the next two lines would be left-justified. This
> causes a disruption of the logical cohesiveness of the LaTeX code. Is
> there a way that I could left-justify the first pair of dollar signs?

Precede the line you want to left-justify with the U+200E
LEFT-TO-RIGHT MARK (a.k.a. "LRM") character.  It by default displays
as a thin 1-pixel space, and so is almost invisible, and it will cause
the "$$" line be treated as a left-to-right paragraph.

However, I don't know what will this do to TeX output; you should try.
If the LRM gets in the way, perhaps a better solution is to precede
the problematic line with a comment that has some left-to-right
characters in it; that should have the same effect on the paragraph
direction determined by Emacs.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to justify a line of text in the GUI?
  2022-11-15  0:14 ` Emanuel Berg
@ 2022-11-15 17:54   ` Evan Aad
  2022-11-15 18:06     ` Emanuel Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Evan Aad @ 2022-11-15 17:54 UTC (permalink / raw)
  To: help-gnu-emacs

Emmanuel, unfortunately you grotesquely misunderstand the gist of my question.

To pick up your example of HTML. Suppose you write an HTML document,
and the text editor in which you compose it displays every other
letter in a different size. When viewed in a web browser the HTML file
displays as intended, the problem is with the text editor used to edit
the source code. You complain about this problem in a mail listing
dedicated to this text editor. You say you'd like all letters of the
source code to have a consistent size. To which one of the members of
the mailing list replies: "It appears you want the source code to look
like it would in a browser, but when viewed in a browser an HTML file
is never gonna look even remotely the same as the source code, and you
don't want it to." But this is an absurd reply that completely misses
the point.

On Tue, Nov 15, 2022 at 6:35 PM Emanuel Berg <incal@dataswamp.org> wrote:
>
> Evan Aad wrote:
>
> > In this case the Emacs GUI would right-justify the first
> > pair of dollar signs, whereas the next two lines would be
> > left-justified. This causes a disruption of the logical
> > cohesiveness of the LaTeX code.
>
> But the LaTeX source is compiled into a document, while Emacs
> is how it looks when editing that source?
>
> It's never gonna look even remotely the same, and you don't
> want it to.
>
> Even HTML is 'compiled' in a way, by the browser.
>
> Now you made me think ...
>
> --
> underground experts united
> https://dataswamp.org/~incal
>
>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to justify a line of text in the GUI?
  2022-11-15 17:54   ` Evan Aad
@ 2022-11-15 18:06     ` Emanuel Berg
  0 siblings, 0 replies; 5+ messages in thread
From: Emanuel Berg @ 2022-11-15 18:06 UTC (permalink / raw)
  To: help-gnu-emacs

Evan Aad wrote:

> Emmanuel, unfortunately you grotesquely misunderstand the
>  gist of my question.
>
> To pick up your example of HTML. Suppose you write an HTML
> document, and the text editor in which you compose it
> displays every other letter in a different size. When viewed
> in a web browser the HTML file displays as intended, the
> problem is with the text editor used to edit the source
> code. You complain about this problem in a mail listing
> dedicated to this text editor. You say you'd like all
> letters of the source code to have a consistent size.
> To which one of the members of the mailing list replies: "It
> appears you want the source code to look like it would in
> a browser, but when viewed in a browser an HTML file is
> never gonna look even remotely the same as the source code,
> and you don't want it to." But this is an absurd reply that
> completely misses the point.

What I mean is they look different because they _are_
different. The editor is optimized, if that is the right word
in the case of HTML :), to produce, edit, and debug source,
while the compiler is intended to translate and transform the
code into something that is useful, the black-boxed end
product, i.e. a displayable, interactive web page in the case
of the browser compiling (or assembling) the HTML source.

Evvan, as long as you regard the webpage and HTML source as
one you won't understand this, I think.

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-15 18:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-14 15:28 How to justify a line of text in the GUI? Evan Aad
2022-11-15  0:14 ` Emanuel Berg
2022-11-15 17:54   ` Evan Aad
2022-11-15 18:06     ` Emanuel Berg
2022-11-15 12:40 ` Eli Zaretskii

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).