From: "Blair, Erik" <Enrique_Blair@baylor.edu>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: underline with line breaks doesn't work
Date: Fri, 1 Jan 2021 05:22:59 +0000 [thread overview]
Message-ID: <78B14F19-01D5-4EA8-B344-535AB8E84B9D@baylor.edu> (raw)
[-- Attachment #1: Type: text/plain, Size: 2612 bytes --]
Dear emacs-orgmode moderators:
I would like to use \ul from the soul package in Org mode for underlining with line breaks (and *not* underlining spaces). It’s not working well. It fails like \underline (spaces get underlined, and lines don’t break and run off the page). My LaTeX export doesn’t work if I insert \ul{abc} into the org file, but I can insert \ulem{abc} or \underline{abc}, as well as the typical _abc_.
More information: I’m actually trying to define a new command using logic in the LaTeX header. This way, I can make notes with key words. I can toggle a Boolean variable, and it makes key words show up; or, it underlines the words, which are also hidden by \phantom. Also, we would like to avoid underlining spaces because it cues the reader to know how many words are missing.
I note this previous discussion:
https://lists.gnu.org/archive/html/emacs-orgmode/2013-06/msg00376.html
It seems like the issue that was fixed at one point and \ul should work, but maybe it’s not now. Or, maybe I don’t have the experience to know how to apply the solution to my Emacs/Org mode on my computer.
FYI, I’m using org-9.3.6 from ELPA with Aquamacs 3.5, which includes GNU Emacs 25.3.50.1. I’m working on macOS X 15.7 (Catalina).
Thanks for any help or instructions you can provide. I’m not very experienced at elisp, so I don’t know how to fix this locally, but I’m happy to try if you tell me. It looks like I may be able to do something with org-latex-text-markup-alist locally, but I don’t know what or how.
I will include my org text below, noting that \underline works in the :+latex_header: lines, but \ul doesn’t.
Kind regards,
Enrique B.
==== Org doc starts below here ====
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+latex_class_options: [12pt]
#+latex_header: \usepackage[margin=1in]{geometry}
#+latex_header: \newif\ifsolution % define a solution Boolean variable
#+latex_header: \solutiontrue % specify the value of the Boolean switch
#+latex_header: \ifsolution
#+latex_header: \newcommand{\keyText}[1]{\underline{{\color{blue} \Large #1}}}
#+latex_header: \else
#+latex_header: \newcommand{\keyText}[1]{\underline{{\phantom{ \Large #1}}}}
#+latex_header: \fi
#+options: toc:nil
* This will be exported :ignore:
The solution text is here.
My message to you is: \keyText{Hello world}.
- Now, let us try some really long key text--so long that it even spans
multiple \keyText{lines. That line is this line, for so I have written it.}
[-- Attachment #2: Type: text/html, Size: 7745 bytes --]
next reply other threads:[~2021-01-01 5:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-01 5:22 Blair, Erik [this message]
2021-01-01 12:28 ` underline with line breaks doesn't work Gustavo Barros
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=78B14F19-01D5-4EA8-B344-535AB8E84B9D@baylor.edu \
--to=enrique_blair@baylor.edu \
--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 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).