Re: [Therion] Increase size of legend

2017-11-16 Thread Martin Sluka via Therion
For standard Computer Modern fonts. In recent TeX one may use mostly any 
fontface. 

M.S. 

Odesláno z iPhonu

16. 11. 2017 v 19:41, Bruce Mutton via Therion :

> Bill
> 
>> The mystery, of course, is what exactly is the \ss macro doing?  I did
> some Google searches but the only pages I found refer to the special German
> character ß which is obviously not how it is being used here.
> 
> As Xavier says, I suspect it is...
> 
> \ss = sans serif, similar to the 'text' statement font switches on page 26
> of the Therion Book.
> 
> But to test that one should try...
> 
> \rm \it \bf and \si as well
> 
> The attached files show what difference they make (bottom righthand side of
> drawing) when used in a .th2 file in a point label statement.  My suspicion
> is they do the same in TeX statements.
> 
> Bruce
> 
> ___
> Therion mailing list
> Therion@speleo.sk
> https://mailman.speleo.sk/listinfo/therion
___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion


Re: [Therion] Increase size of legend

2017-11-16 Thread Xavier Pennec via Therion
\ss is indeed not a standard tex or latex macro, It is defined by 
Therion in thfonts.cxx as a font type face switch (Therion book p.63):

* \rm, \it, \bf, \ss, \si for type face switching.

In the lengend formatting, \si seems to put in italic, and \ss to come 
back to straight.


 Xavier



Le 16-Nov-17 à 15:28, Bill Gee via Therion a écrit :

Hi Bruce -

I have done some more work on this, and I have made progress.  As you and I
have both noted :-)  I do not completely understand why it works.  There are
some deep dark secrets in TeX!  I have ordered a copy of Knuth's original book
on TeX.

The attached file is the latest version of my thconfig file.

The magic lines that make the date and Therion version into larger fonts are
98-99 and 156-157.  I used the "-d" option when compiling, then looked at the
resulting file called "data.tex".  It has quite a few lines using the \ss
macro.  I adapted those lines and was pleased to find that it works.

The mystery, of course, is what exactly is the \ss macro doing?  I did some
Google searches but the only pages I found refer to the special German
character ß which is obviously not how it is being used here.

I have not messed with the base-scale settings any further.  I also have not
chased the problem where "debug station-names" leaks from one layout section
to another.  Martin produced a test case that contradicts my experience.  He
is using a different version of Therion than I am.  More investigation is
needed.



___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion


--

-
Xavier Pennec
Senior Research Scientist / Directeur de recherche
Asclepios project-team, INRIA Sophia-Antipolis
2004 Route des Lucioles, BP93
F-06902 Sophia-Antipolis Cedex, France
+33 4 92 38 76 64
+33 6 78 35 16 90
http://www-sop.inria.fr/asclepios/
---


___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion


Re: [Therion] Increase size of legend

2017-11-16 Thread Bill Gee via Therion
Hi Bruce -

I have done some more work on this, and I have made progress.  As you and I 
have both noted :-)  I do not completely understand why it works.  There are 
some deep dark secrets in TeX!  I have ordered a copy of Knuth's original book 
on TeX.

The attached file is the latest version of my thconfig file.

The magic lines that make the date and Therion version into larger fonts are 
98-99 and 156-157.  I used the "-d" option when compiling, then looked at the 
resulting file called "data.tex".  It has quite a few lines using the \ss 
macro.  I adapted those lines and was pleased to find that it works.

The mystery, of course, is what exactly is the \ss macro doing?  I did some 
Google searches but the only pages I found refer to the special German 
character ß which is obviously not how it is being used here.

I have not messed with the base-scale settings any further.  I also have not 
chased the problem where "debug station-names" leaks from one layout section 
to another.  Martin produced a test case that contradicts my experience.  He 
is using a different version of Therion than I am.  More investigation is 
needed.

-- 
Bill Gee



On Tuesday, November 14, 2017 1:15:23 PM CST Bruce Mutton via Therion wrote:
> Bill
> 
> >I have managed to get what I want, though I do not completely understand
> 
> why it works.
> 
>   :) sometimes my experience as well.
> >
> >I tried various "base-scale" settings but could not see any visible change.
> 
> It was effectively a null setting.
>   Even when base-scale value is 2x or 0.5x the scale value?
> 
> >I discovered some other issues while testing.  First, the settings for
> 
> "debug station-names" and "symbol-show group centerline" are apparently
> global.  If they are set in any layout-endlayout section, then they are set
> for all subsequent layouts.  Is that how they should behave?
>   No they should not work that way, but this type of issue does seem
> familiar.  I seem to recall I had this kind of thing happen some years and
> some versions ago.  It is possible that it was related to having multiple
> copies of the same file open in different instances of Therion, or to some
> bug or the possibility I was using some feature in an unintended way.  Often
> errors in one place don't show up until several processing steps later,
> often in another 'input' file.
> 
> >The TeX code includes \the\currentdate and \the\thversion.  Both items do
> 
> show up on the legend, just below the symbol table.  However, they totally
> ignore the {\size[]} option.  Is that option implemented for these TeX
> macros?  It does not produce any errors when compiling the map.  It also
> does not change anything!
>   \def\txtsize{16}  % Define the default text size
>   \legendtextsize={\size[\txtsize]}
>   \the\currentdate={\size[30]}
>   \the\thversion={\size[\txtsize]}
> 
>   You are outside my area of competence here.  Your code is clean and
> readable, but it is different to what I have been using, not so readable,
> which includes tests that the variables exist and specifies the size and
> style of the text at the start of the line that the variable is called up
> in, as follows.  Maybe including \legendtextsize\ on the same line as
> \the\thversion will improve the behaviour.
> 
> \newtoks\thversiontitleA \thversiontitleA={Compiled}
> \newtoks\thversiontitleB \thversiontitleB={Therion }
> \newtoks\datetitle \datetitle={on }
> 
> \edef\tmp{\the\thversion} \ifx\tmp\empty \else  %only write version and
> date if version is not emplty
>   {\the\legendtextsize\si\the\thversiontitleA: \ss\the\thversiontitleB
> \ss\the\thversion}
>   {\the\legendtextsize\ss\the\datetitle \ss\the\currentdate\par}
> \fi
> 
> >Is there a place where ALL TeX macro options and parameters of ALL macros
> 
> are documented?
>   Not quite sure what you are asking beyond what is listed as you
> describe.   Simple answer is probably no. If you want everything, then
> obtaining it is described here
> https://therion.speleo.sk/wiki/metapost#how_to_get_therions_metapost_code_an
> d_tex_code
> Perhaps you could start a list on the wiki, then others can build on it with
> whatever knowledge they have.
> 
> Bruce
> 
> ___
> Therion mailing list
> Therion@speleo.sk
> https://mailman.speleo.sk/listinfo/therion

