New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Latex to epub – German Quotes not transformed correctly #5470
Comments
parsing latexYou're saying the exact input is the following?
Shouldn't it be in LaTeX:
Or is this a syntax I don't know? outputting htmlThe second part of this issue is that we currently don't output quotes in different locales, see #84 But for ePUB/HTML output you can use |
Note that |
@mb21 No, that is actually correct. Your Syntax creates English quotation marks. The German ones are like this: "`here ist the quote"' |
So am I correctly understanding that in babel, |
First part: exactly right. If this is just with babel, I don't know. This is the usually recommended version to set German text. I found this in several books and tutorials. I personally always used that method. |
Experimented -- looks like it's babel-specific, and only when language is german. |
This is possible. Anyways: unfortunately I currently see no way to easily create german quotation marks in pub. This is really bad for me because my whole publishing workflow otherwise works very well. |
Since they are not "smart" quotes (start and end are different in the source material), wouldn't a simple filter or a preprocessor take care of that conversion for you? |
I just saw that in the LaTeX reader we have this code in smart quote parsing: -- the following is used by babel for localized quotes:
<|> quoted' doubleQuoted (try $ sequence [symbol '"', symbol '`'])
(void $ try $ sequence [symbol '"', symbol '\'']) This causes the ligatures to be rendered as regular English-style quotes in most output formats, which isn't desirable. Instead of parsing Note that you could write a simple lua filter that renders Quoted DoubleQuoted elements with the German quotes. See lua filter documentation on the website. |
-- quote.lua
function Quoted(el)
if el.quotetype == 'DoubleQuote' then
return {pandoc.Str("„"), pandoc.Span(el.content), pandoc.Str("“")}
end
end Run with |
Hit upon the same issue with From that perspective, I guess that such simple filter is OK to use and easier to maintain that any change in |
I want to keep this issue open to track the issue noted above about the special babel ligatures. |
Extending the answer above, you can also add single quote handling like this:
|
Pandoc transformes German quotes incorrectly.
(1) Context
(a) in the LaTeX file the Babel / German package is used
\usepackage[ngerman]{babel}
(b) The quotes are written correctly such as: "`Das ist ein Zitat"'
(c) In the pandoc command also language is defined as German with:
-V lang=de-AT
(2) Correct result would be:
The correct translation to ePub would have to be: „Das ist ein Zitat“ or alternatively possible also: »Das ist ein Zitat«
(2) Bug:
Pandoc actually renders English quotation marks: "Das ist ein Zitat"
The text was updated successfully, but these errors were encountered: