Synopsis: add macro to set page-background in TeX + OPmac
Out of http://petr.olsak.net/opmac-tricks-e.html#coltext ...the OPmac tips and tricks additional macro listing to the core opmac.tex
macro package:
The below code suggested as a way to change color within the document conflicts with \input color
the TeX way to integrate the color package into the available macrocode to a document to be set in TeX.
\def\color#1{\localcolor\colorA#1\relax}
\def\colorA#1#2\relax{\uppercase{\csname#1}#2\endcsname\ignorespaces}
Although OPmac provides color, it contains no macro to set the page color of the document, referring to color all pages of the document to a certain background color, defining the right box would solve this ... beyond my humble skills of yet, thus the occurrence to \input color
, the latter being mostly redundant since OPmac provides color capability in all, including above macro to change color/colored background locally on the fly.
The question: can anyone provide a short additional macro that defines the right 'box' and an additional user command to set the page background. Since color is implemented.
Justification: Petr has provided a package that focusses on functionality, not on styling, the above is a request for additional user functionality. Secondly, including color.tex
macro file to just add background color, and commenting out the above OPmac-tricks macro to solve the conflict is tit for tat, thirdly the philosophy of Petr to have a minimal solid code-base is smothered by including al of the color.tex
code for just the above.
Personal justification: background coloring and text coloring for proof reading is a serious benefit to any author/programmer, the black on white of most printed pdfs' makes for eye burden switching between source (vim-solarized), and pdf-output. To homogenize the back and forth between both, we all spend part of our lives 'on screen', is not a minor. Comes printing time, since the rest of the formatting is identical, compiling to black and white for print, is as simple as \input opmacmodified_to_proofread_onscreen
to \input opmac_modified_to_print
or a conditional or two added to opmac_modified.tex
.
Simplified question: additional macro to easily set page background in TeX + OPmac
Delving further into the matter, the color.tex macros regardless of using floats or a simple \lipsum[2-10]
text, running a few pages, gives "bleeds", second page on, to the left and bottom/top of the page.
Then there is absolute silence in any documentation regarding color(s) and their use with regard to page background coloring. It is supposed "color" means text coloring, locally or globally, and "background" coloring is a local matter, coloring a "box".
With hindsight, the theoretical capability should be there, after all latex is built on top of the tex primitives, the easiness latex colors backgrounds of pages cannot be pulled from the sky, again an OPmac macro can easily render back-ground color locally.
It can be argued that typesetting is done solely for print, making the issue a trivial one, then, typesetting as a process requires jumping from source to compilation onscreen, enough a reason to adapt, during the process of authoring, the background to the one of the source(in case vim-solarized) for useability. Not so trivial after all.
It would be highly satisfactory to discuss the capability of page coloring in tex in a principled way, and to the other end being convinced of the non-essentiality of it, then the pertinent explicit, need.