encoding  utf-8
source AllieSpringCave.th
input ../TherionMasterFiles/CustomSymbolsCode.txt

# This layout is for the main 2D map, all on one page
layout basics
units imperial
scale-bar 50 feet
page-numbers on
north true
rotate 0
symbol-color group centerline [0 80 0]
symbol-color area water [0 0 100]
map-comment "A compass and tape survey of Allie Spring Cave (PUL-317), 
Pulaski County, Missouri"
statistics explo all
legend on
map-header 3 65 w
symbol-set UIS


# Section for PDF properties
doc-author 

Re: [Therion] Increase size of legend

2017-11-14 Thread Bruce Mutton via Therion
Bill
>I have managed to get what I want, though I do not completely understand
why it works.  
:) sometimes my experience as well.

>I tried various "base-scale" settings but could not see any visible change.
It was effectively a null setting.
Even when base-scale value is 2x or 0.5x the scale value? 

>I discovered some other issues while testing.  First, the settings for
"debug station-names" and "symbol-show group centerline" are apparently
global.  If they are set in any layout-endlayout section, then they are set
for all subsequent layouts.  Is that how they should behave?
No they should not work that way, but this type of issue does seem
familiar.  I seem to recall I had this kind of thing happen some years and
some versions ago.  It is possible that it was related to having multiple
copies of the same file open in different instances of Therion, or to some
bug or the possibility I was using some feature in an unintended way.  Often
errors in one place don't show up until several processing steps later,
often in another 'input' file. 

>The TeX code includes \the\currentdate and \the\thversion.  Both items do
show up on the legend, just below the symbol table.  However, they totally
ignore the {\size[]} option.  Is that option implemented for these TeX
macros?  It does not produce any errors when compiling the map.  It also
does not change anything!
  \def\txtsize{16}  % Define the default text size
  \legendtextsize={\size[\txtsize]}
  \the\currentdate={\size[30]}
  \the\thversion={\size[\txtsize]}

You are outside my area of competence here.  Your code is clean and
readable, but it is different to what I have been using, not so readable,
which includes tests that the variables exist and specifies the size and
style of the text at the start of the line that the variable is called up
in, as follows.  Maybe including \legendtextsize\ on the same line as
\the\thversion will improve the behaviour.

\newtoks\thversiontitleA \thversiontitleA={Compiled}
\newtoks\thversiontitleB \thversiontitleB={Therion }
\newtoks\datetitle \datetitle={on }

\edef\tmp{\the\thversion} \ifx\tmp\empty \else  %only write version and
date if version is not emplty
  {\the\legendtextsize\si\the\thversiontitleA: \ss\the\thversiontitleB
\ss\the\thversion}
  {\the\legendtextsize\ss\the\datetitle \ss\the\currentdate\par}
\fi


>Is there a place where ALL TeX macro options and parameters of ALL macros
are documented?
Not quite sure what you are asking beyond what is listed as you
describe.   Simple answer is probably no. If you want everything, then
obtaining it is described here
https://therion.speleo.sk/wiki/metapost#how_to_get_therions_metapost_code_an
d_tex_code  
Perhaps you could start a list on the wiki, then others can build on it with
whatever knowledge they have.

Bruce

___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion


Re: [Therion] Increase size of legend

2017-11-14 Thread Martin Sluka via Therion
Hi Bill,

I just checked my layout in Therion 5.3.16

layout AB
scale 1 1000 
debug station-names
symbol-colour area water [0 0 70]
symbol-set AUT
color map-bg 90
#debug on
symbol-show group centerline
endlayout 

layout BB   
scale 1 1000
endlayout


export map -o ./export/ab_plan_1_171114_AB.pdf -layout AB
export map -o ./export/ab_plan_1_171114_BB.pdf -layout BB


Martin S.


