Re: [Therion] Customising map layout
Thanks, Martin. That worked fine. Dave Clucas daveclucas.com sarawak-caves.com dave.clucas@icloud.com Exploring the World - One cave at a time On 3 Nov 2014, at 19:00, therion-request@speleo.sk wrote:
Send Therion mailing list submissions to therion@speleo.sk
To subscribe or unsubscribe via the World Wide Web, visit http://mailman.speleo.sk/mailman/listinfo/therion or, via email, send a message with subject or body 'help' to therion-request@speleo.sk
You can reach the person managing the list at therion-owner@speleo.sk
When replying, please edit your Subject line so it is more specific than "Re: Contents of Therion digest..."
Today's Topics:
1. Customising map layout (Dave Clucas) 2. Re: Customising map layout (Martin Budaj)
----------------------------------------------------------------------
Message: 1 Date: Mon, 03 Nov 2014 11:53:38 +0800 From: Dave Clucas <dave.clucas@icloud.com> Subject: [Therion] Customising map layout To: therion@speleo.sk Message-ID: <D511F6B0-E6A4-4FE8-94E6-296828C0B948@icloud.com> Content-Type: text/plain; charset="windows-1252"
I?ve tried out the following example from thbook adding this to my layout
code tex-map \def\maplayout{ \legendbox{0}{100}{NW}{\northarrow} } endcode
This works fine for \northarrow and \scalebar but when I tried it with \cavename or \comment I get the following error
(./th_formdef.tex) (./th_pagedef.tex ! Missing { inserted. <to be read again> } \legendbox ...\unskip \setbox \tmpboxa =\vbox {#4} \sx =\wd \tmpboxa \sy =\ht...
\maplayout -> \legendbox {0}{100}{NW}{\comment }
l.12 \setbox\xxx=\hbox to \x{\maplayout \hfill}%\dp\xxx=0bp A left brace was mandatory here, so I've put one in. You might want to delete and/or insert some corrections so that I will find a matching right brace soon. (If you're confused by all this, try typing `I}' now.)
) (./th_pages.tex) 54 numeric registers used out of 32768
! Missing } inserted. <inserted text> } <to be read again> \end l.653 \end
I've inserted something that you may have forgotten. (See the <inserted text> above.) With luck, this will get me unwedged. But if you really didn't forget anything, try typing `2' now; then my insertion and my current dilemma will both disappear.
Underfull \hbox (badness 10000) detected at line 653 [][][]
\hbox(1167.36124+0.0)x1296.84499, glue set 257.37057 .\pdfliteral{q 1.00 1.00 1.00 rg -28.34993 -1191.34709 1348.6867 1219.68703 re f Q} .\hbox(1167.36124+0.0)x0.0 ..\pdfliteral{/OC /oc7 BDC} ..\pdfliteral{q 1 g} ..\hbox(1166.3575+0.0)x0.0, glue set - 1273.75873fil ...\kern 1.00374 ...\hbox(1091.07625+0.0)x1272.75499, shifted -75.28125 [] ...\glue 0.0 plus 1.0fil minus 1.0fil ..\pdfliteral{Q} ..\pdfliteral{EMC} ..etc. .\hbox(0.0+0.0)x0.0 ..\hbox(1167.36124+0.0)x0.0, glue set - 1296.84499fil ...\kern 0.0 ...\hbox(1167.36124+0.0)x1296.84499 [] ...\glue 0.0 plus 1.0fil minus 1.0fil .\glue 3.33333 plus 1.66666 minus 1.11111 .\glue 3.33333 plus 1.66666 minus 1.11111 .etc.
Has anyone any idea what is wrong?
Dave Clucas daveclucas.com sarawak-caves.com dave.clucas@icloud.com
Exploring the World - One cave at a time
Correction, not fine. The correct data displayed in the correct position, however a map-image (elevation) which was there before has disappeared along with the map-header. This is the config file ######################################## Input ################################################ source P6.th input /Users/daveclucas/Documents/caving/surveys/common_layout.th input /Users/daveclucas/Documents/caving/surveys/therionLayouts/layoutscales.thc ######################################## Layouts ################################################ layout layout copy common map-header 0 0 off legend off symbol-show group cave-centreline code metapost fonts_setup(4,8,10,12,16); endcode endlayout layout images map-image 0 100 sw output/P6_elev.pdf map-header 0 -20 nw map-comment "After a map by Richard Gibson dated November 1993<br>High level passages near entrance ommited for clarity<br>Original survey BCRA Gr 5<br>Redrawn in Therion using centreline data from April 2010" code tex-map \def\maplayout{ \legendbox{0}{100}{NW}{\the\comment} } endcode endlayout layout xviScale scale 1 65 #for plan and elevation endlayout layout debug symbol-show group cave-centreline colour map-fg altitude symbol-show point station debug station-names debug scrap-names endlayout ######################################## Output ################################################ export model -o output/P6.lox export model -o output/P6.3d #export model -o output/P6.kml #requires a fixed station in survey #export map -o output/P6.kml #requires a fixed station in survey export map -o output/P6.xvi -layout xviScale export map -o output/P6_e.xvi -layout xviScale -proj elevation select P6Elev export map -o output/P6_elev.pdf -proj elevation -layout layout -layout LayoutScale50 select P6Plan export map -o output/P6.pdf -layout layout -layout LayoutScale50 -layout images #-layout debug ################################################################################################# Dave Clucas daveclucas.com sarawak-caves.com dave.clucas@icloud.com Exploring the World - One cave at a time On 3 Nov 2014, at 19:38, Dave Clucas <dave.clucas@icloud.com> wrote:
Thanks, Martin. That worked fine.
Dave Clucas daveclucas.com sarawak-caves.com dave.clucas@icloud.com
Exploring the World - One cave at a time
On 3 Nov 2014, at 19:00, therion-request@speleo.sk wrote:
Send Therion mailing list submissions to therion@speleo.sk
To subscribe or unsubscribe via the World Wide Web, visit http://mailman.speleo.sk/mailman/listinfo/therion or, via email, send a message with subject or body 'help' to therion-request@speleo.sk
You can reach the person managing the list at therion-owner@speleo.sk
When replying, please edit your Subject line so it is more specific than "Re: Contents of Therion digest..."
Today's Topics:
1. Customising map layout (Dave Clucas) 2. Re: Customising map layout (Martin Budaj)
----------------------------------------------------------------------
Message: 1 Date: Mon, 03 Nov 2014 11:53:38 +0800 From: Dave Clucas <dave.clucas@icloud.com> Subject: [Therion] Customising map layout To: therion@speleo.sk Message-ID: <D511F6B0-E6A4-4FE8-94E6-296828C0B948@icloud.com> Content-Type: text/plain; charset="windows-1252"
I?ve tried out the following example from thbook adding this to my layout
code tex-map \def\maplayout{ \legendbox{0}{100}{NW}{\northarrow} } endcode
This works fine for \northarrow and \scalebar but when I tried it with \cavename or \comment I get the following error
(./th_formdef.tex) (./th_pagedef.tex ! Missing { inserted. <to be read again> } \legendbox ...\unskip \setbox \tmpboxa =\vbox {#4} \sx =\wd \tmpboxa \sy =\ht...
\maplayout -> \legendbox {0}{100}{NW}{\comment }
l.12 \setbox\xxx=\hbox to \x{\maplayout \hfill}%\dp\xxx=0bp A left brace was mandatory here, so I've put one in. You might want to delete and/or insert some corrections so that I will find a matching right brace soon. (If you're confused by all this, try typing `I}' now.)
) (./th_pages.tex) 54 numeric registers used out of 32768
! Missing } inserted. <inserted text> } <to be read again> \end l.653 \end
I've inserted something that you may have forgotten. (See the <inserted text> above.) With luck, this will get me unwedged. But if you really didn't forget anything, try typing `2' now; then my insertion and my current dilemma will both disappear.
Underfull \hbox (badness 10000) detected at line 653 [][][]
\hbox(1167.36124+0.0)x1296.84499, glue set 257.37057 .\pdfliteral{q 1.00 1.00 1.00 rg -28.34993 -1191.34709 1348.6867 1219.68703 re f Q} .\hbox(1167.36124+0.0)x0.0 ..\pdfliteral{/OC /oc7 BDC} ..\pdfliteral{q 1 g} ..\hbox(1166.3575+0.0)x0.0, glue set - 1273.75873fil ...\kern 1.00374 ...\hbox(1091.07625+0.0)x1272.75499, shifted -75.28125 [] ...\glue 0.0 plus 1.0fil minus 1.0fil ..\pdfliteral{Q} ..\pdfliteral{EMC} ..etc. .\hbox(0.0+0.0)x0.0 ..\hbox(1167.36124+0.0)x0.0, glue set - 1296.84499fil ...\kern 0.0 ...\hbox(1167.36124+0.0)x1296.84499 [] ...\glue 0.0 plus 1.0fil minus 1.0fil .\glue 3.33333 plus 1.66666 minus 1.11111 .\glue 3.33333 plus 1.66666 minus 1.11111 .etc.
Has anyone any idea what is wrong?
Dave Clucas daveclucas.com sarawak-caves.com dave.clucas@icloud.com
Exploring the World - One cave at a time
On Mon, Nov 3, 2014 at 1:00 PM, Dave Clucas <dave.clucas@icloud.com> wrote:
Correction, not fine. The correct data displayed in the correct position, however a map-image (elevation) which was there before has disappeared along with the map-header.
This is a side effect of redefining map layout in TeX directly. There is a work-around, though, if you add other \legendbox to insert the image, like \legendbox{0}{100}{NW}{\loadpicture{/absolute/path/to/file}} Martin
Hi All, I have done lots of playing with the redefinition of map layouts in Therion (actually TeX). I have found that there is a border around the pdf images which are included, resulting in significant white space. I would rather have smaller borders in my pdfs that are generated in Therion and then included in the final map.Is there a way to make the borders smaller, or have the white space transparent in the included maps (using such things as "legendbox{0}{100}{NW}{loadpicture{/absolute/path/to/file}}" Thanks, Rowena ----- Original Message ----- From: "List for Therion users" To:"List for Therion users" Cc: Sent:Mon, 3 Nov 2014 22:39:12 +0100 Subject:Re: [Therion] Customising map layout On Mon, Nov 3, 2014 at 1:00 PM, Dave Clucas wrote:
Correction, not fine. The correct data displayed in the correct position, however a map-image (elevation) which was there before has disappeared along with the map-header.
This is a side effect of redefining map layout in TeX directly. There is a work-around, though, if you add other legendbox to insert the image, like legendbox{0}{100}{NW}{loadpicture{/absolute/path/to/file}} Martin _______________________________________________ Therion mailing list Therion@speleo.sk http://mailman.speleo.sk/mailman/listinfo/therion
Rowena I think these are both already features of Therion. I think you are referring to what is controlled by ‘overlap’, at least for map exports – for altas the concept is the same, but the effect is slightly different. From the Therion Book… overlap <value> <units> ◃ set overlap size in paper units in the atlas mode or map margin in the map mode (M, A; default: 1 cm) For map exports it is the margin that Therion adds outside of the rectangle that exactly bounds the cave. For transparent backgrounds, you should be able to use, within a defined layout color map-bg transparent In 5.3.5 there was a bug, whereby, as a work around, you had to put the statement as part of an export command, ie export map \ -layout-color map-bg transparent \ -output cave.pdf and this worked quite well. Unfortunately last few versions at least, I have not been able to get transparent backgrounds to work, and so it has constrained the quality of some of our recent maps. Any updates on workarounds to get transparent backgrounds to work greatly appreciated. Bruce _____ From: therion-bounces@speleo.sk [mailto:therion-bounces@speleo.sk] On Behalf Of rowena_l@tpg.com.au Sent: Tuesday, 4 November 2014 1:16 p.m. To: List for Therion users Subject: Re: [Therion] Customising map layout Hi All, I have done lots of playing with the redefinition of map layouts in Therion (actually TeX). I have found that there is a border around the pdf images which are included, resulting in significant white space. I would rather have smaller borders in my pdfs that are generated in Therion and then included in the final map. Is there a way to make the borders smaller, or have the white space transparent in the included maps (using such things as "\legendbox{0}{100}{NW}{\loadpicture{/absolute/path/to/file}}" Thanks, Rowena
Hi, I have 5.3.15 installed. The overlap works well. Overlap 0 cm gives no border so I can make maps look neater. Also color map-bg transparent seems to work as well. Thanks for the suggestions Bruce. Regards, Rowena From: therion-bounces@speleo.sk [mailto:therion-bounces@speleo.sk] On Behalf Of Bruce Sent: Tuesday, 4 November 2014 4:10 PM To: 'List for Therion users' Subject: [Therion] Overlap and transparent background Rowena I think these are both already features of Therion. I think you are referring to what is controlled by ‘overlap’, at least for map exports – for altas the concept is the same, but the effect is slightly different. From the Therion Book… overlap <value> <units> ◃ set overlap size in paper units in the atlas mode or map margin in the map mode (M, A; default: 1 cm) For map exports it is the margin that Therion adds outside of the rectangle that exactly bounds the cave. For transparent backgrounds, you should be able to use, within a defined layout color map-bg transparent In 5.3.5 there was a bug, whereby, as a work around, you had to put the statement as part of an export command, ie export map \ -layout-color map-bg transparent \ -output cave.pdf and this worked quite well. Unfortunately last few versions at least, I have not been able to get transparent backgrounds to work, and so it has constrained the quality of some of our recent maps. Any updates on workarounds to get transparent backgrounds to work greatly appreciated. Bruce _____ From: therion-bounces@speleo.sk [mailto:therion-bounces@speleo.sk] On Behalf Of rowena_l@tpg.com.au Sent: Tuesday, 4 November 2014 1:16 p.m. To: List for Therion users Subject: Re: [Therion] Customising map layout Hi All, I have done lots of playing with the redefinition of map layouts in Therion (actually TeX). I have found that there is a border around the pdf images which are included, resulting in significant white space. I would rather have smaller borders in my pdfs that are generated in Therion and then included in the final map. Is there a way to make the borders smaller, or have the white space transparent in the included maps (using such things as "\legendbox{0}{100}{NW}{\loadpicture{/absolute/path/to/file}}" Thanks, Rowena
Rowena Glad both those suggestions worked.
color map-bg transparent
seems to work as well.
Hmm, as I said, not for me, but it is good to know it works for someone. Maybe my layouts are so complicated that I am missing something. I will have to look at that some more. Bruce
participants (6)
-
Bruce -
Dave Clucas -
Martin Budaj -
Martin Sluka -
rowena -
rowena_l@tpg.com.au