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

[Question] How to add license to a single file book? #103

Open
Geobert opened this issue Dec 28, 2022 · 2 comments
Open

[Question] How to add license to a single file book? #103

Geobert opened this issue Dec 28, 2022 · 2 comments

Comments

@Geobert
Copy link
Contributor

Geobert commented Dec 28, 2022

I have a short story so it doesn't have chapters. I'm generating the pdf and epub using the -s flag. I want to add the license of the text to both format but I can't find my way though it :-/

PDF: I've printed the tex.template, and see a redefinition of \maketitle but it is used only for book, I can't find the one used if it's not a book.

EPUB: I've printed the template using the command on the doc, but can't see how to add the license on the title page

Also, what's the autograph metadata? It was added without documentation :)

@Geobert
Copy link
Contributor Author

Geobert commented Dec 31, 2022

Replying to myself for the EPUB part: we can't add license to the title page, as its template is hardcoded and no option allows to replace it. I'm working on a patch for this

@Geobert
Copy link
Contributor Author

Geobert commented Jan 4, 2023

Fixes the EPUB part in #105 allowing to override the epub.titlepage.xhtml template.
For pdf, I added this to the template:

<<^book>>
% Redefine the \maketitle command, for single file stories (not used if book option is set to true)
\renewcommand{\maketitle}{
  \thispagestyle{plain}
  % title, title, subtitle, date, license
  \begin{center}  
    {\LARGE \@title \par}%
    \vskip 1.5em%
    {\large
      \lineskip .5em%
      \begin{tabular}[t]{c}%
        \@author
      \end{tabular}\par}%
    <<#has_date>>{\vskip 1em \large \@date}<</has_date>>
    <<#has_license>>{\vskip .2em \small Texte sous license <<&license>>}<</has_license>>
  \end{center}
  \par
  \vskip 1.5em
}
<</book>>

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

1 participant