unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: How to justify a line of text in the GUI?
Date: Tue, 15 Nov 2022 14:40:50 +0200	[thread overview]
Message-ID: <83sfikie5p.fsf@gnu.org> (raw)
In-Reply-To: <CA+-Lr-CTQnBHJFfmpE03K409JELosGTcAQcvo4gVCe7OSGqO=A@mail.gmail.com> (message from Evan Aad on Mon, 14 Nov 2022 17:28:24 +0200)

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



      parent reply	other threads:[~2022-11-15 12:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=83sfikie5p.fsf@gnu.org \
    --to=eliz@gnu.org \
    --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).