/* * [BookHead.java] * * Summary: Generate the header for a Cited Book. * * Copyright: (c) 2012-2017 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.8+ * * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/ * * Version History: * 1.0 2012-03-02 initial version */ package com.mindprod.htmlmacros.macro; import com.mindprod.htmlmacros.support.GoogleAdSense; import com.mindprod.htmlmacros.support.Indexing; import static java.lang.System.*; /** * Generate the header for a Cited Book. * * @author Roedy Green, Canadian Mind Products * @version 1.0 2012-03-02 initial version * @since 2012-03-02 */ public final class BookHead extends Head { /** * how to use the macro */ private static final String USAGE = "\nBookHead {Title} published=yyyymmdd"; /** * Generate the header for a Cited Book. * * @param parms parameters just title * @param quiet true if want output suppressed. * @param verbose @return expanded macro HTML */ public String expandMacro( String[] parms, final boolean quiet, final boolean verbose ) { if ( !quiet ) { out.print( "B" ); } if ( parms.length != 3 ) { throw new IllegalArgumentException( USAGE ); } // we just ignore published. final String title = parms[ 0 ]; final String topRightImage = "icon64/book.png"; final String icon = "icon16/book.png"; final String sectionFile = "book/books.html"; final String sectionTitle = "Cited Books"; final String keywords = "cited books"; return generalHead( "Cited Book: " + title, title, title, title, "titlesubsection", keywords, icon, null, null, topRightImage, null, sectionFile, sectionTitle, null, null, null, null, null, null, Indexing.NONE, GoogleAdSense.MEDIUM_RECTANGLE, null, null ) + ""; } }