LaTex2Web logo

LaTeX2Web, a web authoring and publishing system

If you see this, something is wrong

Collapse and expand sections

To get acquainted with the document, the best thing to do is to select the "Collapse all sections" item from the "View" menu. This will leave visible only the titles of the top-level sections.

Clicking on a section title toggles the visibility of the section content. If you have collapsed all of the sections, this will let you discover the document progressively, from the top-level sections to the lower-level ones.

Cross-references and related material

Generally speaking, anything that is blue is clickable.

Clicking on a reference link (like an equation number, for instance) will display the reference as close as possible, without breaking the layout. Clicking on the displayed content or on the reference link hides the content. This is recursive: if the content includes a reference, clicking on it will have the same effect. These "links" are not necessarily numbers, as it is possible in LaTeX2Web to use full text for a reference.

Clicking on a bibliographical reference (i.e., a number within brackets) will display the reference.

Speech bubbles indicate a footnote. Click on the bubble to reveal the footnote (there is no page in a web document, so footnotes are placed inside the text flow). Acronyms work the same way as footnotes, except that you have the acronym instead of the speech bubble.

Discussions

By default, discussions are open in a document. Click on the discussion button below to reveal the discussion thread. However, you must be registered to participate in the discussion.

If a thread has been initialized, you can reply to it. Any modification to any comment, or a reply to it, in the discussion is signified by email to the owner of the document and to the author of the comment.

Publications

The blue button below that says "table of contents" is your tool to navigate in a publication.

The left arrow brings you to the previous document in the publication, and the right one brings you to the next. Both cycle over the publication list.

The middle button that says "table of contents" reveals the publication table of contents. This table is hierarchical structured. It has sections, and sections can be collapsed or expanded. If you are a registered user, you can save the layout of the table of contents.

Table of contents

First published on Sunday, Aug 31, 2025 and last modified on Thursday, Sep 18, 2025

I am normally hidden by the status bar

Color

François Chaplais

1 Introduction

LaTeX2Web implements most of the xcolor package.

In practice, color usage should be done in two steps.

  • a color is defined by its name and its value
  • the color is used in the document through its name

2 Defining colors

LaTeX2Web has predefined set of colors which is pretty extensive. You can see it here.

If you want to define your own color, we advise you to use a color picker and copy the hex value (6 letters/digits) to the clipboard. Then you define the color in the preamble of your document as follows.

\definecolor{color name}{HTML}{hex value}

The hex value should NOT be preceded with the # hash character. Note that color names and hex values are case insensitive. Example:

\definecolor{testColor}{HTML}{f3d8b7}

3 Opacity

The opacity of a color is defined by a percentage. A totally opaque color has an opacity of 100; it has the same effect as if the opacity had not been specified. A totally transparent color has an opacity of 0; it has the same effect as if the color had not been applied.

To add opacity to a color, append the color name with a question mark ? followed by the opacity. For instance, testColor?70 applies the color testColor with an opacity of 70%.

Remark it is much simpler to define a color by blending colors first and define the opacity after, than to blend colors which already have an opacity. Remember that “transparent” is not the same as “white”.

4 Using color in text

There are three text color dommand.

4.1 \textcolor

\textcolor{color name}{text}

set the color of text to the prescribed color. Example: This text has the blue color.

4.2 \colorbox

\colorbox{color name}{text}

set the background color of text to the prescribed color. The text color is automatically adjusted for improved readability. Example: This text has a blue background color.

4.3 \fcolorbox

\fcolorbox{frame color}{background color}{text}

frames the text with a border of color frame color and backgound color background color. Example: This text has a red border and a turquoise background.

5 Color for LaTeX2Web objects

You apply color to LaTeX2Web objects by wrapping them in a latexDiv environment and styling the latexDiv itself. latexDiv uses the same color names as the other commands.

6 Summary

Summary 1 (color usage)

Colors are defined using the \definecolor command in the preamble. Then the color name can be used in all LaTeX commands that use color.