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

Option to enable Babel's shorthand #7004

Closed
SG-phimeca opened this issue Jan 4, 2021 · 6 comments
Closed

Option to enable Babel's shorthand #7004

SG-phimeca opened this issue Jan 4, 2021 · 6 comments

Comments

@SG-phimeca
Copy link

SG-phimeca commented Jan 4, 2021

Babel shorthands are disabled in the latex default template in order to avoid some side-effects.
I would rather deal with those side-effects than change the way I input punctuation (I write in French).
Would it be possible to add an option for re-enabling babel shorthands?

The new way of diabling shorthands (#6817) makes it harder to re-enable it with a monkey patch without using a custom template.

pandoc 2.11.3.2
Compiled with pandoc-types 1.22, texmath 0.12.1, skylighting 0.10.2,
citeproc 0.3.0.3, ipynb 0.1.0.1

@jgm
Copy link
Owner

jgm commented Jan 4, 2021

Probably this is a wont-fix, but perhaps @lygamac has some ideas about how we might make this easier for you.

@lygamac
Copy link

lygamac commented Jan 5, 2021

Maybe adding

\let\languageshorthands\LanguageShortHands

to your header file might help. This undoes the redefinition. As no extra option are passed in babel package, shorthands are enabled by default.

@SG-phimeca
Copy link
Author

Thanks for the suggestion @lygamac. Unfortunately the code in the header is inserted before the paragraph that disable the shorthands, namely:

% get rid of language-specific shorthands (see #6817):
 \let\LanguageShortHands\languageshorthands
 \def\languageshorthands#1{}

This is what I meant by “The new way of diabling shorthands (#6817) makes it harder to re-enable it”

@lygamac
Copy link

lygamac commented Jan 5, 2021

Try

\AtBeginDocument{\let\languageshorthands\LanguageShortHands}

@SG-phimeca
Copy link
Author

Nice, it works. I did not knew about \AtBeginDocument

@jgm
Copy link
Owner

jgm commented Jan 5, 2021

I'll close this. Good workaround!

@jgm jgm closed this as completed Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants