docs: protected void buildAdditionalPublicanCfg(final BuildData buildData) throws BuildProcessingException {
          final ContentSpec contentSpec = buildData.getContentSpec();
          final Map<String, String> overrides = buildData.getBuildOptions().getOverrides();
          final Map<String, String> additionalPublicanCfgs = contentSpec.getAllAdditionalPublicanCfgs();
  
          for (final Map.Entry<String, String> entry : additionalPublicanCfgs.entrySet()) {
              final String brandOverride = overrides.containsKey(CSConstants.BRAND_OVERRIDE) ? overrides.get(
                      CSConstants.BRAND_OVERRIDE) : (overrides.containsKey(CSConstants.BRAND_ALT_OVERRIDE) ? overrides.get(
                      CSConstants.BRAND_ALT_OVERRIDE) : null);
              final String brand = brandOverride != null ? brandOverride : (contentSpec.getBrand() == null ? getDefaultBrand(
                      buildData) : contentSpec.getBrand());
  
              // Setup publican.cfg
              final StringBuilder publicanCfg = new StringBuilder("xml_lang: ").append(buildData.getOutputLocale()).append("\n");
              publicanCfg.append("type: ").append(contentSpec.getBookType().toString().replaceAll("-Draft", "") + "\n");
              publicanCfg.append("brand: ").append(brand).append("\n");
  
              // Add the custom content
              publicanCfg.append(DocBookBuildUtilities.cleanUserPublicanCfg(entry.getValue()));
  
              // Add the dtdver property
              if (buildData.getDocBookVersion() == DocBookVersion.DOCBOOK_50) {
                  publicanCfg.append("dtdver: \"5.0\"\n");
              }
  
              // Add docname if it wasn't specified and the escaped title is valid
              Matcher m = null;
              if (BuilderConstants.VALID_PUBLICAN_DOCNAME_PATTERN.matcher(buildData.getEscapedBookTitle()).matches()) {
                  m = DOCNAME_PATTERN.matcher(publicanCfg);
                  if (!m.find()) {
                      publicanCfg.append("docname: ").append(buildData.getEscapedBookTitle().replaceAll("_", " ")).append("\n");
                  }
              }
  
              // Add product if it wasn't specified
              m = PRODUCT_PATTERN.matcher(publicanCfg);
              if (!m.find()) {
                  publicanCfg.append("product: ").append(escapeProduct(buildData.getOriginalBookProduct())).append("\n");
              }
  
              // Add the mainfile attribute
              publicanCfg.append("mainfile: ").append(buildData.getRootBookFileName()).append("\n");
  
              // Add version if it wasn't specified
              m = VERSION_PATTERN.matcher(publicanCfg);
              if (!m.find()) {
                  String version = contentSpec.getBookVersion();
                  if (isNullOrEmpty(version)) {
                      version = DocBookBuildUtilities.getKeyValueNodeText(buildData, contentSpec.getVersionNode());
                  }
                  if (isNullOrEmpty(version)) {
                      version = BuilderConstants.DEFAULT_VERSION;
                  }
                  publicanCfg.append("version: ").append(escapeVersion(version)).append("\n");
              }
  
              String fixedPublicanCfg = publicanCfg.toString();
  
              if (buildData.getBuildOptions().getPublicanShowRemarks()) {
                  // Remove any current show_remarks definitions
                  if (publicanCfg.indexOf("show_remarks") != -1) {
                      fixedPublicanCfg = fixedPublicanCfg.replaceAll("show_remarks\\s*:\\s*\\d+\\s*(\\r)?(\\n)?", "");
                  }
                  fixedPublicanCfg += "show_remarks: 1\n";
              }
  
              addToZip(buildData.getRootBookFolder() + entry.getKey(), fixedPublicanCfg, buildData);
          }
      }