emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Thomas S. Dye" <tsd@tsdye.online>
To: Rob Sargent <rsargent@xmission.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: how to add special glyphs
Date: Mon, 06 Mar 2023 13:06:02 -1000	[thread overview]
Message-ID: <87sfeh79od.fsf@tsdye.online> (raw)
In-Reply-To: <d19cd82f-4805-7deb-ece0-78f301d48215@xmission.com>


Rob Sargent <rsargent@xmission.com> writes:

> On 3/6/23 10:42, Rob Sargent wrote:

> I settled for \ding{54}, but of course that doesn't work in the 
> HTML export.  I
> keep bumping in to this works-here-not-there in export. Quite 
> disappointing.

LaTeX is great, but not for the faint of heart. 

I know two ways that might fix things for you.

One is org-entities-user, which makes a dictionary to cover html 
and LaTeX export, e.g.,
    (add-to-list 'org-entities-user '("eng" "\\ng" nil "&eng;" "g" 
    "g" "ŋ"))

Another is to use UTF-8 in LaTeX.  Here's one of my setups:

#+name: koma-article-liberation
#+header: :results silent
#+begin_src emacs-lisp
  (require 'ox-latex)
  (add-to-list
   'org-latex-classes
   '("koma-article-liberation"
     "\\documentclass{scrartcl}
  [NO-DEFAULT-PACKAGES]
  [PACKAGES]
  [EXTRA]
     \\usepackage{microtype}
     \\usepackage{amstext}
     \\usepackage{fontspec}
     \\usepackage{unicode-math}
     \\defaultfontfeatures{Ligatures=TeX}
     \\setmainfont{Liberation Serif}
     \\setsansfont{Liberation Sans}[Scale=MatchLowercase]
     \\setmonofont{Liberation Mono}[Scale=MatchLowercase]
     \\usepackage{paralist}
     \\let\\itemize\\compactitem
     \\let\\description\\compactdesc
     \\renewenvironment{enumerate}{\\begin{inparaenum}[(i)]}{\\end{inparaenum}}
     \\usepackage{fewerfloatpages}
     \\usepackage{graphicx}
     \\usepackage{textcomp}
     \\usepackage{array}
     \\usepackage[x11names]{xcolor}
     \\usepackage[colorlinks=true,allcolors=Blue4]{hyperref}
     \\usepackage[color=blue]{attachfile2}
     \\usepackage[cache=false]{minted}
     \\usemintedstyle{tango}
     \\usepackage{rotating}
     \\usepackage[authordate, giveninits=true, noibid, 
     sortcites=true, backend=biber, 
     bibencoding=utf8]{biblatex-chicago}
     \\addbibresource{tsd.bib}
     \\newcommand{\\rc}{$^{14}$C}"
     ("\\section{%s}" . "\\section*{%s}")
     ("\\subsection{%s}" . "\\subsection*{%s}")
     ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
     ("\\paragraph{%s}" . "\\paragraph*{%s}")
     ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
#+end_src

The key here is the fontspec package.

If you go the UTF-8 route, then you'll need to compile with either 
XeLaTeX or LuaLaTeX, something like this:

#+name: xelatex-biber
#+header: :results silent
#+begin_src emacs-lisp
  (setq org-latex-pdf-process
        '("xelatex -interaction nonstopmode -shell-escape 
        -output-directory %o %f"
          "biber %b"
          "xelatex -interaction nonstopmode -shell-escape 
          -output-directory %o %f"
          "xelatex -interaction nonstopmode -shell-escape 
          -output-directory %o %f"))
#+end_src

hth,
Tom

-- 
Thomas S. Dye
https://tsdye.online/tsdye


  reply	other threads:[~2023-03-06 23:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-06 15:42 how to add special glyphs Rob Sargent
2023-03-06 17:37 ` Thomas S. Dye
2023-03-06 17:42   ` Rob Sargent
2023-03-06 22:23     ` Rob Sargent
2023-03-06 23:06       ` Thomas S. Dye [this message]
2023-03-06 23:24         ` Rob Sargent
2023-03-07 10:48           ` Fraga, Eric
2023-03-07 14:05       ` Ihor Radchenko
2023-03-07 15:54 ` Max Nikulin
2023-03-08  0:29   ` Rob Sargent
2023-03-08 14:59     ` Max Nikulin
2023-03-08 15:17       ` Rob Sargent
  -- strict thread matches above, loose matches on Subject: below --
2023-03-08 10:08 Pedro Andres Aranda Gutierrez
2023-03-08 15:14 ` Rob Sargent
2023-03-08 16:53   ` Pedro Andres Aranda Gutierrez

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=87sfeh79od.fsf@tsdye.online \
    --to=tsd@tsdye.online \
    --cc=emacs-orgmode@gnu.org \
    --cc=rsargent@xmission.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).