From 816c59aa3d64f7a423ee885c55f7982f66c0839f Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Fri, 7 Nov 2014 00:50:51 -0500 Subject: [PATCH] Hack to get all menus to appear in right places. The only way I could figure out how to get different output for monolithic and section-based versions was to do this rather odd hack, which uses tex4ht.usr to conditionally insert specific bootstrap HTML for the mention that will allow proper formatting. --- Makefile | 6 +++--- tex4ht.usr | 25 +++++++++++++++++++++++++ webhacks.cfg | 30 ++++++++++-------------------- 3 files changed, 38 insertions(+), 23 deletions(-) create mode 100644 tex4ht.usr diff --git a/Makefile b/Makefile index 19ec591..6739974 100644 --- a/Makefile +++ b/Makefile @@ -67,12 +67,12 @@ $(HTML_OUTPUT_DIR)/monolithic/$(BOOK_BASE).html: $(LATEX_INPUT_FILES) $(WEB_CONF mkdir -p $(HTML_OUTPUT_DIR)/monolithic/css /bin/rm -f $(BOOK_BASE)*.html /bin/rm -f $(BOOK_BASE)*.js - $(HTLATEX) comprehensive-gpl-guide.tex "webhacks,xhtml,mouseover,fn-in" - $(HTLATEX) comprehensive-gpl-guide.tex "webhacks,xhtml,mouseover,fn-in" + $(HTLATEX) comprehensive-gpl-guide.tex "webhacks,xhtml,mouseover,fn-in,monolith" + $(HTLATEX) comprehensive-gpl-guide.tex "webhacks,xhtml,mouseover,fn-in,monolith" mv ${BOOK_BASE}*js $(HTML_OUTPUT_DIR)/monolithic/js /bin/rm -f $(BOOK_BASE)*.html /bin/rm -f $(BOOK_BASE)*.js - $(HTLATEX) comprehensive-gpl-guide.tex "webhacks,xhtml,fn-in" + $(HTLATEX) comprehensive-gpl-guide.tex "webhacks,xhtml,fn-in,monolith" mv $(BOOK_BASE)*html $(HTML_OUTPUT_DIR)/monolithic mv cm*png $(HTML_OUTPUT_DIR)/monolithic mv ${BOOK_BASE}*css $(HTML_OUTPUT_DIR)/monolithic diff --git a/tex4ht.usr b/tex4ht.usr new file mode 100644 index 0000000..8d872c2 --- /dev/null +++ b/tex4ht.usr @@ -0,0 +1,25 @@ +\newcommand{\startmymenu}{\HCode{ + }}} + \else + \newcommand{\monolith}{\Configure{next+}{\HCode{
\Hnewline
}}} + + + \fi diff --git a/webhacks.cfg b/webhacks.cfg index c2f02a9..47b6ae7 100644 --- a/webhacks.cfg +++ b/webhacks.cfg @@ -47,28 +47,18 @@ \Hnewline }} +\monolith \Configure{crosslinks}{\HCode{
  • }}{\HCode{
  • }}{next-section}{prev-at-top}{prev-at-bottom}{jump-to-top}{jump-to-bottom}{up-section} \Configure{crosslinks+} - {\IgnorePar\HCode{}} + + +\Tag{TITLE+}{Copyleft and the GNU General Public License: A Comprehensive Tutorial and Guide} + + \EndPreamble