diff --git a/src/l2l_scanner.l b/src/l2l_scanner.l
index d769e914a8535b9271bc6438029dcd1719fcf9f5..d02479d7370525f4336ccf14dead9eded4cb5b78 100644 (file)
--- a/src/l2l_scanner.l
+++ b/src/l2l_scanner.l
l2l_sub = 1;
}
}
+
+ \[[0-9]+\] {
+ L2L_YY_APPEND_OR_ECHO(l2l_buf_ptr,
+ "{\\bfseries\\textcolor{DarkBlue}{%s}}", yytext);
+ }
}
\<[uU]> {
L2L_YY_APPEND_OR_ECHO(l2l_buf_ptr, "%s", yytext);
}
+(Abbildung|Listing)({WHITESPACE}|\n)+[0-9]+ {
+ L2L_YY_APPEND_OR_ECHO(l2l_buf_ptr, "\\textcolor{DarkBlue}{%s}", yytext);
+}
+
/*
* header
*/
*/
@(B|KT):{WHITESPACE}* {
+ _Bool is_image = 0;
+ _Bool is_box = 0;
+
+ if (! strncmp(yytext, "@B:", 3))
+ is_image = 1;
+ else if (! strncmp(yytext, "@KT:", 4))
+ is_box = 1;
+
if (l2l_scanner_state != L2L_FIGURE) {
- fprintf(yyout, "\\begin{figure}\n");
+ if (is_box)
+ fprintf(yyout, "\\begin{l2lbox}\n");
+ else
+ fprintf(yyout, "\\begin{figure}\n");
l2l_scanner_state = L2L_FIGURE;
}
else {
}
l2l_buf_ptr = &l2l_caption;
- if (! strncmp(yytext, "@B:", 3))
+ if (is_image)
BEGIN(caption);
- else if (! strncmp(yytext, "@KT:", 4))
+ else if (is_box)
BEGIN(box_caption);
else
assert(0);
@KL: {
if (l2l_scanner_state != L2L_FIGURE) {
- fprintf(yyout, "\\begin{figure}\n");
+ fprintf(yyout, "\\begin{l2lbox}\n");
l2l_scanner_state = L2L_FIGURE;
}
else {
}
<box>@(KE|L):{WHITESPACE}* {
- fprintf(yyout, "\\end{figure}");
+ fprintf(yyout, "\\end{l2lbox}");
l2l_scanner_state = L2L_BODY;
l2l_last_yystart = INITIAL;
BEGIN(l2l_last_yystart);