From Newsgroup: comp.text.tex
On 05/11/2025 20:28, Jeff Barnett wrote:
[...]
What I hoped to see as a response was a SIMPLE combination of the
picture environment and a TRIVIAL to use coloring extension.
That is EXACTLY what I posted before: a 9-line file that demonstrates
(1) a simple picture environment
and
(2) the use of the \color command.
I'm not clear how much more simply it can be expressed.
If you don't consider \color to be trivial, then I don't think anyone
can help you more.
I thought, incorrectly, that surely such a thing had been produced.
It is what I posted.
Did you know that xcolor never mentions picture let alone provides
an example?
Why would it mention the picture environment? Package documentation is designed to tell you how its commands work, and unless they warn you otherwise, they work in all LaTeX packages. There is nothing to mention.
It spends dozens of pages on color models - something I learned
about in the darkroom 50+ years ago.
Me too. I find it valuable to be able to point newcomers to the science
of colour at the descriptions. Most users are wholly unaware of this,
and the reference point is useful.
There are 1000s of packages on CTAN, most I've never heard of and
never will.
I've been using LaTeX since it started, and I also don't know the
majority of packages. I don't think that's relevant.
I had hoped that one of the better informed folks who inhabited
this forum could direct me to one that met my needs.
We have done exactly that: we showed you the xcolor package and its
\color command, which does exactly what you asked for.
I don't understand what more you are looking for rCo perhaps you could describe what you want that \color does not do.
Perhaps I should have included in my original message that I
preferred using the pdf version of LaTeX;
No, every version of LaTeX except the original (now largely obsolescent) produces PDF by default: there is no need to mention it.
If you meant you use the pdflatex program, that is being superseded by LuaLaTeX, but within the circumstances of your requirements, both do
exactly the same.
that would have meant I might not need to read about interfaces with
drivers and so on and the final piping chain necessary to print the
product after applying my favorite typesetting chain.
I'm sorry, I must have missed that. I don't have any interfaces with
drivers, or any pipe needed to print except clicking on Print in my PDF viewer. What drivers and piping chain are you referring to?
An issue in LaTeX that seems to get worse with time is the diverging
ways that one specifies optional parameters.
No, optional parameters are always in square brackets.
They can appear in property name - property value motifs,
I'm not sure what those are.
square vs round brackets,
Square brackets are for optional parameters.
Round brackets are rare, and used mostly for (x,y) coordinates in
drawing diagrams.
Curly braces are for mandatory values.
comma separated lists,
That's a different thing.
list of various sorts where position is significant,
The only one I encounter regularly is in the \includegraphics command,
and it is well documented.
Combining almost any two things can be painful.
Getting them wrong certainly can be :-)
In simple fact I noticed no similarities between xcolor and and the
picture environment.
I don't understand that at al. There are no similarities between picture
and xcolor because there are no similarities between picture and xcolor.
picture is a LaTeX environment for drawing simple diagrams;
xcolor is a package for adding color to your document.
You don't have to use picture if you don't want to draw diagrams (but
you might want xcolor if you want colors somewhere in your document. Conversely, you don't have to use xcolor if you don't want any color
except black; nothing to do with drawing diagrams at all.
I had hoped, in this case, that someone with too much time on their
hands had extended the picture environment so that color parameters
could be slipped in where one might want to use them.
Ah. You expected color to be automatically available wherever picture
was used? LaTeX doesn't automatically include features that most users
don't need, to avoid filling up your document processing with unwanted features. For example, the facilities to add images are not included by default. You have to use the graphicx package to get them. This is what
keeps LaTeX fast and small.
If you frequently need color in your picture diagrams (without moving to
TikZ, which is much bigger and more powerful than picture, but of course
much more complex and takes longer to learn), you can always borrow the
source code of the picture commands and modify them to accept an
optional colour argument. You would need to learn something about the internals of TeX and LaTeX, which is not something the average user
might want.
It is fascinating that the TeX community has made it possible for knowledgeable scientist (knowledgeable in their own field) to
easily, one might say trivially, draw pictures of chemical
structures, tensors mixed into categories, and DNA fragments but
drawing simple lines and boxes with labels diagrams in color is
pretty much a complete kludge.
It's open to you to rewrite the relevant commands into a package which implements color in a way you find more acceptable. The fact that in 40
years no-one has thought it necessary indicates to me that the existing mechanism works.
If you want to add color to pictures of chemical structures, tensors
mixed into categories, and DNA fragments, I think you would need to use
xcolor and the \color command anyway. LaTeX is built on the add-on
principle: you start with the basics and add the packages needed to do
what you want. The alternative is to pack everything in at the start,
which is what Microsoft Word does.
The TeX family has been such a success
[snip] That's a really excellent description.
Point 3 above is really (actually really really) important. If there
was no LaTeX, TeX might still be around but would have all but
disappeared into the publishing houses. Possibly they would have
developed competitive versions by copy and making individuating
changes to TeX to avoid issues of ownership disputes.
Several commercial typesetting systems owe a huge amount to TeX, and
some were even built by rewriting the TeX engine and building a
different environment around it.
Using TeX can be fun and challenging but solving (formatting, etc.)
problems in Tex is puzzle solving, not creating a document per se.
I think for most users rCo at least the ones I teach and for whom I wrote
my documentation rCo seem to pick up the add-on package concept very
easily, freeing them to spend their time writing rather than coding.
Peter
--- Synchronet 3.21a-Linux NewsLink 1.2