aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-03-25 20:52:37 +0200
committerThomas White <taw@physics.org>2018-03-25 20:53:01 +0200
commita4023e19f297278303efe4f1461ae8791546527c (patch)
tree535cf7e24a9390c6c9677b8386c08ab0d5523617
parenta376f1015813ff097b3b4add89b62c97dd6155f6 (diff)
Add \lalign and \center (and show them off)
-rw-r--r--data/demo.sc4
-rw-r--r--src/sc_interp.c10
2 files changed, 12 insertions, 2 deletions
diff --git a/data/demo.sc b/data/demo.sc
index 8ce4434..54a8e76 100644
--- a/data/demo.sc
+++ b/data/demo.sc
@@ -5,7 +5,7 @@
\fgcol[#c5c5c5]
\slidesize[1024x768]
- \ss[prestitle]{\f[1fx140u+0+0]\pad[20,20,20,20]\fontsize[64]\fgcol[#eeeeee]\contents}
+ \ss[prestitle]{\f[1fx140u+0+0]\pad[20,20,20,20]\fontsize[64]\fgcol[#eeeeee]\center\contents}
\ss[slidetitle]{\f[1fx90u+0+0]\pad[20,20,20,20]\fontsize[36]\fgcol[#eeeeee]\contents}
\ss[footer]{\f[0.97fx30u+0+740]{\ralign\editable{\fontsize[11]\bold{T. A. White} | \editable{A demonstration talk | 1 March 2018} | \bold{Slide} \slidenumber}}}
\ss[credit]{\f[600ux30u+700+700]{\fontsize[11]\contents}}
@@ -20,7 +20,7 @@
Colloquium works differently to other presentation programs. Colloquium makes \italic{narrative, not slides,} the centre of attention. Slides come when you need to illustrate something. This window is called the \oblique{narrative editor}. Your slides are embedded into the narrative text, like this:\slide{
\prestitle{Welcome to Colloquium}
-\f[506.3ux520.3u+244.5+141.3]{\image[1fx1f+0+0,filename="colloquium.svg"]{}}\f[537.4ux62.0u+257.8+692.6]{This is the presentation title slide, in case you hadn't noticed.}}
+\f[506.3ux520.3u+244.5+141.3]{\image[1fx1f+0+0,filename="colloquium.svg"]{}}\f[983.9ux75.4u+21.1+673.0]{\center This is the presentation title slide, in case you hadn't noticed.}}
As you can probably tell, the above slide happens to be the title page for the presentation.
To edit a slide, simply double-click on it. Try it on this next slide:\slide{
\slidetitle{Here is the slide title!}
diff --git a/src/sc_interp.c b/src/sc_interp.c
index eb09063..2e95e8c 100644
--- a/src/sc_interp.c
+++ b/src/sc_interp.c
@@ -1191,11 +1191,21 @@ int sc_interp_add_blocks(SCInterpreter *scin, SCBlock *bl)
set_italic(scin);
maybe_recurse_after(scin, child);
+ } else if ( strcmp(name, "lalign") == 0 ) {
+ maybe_recurse_before(scin, child);
+ set_alignment(scin, PANGO_ALIGN_LEFT);
+ maybe_recurse_after(scin, child);
+
} else if ( strcmp(name, "ralign") == 0 ) {
maybe_recurse_before(scin, child);
set_alignment(scin, PANGO_ALIGN_RIGHT);
maybe_recurse_after(scin, child);
+ } else if ( strcmp(name, "center") == 0 ) {
+ maybe_recurse_before(scin, child);
+ set_alignment(scin, PANGO_ALIGN_CENTER);
+ maybe_recurse_after(scin, child);
+
} else if ( strcmp(name, "fgcol") == 0 ) {
maybe_recurse_before(scin, child);
set_colour(scin, options);