> 14. 11. 2017 v 15:07, Bill Gee via Therion <therion@speleo.sk>:
> 
> Hello everyone -
> 
> I have managed to get what I want, though I do not completely understand why 
> it works.  Thanks to Bruce and Torsten for valuable pointers.
> 
> The attached file is my thconfig with modifications for the large legend.  
> The 
> layout for "mainmapprint" contains the MetaPost and TeX code.
> 
> In truth, I think the main reason I am getting the large legend now is 
> because 
> I changed the scale to 1:800.  When I looked at the relation between the 
> desired size of printout and the bounding box of the cave, I get a ratio in 
> the range of 1:800.  It is actually 1:851 for north-south and 1:705 for east-
> west, so 1:800 seems a reasonable middle ground.
> 
> I tried various "base-scale" settings but could not see any visible change.  
> It was effectively a null setting.
> 
> I discovered some other issues while testing.  First, the settings for "debug 
> station-names" and "symbol-show group centerline" are apparently global.  If 
> they are set in any layout-endlayout section, then they are set for all 
> subsequent layouts.  Is that how they should behave?
> 
> Second - I want to add the current date and Therion version to the legend.  
> The TeX code includes \the\currentdate and \the\thversion.  Both items do 
> show 
> up on the legend, just below the symbol table.  However, they totally ignore 
> the {\size[]} option.  Is that option implemented for these TeX macros?  It 
> does not produce any errors when compiling the map.  It also does not change 
> anything!  Another null setting ...
> 
> The Therion Book on page 69 lists all of the TeX macros that can be used on 
> map layouts.  However, it says NOTHING about what options and parameters are 
> implemented.  The sample code in the Therion Book, on the Wiki and in the 
> files Torsten sent me show some of these macros with options.  Is there a 
> place where ALL options and parameters of ALL macros are documented?
> 
> Thanks!
> 
> -- 
> Bill Gee
> 
> 
> 
> On Friday, November 10, 2017 1:18:45 AM CST Bruce Mutton via Therion wrote:
>> Hi Bill
>> If I were in your situation (as I think I have been from time to time), then
>> I would opt for targeting an exported map that was close to the 3'x2' paper
>> size when printed at full size.  I would do this by using 'scale 1 xxx'
>> where xxx is one of the preferred scales that gives you close to the right
>> paper size. That is assuming the full size legend, north arrow, header text
>> are more or less the right size for your needs, or only need minor tweaks.
>> 
>> Then if some symbols are not quite right, I would limit my code
>> customisation to only those symbols.  Judging by examples you have posted
>> on the wiki, you are pretty good at this.  Examples in
>> https://therion.speleo.sk/wiki/metapost#cave_symbol_size_and_density_exampl
>> es provide some patterns to guide changes in fill density, and the
>> discussion near the top of the page about variables u, v and w might be
>> helpful.
>> 
>> As Felix mentioned, you can tweak text and symbol size with 'base-scale 1
>> yyy', if you want to optimise for printing larger or smaller than full
>> size.
>> 
>> Seems to me that this approach is likely to be the path of least resistance,
>> requiring only changes to your layouts and some metapost. Optimising
>> standard output elements for printing at the 'wrong size' just seems
>> counter productive to me.
>> 
>> I should admit however that I tend to avoid using fills like clay, sand,
>> debris, blocks, and rather use points.  That avoids the fill density issues
>> you describe, but I appreciate if you already have a large investment in
>> area fills your approach may be tempting.
>> 
>> Bruce
>> 
>> -Original Message-
>> From: Therion [mailto:therion-boun...@speleo.sk] On Behalf Of Bill Gee via
>> Therion Sent: Friday, 10 November 2017 8:37 AM
>> To: List for Therion users <therion@speleo.sk>
>> Cc: Bill Gee <b...@campercaver.net>
>> Subject: Re: [Therion] Increase size of legend
>> 
>> Hi Bruce -
>> 
>> The reason for 1m x 0.6m paper (a

Re: [Therion] Increase size of legend

2017-11-14 Thread Bill Gee via Therion
Hello everyone -

I have managed to get what I want, though I do not completely understand why 
it works.  Thanks to Bruce and Torsten for valuable pointers.

The attached file is my thconfig with modifications for the large legend.  The 
layout for "mainmapprint" contains the MetaPost and TeX code.

In truth, I think the main reason I am getting the large legend now is because 
I changed the scale to 1:800.  When I looked at the relation between the 
desired size of printout and the bounding box of the cave, I get a ratio in 
the range of 1:800.  It is actually 1:851 for north-south and 1:705 for east-
west, so 1:800 seems a reasonable middle ground.

I tried various "base-scale" settings but could not see any visible change.  
It was effectively a null setting.

I discovered some other issues while testing.  First, the settings for "debug 
station-names" and "symbol-show group centerline" are apparently global.  If 
they are set in any layout-endlayout section, then they are set for all 
subsequent layouts.  Is that how they should behave?

Second - I want to add the current date and Therion version to the legend.  
The TeX code includes \the\currentdate and \the\thversion.  Both items do show 
up on the legend, just below the symbol table.  However, they totally ignore 
the {\size[]} option.  Is that option implemented for these TeX macros?  It 
does not produce any errors when compiling the map.  It also does not change 
anything!  Another null setting ...

The Therion Book on page 69 lists all of the TeX macros that can be used on 
map layouts.  However, it says NOTHING about what options and parameters are 
implemented.  The sample code in the Therion Book, on the Wiki and in the 
files Torsten sent me show some of these macros with options.  Is there a 
place where ALL options and parameters of ALL macros are documented?

Thanks!

-- 
Bill Gee



On Friday, November 10, 2017 1:18:45 AM CST Bruce Mutton via Therion wrote:
> Hi Bill
> If I were in your situation (as I think I have been from time to time), then
> I would opt for targeting an exported map that was close to the 3'x2' paper
> size when printed at full size.  I would do this by using 'scale 1 xxx'
> where xxx is one of the preferred scales that gives you close to the right
> paper size. That is assuming the full size legend, north arrow, header text
> are more or less the right size for your needs, or only need minor tweaks.
> 
> Then if some symbols are not quite right, I would limit my code
> customisation to only those symbols.  Judging by examples you have posted
> on the wiki, you are pretty good at this.  Examples in
> https://therion.speleo.sk/wiki/metapost#cave_symbol_size_and_density_exampl
> es provide some patterns to guide changes in fill density, and the
> discussion near the top of the page about variables u, v and w might be
> helpful.
> 
> As Felix mentioned, you can tweak text and symbol size with 'base-scale 1
> yyy', if you want to optimise for printing larger or smaller than full
> size.
> 
> Seems to me that this approach is likely to be the path of least resistance,
> requiring only changes to your layouts and some metapost. Optimising
> standard output elements for printing at the 'wrong size' just seems
> counter productive to me.
> 
> I should admit however that I tend to avoid using fills like clay, sand,
> debris, blocks, and rather use points.  That avoids the fill density issues
> you describe, but I appreciate if you already have a large investment in
> area fills your approach may be tempting.
> 
> Bruce
> 
> -Original Message-
> From: Therion [mailto:therion-boun...@speleo.sk] On Behalf Of Bill Gee via
> Therion Sent: Friday, 10 November 2017 8:37 AM
> To: List for Therion users <therion@speleo.sk>
> Cc: Bill Gee <b...@campercaver.net>
> Subject: Re: [Therion] Increase size of legend
> 
> Hi Bruce -
> 
> The reason for 1m x 0.6m paper (actually 3 feet by 2 feet) is because that
> is the size of the frame that the landowner wishes to display the map in. 
> It is also the largest size we can get printed for any reasonable cost.
> 
> I've been using 1:200 for this map.  Scales of 1:500 and higher make the
> fills on the map too sparse.  A clay area might have one clay symbol in it.
>  Scales below 1:200 make the fills too dense.
> 
> --
> Bill Gee
> 
> On Thursday, November 9, 2017 1:02:00 PM CST Bruce Mutton via Therion wrote:
> > Hi Bill
> > 
> > Sounds like you need to print on a larger piece of paper. 1m x 0.6m is
> > quite modest.  I presume you are not printing your pdf file out at the
> > full size that Therion generated it at.
> > 
> > I have not had any legend size issues with a 30km cave, although I must
> > admit that I do with very

[Therion] Increase size of legend

2017-11-10 Thread Bruce Mutton via Therion
Hi Bill
I also like what I see in Torstens examples, I feel a map-tex revolution coming 
on in my projects, eventually.
Fills vs points; pros and cons each way - it all depends on the compromises one 
is prepared to take, and what one wants to spend time on.

Scale and maps; my take is that Therion's 'export map' probably has it's roots 
in the days when one could not zoom in on a piece of paper, and so one may as 
well work towards optimising for viewing at the scale it was exported at - at 
least as an initial goal.  No point in having detail requiring either zooming 
in or a magnifying glass.  It just makes the output look messy at natural 
scale, when there is a lot of unintelligible information.

On the other hand we can zoom when viewed with a device so we may as well 
support that when appropriate.

My approach is to have a particular presentation and scale range in mind when I 
create a layout and output.
So yes, an exported map intended to be viewed at natural scale AND a different 
exported map (or probably atlas) intended to be navigated and zoomed with a 
device.

I like the idea of atlas over map, as you can precisely set the page size (aka 
default zoom level), and navigation panel and page edge hyperlinks give precise 
and efficient navigation options.  Probably depends what sort of device you 
think it will be viewed on though.  Atlas also lend themselves to selecting 
just those bits of the cave you are interested in the moment.  The header and 
legend information is easily located at either end of the document. You can 
extract out just the pages you want and save them to a new file (although that 
breaks most of the hyperlinks).  The atlas benefits probably become more 
relevant when the cave gets longer, maybe over 5 or 10 km in length.

Or I might just be old fashioned :)

