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

Short story format ? #3

Closed
taophp opened this issue Feb 29, 2016 · 8 comments
Closed

Short story format ? #3

taophp opened this issue Feb 29, 2016 · 8 comments

Comments

@taophp
Copy link
Contributor

taophp commented Feb 29, 2016

I may use crowbook to format some short stories, with only one md file, so it should be great to have a option to change the output to something adapted : there is only one chapter, one title for both the book and the chapter, no numbering and no blank page to start with.

@crowdagger
Copy link
Owner

Including the md file with "!" allows to hide the chapter in the rendered file (though they still appear in the TOC). E.g:

author: Foo
title: Bar

! short_story.md

should do the trick for current HTML/EPUB output . (PDF/Latex would currently require to change the template file as well, to use "article" class instead of "book", because there is currently no other way to specify it.) However it would indeed be nice to be able to just have one file for the markdown code and the metadata, as you point out in #2

@taophp
Copy link
Contributor Author

taophp commented Mar 1, 2016

I'll try your idea for the epub when I have a minute and let you if it does the trick.

PDF/Latex would currently require to change the template file as well, to use "article" class instead of "book", because there is currently no other way to specify it.

Yes, that's what I was thinking about.

crowdagger added a commit that referenced this issue Mar 1, 2016
This option allows Crowbook to parse a single MarkDown file,
defaulting to hide the chapters' headings. This should allow to get
ride of `.book` file for short stories.

Resolves: #2, #3
@crowdagger
Copy link
Owner

crowbook can now be called with --single to parse a Markdown file that embed its configuration in an inline YAML block. Not closing the bug yet, though, because it would still be nice to have templates (at least for LaTeX) that depend on some options to use different a different class for the document.

@taophp
Copy link
Contributor Author

taophp commented Mar 1, 2016

For Epub, hiding the chapter title is a acceptable solution, at least for me.

@taophp
Copy link
Contributor Author

taophp commented Mar 1, 2016

Great to discover the --single option ! I have test it immediately and, yes, it good for me ! Thanks for your work !

A detail to consider: as there is no chapter, and that the title is set in the Yaml, the h1 requirement seems redundant in that case. It is not a problem for the PDF output, but the epub failed if the H1 is missing.
In fact, that should be useful for Jekyll: many Jekyll templates (including mines) treat the document title (defined in the Yaml block) separately form the rest of the text. So relying on the h1 tag in the text breaks the template...

@taophp taophp closed this as completed Mar 1, 2016
@taophp taophp reopened this Mar 1, 2016
@crowdagger
Copy link
Owner

A detail to consider: as there is no chapter, and that the title is set in the Yaml, the h1 requirement seems redundant in that case. It is not a problem for the PDF output, but the epub failed if the H1 is missing.

This requirement was because I was convinced it would cause problems if the EPUB's manifest and TOC listed a file with an empty title, but apparently it doesn't (it just doesn't appear in the TOC but in that case that's probably what you'd want anyway) so I just removed it.

@taophp
Copy link
Contributor Author

taophp commented Mar 1, 2016

OK, that's great. Now, what I miss the most is the support of the article latex class... to close this bug and definitively adopt Crowbook for my short stories chain.

@taophp
Copy link
Contributor Author

taophp commented Mar 2, 2016

Great! You make my day!

crowdagger pushed a commit that referenced this issue Mar 15, 2016
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

No branches or pull requests

2 participants