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

Add support for Hungarian language @aref #672

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dmurdoch
Copy link
Contributor

As mentioned in Issue #671, the babel Hungarian support in LaTeX adds the macro \aref to be like \ref but with support for some special Hungarian grammatical constraints.

This PR takes the changes from my magyarbookdown package and includes them in bookdown. I'm not sure this is an appropriate addition, but I'll let you decide.

@CLAassistant
Copy link

CLAassistant commented Sep 24, 2020

CLA assistant check
All committers have signed the CLA.

@cderv cderv linked an issue Mar 24, 2021 that may be closed by this pull request
@cderv cderv requested a review from yihui March 24, 2021 11:19
Copy link
Member

@yihui yihui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the recent PR #1120 (aiming to fix #1114), it's possible to customize figure labels via a function provided by users. I don't know anything about Hungarian, but I guess at least it should be possible to generate a label like az 1. ábra now for non-LaTeX output. If that's the case, we don't need to embed the label-generating logic for a particular language inside this package.

For LaTeX output, perhaps we just need a config option for users to specify which LaTeX command they'd like to convert \@ref() to (the default would still be \ref{}). Again, I know nothing about \aref{}, so my naive question is, could redefining \ref to \aref solve the problem?

Thanks!

@tamas-ferenci
Copy link

Thank you! Unfortunately this redefinition wouldn't really solve the problem, as we might need \ref as well. (aref is only need when there is a definite article in the reference text.) If possible, the best would be to introduce \@aref identically to \@ref, with the former translating to aref in LaTeX, the latter to ref. Of course, HTML output also needs its own logic, similar to https://github.com/dmurdoch/magyarbookdown/blob/master/R/replacements.R .

@yihui
Copy link
Member

yihui commented Apr 7, 2021

@tamas-ferenci Thanks for the explanation! We'll think more about it.

@yihui yihui added the feature a feature request or enhancement label Apr 7, 2021
@tamas-ferenci
Copy link

Dear @yihui , I was just wondering if there are any updates on this issue. Thank you very much!

@yihui
Copy link
Member

yihui commented Oct 26, 2024

Sorry, there aren't, but I'm okay with merging this PR (the Git conflicts need to be resolved first).

@tamas-ferenci
Copy link

tamas-ferenci commented Oct 26, 2024

That would be great, if you could do it, thank you in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to handle a specialized addition to bookdown?
4 participants