Skip to content
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

disable conversion of straight quotes to curly quotes in latex to wiki conversion #2541

Closed
jarnosc opened this issue Nov 16, 2015 · 4 comments

Comments

@jarnosc
Copy link

jarnosc commented Nov 16, 2015

Hello!

I am using LaTeX with the wiki.sty package. I'd like to prevent Pandoc from converting the wiki markup ''italics'' or '''boldface''' into ”utf8” ”’quotes”’ when converting my latex file to wiki markup, for further processing. In fact, according to the manual, the directives "--smart-quote" "-S" work for converting to LaTeX, not from it; and if you require UTF-8 as input, it should be fairly easy to input the curly quotes directly, and I see no reason to encourage the use of those TeX ligatures anymore.

I think this issue fits in the category of feature request.

@jarnosc jarnosc changed the title disable conversion of quotes to smart quotes from latex to wiki disable conversion of straight quotes to curly quotes in latex to wiki conversion Nov 16, 2015
@jgm
Copy link
Owner

jgm commented Nov 17, 2015

Try with --no-tex-ligatures

+++ jlrn7 [Nov 16 15 13:19 ]:

Hello!

I am using LaTeX with the wiki.sty package. I'd like to prevent Pandoc
from converting the wiki markup ''italics'' or '''boldface''' into
”utf8” ”’quotes”’ when converting my latex file to wiki markup, for
further processing. In fact, according to the manual, the directives
"--smart-quote" "-S" work for converting to LaTeX, not from it; and if
you require UTF-8 as input, it should be fairly easy to input the curly
quotes directly, and I see no reason to encourage the use of those TeX
ligatures anymore.

I think this issue fits in the category of feature request.


Reply to this email directly or [1]view it on GitHub.

References

  1. disable conversion of straight quotes to curly quotes in latex to wiki conversion #2541

@jarnosc
Copy link
Author

jarnosc commented Nov 19, 2015

I fear I didn't explain myself: I normally type ''emphasis'' with two single quotation marks with the wiki.sty package on LaTeX; now I want to convert the LaTeX file to ''true'' wiki, but the processor converts my double single quotes into a unicode closing curly quotes; I want to avoid that. The --no-tex-ligatures switch also works only in conversion to latex, not from it.

@jgm
Copy link
Owner

jgm commented Nov 19, 2015

OK, I understand:

% pandoc -t mediawiki -f latex 
''hi''
^D
”hi”

and you want ''hi'' instead. I think this is really a bug. the LaTex reader shouldn't be parsing these as a Quoted inline when --no-tex-ligatures is set. Fix is fairly easy.

@jgm
Copy link
Owner

jgm commented Nov 19, 2015

On second look: the current situation with --no-tex-ligatures is confusing, since in addition to affecting the LaTeX writer it actually causes smart quote parsing to be turned off in the reader, but only when the output format is LaTeX or ConTeXt.

It would make more sense for --no-tex-ligatures to affect the LaTeX reader, no matter what the output format. (We'd still need to have it affect other readers when the output format is LaTeX or ConTeXt, because otherwise we get Quoted elements in the parse tree and the LaTeX writer would have no idea how to reconstruct the original delimiter characters. This is a bit ugly but I don't see a good way around it.)

@jgm jgm closed this as completed in ed1173a Nov 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants