Skip to content

Remove punctuation mark from the figure captions #1444

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

Merged
merged 9 commits into from
Jul 3, 2020
Merged

Conversation

etanot
Copy link
Contributor

@etanot etanot commented Jun 24, 2020

@ben can you take a look into this pull request? As you suggested, I've removed all punctuation mark from figure captions. Here I'm adding few screenshots after changes:

double-dot
triple-dot

Resolves: #1437

@Morganov
Copy link
Member

I assume, images captions also have to be updated by removing trailing dot.

@etanot
Copy link
Contributor Author

etanot commented Jun 24, 2020

@Morganov

I assume, images captions also have to be updated by removing trailing dot.

Didn't get. Are you talking about removing punctuation mark from here?

I was thinking about removing these punctuation marks, also, but in a separate commit. At some place, it doesn't end with punctuation mark (like this), and at some places it does.

@Morganov
Copy link
Member

@finn0
Exactly. An image could also be mentioned in text. Asciidoc takes an image title from square brackets and use it as-is to create a link in text. So, the trailing dots in image title is the root cause of the issue #1437

@etanot
Copy link
Contributor Author

etanot commented Jun 24, 2020

There is one more issue, due to this PR, some paragraph don't have any punctuation mark (see below) because those punctuation mark are their because of caption.

no-punctuation-mark

I think a separate commit would be good idea because I found there are also other places where punctuation marks are missing like this which have nothing to do with this PR.

@etanot etanot changed the title Remove punctuation mark from the figure captions WIP: Remove punctuation mark from the figure captions Jun 25, 2020
@etanot
Copy link
Contributor Author

etanot commented Jun 25, 2020

@Morganov

Exactly. An image could also be mentioned in text. Asciidoc takes an image title from square brackets and use it as-is to create a link in text. So, the trailing dots in image title is the root cause of the issue #1437

Removing punctuation marks from caption text (text in square bracket) don't fix the problem (see below and this also),

double-dot
Fig: Screenshot of Progit book based on etanot@d682f1b commit

but removing it from text present above image::images do fix the problem. So I thought, Asciidoc takes image title from text present above image::images; please correct me, if I'm wrong.

double-dot-fixed

I've tested this before pull request and now I confirm it. Anyway I'm making changes that you've suggested, once it completed I'll force push it.

Edit:
Even some places don't have any content in square bracket, see this. If you scroll below you found none of image::images tag have any content in square bracket; but in book they do have caption and referred in text.

organization_page

@etanot
Copy link
Contributor Author

etanot commented Jun 25, 2020

Some figures don't have any caption associated with them, like in rerere.asc, reset.asc and replace.asc; and if you scroll below, you'll notice none of figure have any captions associated with them. Should I assign some caption to those figure? Or leave as it's.

@Morganov
Copy link
Member

Removing punctuation marks from caption text (text in square bracket) don't fix the problem (see below and this also)

Yes, you were right.

For "block" image AsciiDoc uses its title form line above that starts from dot to create a signature like "Figure N: Image title". Additionally, the same text from the image block is used to create a link to image if it's mentioned in the text.

The title in brackets is using only for popup tip, but for "block" images it's not working (at least in html, epub and pdf versions of book and example at https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#images)

Even some places don't have any content in square bracket, see this. If you scroll below you found none of image::images tag have any content in square bracket; but in book they do have caption and referred in text.

I don't know will this issue be fixed later in AsciiDoc or do we need to remove those captions from brackets if they are. As for now, I recommend you to leave them as-is.

Some figures don't have any caption associated with them, like in rerere.asc, reset.asc and replace.asc; and if you scroll below, you'll notice none of figure have any captions associated with them. Should I assign some caption to those figure? Or leave as it's.

IMHO, it's a good idea to add a meaningful caption to images that have no it.

If a paragraph ends with a figure caption, it ends with double period
marks. One of them is due to figure caption, which itself ends with a
period and other is for end of paragraph.

So removing period from figure captions would be a good idea, as Ben has
suggested[1].

Due to this commit, now some paragraphs don't have any period mark at
end of paragraph. Those period are their because of caption, that's
paragraphs itself don't end with any period, see [2].

[1]: progit#1437 (comment)
[2]: progit#1444 (comment)

Resolves: progit#1437
etanot pushed a commit to etanot/progit2 that referenced this pull request Jun 26, 2020
- After removing period mark from figure captions; some paragraph left
  with no period because those paragraph has only one period and that's
  because of figure caption (see
  progit#1444 (comment)).
- End all bullet points with a period.
@etanot etanot changed the title WIP: Remove punctuation mark from the figure captions Remove punctuation mark from the figure captions Jun 26, 2020
@etanot
Copy link
Contributor Author

etanot commented Jun 26, 2020

@Morganov I've made all changes that you've suggested. Can you review it, now?

@etanot
Copy link
Contributor Author

etanot commented Jun 26, 2020

@Morganov

I recommend you to leave them as-is.

Sorry, I've already put same text as in caption in empty square bracket. At most places same text has been used in square bracket. If you want to discard those changes, you can discard it; I've put these changes in a separate commit.

it's a good idea to add a meaningful caption to images that have no it.

May be I'll do it in separate PR.

Copy link
Member

@ben ben left a comment

Choose a reason for hiding this comment

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

Wow, this is a really thorough examination of end-of-line punctuation! Thanks for going through all this work, I really appreciate it. I just had a few notes, but I'm on board with most of what you've done here.

Comment on lines 333 to 337
* What the project is for
* How to configure and install it
* An example of how to use it or get it running
* The license that the project is offered under
* How to contribute to it
* What the project is for.
* How to configure and install it.
* An example of how to use it or get it running.
* The license that the project is offered under.
* How to contribute to it.
Copy link
Member

Choose a reason for hiding this comment

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

I'd say leave the periods off of these. It's a bullet list of sentence fragments.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, I follow Garner's book for punctuation, in which it's stated that if bullet point starts with a lowercase letter, end it with semicolon except last one which ends with period. And if bullet starts with uppercase letter end it with period; and by convention a fragment would be acceptable units. Let me check it for APA style.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, in APA style we may not use punctuation with fragments of sentence; but my question is, are these statements really fragments of a sentence or a complete sentence? These statements can exist alone; and also if we're assuming these statements as fragments, it should start with lowercase.

Comment on lines 16 to 18
* The name of the reference being pushed to
* The old revision where that branch was
* The new revision being pushed
* The name of the reference being pushed to.
* The old revision where that branch was.
* The new revision being pushed.
Copy link
Member

Choose a reason for hiding this comment

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

Again, bullet lists don't need punctuation.

Comment on lines 131 to 133
* git push origin :branch-to-delete (Bazaar can't accept ref deletions in this way.)
* git push origin old:new (it will push 'old')
* git push --dry-run origin branch (it will push)
* git push origin :branch-to-delete (Bazaar can't accept ref deletions in this way).
* git push origin old:new (it will push 'old').
* git push --dry-run origin branch (it will push).
Copy link
Member

Choose a reason for hiding this comment

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

Bullet lists don't need punctuation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about this?

* `git push origin :branch-to-delete`: Bazaar can't accept ref deletions in this way,
* `git push origin old:new`: it will push 'old',
* `git push --dry-run origin branch`: it will push.
  • git push origin :branch-to-delete: Bazaar can't accept ref deletions in this way,
  • git push origin old:new: it will push 'old',
  • git push --dry-run origin branch: it will push.

see APA style section 6.52 (Items That Contain Both Phrases and Sentences).

Copy link
Member

Choose a reason for hiding this comment

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

I don't think that it's the best way to use the in-line comment for the command example.
The colon symbol is used in Git as a special symbol and the additional one might confuse people who read the book.

Possibly, the better way is to use // to separate command and a comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Morganov,

the better way is to use // to separate command and a comment.

How about using # to separate command and a comment instead of //? Even if user copy whole command, they won't get any error because in most shell # sign is used for comment.

@ben
Copy link
Member

ben commented Jun 26, 2020

it's a good idea to add a meaningful caption to images that have no it.

May be I'll do it in separate PR.

Yeah, no need to add more to this one.

Vipul Kumar added 8 commits July 3, 2020 15:55
- After removing period mark from figure captions; some paragraph left
  with no period because those paragraph has only one period and that's
  because of figure caption (see
  progit#1444 (comment)).
- End all bullet points with a period.
There is no need for period mark at end of text, present in square
bracket; and removing it also make syntax consistent across whole
project.
Some square brackets are empty, but they do have caption along with
them.  So I've put same text as caption in empty square brackets.
We generally separate statement and commands with a colon.
Double quote around "Home" keyword is missing in square bracket, but
present in figure caption, see @Morganov's comment on PR progit#1444[1].

[1]: progit#1444 (comment)
@etanot
Copy link
Contributor Author

etanot commented Jul 3, 2020

@ben, I've made all suggested changes. Can you review the pull request, once again?

@ben
Copy link
Member

ben commented Jul 3, 2020

@ben ben merged commit 8176545 into progit:master Jul 3, 2020
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.

Double full stop, at end of paragraph
3 participants