Bruce

-Original Message-
From: Therion [mailto:therion-boun...@speleo.sk] On Behalf Of Bill Gee via 
Therion
Sent: Saturday, 11 November 2017 8:21 AM
To: List for Therion users <therion@speleo.sk>
Cc: Bill Gee <b...@campercaver.net>
Subject: Re: [Therion] Increase size of legend

Hi Bruce -

There is much to think about here, and also with Torsten's message.  I have 
enough to keep me busy for several days!  :-)

Regarding area fills vs. points ...  I take the opposite view of you.  I prefer 
area fills.  With an area fill I can completely control the boundaries of the 
symbol.  Points do not allow that.  I had several cases where clay floor and 
flowstone were drawn as overlapping even though that was not the case in the 
cave.  The downside to area fills is, as you note, the symbol density at 
various map scales.

Speaking of scale - If I were to set the map scale based on the bounding box of 
the cave, then it would be somewhere around 1:1200.  At that scale much detail 
gets lost when you zoom in on the PDF.

Maybe the thing to do is create TWO maps.  One would be scaled for printing as 
the landowner wants and the other would be scaled for viewing in a PDF, 
particularly when zoomed in.  Is that a common practice?

--
Bill Gee



On Friday, November 10, 2017 1:18:45 AM CST Bruce Mutton via Therion wrote:
> Hi Bill
> If I were in your situation (as I think I have been from time to time), then
> I would opt for targeting an exported map that was close to the 3'x2' paper
> size when printed at full size.  I would do this by using 'scale 1 xxx'
> where xxx is one of the preferred scales that gives you close to the right
> paper size. That is assuming the full size legend, north arrow, header text
> are more or less the right size for your needs, or only need minor tweaks.
> 
> Then if some symbols are not quite right, I would limit my code
> customisation to only those symbols.  Judging by examples you have posted
> on the wiki, you are pretty good at this.  Examples in
> https://therion.speleo.sk/wiki/metapost#cave_symbol_size_and_density_exampl
> es provide some patterns to guide changes in fill density, and the
> discussion near the top of the page about variables u, v and w might be
> helpful.
> 
> As Felix mentioned, you can tweak text and symbol size with 'base-scale 1
> yyy', if you want to optimise for printing larger or smaller than full
> size.
> 
> Seems to me that this approach is likely to be the path of least resistance,
> requiring only changes to your layouts and some metapost. Optimising
> standard output elements for printing at the 'wrong size' just seems
> counter productive to me.
> 
> I should admit however that I tend to avoid using fills like clay, sand,
> debris, blocks, and rather use points.  That avoids the fill density issues
> you describe, but I appreciate if you already have a large investment in
> area fills your approach may be tempting.
> 
> Bruce
> 
> -Original Message-
> From: Therion [mailto:therion-boun...@speleo.sk] On Behalf Of Bill Gee via
&

Re: [Therion] Increase size of legend

2017-11-10 Thread Bill Gee via Therion
Hi Torsten -

Thanks!  There is enough here to keep me busy for several days.  I need to 
figure out how to integrate all this code into my thconfig, then fiddle with 
the constants to get it to come out right.

-- 
Bill Gee



