Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/pandocPublic

LaTeX reader: RN and Rn, from biblatex#3854

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jgm merged 2 commits intojgm:masterfrombucklereed:latex-rn
Aug 24, 2017
Merged

Conversation

bucklereed
Copy link
Contributor

@bucklereedbucklereed commentedAug 20, 2017
edited
Loading

This is not bug-for-bug compatible: it barfs on weird input, whereas biblatex will accept just about anything that starts with a digit and several things that don't. Is that acceptable?

I had a go at bug-for-bug compatibility, but the implementation was getting a little bit silly. Here are the test cases that I cut out when I gave up:

          , "internal spaces" =:            "\\RN{ 2 3 }" =?>            para (str "II3")          , "internal spaces many words" =:            "\\RN{5 hello there}" =?>            para (str "V" <> str "HELLO" <> space <> "THERE")          , "newlines" =:            "\\RN{\n15\n17\n}" =?>            para (str "XV17")          , "number then space then non-number" =:            "\\Rn{5 HELLO}" =?>            para (str "vHELLO")          , "number then non-number, non-number gets upcased by RN" =:            "\\RN{4hello}" =?>            para (str "IVHELLO")          , "internal command" =:            "\\Rn{4\\textit{8}}" =?>            para (str "iv" <> emph (str "8"))          , "dotted" =:            "\\RN{3.8}" =?>            para (str "III.8")          , "negative" =:            "\\RN{-3}" =?>            (mempty :: Blocks)          , "double negative" =:            "\\RN{--3}" =?>            para (str "III")          , "triple negative" =:            "\\RN{---3 2}" =?>            para (str "2")          , "quadruple negative" =:            "\\RN{----3 2}" =?>            para (str "III2")          , "negative zero" =:            "\\RN{-0}" =?>            (mempty :: Blocks)          , "spaced negative" =:            "\\RN{- 3 5}" =?>            para (str "5")          , "spaced double negative" =:            "\\Rn{- - 3 5}" =?>            para (str "iii5")          , "internal hyphen" =:            "\\RN{3-5}" =?>            para (str "III-5")          , "space then unbraced argument" =:            "\\RN 7 ok" =?>            para (str "VII" <> space <> str "ok")          , "space then unbraced argument with trailing nondigits" =:            "\\RN 7ok" =?>            para (str "VIIok")          , "multiple zeroes" =:            "\\Rn{0 0 3}" =?>            para (str "0" <> space <> str "3")          -- The next cases cause errors when processed by LaTeX, but we would rather produce wonky output than fail.          -- Other things that make biblatex error, and hence which we don't mind if they don't work:          -- - "\\RN{hello}"          -- - "\\RN\n\n"          , "argument in textit" =:            "\\RN{\\textit{8}}" =?>            para (emph (str "8"))          , "leading dot" =:            "\\Rn{.3}" =?>            para (str ".3")          , "empty brace" =:            "\\RN{}" =?>            (mempty :: Blocks)

More things that don't work:

  • "\RN{{3}}"
  • "\Rn \bgroup 13 \egroup"

@bucklereed
Copy link
ContributorAuthor

Oops, I think I've just found a better implementation anyway. It's funny how that always seems to happen after the pull request, and not before...

@bucklereed
Copy link
ContributorAuthor

👍 Travis is complaining, but that looks like more HEAD breakage (I didn't even touch that module) and it's green on newer GHCs.

@jgm
Copy link
Owner

jgm commentedAug 24, 2017

"\RN{{3}}"
"\Rn \bgroup 13 \egroup"

Have you looked at usinggrouped?

@bucklereed
Copy link
ContributorAuthor

Sorry, I wasn't clear there: those don't work in LaTeX, and the current implementation reflects that.

@jgmjgm merged commitc80e26f intojgm:masterAug 24, 2017
@jgm
Copy link
Owner

jgm commentedAug 24, 2017

Thanks!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@bucklereed@jgm

[8]ページ先頭

©2009-2025 Movatter.jp