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

Don't collapse cite when any of the cites contains optional arguments #1732

Merged
merged 7 commits into from Jan 21, 2021

Conversation

slideclimb
Copy link
Collaborator

@slideclimb slideclimb commented Jan 8, 2021

Fix #1730

Summary of additions and changes

  • Don't collapse a cite when it contains an optional argument, as an optional argument belongs to a specific citation and does not make any sense when collapsed with another citation.

How to test this pull request

Lorem Ipsum.\footcite[p. 1]{Book1} \footcite[p. 2]{Book2}

See tests.

@slideclimb slideclimb added this to the b0.7.3 milestone Jan 8, 2021
@slideclimb slideclimb self-assigned this Jan 8, 2021
@HannahSchellekens HannahSchellekens added the bug Deficiencies in TeXiFy behaviour. label Jan 10, 2021
Copy link
Member

@HannahSchellekens HannahSchellekens left a comment

Choose a reason for hiding this comment

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

image

First one does not get a collapse inspection on the last 2 citations.

@slideclimb
Copy link
Collaborator Author

First one does not get a collapse inspection on the last 2 citations.

Fair point. Completely didn't think of that. Will fix.

@PHPirates PHPirates marked this pull request as draft January 12, 2021 11:27
@slideclimb slideclimb marked this pull request as ready for review January 15, 2021 16:30
Copy link
Member

@HannahSchellekens HannahSchellekens left a comment

Choose a reason for hiding this comment

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

Lorem Ipsum.\footcite[p. 1]{Book1}~\cite{Book2}~\cite{chi}\cite[a]{bambi}.

Non breaking spaces break the inspection. Other than that, good work :)

@slideclimb
Copy link
Collaborator Author

Thanks! I guess it didn't work with non-breaking spaces before? (I didn't change anything about finding the cites.) I agree that should work as well, will add.

@PHPirates PHPirates merged commit da1cecf into master Jan 21, 2021
@PHPirates PHPirates deleted the collapse-citation branch January 21, 2021 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Deficiencies in TeXiFy behaviour.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Collapse Citations removes the page number from the citation
3 participants