On Friday, November 10, 2017 1:46:55 AM CST Torsten Schnitter via Therion 
wrote:
> Hi Bill
> 
> I have done that. Somewhat complicated but it works (for me).
> Following just as an example to get an idea about it.
> I also seperated scalebar, northarrow, legendcontent and legendsymbols from
> each other to place them at different positions.
> 
> You can input the attached .th files in your config file using:
> input .\filename.th
> (I put the code into files to use it with different caves. But you also can
> put the sourcecode directly into your config file)
> 
> within layout command use following:
> - copy legendcontent (for input of new code for legendcontent into the
> layout definition) - copy legendsymbols (for input of new code for
> legendsymbols into the layout definition) - copy scalebar (for input of new
> code for scalebar into the layout definition) - copy northarrow_new (for
> input of new code for northarrow into the layout definition) - scale and
> base-scale (for sizing the map and size of symbols inside map) -
> legend-width xx cm (to size the width of legendsymbols-table)
> - legend-columns x (number of rows of legend-symbols)
> 
> also within layout:
> code metapost
>   % scale of legend symbols
>   tmpscale:=2.0;
>   % scale of north arrow
>   tmpscalenarrow:=2.5;
>   % scale of scalebar
>   tmpscalebar:=2.0;
> endcode
> 
> code tex-map
>   % parameter legendcontent
>   \def\thsizexl{60}   %
> size of cave name in map \def\thsizel{48}  
>  % size of comment in map \def\thsizem{36} 
>   % size of text in map % parameter legend
> symbols
>   \def\legendsymbolswidth1{60 cm} %
> width of legendcontent \legendtextsectionsize={\size[60]}  
>% text size of legend symbols header
> \legendtextsize={\size[48]} % text
> size of legend symbols % map layout
>   \def\maplayout{
> \legendbox{x}{y}{NW}{\the\legendcontent} %
> map header \legendbox{x}{y}{NW}{\legendsymbols}   
> % legend symbols \legendbox{x}{y}{NW}{\northarrow} 
>% north arrow \legendbox{x}{y}{NW}{\hsize=10 cm\centerline\scalebar}
>  % scalebar endcode
> 
> 
> Some finetuning:
> within the file legendsymbols.th is a line
>% personal adjustments
> \advance\legendsymbolht by -4pt % align legendsymboltext from top of
> legendsymbolbox with adjusting the number you can adjust the text from each
> legendsymbol to the symbolbox.
> 
> hth,
> Torsten
> 
> > Bill Gee via Therion  hat am 9. November 2017 um
> > 14:45 geschrieben:
> > 
> > Hello everyone -
> > 
> > I need to make the legend on a map larger. The cave has grown to
> > nearly 3km of passage, and even when printed on 60cm x 100cm paper
> > the legend is too smal to read. Even a magnifying glass does not
> > help!
> > 
> > I referred to a thread from about two years ago which discusses this
> > subject. Henry Bennett provided a combination of MetaPost and TeX
> > code that is supposed to make the legend larger. It works ... Sort
> > of! Much is left out.
> > 
> > Here is the code I have in the layout section of my thconfig file:
> > 
> > # Change the size of the legend
> > code metapost
> > def draw_legend_box =
> > %make the objects in the legend boxes bigger
> > currentpicture := currentpicture scaled 5.0;
> > clip currentpicture to unitsquare scaled 10u;
> > drawoptions();
> > pickup PenB;
> > draw unitsquare scaled 10u ;
> > enddef;
> > 
> > %clear the background of the larger legend boxes
> > def clean_legend_box =
> > unfill unitsquare scaled 10u;
> > enddef;
> > 
> > %change the value of inscale to fill the legend boxes
> > def inscale =
> > xscaled legend_scale yscaled (0.6*legend_scale)
> > %xscaled legend_scale yscaled legend_scale
> > enddef;
> > endcode
> > 
> > code tex-map
> > \def\maplayout{
> > \legendbox{3}{65}{W}{
> > \legendwidth 80 cm
> > \legendtextsize={\size[74]}
> > \hsize=\legendwidth
> > \northarrow\bigskip
> > \the\cavename
> > \the\comment
> > \input th_legend
> > }
> > }
> > endcode
> > 
> > The legend that results from this is about the right size. However,
> > only the symbol table is enlarged. The north arrow is still too small
> > and everything else that is supposed to be in the legend is missing.

Re: [Therion] Increase size of legend

2017-11-10 Thread Bill Gee via Therion
Hi Bruce -

There is much to think about here, and also with Torsten's message.  I have 
enough to keep me busy for several days!  :-)

Regarding area fills vs. points ...  I take the opposite view of you.  I 
prefer area fills.  With an area fill I can completely control the boundaries 
of the symbol.  Points do not allow that.  I had several cases where clay 
floor and flowstone were drawn as overlapping even though that was not the 
case in the cave.  The downside to area fills is, as you note, the symbol 
density at various map scales.

Speaking of scale - If I were to set the map scale based on the bounding box 
of the cave, then it would be somewhere around 1:1200.  At that scale much 
detail gets lost when you zoom in on the PDF.

Maybe the thing to do is create TWO maps.  One would be scaled for printing as 
the landowner wants and the other would be scaled for viewing in a PDF, 
particularly when zoomed in.  Is that a common practice?

-- 
Bill Gee



On Friday, November 10, 2017 1:18:45 AM CST Bruce Mutton via Therion wrote:
> Hi Bill
> If I were in your situation (as I think I have been from time to time), then
> I would opt for targeting an exported map that was close to the 3'x2' paper
> size when printed at full size.  I would do this by using 'scale 1 xxx'
> where xxx is one of the preferred scales that gives you close to the right
> paper size. That is assuming the full size legend, north arrow, header text
> are more or less the right size for your needs, or only need minor tweaks.
> 
> Then if some symbols are not quite right, I would limit my code
> customisation to only those symbols.  Judging by examples you have posted
> on the wiki, you are pretty good at this.  Examples in
> https://therion.speleo.sk/wiki/metapost#cave_symbol_size_and_density_exampl
> es provide some patterns to guide changes in fill density, and the
> discussion near the top of the page about variables u, v and w might be
> helpful.
> 
> As Felix mentioned, you can tweak text and symbol size with 'base-scale 1
> yyy', if you want to optimise for printing larger or smaller than full
> size.
> 
> Seems to me that this approach is likely to be the path of least resistance,
> requiring only changes to your layouts and some metapost. Optimising
> standard output elements for printing at the 'wrong size' just seems
> counter productive to me.
> 
> I should admit however that I tend to avoid using fills like clay, sand,
> debris, blocks, and rather use points.  That avoids the fill density issues
> you describe, but I appreciate if you already have a large investment in
> area fills your approach may be tempting.
> 
> Bruce
> 
> -Original Message-
> From: Therion [mailto:therion-boun...@speleo.sk] On Behalf Of Bill Gee via
> Therion Sent: Friday, 10 November 2017 8:37 AM
> To: List for Therion users <therion@speleo.sk>
> Cc: Bill Gee <b...@campercaver.net>
> Subject: Re: [Therion] Increase size of legend
> 
> Hi Bruce -
> 
> The reason for 1m x 0.6m paper (actually 3 feet by 2 feet) is because that
> is the size of the frame that the landowner wishes to display the map in. 
> It is also the largest size we can get printed for any reasonable cost.
> 
> I've been using 1:200 for this map.  Scales of 1:500 and higher make the
> fills on the map too sparse.  A clay area might have one clay symbol in it.
>  Scales below 1:200 make the fills too dense.
> 
> --
> Bill Gee
> 
> On Thursday, November 9, 2017 1:02:00 PM CST Bruce Mutton via Therion wrote:
> > Hi Bill
> > 
> > Sounds like you need to print on a larger piece of paper. 1m x 0.6m is
> > quite modest.  I presume you are not printing your pdf file out at the
> > full size that Therion generated it at.
> > 
> > I have not had any legend size issues with a 30km cave, although I must
> > admit that I do with very small caves, where the legend ends up much
> > bigger
> > than the cave itself!
> > 
> > If you want to fit your cave to paper of a particular size, then change
> > the
> > scale.  I rarely use anything less than 'scale 1 1000' for a cave longer
> > than 1km.
> > 
> > To be precise about fitting the cave to a particular paper size, then
> > 'export atlas' will give a better result than 'export map', although of
> > course atlas do give quite a different end product, and take a bit more
> > care and attention to set up well.
> > 
> > 
> > 
> > Bruce
> > 
> > 
> > 
> > From: Therion [mailto:therion-boun...@speleo.sk] On Behalf Of Bill Gee via
> > Therion
> > Sent: Friday, 10 November 2017 2:45 AM
> > To: Therion Mail List <therion@speleo.sk>
> > Cc: Bill Gee <b..

