1

Noticed that when using tex4ebook -f epub3 that the kindle previewer shows the generated epub as anonymous. Sure enough, its content.opf has

<dc:creator>Anonymous</dc:creator>

This was produced on windows by running TeXlive 2023 (updated)

tex4ebook -f epub3 mwe_no_creator.tex

where mwe_no_creator.tex looks like

\documentclass{memoir}

\usepackage{lipsum}

\title{A Cool Anthology}
\author{S.~Guide}
\date{}  % suppress normally-inserted date

\begin{document}

\maketitle
\thispagestyle{empty}  % suppress page number on title page (!)

\frontmatter

\tableofcontents

\mainmatter

\chapter{Story A}{

Story A graf 1

Story A graf 2

\lipsum

\end{document}

Using pdflatex on this file produces a title page which does show both title and author.

Seems like a pretty simple thing to fluff, but I can't see what I'm doing wrong here. Suggestions welcome.

btw, this is run without html tidy since I've found it seems to introduce a lot of epubcheck issues (without tidy, the generated epub is clean per epubcheck).

1 Answer 1

0

This issue seems to be fixed in the development version of tex4ebook. Until I post the updated version to CTAN, you can use the fixed version of tex4ebook.sty:

% Package tex4ebook. Author Michal Hoftich <[email protected]>
% This package is subject of LPPL license, version 1.3 
\ProvidesPackage{tex4ebook}[{{date}} version {{version}}]
\RequirePackage{etoolbox}
\RequirePackage{kvoptions}
\RequirePackage{graphicx}
% Command for generating NCX file. The hard work is done in the file
% tex4ebook.4ht
\def\ncxtable{}
% Command for generating OPF file 
\def\opftable{}

%Declare RFC3066 language code for babel language name
\def\DeclareLanguageEbook#1#2{%
\csgdef{rfclang#1}{#2}%
}
\def\GetLanguage{%
\ifx\bbl@main@language\@undefined en-US%  
\else%
\ifcsdef{rfclang\bbl@main@language}{\csuse{rfclang\bbl@main@language}}{}%
\fi%
}

\DeclareLanguageEbook{UKenglish}{en-GB}
\DeclareLanguageEbook{USenglish}{en-US}
\DeclareLanguageEbook{acadian}{fr}
\DeclareLanguageEbook{albanian}{sq}
\DeclareLanguageEbook{american}{en-US}
\DeclareLanguageEbook{amharic}{am}
\DeclareLanguageEbook{arabic}{ar}
\DeclareLanguageEbook{armenian}{hy}
\DeclareLanguageEbook{australian}{en-US}
\DeclareLanguageEbook{austrian}{de}
\DeclareLanguageEbook{basque}{eu}
\DeclareLanguageEbook{bengali}{bn}
\DeclareLanguageEbook{brazilian}{pt}
\DeclareLanguageEbook{brazil}{pt}
\DeclareLanguageEbook{breton}{br}
\DeclareLanguageEbook{british}{en-GB}
\DeclareLanguageEbook{bulgarian}{bg}
\DeclareLanguageEbook{canadian}{en-US}
\DeclareLanguageEbook{canadien}{fr}
\DeclareLanguageEbook{catalan}{ca}
\DeclareLanguageEbook{croatian}{hr}
\DeclareLanguageEbook{czech}{cs-CZ}
\DeclareLanguageEbook{danish}{da}
\DeclareLanguageEbook{divehi}{dv}
\DeclareLanguageEbook{dutch}{nl}
\DeclareLanguageEbook{english}{en}
\DeclareLanguageEbook{esperanto}{eo}
\DeclareLanguageEbook{estonian}{et}
\DeclareLanguageEbook{finnish}{f\/i}
\DeclareLanguageEbook{francais}{fr}
\DeclareLanguageEbook{french}{fr}
\DeclareLanguageEbook{galician}{gl}
\DeclareLanguageEbook{germanb}{de}
\DeclareLanguageEbook{german}{de}
\DeclareLanguageEbook{greek}{el}
\DeclareLanguageEbook{hebrew}{he}
\DeclareLanguageEbook{hindi}{hi}
\DeclareLanguageEbook{hungarian}{hu}
\DeclareLanguageEbook{icelandic}{is}
\DeclareLanguageEbook{interlingua}{ia}
\DeclareLanguageEbook{irish}{ga}
\DeclareLanguageEbook{italian}{it}
\DeclareLanguageEbook{kannada}{kn}
\DeclareLanguageEbook{khmer}{km}
\DeclareLanguageEbook{korean}{ko}
\DeclareLanguageEbook{lao}{lo}
\DeclareLanguageEbook{latin}{la}
\DeclareLanguageEbook{latvian}{lv}
\DeclareLanguageEbook{lithuanian}{lt}
\DeclareLanguageEbook{lowersorbian}{dsb}
\DeclareLanguageEbook{magyar}{hu}
\DeclareLanguageEbook{malayalam}{ml}
\DeclareLanguageEbook{marathi}{mr}
\DeclareLanguageEbook{naustrian}{de}
\DeclareLanguageEbook{newzealand}{en}
\DeclareLanguageEbook{ngerman}{de}
\DeclareLanguageEbook{norsk}{no}
\DeclareLanguageEbook{norwegiannynorsk}{nn}
\DeclareLanguageEbook{nynorsk}{no}
\DeclareLanguageEbook{occitan}{oc}
\DeclareLanguageEbook{oldchurchslavonic}{cu}
\DeclareLanguageEbook{persian}{fa}
\DeclareLanguageEbook{polish}{pl-PL}
\DeclareLanguageEbook{polutonikogreek}{el}
\DeclareLanguageEbook{portuges}{pt}
\DeclareLanguageEbook{portuguese}{pt}
\DeclareLanguageEbook{romanian}{ro}
\DeclareLanguageEbook{romansh}{rm}
\DeclareLanguageEbook{russian}{ru}
\DeclareLanguageEbook{samin}{se}
\DeclareLanguageEbook{sanskrit}{sa}
\DeclareLanguageEbook{scottish}{gd}
\DeclareLanguageEbook{serbian}{sr}
\DeclareLanguageEbook{serbo-croatian}{sh}
\DeclareLanguageEbook{slovak}{sk}
\DeclareLanguageEbook{slovene}{sl}
\DeclareLanguageEbook{slovenian}{sl}
\DeclareLanguageEbook{spanish}{es}
\DeclareLanguageEbook{swedish}{sv}
\DeclareLanguageEbook{tamil}{ta}
\DeclareLanguageEbook{telugu}{te}
\DeclareLanguageEbook{thai}{th}
\DeclareLanguageEbook{tibetan}{bo}
\DeclareLanguageEbook{turkish}{tr}
\DeclareLanguageEbook{turkmen}{tk}
\DeclareLanguageEbook{ukrainian}{uk}
\DeclareLanguageEbook{uppersorbian}{hsb}
\DeclareLanguageEbook{urdu}{ur}
\DeclareLanguageEbook{vietnamese}{vi}
\DeclareLanguageEbook{welsh}{cy}

\AtEndDocument{%
\ncxtable
\opftable
}

% Default empty values
\def\Title{Unnamed}
\def\Author{Anonymous}

% We need to save values of title, author etc.
\let\tf@orig@title\title

% normal \title
\newcommand\tf@title[1]{%
  \tf@orig@title{#1}%
  \let\Title\@title%
}

% \title with optional argument
\newcommand\tf@opttitle[2][]{%
  \tf@orig@title[#1]{#2}%
  \let\Title\@title%
}

% some classes (amsart) define \title command with optional argument
\renewcommand\title{%
\@ifnextchar[\tf@opttitle\tf@title%
}

\let\tf@orig@author\author
\newcommand\tf@author[1]{%
  \tf@orig@author{#1}%
  \gdef\Author{#1}%
}

\newcommand\tf@optauthor[2][]{%
  \tf@orig@author[#1]{#2}%
  \gdef\Author{#2}%
}

% support optiona argument for \author as well
\renewcommand\author{%
\@ifnextchar[\tf@optauthor\tf@author%
}

%\let\Author\@author
\let\Date\today
\let\origdate\date
\renewcommand\date[1]{%
  \origdate{#1}%
  \global\let\Date\@date%
}
%}


% Fixes for AMS classess
\AddToHook{class/after}{%
  \ifx\authors\@empty%
  \def\@maketitle@hook{
  \global\let\Author\authors
  }
  \fi%
}

\newcommand\coverimage[2][]{\includegraphics[#1]{#2}}

\newcommand\epubpage{\clearpage}

\endinput

It produces the following metadata file:

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://www.idpf.org/2007/opf"
unique-identifier="dcidid" version="3.0">
  <metadata xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:opf="http://www.idpf.org/2007/opf">
    <dc:title>A Cool Anthology</dc:title>
    <dc:language>en-US</dc:language>
    <dc:identifier id="dcidid">
    http://example.com/sample</dc:identifier>
    <dc:creator>S.&#160;Guide</dc:creator>
    <dc:date>2023-11-12T16:25:00Z</dc:date>
    <meta property="dcterms:modified">2023-11-12T16:25:00Z</meta>
  </metadata>
  <manifest>
    <item id="ncx" href="sample.ncx"
    media-type="application/x-dtbncx+xml" />
    <item id="stylesheet" href="sample.css"
    media-type="text/css" />
    <item id="file1" href="sample.xhtml"
    media-type="application/xhtml+xml" />
    <item id="file2" properties="nav" href="sampleli1.xhtml"
    media-type="application/xhtml+xml" />
    <item id="file3" href="samplech1.xhtml"
    media-type="application/xhtml+xml" />
  </manifest>
  <spine toc="ncx">
    <itemref idref="file1" />
    <itemref idref="file2" />
    <itemref idref="file3" />
  </spine>
</package>

3
  • Thank you kindly, this seems to work. Though the interpretation of ~ (non-breaking inter-word space) doesn't seem to work properly in the metadata, but using "\ " instead makes everything happy.
    – ewedel
    Commented Nov 14, 2023 at 7:56
  • Any idea when this might appear at ctan?
    – ewedel
    Commented Nov 14, 2023 at 7:56
  • @ewedel I usually do updates on CTAN once a year, usually before new TeX Live version, but I will probably do it earlier this year, as there are enough updates already.
    – michal.h21
    Commented Nov 14, 2023 at 8:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .