I have no clue in LaTeX package developing but I have a dream! Consider following two files:
% A LaTeX file
\documentclass{article}
\usepackage[style.css]{css}
\begin{document}
\begin{abstract}
This is abstract!
\end{abstract}
This is \cls{code}{foo} and that is \cls{code}{bar}.
\end{document}
A simple css.file:
/*style.css*/
abstract{
color:red;
}
.code{
background:blue;
}
I want the package map css rules to its latex counterparts before rendering. In this example:
\documentclass{article}
\usepackage{color}
\begin{document}
{\color{red}
\begin{abstract}
This is abstract!
\end{abstract}
}
This is \colorbox{blue}{foo} and that is \colorbox{blue}{bar}.
\end{document}
I want to know how can I develop a simple package that for beginning provide ability to use color/font-family/font-weight css rules in LaTeX. In next stage I want to add it id/class addressing. Perhaps we can put the source in GitHub and the community could extend it.
Notice that I want to use only CSS syntax as syntax-suger for LaTeX styling.
As an answer please at least provide a minimum solution to set the color of abstract using provided example. Thanks all.
related: CSS based LaTeX formatting?
l3keys). – Sean Allred Oct 16 '13 at 05:00titlesec– Joseph Wright Oct 16 '13 at 07:19l3regex. However, you seem to contradict yourself. You haven't mention RegEx at all in the question and now you ask about it, and at the same time you say that the question is clear ;) – yo' Oct 16 '13 at 08:37\chaptername(and other*namemacros); while these were introduced to reduce hassle when writing in non-english languages, they show an approach to writing something that "knows" what it's typesetting. the structure of latex markup doesn't help, but i don't doubt that a css-like class is do-able. – wasteofspace Oct 16 '13 at 09:44