* allow italic quote marks? org-emphasis-regexp-components @ 2015-06-15 10:12 Myles English 2015-06-18 2:46 ` Steven Arntson 0 siblings, 1 reply; 12+ messages in thread From: Myles English @ 2015-06-15 10:12 UTC (permalink / raw) To: emacs-orgmode Hello, Can anyone tell me what to set org-emphasis-regexp-components to in order to allow italic quote marks? i.e. /"like this"/ I don't understand the documentation and am just not in the mood to spend the next hour or so working it out. (That is a rule of thumb for me; if it involves a regular expression, it will take at least an hour, and three cups of tea.) Thanks, Myles ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: allow italic quote marks? org-emphasis-regexp-components 2015-06-15 10:12 allow italic quote marks? org-emphasis-regexp-components Myles English @ 2015-06-18 2:46 ` Steven Arntson 2015-06-18 3:19 ` Kaushal 0 siblings, 1 reply; 12+ messages in thread From: Steven Arntson @ 2015-06-18 2:46 UTC (permalink / raw) To: emacs-orgmode I am not helpful here, but would simply like to add that I would also love an answer to this, as well as times when italics don't seem to work around periods and commas, like "and /then,/ well, ..." (which does not italicize for me on emacs 24.5.1, org 8.2.1). Myles English <mylesenglish@gmail.com> writes: > Hello, > > Can anyone tell me what to set org-emphasis-regexp-components to in > order to allow italic quote marks? > > i.e. /"like this"/ > > I don't understand the documentation and am just not in the mood to > spend the next hour or so working it out. (That is a rule of thumb for > me; if it involves a regular expression, it will take at least an hour, > and three cups of tea.) > > Thanks, > Myles ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: allow italic quote marks? org-emphasis-regexp-components 2015-06-18 2:46 ` Steven Arntson @ 2015-06-18 3:19 ` Kaushal 2015-06-18 3:23 ` Kaushal 2015-06-18 7:53 ` Marcin Borkowski 0 siblings, 2 replies; 12+ messages in thread From: Kaushal @ 2015-06-18 3:19 UTC (permalink / raw) To: Steven Arntson, emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1583 bytes --] The solution is simpler than you think; you simply need to add ZERO WIDTH SPACE unicode char between / and " (beginning) and " and / (end). The default way to do it is C-x 8 RET zero width space RET or C-x 8 RET 200b RET But I need to use this priceless unicode char to escape stuff like this in org-mode and so I have bound "0" in "C-x 8" map to insert this char. Here is how I do it in my init: https://github.com/kaushalmodi/.emacs.d/blob/f3c44e933f45dfdb760540e9f86acc91b55ab94a/setup-files/setup-editing.el#L637 Thus I simply need to do C-x 8 0 to insert the ZERO WIDTH SPACE. To elaborate more, <0> below is where you insert the 200b unicode characters: I would like to see /<0>"these surrounding quotes in italics"<0>/. On Wed, Jun 17, 2015 at 10:46 PM Steven Arntson <steven@stevenarntson.com> wrote: > I am not helpful here, but would simply like to add that I would also > love an answer to this, as well as times when italics don't seem to work > around periods and commas, like "and /then,/ well, ..." (which does not > italicize for me on emacs 24.5.1, org 8.2.1). > > Myles English <mylesenglish@gmail.com> writes: > > > Hello, > > > > Can anyone tell me what to set org-emphasis-regexp-components to in > > order to allow italic quote marks? > > > > i.e. /"like this"/ > > > > I don't understand the documentation and am just not in the mood to > > spend the next hour or so working it out. (That is a rule of thumb for > > me; if it involves a regular expression, it will take at least an hour, > > and three cups of tea.) > > > > Thanks, > > Myles > > > [-- Attachment #2: Type: text/html, Size: 2445 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: allow italic quote marks? org-emphasis-regexp-components 2015-06-18 3:19 ` Kaushal @ 2015-06-18 3:23 ` Kaushal 2015-06-18 7:53 ` Marcin Borkowski 1 sibling, 0 replies; 12+ messages in thread From: Kaushal @ 2015-06-18 3:23 UTC (permalink / raw) To: Steven Arntson, emacs-orgmode, Myles English [-- Attachment #1: Type: text/plain, Size: 1799 bytes --] And Steven, You need to insert that same char between , and / in /then,/ On Wed, Jun 17, 2015 at 11:19 PM Kaushal <kaushal.modi@gmail.com> wrote: > The solution is simpler than you think; you simply need to add ZERO WIDTH > SPACE unicode char between / and " (beginning) and " and / (end). > > The default way to do it is > > C-x 8 RET zero width space RET > > or > > C-x 8 RET 200b RET > > But I need to use this priceless unicode char to escape stuff like this in > org-mode and so I have bound "0" in "C-x 8" map to insert this char. > Here is how I do it in my init: > https://github.com/kaushalmodi/.emacs.d/blob/f3c44e933f45dfdb760540e9f86acc91b55ab94a/setup-files/setup-editing.el#L637 > Thus I simply need to do C-x 8 0 to insert the ZERO WIDTH SPACE. > > To elaborate more, <0> below is where you insert the 200b unicode > characters: > > I would like to see /<0>"these surrounding quotes in italics"<0>/. > > > > On Wed, Jun 17, 2015 at 10:46 PM Steven Arntson <steven@stevenarntson.com> > wrote: > >> I am not helpful here, but would simply like to add that I would also >> love an answer to this, as well as times when italics don't seem to work >> around periods and commas, like "and /then,/ well, ..." (which does not >> italicize for me on emacs 24.5.1, org 8.2.1). >> >> Myles English <mylesenglish@gmail.com> writes: >> >> > Hello, >> > >> > Can anyone tell me what to set org-emphasis-regexp-components to in >> > order to allow italic quote marks? >> > >> > i.e. /"like this"/ >> > >> > I don't understand the documentation and am just not in the mood to >> > spend the next hour or so working it out. (That is a rule of thumb for >> > me; if it involves a regular expression, it will take at least an hour, >> > and three cups of tea.) >> > >> > Thanks, >> > Myles >> >> >> [-- Attachment #2: Type: text/html, Size: 2980 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: allow italic quote marks? org-emphasis-regexp-components 2015-06-18 3:19 ` Kaushal 2015-06-18 3:23 ` Kaushal @ 2015-06-18 7:53 ` Marcin Borkowski 2015-06-18 14:29 ` Kaushal 2015-06-18 15:50 ` Myles English 1 sibling, 2 replies; 12+ messages in thread From: Marcin Borkowski @ 2015-06-18 7:53 UTC (permalink / raw) To: Steven Arntson, emacs-orgmode On 2015-06-18, at 05:19, Kaushal <kaushal.modi@gmail.com> wrote: > The solution is simpler than you think; you simply need to add ZERO WIDTH > SPACE unicode char between / and " (beginning) and " and / (end). Won't it break the LaTeX export? Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: allow italic quote marks? org-emphasis-regexp-components 2015-06-18 7:53 ` Marcin Borkowski @ 2015-06-18 14:29 ` Kaushal 2015-06-18 15:50 ` Myles English 1 sibling, 0 replies; 12+ messages in thread From: Kaushal @ 2015-06-18 14:29 UTC (permalink / raw) To: Marcin Borkowski, Steven Arntson, emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 573 bytes --] Nope, it doesn't :) Screencap of pdf export: http://i.imgur.com/KuLHKNd.png On Thu, Jun 18, 2015 at 3:54 AM Marcin Borkowski <mbork@mbork.pl> wrote: > > On 2015-06-18, at 05:19, Kaushal <kaushal.modi@gmail.com> wrote: > > > The solution is simpler than you think; you simply need to add ZERO WIDTH > > SPACE unicode char between / and " (beginning) and " and / (end). > > Won't it break the LaTeX export? > > Best, > > -- > Marcin Borkowski > http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski > Faculty of Mathematics and Computer Science > Adam Mickiewicz University > > [-- Attachment #2: Type: text/html, Size: 1114 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: allow italic quote marks? org-emphasis-regexp-components 2015-06-18 7:53 ` Marcin Borkowski 2015-06-18 14:29 ` Kaushal @ 2015-06-18 15:50 ` Myles English 2015-06-18 16:02 ` Kaushal 1 sibling, 1 reply; 12+ messages in thread From: Myles English @ 2015-06-18 15:50 UTC (permalink / raw) To: Marcin Borkowski; +Cc: Steven Arntson, emacs-orgmode, Kaushal Marcin Borkowski writes: > On 2015-06-18, at 05:19, Kaushal <kaushal.modi@gmail.com> wrote: > >> The solution is simpler than you think; you simply need to add ZERO WIDTH >> SPACE unicode char between / and " (beginning) and " and / (end). Thanks for your detailed answer Kaushal. I hadn't heard of a 'zero length space' before. > Won't it break the LaTeX export? I seems to work and manages to produce a pdf but does give this error: ! Package inputenc Error: Unicode char \u8: not set up for use with LaTeX. Myles ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: allow italic quote marks? org-emphasis-regexp-components 2015-06-18 15:50 ` Myles English @ 2015-06-18 16:02 ` Kaushal 2015-06-18 17:04 ` Steven Arntson 2015-06-18 18:29 ` Marcin Borkowski 0 siblings, 2 replies; 12+ messages in thread From: Kaushal @ 2015-06-18 16:02 UTC (permalink / raw) To: Myles English, Marcin Borkowski; +Cc: Steven Arntson, emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 2104 bytes --] A quick google search comes up this these: http://tex.stackexchange.com/questions/83440/inputenc-error-unicode-char-u8-not-set-up-for-use-with-latex http://tex.stackexchange.com/questions/4268/inputenc-error-unicode-char-u8-error-while-trying-to-write-a-degree-symbol Based on those solutions, may be you can add \DeclareUnicodeCharacter{200b}{} I haven't tried it, so cannot guarantee if that will work. I regularly generate pdfs and almost all of my org documents would be using 0x200b somewhere. If a pdf generates fine without any visible artifacts and with all content as expected, I do not look into the tex compilation logs. This time I checked the log and I don't get that error, but a warning instead. Note that I also use XeTeX which has unicode support. Below is a snippet from my log: This is XeTeX, Version 3.14159265-2.6-0.99991 (TeX Live 2014) (preloaded format=xelatex) \write18 enabled. entering extended mode (/home/kmodi/sandbox/org/italic_quotes.tex LaTeX2e <2014/05/01> Babel <3.9k> and hyphenation patterns for 2 languages loaded. (/home/kmodi/texlive/2014/texmf-dist/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (/home/kmodi/texlive/2014/texmf-dist/tex/latex/base/size11.clo)) (/home/kmodi/texlive/2014/texmf-dist/tex/latex/base/inputenc.sty Package inputenc Warning: inputenc package ignored with utf8 based engines. On Thu, Jun 18, 2015 at 11:49 AM Myles English <mylesenglish@gmail.com> wrote: > > Marcin Borkowski writes: > > > On 2015-06-18, at 05:19, Kaushal <kaushal.modi@gmail.com> wrote: > > > >> The solution is simpler than you think; you simply need to add ZERO > WIDTH > >> SPACE unicode char between / and " (beginning) and " and / (end). > > Thanks for your detailed answer Kaushal. I hadn't heard of a 'zero > length space' before. > > > Won't it break the LaTeX export? > > I seems to work and manages to produce a pdf but does give this error: > > ! Package inputenc Error: Unicode char \u8: not set up for use with LaTeX. > > Myles > [-- Attachment #2: Type: text/html, Size: 4173 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: allow italic quote marks? org-emphasis-regexp-components 2015-06-18 16:02 ` Kaushal @ 2015-06-18 17:04 ` Steven Arntson 2015-06-18 18:29 ` Marcin Borkowski 1 sibling, 0 replies; 12+ messages in thread From: Steven Arntson @ 2015-06-18 17:04 UTC (permalink / raw) To: emacs-orgmode Thank you very much! -steven Kaushal <kaushal.modi@gmail.com> writes: > A quick google search comes up this these: > > http://tex.stackexchange.com/questions/83440/inputenc-error-unicode-char-u8-not-set-up-for-use-with-latex > http://tex.stackexchange.com/questions/4268/inputenc-error-unicode-char-u8-error-while-trying-to-write-a-degree-symbol > > Based on those solutions, may be you can add > > \DeclareUnicodeCharacter{200b}{} > I haven't tried it, so cannot guarantee if that will work. > > I regularly generate pdfs and almost all of my org documents would be > using 0x200b somewhere. If a pdf generates fine without any visible > artifacts and with all content as expected, I do not look into the tex > compilation logs. > > This time I checked the log and I don't get that error, but a warning > instead. Note that I also use XeTeX which has unicode support. Below > is a snippet from my log: > > This is XeTeX, Version 3.14159265-2.6-0.99991 (TeX Live 2014) > (preloaded format=xelatex) > \write18 enabled. > entering extended mode > (/home/kmodi/sandbox/org/italic_quotes.tex > LaTeX2e <2014/05/01> > Babel <3.9k> and hyphenation patterns for 2 languages loaded. > (/home/kmodi/texlive/2014/texmf-dist/tex/latex/base/article.cls > Document Class: article 2007/10/19 v1.4h Standard LaTeX document class > (/home/kmodi/texlive/2014/texmf-dist/tex/latex/base/size11.clo)) > (/home/kmodi/texlive/2014/texmf-dist/tex/latex/base/inputenc.sty > > Package inputenc Warning: inputenc package ignored with utf8 based > engines. > > On Thu, Jun 18, 2015 at 11:49 AM Myles English > <mylesenglish@gmail.com> wrote: > > Marcin Borkowski writes: > > > On 2015-06-18, at 05:19, Kaushal <kaushal.modi@gmail.com> wrote: > > > >> The solution is simpler than you think; you simply need to add > ZERO WIDTH > >> SPACE unicode char between / and " (beginning) and " and / > (end). > > Thanks for your detailed answer Kaushal. I hadn't heard of a 'zero > length space' before. > > > Won't it break the LaTeX export? > > I seems to work and manages to produce a pdf but does give this > error: > > ! Package inputenc Error: Unicode char \u8: not set up for use > with LaTeX. > > Myles > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: allow italic quote marks? org-emphasis-regexp-components 2015-06-18 16:02 ` Kaushal 2015-06-18 17:04 ` Steven Arntson @ 2015-06-18 18:29 ` Marcin Borkowski 2015-06-18 18:58 ` Rasmus 1 sibling, 1 reply; 12+ messages in thread From: Marcin Borkowski @ 2015-06-18 18:29 UTC (permalink / raw) To: Myles English, Steven Arntson, emacs-orgmode On 2015-06-18, at 18:02, Kaushal <kaushal.modi@gmail.com> wrote: > A quick google search comes up this these: > > http://tex.stackexchange.com/questions/83440/inputenc-error-unicode-char-u8-not-set-up-for-use-with-latex > http://tex.stackexchange.com/questions/4268/inputenc-error-unicode-char-u8-error-while-trying-to-write-a-degree-symbol > > Based on those solutions, may be you can add > > \DeclareUnicodeCharacter{200b}{} > > I haven't tried it, so cannot guarantee if that will work. Thanks, I'll check it in my Spare Time™. > I regularly generate pdfs and almost all of my org documents would be using > 0x200b somewhere. If a pdf generates fine without any visible artifacts and > with all content as expected, I do not look into the tex compilation logs. I hate when TeX gives me *any* errors. (So does AUCTeX.) Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: allow italic quote marks? org-emphasis-regexp-components 2015-06-18 18:29 ` Marcin Borkowski @ 2015-06-18 18:58 ` Rasmus 2015-06-19 12:51 ` Myles English 0 siblings, 1 reply; 12+ messages in thread From: Rasmus @ 2015-06-18 18:58 UTC (permalink / raw) To: emacs-orgmode Marcin Borkowski <mbork@mbork.pl> writes: > On 2015-06-18, at 18:02, Kaushal <kaushal.modi@gmail.com> wrote: > >> A quick google search comes up this these: >> >> http://tex.stackexchange.com/questions/83440/inputenc-error-unicode-char-u8-not-set-up-for-use-with-latex >> http://tex.stackexchange.com/questions/4268/inputenc-error-unicode-char-u8-error-while-trying-to-write-a-degree-symbol >> >> Based on those solutions, may be you can add >> >> \DeclareUnicodeCharacter{200b}{} >> >> I haven't tried it, so cannot guarantee if that will work. > > Thanks, I'll check it in my Spare Time™. I use something like this: (defcustom rasmus/org-latex-unicode-to-tex '((" " "~") (" " "\\,") ("" "")) "list of re rep pairs which are replaced during latex export") (defun rasmus/org-latex-unicode-to-tex (text backend info) "Replace unicode strings with their TeX equivalents. Currently: ' ' (no break space) to '~' ' ' (thin space) to '\,' '' (zero width space) to ''." (when (org-export-derived-backend-p backend 'latex) (cl-loop for (re rep) in rasmus/org-latex-unicode-to-tex do (setq text (replace-regexp-in-string re rep text t t))) text)) (add-to-list 'org-export-filter-final-output-functions 'rasmus/org-latex-unicode-to-tex) -- Sådan en god dansk lagereddike kan man slet ikke bruge mere ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: allow italic quote marks? org-emphasis-regexp-components 2015-06-18 18:58 ` Rasmus @ 2015-06-19 12:51 ` Myles English 0 siblings, 0 replies; 12+ messages in thread From: Myles English @ 2015-06-19 12:51 UTC (permalink / raw) To: Rasmus; +Cc: emacs-orgmode Rasmus writes: > Marcin Borkowski <mbork@mbork.pl> writes: > >> On 2015-06-18, at 18:02, Kaushal <kaushal.modi@gmail.com> wrote: >> >>> A quick google search comes up this these: >>> >>> http://tex.stackexchange.com/questions/83440/inputenc-error-unicode-char-u8-not-set-up-for-use-with-latex >>> http://tex.stackexchange.com/questions/4268/inputenc-error-unicode-char-u8-error-while-trying-to-write-a-degree-symbol >>> >>> Based on those solutions, may be you can add >>> >>> \DeclareUnicodeCharacter{200b}{} >>> >>> I haven't tried it, so cannot guarantee if that will work. >> >> Thanks, I'll check it in my Spare Time™. > > I use something like this: > > (defcustom rasmus/org-latex-unicode-to-tex '(("" "~") > (" " "\\,") > ("" "")) > "list of re rep pairs which are replaced during latex export") > > (defun rasmus/org-latex-unicode-to-tex (text backend info) > "Replace unicode strings with their TeX equivalents. > > Currently: '' (no break space) to '~' > ' ' (thin space) to '\,' > '' (zero width space) to ''." > (when (org-export-derived-backend-p backend 'latex) > (cl-loop for (re rep) in rasmus/org-latex-unicode-to-tex do > (setq text (replace-regexp-in-string re rep text t t))) > text)) > > (add-to-list 'org-export-filter-final-output-functions > 'rasmus/org-latex-unicode-to-tex) Thanks, I am using this now. Myles ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2015-06-19 12:51 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-06-15 10:12 allow italic quote marks? org-emphasis-regexp-components Myles English 2015-06-18 2:46 ` Steven Arntson 2015-06-18 3:19 ` Kaushal 2015-06-18 3:23 ` Kaushal 2015-06-18 7:53 ` Marcin Borkowski 2015-06-18 14:29 ` Kaushal 2015-06-18 15:50 ` Myles English 2015-06-18 16:02 ` Kaushal 2015-06-18 17:04 ` Steven Arntson 2015-06-18 18:29 ` Marcin Borkowski 2015-06-18 18:58 ` Rasmus 2015-06-19 12:51 ` Myles English
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.