230 |
"\\usepackage[%s,left=15mm,right=15mm,top=10mm,bottom=10mm]{geometry}\n", |
"\\usepackage[%s,left=15mm,right=15mm,top=10mm,bottom=10mm]{geometry}\n", |
231 |
texsize); |
texsize); |
232 |
fprintf (fp, "\\begin{document}\n"); |
fprintf (fp, "\\begin{document}\n"); |
233 |
if (preferences.printstyle == 0) |
|
234 |
|
/* TABLE */ |
235 |
|
if (preferences.printstyle == 0) /* normal style */ |
236 |
{ |
{ |
237 |
fprintf (fp, "\\begin{tabular}{||l|l|l"); /* nr, date, gmt */ |
fprintf (fp, "\\begin{tabular}{||l|l|l"); /* nr, date, gmt */ |
238 |
if (GTK_WIDGET_VISIBLE (endhbox)) |
if (GTK_WIDGET_VISIBLE (endhbox)) |
239 |
fprintf (fp, "|l"); /* gmtend */ |
fprintf (fp, "|l"); /* gmtend */ |
240 |
fprintf (fp, "|l|l|l|l|l"); /* call band mode rst myrst */ |
fprintf (fp, "|l|l|l|l|l"); /* call band mode rst myrst */ |
241 |
if (GTK_WIDGET_VISIBLE (qslhbox)) |
if (GTK_WIDGET_VISIBLE (qslhbox)) |
242 |
fprintf (fp, "|c|c"); /* qslin, qslout */ |
fprintf (fp, "|c|c"); /* qslin, qslout */ |
243 |
if (GTK_WIDGET_VISIBLE (powerhbox)) |
if (GTK_WIDGET_VISIBLE (powerhbox)) |
244 |
fprintf (fp, "|l"); /* power */ |
fprintf (fp, "|l"); /* power */ |
245 |
if (GTK_WIDGET_VISIBLE (namehbox)) |
if (GTK_WIDGET_VISIBLE (namehbox)) |
256 |
fprintf (fp, "|l"); /*remarks */ |
fprintf (fp, "|l"); /*remarks */ |
257 |
fprintf (fp, "||}\n"); |
fprintf (fp, "||}\n"); |
258 |
} |
} |
259 |
else |
else /* contest style */ |
260 |
fprintf (fp, "\\begin{tabular}{||l|l|l|l|l|l|l|l||l|l||}\n"); |
fprintf (fp, "\\begin{tabular}{||l|l|l|l|l|l|l|l||l|l||}\n"); |
261 |
fprintf (fp, "\\hline\n"); |
fprintf (fp, "\\hline\n"); |
262 |
|
|
263 |
|
/* HEADER */ |
264 |
if (preferences.printstyle == 0) |
if (preferences.printstyle == 0) |
265 |
{ |
{ |
266 |
fprintf (fp, "\\textbf{Nr} &\\textbf{Date} &\\textbf{GMT}"); |
fprintf (fp, "\\textbf{Nr} &\\textbf{Date} &\\textbf{GMT}"); |
300 |
fprintf (fp, "\\hline\n"); |
fprintf (fp, "\\hline\n"); |
301 |
fprintf (fp, "\\hline\n"); |
fprintf (fp, "\\hline\n"); |
302 |
|
|
303 |
|
|
304 |
if (preferences.printall == 0) |
if (preferences.printall == 0) |
305 |
{ |
{ |
306 |
printlow = 1; |
printlow = 1; |
307 |
printhigh = logwindow->qsos; |
printhigh = logwindow->qsos; |
308 |
} |
} |
309 |
|
|
310 |
|
|
311 |
|
/* QSO s */ |
312 |
if (GTK_CLIST (logwindow->clist)->rows > 0) |
if (GTK_CLIST (logwindow->clist)->rows > 0) |
313 |
{ |
{ |
314 |
for (i = GTK_CLIST (logwindow->clist)->rows - printlow; |
for (i = GTK_CLIST (logwindow->clist)->rows - printlow; |
342 |
if (GTK_WIDGET_VISIBLE (remarksvbox)) |
if (GTK_WIDGET_VISIBLE (remarksvbox)) |
343 |
{ /* escape # for latex, TODO: &, _, %, $, \, {, }, ^ */ |
{ /* escape # for latex, TODO: &, _, %, $, \, {, }, ^ */ |
344 |
if (strstr (item[REMARKS], "#")) |
if (strstr (item[REMARKS], "#")) |
345 |
|
{ |
346 |
temp = strreplace (item[REMARKS], "#", "\\#"); |
temp = strreplace (item[REMARKS], "#", "\\#"); |
347 |
fprintf (fp, "&%s", temp); |
fprintf (fp, "&%s", temp); |
348 |
|
} |
349 |
|
else |
350 |
|
fprintf (fp, "&%s", item[REMARKS]); |
351 |
} |
} |
352 |
fprintf (fp, "\\\\\n"); |
fprintf (fp, "\\\\\n"); |
353 |
} |
} |