[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Smart quotes not working correctly with single quotes
From: |
Albert Krewinkel |
Subject: |
Re: Smart quotes not working correctly with single quotes |
Date: |
Fri, 28 May 2021 19:55:29 +0200 |
Andreas Gösele <agoesele@sju.edu> writes:
> [...] I tried to convert the LaTeX document with pandoc, tex4h and
> latex2html to odt and html but none of them produces the correct
> output.
>
> So I'm wondering whether there is any way to make org export to
> recognize single quotes also outside from double quote. It should be
> possible as inner quotes is not the only use of simple quotes.
I apologize for the non-Emacs solution, but you can use pandoc in
combination with the following Lua filter to get the desired result:
https://github.com/pandoc/lua-filters/tree/master/pandoc-quotes.lua
For LaTeX output, you can also pass -Vcsquotes as a parameter to force
pandoc to make use of the csquotes package. Both should give you the
desired results.
HTH
> Juan Manuel MacÃas <maciaschain@posteo.net> writes:
>
>> Hi Andreas,
>>
>> I don't know if this is a bug, but I would say that in principle it's
>> the expected result. Single quotes are understood here as inner quotes
>> or second-level quotation marks, therefore they are only activated
>> nested in text with first level quotes: " ... '...' ... "
>>
>> lorem "ipsum 'dolor sit' amet"
>>
>> For LaTeX output, however, the csquotes package is a more powerful
>> option to control the correct quotation marks for each language. For
>> example:
>>
>> #+LaTeX_Header: \usepackage[german,english]{babel}
>> #+LaTeX_Header:
>> \usepackage[babel=true,autostyle=true,german=quotes]{csquotes}
>> #+LaTeX_Header: \MakeOuterQuote{"}
>> #+LaTeX_Header: \MakeInnerQuote{´}
>>
>> #+LaTeX: \selectlanguage{german}\EnableQuotes
>> It's a ´test´. "Please".
>>
>> lorem "ipsum ´dolor´ sit" amet
>>
>> Best regards,
>>
>> Juan Manuel
>>
>> Andreas Gösele writes:
>>
>>> Hi,
>>>
>>> even using "smart quotes", single quotes are not correctly exported into
>>> html, odt or latex.
>>>
>>> I have as document:
>>>
>>> | #+LANGUAGE: de
>>> | #+OPTIONS: ':t
>>> | #+OPTIONS: toc:nil
>>> | It's a 'test'. "Please".
>>>
>>> If I export it to html I get:
>>>
>>> | It’s a ’test’. „Please“.
>>>
>>> I should get:
>>>
>>> | It’s a ‚test‘. „Please“.
>>>
>>> If I export to latex I get:
>>>
>>> | It's a 'test'. "`Please"'.
>>>
>>> I should get:
>>>
>>> | It's a \glq{}test\grq{}. "`Please"'.
>>>
>>> If I export to odt I get:
>>>
>>> | Itâs a âtestâ. âPleaseâ.
>>>
>>> I should get:
>>>
>>> | Itâs a âtestâ. âPleaseâ.
>>>
>>> (The odt example outputs use utf8, I hope it gets transmitted.)
>>>
>>> So in all three cases apostrophes and double quotes are correctly
>>> exported, but not single quotes. Similar problem if I use "#+LANGUAGE:
>>> en".
>>>
>>> I have org-mode 9.3 with emacs 27.1.
>>>
>>> What could I do to get single quotes to be exported correctly?
>>>
>>> Thanks a lot!
>>>
>>> Andreas
>>>
--
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124
- Smart quotes not working correctly with single quotes, Andreas Gösele, 2021/05/27
- Re: Smart quotes not working correctly with single quotes, Nicolas Goaziou, 2021/05/28
- Re: Smart quotes not working correctly with single quotes,
Albert Krewinkel <=
- Re: Smart quotes not working correctly with single quotes, Andreas Gösele, 2021/05/28
- Re: Smart quotes not working correctly with single quotes, Andreas Gösele, 2021/05/29
- Re: Smart quotes not working correctly with single quotes, Nicolas Goaziou, 2021/05/28
- Re: Smart quotes not working correctly with single quotes, Juan Manuel Macías, 2021/05/28
- Re: Smart quotes not working correctly with single quotes, Andreas Gösele, 2021/05/28