Skip to content

Instantly share code, notes, and snippets.

View petersell's full-sized avatar

Andreas Petersell petersell

View GitHub Profile
Verifying my Blockstack ID is secured with the address 1LGrzTpnrXfSuNS5uVMer5tbn6wmenvye2 https://explorer.blockstack.org/address/1LGrzTpnrXfSuNS5uVMer5tbn6wmenvye2
@petersell
petersell / preventpagebreak.xsl
Last active May 16, 2017 10:04
Umbruchverhinderne Attribute
<xsl:attribute-set name="topic__shortdesc" use-attribute-sets="body">
<xsl:attribute name="keep-with-previous.within-page">always</xsl:attribute>
<xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
</xsl:attribute-set>
@petersell
petersell / fop-for-dita-ot.md
Last active February 8, 2020 18:37
Das FOP-Plugin für das DITA-OT 2.4.5 einrichten

Hintergrund

Als ich 2008 mit DITA-XML anfing, war der Open Source Apache FOP-Prozessor nicht in der Lage, ein Stichwortverzeichnis auszugeben. Darum mußte ich auf den XEP-Prozessor Personal Edition zurückgreifen. Dieser gibt jedoch eine Fusszeile aus, die besagt, dass die Software nicht für den kommerziellen Einsatz bestimmt ist. Inzwischen kann unter FOP ein Stichwortverzeichnis generiert werden und ich sattle um. Sämtliche PDF-Einstellungen müssen neu eingerichtet für den Einsatz unter FOP werden.

Bilder werden nicht an A4 angepaßt

Die Bilder haben viel zu große Abmasse, trotz 72dpi und max. 600px Breite. Eine Lösungsansatz fand ich hier bei: infotexture.net

Für mich ergaben sich aus dem og. Hinweis folgende Handlungsschritte:

  1. In der Datei DITA-OT-2.4.5/plugins/org.dita.pdf2.fop/cfg/fop.xconf von 72 dpi auf 120 dpi erhöhen: <source-resolution>120</source-resolution> und <target-resolution>120</target-resolution>

Modulare Onlinehilfe

Vor fünf Jahren entwickelte meine Abteilung ein neues Softwareprodukt. Damit es neue Kunden findet, hielt ich es marketingtechnisch für eine gute Idee, die Onlinehilfe des neuen Produkts einfach mit derjenigen des bereits bestehenden, ähnlichen Produkts zu verbinden. Zumindestens im Bereich Marketing hat sich dies gelohnt. Fast alle Kunden der alten, ähnlichen Software sind inzwischen auch Nutzer der neuen Software. Eine gute Idee bis zu dem Tag, als ich die Onlinesysteme wieder trennen wollte. Es ging nicht! Die ursprünglich zwei Hilfen waren zu einem festen Monolithen zusammengeschweißt. Ich hatte wild untereinander verlinkt, und das direkt durch xref-Verlinkung! Denn beide Softwareprodukte nutzen gemeinsam bestimmte Programmteile wie die Nutzerverwaltung oder die Gerätesteuerung für Drucker und Scanner.

Bis ich auf Priscilla Buckleys Artikel [From Monolithicity to Flexibility, Using DITA Keyrefs](http://www.ixiasoft.com/download_file/force/2327/ "From Monolothity to Flexibility - U

@petersell
petersell / content.navigation.xml
Created December 29, 2014 13:30
Navigational content file of plugin com.ditalog.kirby.txt
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN"
"http://docs.oasis-open.org/dita/v1.2/os/dtd1.2/technicalContent/dtd/topic.dtd">
<topic id="main_topic" xml:lang="en">
<title>Main Topic</title>
<shortdesc>This is the main topic. It is a
<filepath>content.navigation.xml</filepath> in the folder
<filepath>topics</filepath>. It has no paragraphs.</shortdesc>
<prolog>
<author type="creator">Andreas Petersell</author>
@petersell
petersell / content.standard.xml
Created December 29, 2014 13:25
Normal content file of plugin com.ditalog.kirby.txt - no parent content file above.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
"http://docs.oasis-open.org/dita/v1.2/os/dtd1.2/technicalContent/dtd/concept.dtd">
<concept id="christmas-article-first" xml:lang="en">
<title xml:lang="en">Christmas - The first article</title>
<shortdesc>This is the first article within the Christmas topic. It is a
<filepath>content.standard.xml</filepath> in the folder
<filepath>topics/first-chapter/christmas/christmas-article-first</filepath>.</shortdesc>
@petersell
petersell / keydef-first-chapter.ditamap
Created December 23, 2014 13:41
Content ditamap of the first chapter within the sample files of the dita2kirby plugin.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN"
"http://docs.oasis-open.org/dita/v1.2/os/dtd1.2/technicalContent/dtd/map.dtd">
<map id="keydef-first-chapter" scope="local" title="Container First Chapter"
xml:lang="en">
<!-- Topics start page Chapter 1 -->
<keydef href="first-chapter/content.navigation.xml"
keys="first-chapter_topic" scope="local" type="topic" xml:lang="en"/>
@petersell
petersell / content-first-chapter.ditamap
Created December 23, 2014 13:35
Content ditamap of the first chapter within the sample files of the dita2kirby plugin
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN"
"http://docs.oasis-open.org/dita/v1.2/os/dtd1.2/technicalContent/dtd/map.dtd">
<map id="first-chapter" scope="local" title="Content First Chapter" xml:lang="en">
<!-- Topics Part -->
<mapref href="topics/keydef-first-chapter.ditamap" processing-role="resource-only"/>
<!-- Topics Christmas -->
<topicref keyref="first-chapter_topic">
<topicref keyref="christmas" collection-type="sequence">
<topicref keyref="christmas-article-first"/>
@petersell
petersell / sample.ditamap
Created December 23, 2014 13:09
Starting ditamap from the sample files of dita2kirby plugin
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN"
"http://docs.oasis-open.org/dita/v1.2/os/dtd1.2/technicalContent/dtd/map.dtd">
<map id="main" scope="local" xml:lang="en">
<topicref keys="main_topic" href="topics/content.navigation.xml" scope="local">
<mapref href="content-first-chapter.ditamap" scope="local"/>
<mapref href="content-second-chapter.ditamap" scope="local"/>
</topicref>
</map>
@petersell
petersell / figcaption-below.xsl
Created December 5, 2014 09:37
Template for putting the figcaption below the image
<!-- This template puts the caption below the image -->
<xsl:template match="*[contains(@class, ' topic/fig ')]" mode="fig-fmt">
<!-- This template is deprecated in DITA-OT 1.7. Processing will moved into the main element rule. -->
<!-- <xsl:variable name="default-fig-class">
<xsl:apply-templates select="." mode="dita2html:get-default-fig-class"/>
</xsl:variable> -->
<xsl:apply-templates select="*[contains(@class, ' ditaot-d/ditaval-startprop ')]" mode="out-of-line"/>
<div>
<!-- <xsl:if test="$default-fig-class != ''">
<xsl:attribute name="class"><xsl:value-of select="$default-fig-class"/></xsl:attribute>