emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Juan Manuel Macías" <maciaschain@posteo.net>
To: Zenny <garbytrash@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Sanskrit/Devanagari fonts not exported to org-pdf output
Date: Thu, 21 Sep 2023 15:33:35 +0000	[thread overview]
Message-ID: <87wmwjpmls.fsf@posteo.net> (raw)
In-Reply-To: <CACuV5sApp984XNR66AWS_B_qFxQ5cJyN=YGW-BLgE5okC0OoCQ@mail.gmail.com> (Zenny's message of "Thu, 21 Sep 2023 15:46:06 +0200")

Hi, Zenny,

Zenny writes:

> Where does this preamble goes to? Any example?

As in your example, using latex_header keywords (replacing the
polyglossia code with the babel code):

#+LaTeX_Header: \usepackage[english]{babel}
#+LaTeX_Header: \usepackage{fontspec}
#+LaTeX_Header: \newfontscript{Devanagari}{deva}
#+LaTeX_Header: \babelprovide[onchar=ids fonts]{sanskrit-devanagari}
#+LaTeX_Header: \babelfont[sanskrit-devanagari]{rm}{Noto Sans Devanagari}

> Yet I am a bit confused because the Sanskrit/Devanagari words are used
> not in a whole block, but in between English sentences, eg.:

With Polyglossia and babel it is necessary to enter a command that
changes the language. In the case of polyglossia, if you don't
explicitly switch to Sanskrit the font you declared for Sanskrit is not
used, and LaTeX still thinks the text is English. Polyglossia uses some
commands similar to those of babel (\selectlanguage, for long texts) and
other native ones, such as \text<lang>{text}, where <lang> is the
secondary language. In babel you have the command
\foreignlanguage{<lang>}{text}. For example (using polyglossia):

Old expression goes like \textsanskrit{स्वस्ति सत्यं वचति}

Of course, in org you would have to use some trick, like defining some
macro (since org does not have, at the moment[1], a native language
switching method):

#+macro: sanskrit @@latex:\textsanskrit{@@$1@@latex:}@@

Old expression goes like {{{sanskrit(स्वस्ति सत्यं वचति)}}}

With LuaLaTeX, babel can associate a non latin language to a font
without requiring an explicit language switch:

#+LaTeX_Header: \usepackage[english]{babel}
#+LaTeX_Header: \usepackage{fontspec}
#+LaTeX_Header: \newfontscript{Devanagari}{deva}
#+LaTeX_Header: \babelprovide[onchar=ids fonts]{sanskrit-devanagari}
#+LaTeX_Header: \babelfont[sanskrit-devanagari]{rm}{Noto Sans Devanagari}

Old expression goes like स्वस्ति सत्यं वचति

[1] You might be interested in this thread: https://list.orgmode.org/878r9t7x7y.fsf@posteo.net/


  reply	other threads:[~2023-09-21 15:34 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-21  7:46 Sanskrit/Devanagari fonts not exported to org-pdf output Zenny
2023-09-21  8:24 ` Juan Manuel Macías
2023-09-21 13:46   ` Zenny
2023-09-21 15:33     ` Juan Manuel Macías [this message]
2023-09-21 17:53       ` Zenny
2023-09-21 18:28         ` Juan Manuel Macías
2023-09-21 18:44           ` Zenny
2023-09-21 19:32             ` Juan Manuel Macías
2023-09-21 20:26               ` Zenny
2023-09-21 20:39                 ` Zenny
2023-09-21 20:41                   ` Zenny
2023-09-21 21:19                     ` Juan Manuel Macías
2023-09-22  7:04                       ` Zenny
2023-09-22  8:00                         ` Juan Manuel Macías
2023-09-22  8:07                           ` Zenny
2023-09-22  8:09                             ` Zenny
2023-09-22  8:41                               ` Juan Manuel Macías
2023-09-22  8:49                                 ` Zenny
2023-09-22  8:54                                   ` Zenny
2023-09-22  8:54                                   ` Juan Manuel Macías
2023-09-22  8:58                                     ` Zenny
2023-09-22  9:06                                       ` Juan Manuel Macías
2023-09-22  9:37                                         ` Zenny
2023-09-22 10:02                                           ` Juan Manuel Macías
2023-09-22 12:59                                             ` Zenny
2023-09-22 15:12                                               ` Juan Manuel Macías
2023-09-22 17:51                                                 ` Zenny
2023-09-22  8:18                             ` Juan Manuel Macías
2023-09-22  8:30                               ` Zenny

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.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wmwjpmls.fsf@posteo.net \
    --to=maciaschain@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=garbytrash@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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