Re: [Therion] Increase size of legend

2017-11-09 Thread Torsten Schnitter via Therion
Hi Bill

I have done that. Somewhat complicated but it works (for me).
Following just as an example to get an idea about it.
I also seperated scalebar, northarrow, legendcontent and legendsymbols from 
each other to place them at different positions.

You can input the attached .th files in your config file using:
input .\filename.th
(I put the code into files to use it with different caves. But you also can put 
the sourcecode directly into your config file)

within layout command use following:
- copy legendcontent (for input of new code for legendcontent into the layout 
definition)
- copy legendsymbols (for input of new code for legendsymbols into the layout 
definition)
- copy scalebar (for input of new code for scalebar into the layout definition)
- copy northarrow_new (for input of new code for northarrow into the layout 
definition)
- scale and base-scale (for sizing the map and size of symbols inside map)
- legend-width xx cm (to size the width of legendsymbols-table)
- legend-columns x (number of rows of legend-symbols)

also within layout:
code metapost
  % scale of legend symbols
  tmpscale:=2.0;
  % scale of north arrow
  tmpscalenarrow:=2.5;
  % scale of scalebar
  tmpscalebar:=2.0;
endcode

code tex-map
  % parameter legendcontent
  \def\thsizexl{60}   % 
size of cave name in map
  \def\thsizel{48}% 
size of comment in map
  \def\thsizem{36}% 
size of text in map
  % parameter legend symbols
  \def\legendsymbolswidth1{60 cm} % 
width of legendcontent
  \legendtextsectionsize={\size[60]}  % 
text size of legend symbols header
  \legendtextsize={\size[48]} % 
