% \iffalse meta-comment % % alertmessage.dtx % Copyright (C) 2015 by Pierre Dupuis % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. % The latest version of this license is in % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. % % This work has the LPPL maintenance status `maintained'. % % The Current Maintainer of this work is M. Pierre Dupuis % % This work consists of the files alertmessage.dtx and alertmessage.ins % and the derived file alertmessage.sty. % % \fi % % \iffalse %\NeedsTeXFormat{LaTeX2e}[2003/12/01] %\ProvidesPackage{alertmessage} % [2005/08/04 v1.1 Alert messages] % % Required packages % \RequirePackage{picture}% % \RequirePackage{xcolor}% % \RequirePackage{ifthen}% % \RequirePackage{calc}% % \RequirePackage{graphicx}% % \RequirePackage{tikz}% % % % Options % \DeclareOption*{}% % \ProcessOptions% % % % ALERT PANEL % \newlength{\alertmessage@textlength}% % \newcommand*\alertmessage@panel[3]{% % \begin{center} % % \noindent % No indentation % \begin{tikzpicture} % % \node[draw=#1!80, fill=#1!20, rounded corners=5pt, inner sep=11pt]{ % Add a little bit of transparency % $\begin{array}{l} % One-cell table % \includegraphics[scale=0.5]{{#2}} % Alert icon % \end{array}$ % % \settowidth{\alertmessage@textlength}{{#3}} % % \ifthenelse{\lengthtest{\alertmessage@textlength > 400pt}}{ % If text is more than 400pt % \parbox{340pt}{{#3}} % Box which handles paragraphs, limited to 10cm % }{ % Else % \makebox{}{{#3}} % Box which adapts itself to the text length % } % % }; % % \end{tikzpicture} % % \end{center} % % \par % Get back the indentation % }% % % % ERROR ALERT % \newcommand*\alerterror[1]{% % \alertmessage@panel{red}{img/alertmessage-error.png}{#1}% % }% % % % ERROR WARNING % \newcommand*\alertwarning[1]{% % \alertmessage@panel{orange}{img/alertmessage-warning.png}{#1}% % }% % % % ERROR SUCCESS % \newcommand*\alertsuccess[1]{% % \alertmessage@panel{green}{img/alertmessage-success.png}{#1}% % }% % % % ERROR INFO % \newcommand*\alertinfo[1]{% % \alertmessage@panel{blue}{img/alertmessage-info.png}{#1}% % }% % % %<*driver> \documentclass{ltxdoc} \usepackage{alertmessage} \EnableCrossrefs \CodelineIndex \RecordChanges \begin{document} \DocInput{alertmessage.dtx} \end{document} % % \fi % % \CheckSum{0} % % \changes{v1.1}{2005/08/04}{First version} % % \GetFileInfo{alertmessage.sty} % % % \title{The \textsf{alertmessage} package\thanks{This document % corresponds to \textsf{alertmessage}~\fileversion, % dated ~\filedate.}} % \author{Pierre Dupuis} % % \maketitle % \section{Introduction} % % This package provides beautiful boxes to display alert messages. The alerts are inspired by the Bootstrap framework. % \alertinfo{Lorem ipsum dolor sit amet, consectetuer adipiscing elit.} % % The size of the box increases according to the text length until a certain limit to guarantee the responsiveness of the alert. % % \alertinfo{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo.} % % There are four alerts available for information, warning, error and success messages. Each one has its own color and icon. % \newpage % % % \section{Usage} % % \DescribeMacro{\alertinfo} % This macro displays a blue alert indicating an information message. % \alertinfo{Lorem ipsum dolor sit amet, consectetuer adipiscing elit.} % % \DescribeMacro{\alertsuccess} % This macro displays a green alert indicating a successful message. % \alertsuccess{Lorem ipsum dolor sit amet, consectetuer adipiscing elit.} % % \DescribeMacro{\alertwarning} % This macro displays an orange alert indicating a warning message. % \alertwarning{Lorem ipsum dolor sit amet, consectetuer adipiscing elit.} % % \DescribeMacro{\alerterror} % This macro displays a red alert indicating an error message. % \alerterror{Lorem ipsum dolor sit amet, consectetuer adipiscing elit.} % % % \Finale \endinput