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

roffit: strip italic corrections #29

Merged
merged 2 commits into from
Sep 16, 2022
Merged

Conversation

bagder
Copy link
Owner

@bagder bagder commented Sep 16, 2022

The \/ escape sequence inserts an italic correction, i.e. a small piece of horizontal motion (1/12 em) that should be sufficient to separate an italic character from a following roman character. Similarly, \,, adds a left italic correction, always a zero motion, that should be sufficient to separate a roman character from an immediately following italic character.

roffit now simply removes them

Fixes #28

@hydrargyrum
Copy link

nope it fails: Unmatched [ in regex; marked by <-- HERE in m/\\[ <-- HERE ,/ at ./roffit line 563.

however, this works: $txt =~ s@\\[,/]@@g;

@hydrargyrum
Copy link

maybe add to testpage.1 and testpage.output?

The `\/` escape sequence inserts an italic correction, i.e. a small piece of
horizontal motion (1/12 em) that should be sufficient to separate an italic
character from a following roman character. Similarly, `\,`, adds a left
italic correction, always a zero motion, that should be sufficient to separate
a roman character from an immediately following italic character.

roffit now simply removes them

Reported-by: hydrargyrum on github
Fixes #28
@bagder bagder force-pushed the bagder/italic-corrections branch from 6bd0f46 to 19955b6 Compare September 16, 2022 15:40
@bagder
Copy link
Owner Author

bagder commented Sep 16, 2022

I fixed the bad perl and added a test for this.

Copy link

@hydrargyrum hydrargyrum left a comment

Choose a reason for hiding this comment

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

from my POV, it works

@bagder
Copy link
Owner Author

bagder commented Sep 16, 2022

Excellent, many thanks!

@bagder bagder merged commit 674e2b7 into master Sep 16, 2022
@bagder bagder deleted the bagder/italic-corrections branch September 16, 2022 15:45
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

Successfully merging this pull request may close these issues.

roffit takes some characters that should be ignored
2 participants