text size of legend symbols
  % map layout
  \def\maplayout{
\legendbox{x}{y}{NW}{\the\legendcontent} % map 
header
\legendbox{x}{y}{NW}{\legendsymbols}% 
legend symbols
\legendbox{x}{y}{NW}{\northarrow} % north 
arrow
\legendbox{x}{y}{NW}{\hsize=10 cm\centerline\scalebar}  % 
scalebar
endcode


Some finetuning:
within the file legendsymbols.th is a line
   % personal adjustments
\advance\legendsymbolht by -4pt % align legendsymboltext from top of 
legendsymbolbox
with adjusting the number you can adjust the text from each legendsymbol to the 
symbolbox.

hth,
Torsten

> Bill Gee via Therion  hat am 9. November 2017 um 14:45 
> geschrieben:
> 
> Hello everyone -
>  
> I need to make the legend on a map larger. The cave has grown to nearly 
> 3km of passage, and even when printed on 60cm x 100cm paper the legend is too 
> smal to read. Even a magnifying glass does not help!
>  
> I referred to a thread from about two years ago which discusses this 
> subject. Henry Bennett provided a combination of MetaPost and TeX code that 
> is supposed to make the legend larger. It works ... Sort of! Much is left out.
>  
> Here is the code I have in the layout section of my thconfig file:
>  
> # Change the size of the legend
> code metapost
> def draw_legend_box =
> %make the objects in the legend boxes bigger
> currentpicture := currentpicture scaled 5.0;
> clip currentpicture to unitsquare scaled 10u;
> drawoptions();
> pickup PenB;
> draw unitsquare scaled 10u ;
> enddef;
>  
> %clear the background of the larger legend boxes
> def clean_legend_box =
> unfill unitsquare scaled 10u;
> enddef;
>  
> %change the value of inscale to fill the legend boxes
> def inscale =
> xscaled legend_scale yscaled (0.6*legend_scale)
> %xscaled legend_scale yscaled legend_scale
> enddef;
> endcode
>  
> code tex-map
> \def\maplayout{
> \legendbox{3}{65}{W}{
> \legendwidth 80 cm
> \legendtextsize={\size[74]}
> \hsize=\legendwidth
> \northarrow\bigskip
> \the\cavename
> \the\comment
> \input th_legend
> }
> }
> endcode
>  
> The legend that results from this is about the right size. However, only 
> the symbol table is enlarged. The north arrow is still too small and 
> everything else that is supposed to be in the legend is missing. The attached 
> screen shot shows what I get.
>  
> The Therion Book has a section describing the TeX macros that can be 
> used. It looks like the documentation is not complete. Some of the macros are 
> shown with options and parameters, but not all. There are samples on the Wiki 
> that show additional options. Is there a document that describes ALL of the 
> options and parameters for the TeX macros?
>  
> How are the parameters in the MetaPost section of the code related? 
> 

[Therion] Increase size of legend

2017-11-09 Thread Bruce Mutton via Therion
Hi Bill
If I were in your situation (as I think I have been from time to time), then I 
would opt for targeting an exported map that was close to the 3'x2' paper size 
when printed at full size.  I would do this by using 'scale 1 xxx' where xxx is 
one of the preferred scales that gives you close to the right paper size.
That is assuming the full size legend, north arrow, header text are more or 
less the right size for your needs, or only need minor tweaks.

Then if some symbols are not quite right, I would limit my code customisation 
to only those symbols.  Judging by examples you have posted on the wiki, you 
are pretty good at this.  Examples in 
https://therion.speleo.sk/wiki/metapost#cave_symbol_size_and_density_examples 
provide some patterns to guide changes in fill density, and the discussion near 
the top of the page about variables u, v and w might be helpful.

As Felix mentioned, you can tweak text and symbol size with 'base-scale 1 yyy', 
if you want to optimise for printing larger or smaller than full size.

Seems to me that this approach is likely to be the path of least resistance, 
requiring only changes to your layouts and some metapost.
Optimising standard output elements for printing at the 'wrong size' just seems 
counter productive to me.

I should admit however that I tend to avoid using fills like clay, sand, 
debris, blocks, and rather use points.  That avoids the fill density issues you 
describe, but I appreciate if you already have a large investment in area fills 
your approach may be tempting.

Bruce

-Original Message-
From: Therion [mailto:therion-boun...@speleo.sk] On Behalf Of Bill Gee via 
Therion
Sent: Friday, 10 November 2017 8:37 AM
To: List for Therion users <therion@speleo.sk>
Cc: Bill Gee <b...@campercaver.net>
Subject: Re: [Therion] Increase size of legend

Hi Bruce -

The reason for 1m x 0.6m paper (actually 3 feet by 2 feet) is because that is 
the size of the frame that the landowner wishes to display the map in.  It is 
also the largest size we can get printed for any reasonable cost.

I've been using 1:200 for this map.  Scales of 1:500 and higher make the fills 
on the map too sparse.  A clay area might have one clay symbol in it.  Scales 
below 1:200 make the fills too dense.

--
Bill Gee



On Thursday, November 9, 2017 1:02:00 PM CST Bruce Mutton via Therion wrote:
> Hi Bill
> 
> Sounds like you need to print on a larger piece of paper. 1m x 0.6m is quite
> modest.  I presume you are not printing your pdf file out at the full size
> that Therion generated it at.
> 
> I have not had any legend size issues with a 30km cave, although I must
> admit that I do with very small caves, where the legend ends up much bigger
> than the cave itself!
> 
> If you want to fit your cave to paper of a particular size, then change the
> scale.  I rarely use anything less than 'scale 1 1000' for a cave longer
> than 1km.
> 
> To be precise about fitting the cave to a particular paper size, then
> 'export atlas' will give a better result than 'export map', although of
> course atlas do give quite a different end product, and take a bit more care
> and attention to set up well.
> 
> 
> 
> Bruce
> 
> 
> 
> From: Therion [mailto:therion-boun...@speleo.sk] On Behalf Of Bill Gee via
> Therion
> Sent: Friday, 10 November 2017 2:45 AM
> To: Therion Mail List <therion@speleo.sk>
> Cc: Bill Gee <b...@campercaver.net>
> Subject: [Therion] Increase size of legend
> 
> 
> 
> Hello everyone -
> 
> 
> 
> I need to make the legend on a map larger. The cave has grown to nearly 3km
> of passage, and even when printed on 60cm x 100cm paper the legend is too
> smal to read. Even a magnifying glass does not help!
> 
>  . snipped.
> 
> Thanks!


___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion

___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion


Re: [Therion] Increase size of legend

2017-11-09 Thread Bill Gee via Therion
Hi Bruce -

The reason for 1m x 0.6m paper (actually 3 feet by 2 feet) is because that is 
the size of the frame that the landowner wishes to display the map in.  It is 
also the largest size we can get printed for any reasonable cost.

I've been using 1:200 for this map.  Scales of 1:500 and higher make the fills 
on the map too sparse.  A clay area might have one clay symbol in it.  Scales 
below 1:200 make the fills too dense.

-- 
Bill Gee



On Thursday, November 9, 2017 1:02:00 PM CST Bruce Mutton via Therion wrote:
> Hi Bill
> 
> Sounds like you need to print on a larger piece of paper. 1m x 0.6m is quite
> modest.  I presume you are not printing your pdf file out at the full size
> that Therion generated it at.
> 
> I have not had any legend size issues with a 30km cave, although I must
> admit that I do with very small caves, where the legend ends up much bigger
> than the cave itself!
> 
> If you want to fit your cave to paper of a particular size, then change the
> scale.  I rarely use anything less than 'scale 1 1000' for a cave longer
> than 1km.
> 
> To be precise about fitting the cave to a particular paper size, then
> 'export atlas' will give a better result than 'export map', although of
> course atlas do give quite a different end product, and take a bit more care
> and attention to set up well.
> 
> 
> 
> Bruce
> 
> 
> 
> From: Therion [mailto:therion-boun...@speleo.sk] On Behalf Of Bill Gee via
> Therion
> Sent: Friday, 10 November 2017 2:45 AM
> To: Therion Mail List <therion@speleo.sk>
> Cc: Bill Gee <b...@campercaver.net>
> Subject: [Therion] Increase size of legend
> 
> 
> 
> Hello everyone -
> 
> 
> 
> I need to make the legend on a map larger. The cave has grown to nearly 3km
> of passage, and even when printed on 60cm x 100cm paper the legend is too
> smal to read. Even a magnifying glass does not help!
> 
>  . snipped.
> 
> Thanks!


___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion


Re: [Therion] Increase size of legend

2017-11-09 Thread Bruce Mutton via Therion
Hi Bill

Sounds like you need to print on a larger piece of paper. 1m x 0.6m is quite
modest.  I presume you are not printing your pdf file out at the full size
that Therion generated it at.

I have not had any legend size issues with a 30km cave, although I must
admit that I do with very small caves, where the legend ends up much bigger
than the cave itself!

If you want to fit your cave to paper of a particular size, then change the
scale.  I rarely use anything less than 'scale 1 1000' for a cave longer
than 1km.

To be precise about fitting the cave to a particular paper size, then
'export atlas' will give a better result than 'export map', although of
course atlas do give quite a different end product, and take a bit more care
and attention to set up well.

 

Bruce

 

From: Therion [mailto:therion-boun...@speleo.sk] On Behalf Of Bill Gee via
Therion
Sent: Friday, 10 November 2017 2:45 AM
To: Therion Mail List <therion@speleo.sk>
Cc: Bill Gee <b...@campercaver.net>
Subject: [Therion] Increase size of legend

 

Hello everyone -

 

I need to make the legend on a map larger. The cave has grown to nearly 3km
of passage, and even when printed on 60cm x 100cm paper the legend is too
smal to read. Even a magnifying glass does not help!

 . snipped.

Thanks!


-- 

Bill Gee

 

 

___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion


Re: [Therion] Increase size of legend

2017-11-09 Thread Felix Ossig-Bonanno via Therion
Hi Bill,

Have you tried changing the scale in your config file?
You can use it to scale the size of the passages.

  scale 1 75 #default 1 200 #so 1 100 makes the passages twice as big.


Then if the detail inside the passages isn't to your liking e.g. changing
the scale doesn't change the size of the gravel fill etc.
you will need to change the 'base-scale' option too

base-scale 1 75


I hope that helps!

Regards,
*Felix Ossig-Bonanno*

*m:* +1 ()
*e:* oss...@gmail.com
*w:* eclecticcats.wordpress.com

On 9 November 2017 at 05:45, Bill Gee via Therion  wrote:

> Hello everyone -
>
>
>
> I need to make the legend on a map larger. The cave has grown to nearly
> 3km of passage, and even when printed on 60cm x 100cm paper the legend is
> too smal to read. Even a magnifying glass does not help!
>
>
>
> I referred to a thread from about two years ago which discusses this
> subject. Henry Bennett provided a combination of MetaPost and TeX code that
> is supposed to make the legend larger. It works ... Sort of! Much is left
> out.
>
>
>
> Here is the code I have in the layout section of my thconfig file:
>
>
>
> # Change the size of the legend
>
> code metapost
>
> def draw_legend_box =
>
> %make the objects in the legend boxes bigger
>
> currentpicture := currentpicture scaled 5.0;
>
> clip currentpicture to unitsquare scaled 10u;
>
> drawoptions();
>
> pickup PenB;
>
> draw unitsquare scaled 10u ;
>
> enddef;
>
> %clear the background of the larger legend boxes
>
> def clean_legend_box =
>
> unfill unitsquare scaled 10u;
>
> enddef;
>
> %change the value of inscale to fill the legend boxes
>
> def inscale =
>
> xscaled legend_scale yscaled (0.6*legend_scale)
>
> %xscaled legend_scale yscaled legend_scale
>
> enddef;
>
> endcode
>
> code tex-map
>
> \def\maplayout{
>
> \legendbox{3}{65}{W}{
>
> \legendwidth 80 cm
>
> \legendtextsize={\size[74]}
>
> \hsize=\legendwidth
>
> \northarrow\bigskip
>
> \the\cavename
>
> \the\comment
>
> \input th_legend
>
> }
>
> }
>
> endcode
>
>
>
> The legend that results from this is about the right size. However, only
> the symbol table is enlarged. The north arrow is still too small and
> everything else that is supposed to be in the legend is missing. The
> attached screen shot shows what I get.
>
>
>
> The Therion Book has a section describing the TeX macros that can be used.
> It looks like the documentation is not complete. Some of the macros are
> shown with options and parameters, but not all. There are samples on the
> Wiki that show additional options. Is there a document that describes ALL
> of the options and parameters for the TeX macros?
>
>
>
> How are the parameters in the MetaPost section of the code related?
> Looking at the legend I get, I see that the boxes enclosing each symbol are
> about the right size but the symbols drawn in them are (in some cases) too
> small. Look at the symbols for pillar and stalagmite, for example. Others,
> like the pendant (a user-defined symbol) are too large. Which of the
> MetaPost lines control that?
>
>
>
> Does anyone have suggestions about what I am missing?
>
>
>
> If anyone wants to see the full map, let me know. It is nearly 3mb as a
> PDF, so I don't want to send it to the entire group.
>
> Thanks!
>
>
> --
>
> Bill Gee
>
>
>
>
>
> ___
> Therion mailing list
> Therion@speleo.sk
> https://mailman.speleo.sk/listinfo/therion
>
>
___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion


[Therion] Increase size of legend

2017-11-09 Thread Bill Gee via Therion
Hello everyone -

I need to make the legend on a map larger.  The cave has grown to nearly 3km 
of passage, and even when printed on 60cm x 100cm paper the legend is too smal 
to read.  Even a magnifying glass does not help!

I referred to a thread from about two years ago which discusses this subject.  
Henry Bennett provided a combination of MetaPost and TeX code that is supposed 
to make the legend larger.  It works ...  Sort of!  Much is left out.

Here is the code I have in the layout section of my thconfig file:

# Change the size of the legend
code metapost
   def draw_legend_box =
   %make the objects in the legend boxes bigger
currentpicture := currentpicture scaled 5.0;
clip currentpicture to unitsquare scaled 10u;
drawoptions();
pickup PenB;
draw unitsquare scaled 10u ;
enddef;
 
%clear the background of the larger legend boxes   
def clean_legend_box =
unfill unitsquare scaled 10u;
enddef;
   
%change the value of inscale to fill the legend boxes
def inscale =
xscaled legend_scale yscaled (0.6*legend_scale)
%xscaled legend_scale yscaled legend_scale
enddef;
endcode
 
code tex-map
  \def\maplayout{
\legendbox{3}{65}{W}{
  \legendwidth 80 cm
  \legendtextsize={\size[74]}
  \hsize=\legendwidth
  \northarrow\bigskip
  \the\cavename
  \the\comment
  \input th_legend
  }
  }
endcode 

The legend that results from this is about the right size.  However, only the 
symbol table is enlarged.  The north arrow is still too small and everything 
else that is supposed to be in the legend is missing.   The attached screen 
shot shows what I get.

The Therion Book has a section describing the TeX macros that can be used.  It 
looks like the documentation is not complete.  Some of the macros are shown 
with options and parameters, but not all.  There are samples on the Wiki that 
show additional options.  Is there a document that describes ALL of the 
options and parameters for the TeX macros?

How are the parameters in the MetaPost section of the code related?  Looking 
at the legend I get, I see that the boxes enclosing each symbol are about the 
right size but the symbols drawn in them are (in some cases) too small.
Look at the symbols for pillar and stalagmite, for example.  Others, like the 
pendant (a user-defined symbol) are too large.  Which of the MetaPost lines 
control that?

Does anyone have suggestions about what I am missing?

If anyone wants to see the full map, let me know.  It is nearly 3mb as a PDF, 
so I don't want to send it to the entire group.

Thanks!

-- 
Bill Gee

___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion