-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Cross-reference to section is labelled „section_title“ #4526
Labels
Comments
Shorter repro: <chapter xml:id="_bedienoberfläche">
<title>Bedienoberfläche</title>
<simpara>Dieses Kapitel stellt die Bedienoberfläche vor.</simpara>
<section xml:id="_anmelden">
<title>Anmelden</title>
<simpara>Nach dem Anmelden wird man auf die <xref linkend="_startseite"/> weitergeleitet.</simpara>
<tip>
<simpara>This is a test for a „tip“.</simpara>
</tip>
</section>
<section xml:id="_startseite">
<title>Startseite</title>
<simpara>Nach dem <xref linkend="_anmelden"/> gelangt man zur Startseite.</simpara>
</section>
</chapter> |
Relevant bit of docbook reader: -- Use the 'xreflabel' attribute for getting the title of a xref link;
-- if there's no such attribute, employ some heuristics based on what
-- docbook-xsl does.
xrefTitleByElem el
| not (null xrefLabel) = xrefLabel
| otherwise = case qName (elName el) of
"chapter" -> descendantContent "title" el
"sect1" -> descendantContent "title" el
"sect2" -> descendantContent "title" el
"sect3" -> descendantContent "title" el
"sect4" -> descendantContent "title" el
"sect5" -> descendantContent "title" el
"cmdsynopsis" -> descendantContent "command" el
"funcsynopsis" -> descendantContent "function" el
_ -> qName (elName el) ++ "_title" |
I don't know Haskell at all, but do I get it right that only a single line is missing? "section" -> descendantContent "title" el |
That seems correct! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using Ubuntu 17.10:
with testbook.xml:
yields this output in testbook.tex:
The problem is the
section\_title
in the output, which should have been substituted. For example:Note that this is not specific to LaTeX output. I also see this in EPUB3 output as well.
The text was updated successfully, but these errors were encountered: