texlive[71976] Master/texmf-dist: mercatormap (5aug24)

commits+karl at tug.org commits+karl at tug.org
Mon Aug 5 21:33:44 CEST 2024


Revision: 71976
          https://tug.org/svn/texlive?view=revision&revision=71976
Author:   karl
Date:     2024-08-05 21:33:43 +0200 (Mon, 05 Aug 2024)
Log Message:
-----------
mercatormap (5aug24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/mercatormap/CHANGES.md
    trunk/Master/texmf-dist/doc/latex/mercatormap/README.md
    trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap-example.tex
    trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap.doc.animations.tex
    trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap.doc.definition.tex
    trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap.doc.orthodromes.tex
    trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap.doc.sty
    trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap.pdf
    trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap.tex
    trunk/Master/texmf-dist/tex/latex/mercatormap/mercatormap.sty
    trunk/Master/texmf-dist/tex/latex/mercatormap/mercatorpy.def
    trunk/Master/texmf-dist/tex/latex/mercatormap/mercatorsupplier.def

Modified: trunk/Master/texmf-dist/doc/latex/mercatormap/CHANGES.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mercatormap/CHANGES.md	2024-08-04 23:41:50 UTC (rev 71975)
+++ trunk/Master/texmf-dist/doc/latex/mercatormap/CHANGES.md	2024-08-05 19:33:43 UTC (rev 71976)
@@ -16,6 +16,29 @@
 ### Security
 
 
+
+## [1.2.0] - 2024-08-05
+
+### Added
+- Command `\ifmrcNPexists` to test existence of a named position
+- Macros `\mrcAnimAngle` and `\l_mermap_anim_angle_fp` to measure
+    the current orthodrome angle
+- Animation example for static maps    
+
+### Changed
+- `\mrcNPlat` and `\mrcNPlon` result to 0 now, if named position does not exist
+- `\ifmrcNPinmap` and `\ifmrcNPinvicinity` result to `false` now, if named position does not exist
+- Point definitions on an orthodrome now take an optional angle as result:
+    - Command `mrcNPfromOrthoFraction`
+    - Command `mrcNPfromOrthoFractionNamed`
+    - Command `mrcNPfromOrthoDistance`
+    - Command `mrcNPfromOrthoDistanceNamed`
+
+### Fixed
+- Documentation contained dates from `2023` instead of `2024`
+
+
+
 ## [1.1.0] - 2024-08-01
 
 ### Added

Modified: trunk/Master/texmf-dist/doc/latex/mercatormap/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mercatormap/README.md	2024-08-04 23:41:50 UTC (rev 71975)
+++ trunk/Master/texmf-dist/doc/latex/mercatormap/README.md	2024-08-05 19:33:43 UTC (rev 71976)
@@ -1,4 +1,4 @@
-# The LaTeX package mercatormap - version 1.1.0 (2024/08/01)
+# The LaTeX package mercatormap - version 1.2.0 (2024/08/05)
 
 
 > Copyright (c) 2020-2024 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>

Modified: trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap-example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap-example.tex	2024-08-04 23:41:50 UTC (rev 71975)
+++ trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap-example.tex	2024-08-05 19:33:43 UTC (rev 71976)
@@ -1,7 +1,7 @@
 % \LaTeX-Main\
 % !TeX encoding=UTF-8
 %%
-%% The LaTeX package mercatormap - version 1.1.0 (2024/08/01)
+%% The LaTeX package mercatormap - version 1.2.0 (2024/08/05)
 %% mercatormap-example.tex: Example document with a map
 %%
 %% -------------------------------------------------------------------------------------------

Modified: trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap.doc.animations.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap.doc.animations.tex	2024-08-04 23:41:50 UTC (rev 71975)
+++ trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap.doc.animations.tex	2024-08-05 19:33:43 UTC (rev 71976)
@@ -46,7 +46,8 @@
   \item Movement along an orthodrome from starting to final position with an unchanged
     common scale denominator.
   \item Zoom in or out on a fixed position.
-  \item Combination of both animation.
+  \item Combination of both animations.
+  \item Animated orthodrome drawing on a static map.
   \end{itemize}
   For more complex animations, several \refEnv{mrcAnimation} environments may be
   used consecutively.
@@ -92,13 +93,54 @@
 \end{dispExample*}
 
 
+
 \clearpage
+\begin{dispExample*}{breakable}
+  % \usepackage{fontawesome5}
+  \mrcNPdef{heathrow}{51.4678}{-0.4548}
+  \mrcNPdef{lax}{33.9421}{-118.4088}
+  \mrcNPdef{reykjavik}{64.1289}{-21.9369}
+
+  \begin{tcbraster}[raster height=22cm,raster columns=2,raster rows=4,
+      tile,size=minimal,boxsep=1pt,colback=black!20 ]
+  \begin{mrcAnimation}
+    {
+      named-start-position = heathrow,
+      named-final-position = lax,
+      frames = 8,
+    }
+    \begin{tcolorbox}
+      \begin{tikzpicture}
+      \mrcmap
+        [
+          type           = areafit,
+          area           = {heathrow,lax,reykjavik},
+          source         = topplusopen web,
+          tex width      = \tcbtextwidth,
+          tex height     = \tcbtextheight,
+          flex area fit  = 8mm,
+        ]{london-lax-\mrcAnimFrame}
+      \mrcdrawmap
+      \node[above left,font=\fontsize{3.5pt}{3.5pt}\sffamily]
+        at (mrcmap.south east) {\mrcmapattribution};
+      \mrcclipmap
+      \mrcNPdraworthodrome[red,very thick]{heathrow}{AnimNP}
+      \node[red!70!black,rotate=\mrcAnimAngle]
+          at (\mrcNPcs{AnimNP}) {\large\faPlane};
+      \end{tikzpicture}
+    \end{tcolorbox}
+  \end{mrcAnimation}
+  \end{tcbraster}
+\end{dispExample*}
+
+
+\clearpage
 %-------------------------------------------------------------------------------
 \subsection{Animation Options}\label{ref:animOptions}
 
 \begin{docMrcKeys}[
     doc keypath = anim,
-    doc new     = 2023-07-31,
+    doc new     = 2024-07-31,
   ]{
     {
       doc name        = start-position,
@@ -117,7 +159,7 @@
 
 \begin{docMrcKeys}[
     doc keypath = anim,
-    doc new     = 2023-07-31,
+    doc new     = 2024-07-31,
   ]{
     {
       doc name        = final-position,
@@ -136,7 +178,7 @@
 
 \begin{docMrcKeys}[
     doc keypath = anim,
-    doc new     = 2023-07-31,
+    doc new     = 2024-07-31,
   ]{
     {
       doc name        = position,
@@ -158,7 +200,7 @@
 
 \begin{docMrcKeys}[
     doc keypath = anim,
-    doc new     = 2023-07-31,
+    doc new     = 2024-07-31,
   ]{
     {
       doc name        = frames,
@@ -175,7 +217,7 @@
 
 \begin{docMrcKeys}[
     doc keypath = anim,
-    doc new     = 2023-07-31,
+    doc new     = 2024-07-31,
     doc parameter   = {\colOpt{=true\textbar false}},
     doc description = {default |true|, initially |false|},
   ]{
@@ -194,7 +236,7 @@
 
 \begin{docMrcKeys}[
     doc keypath = anim,
-    doc new     = 2023-07-31,
+    doc new     = 2024-07-31,
   ]{
     {
       doc name        = drop-no-frame,
@@ -207,7 +249,7 @@
 
 \begin{docMrcKeys}[
     doc keypath = anim,
-    doc new     = 2023-07-31,
+    doc new     = 2024-07-31,
   ]{
     {
       doc name        = scale-denominators,
@@ -238,7 +280,7 @@
 
 \begin{docMrcKeys}[
     doc keypath = anim,
-    doc new     = 2023-07-31,
+    doc new     = 2024-07-31,
   ]{
     {
       doc name        = common-scale-denominator,
@@ -257,7 +299,7 @@
 \clearpage
 \begin{docMrcKeys}[
     doc keypath = anim,
-    doc new     = 2023-07-31,
+    doc new     = 2024-07-31,
   ]{
     {
       doc name        = timewarp,
@@ -274,7 +316,7 @@
 
 
 \begin{docCommands}[
-    doc new     = 2023-07-31,
+    doc new     = 2024-07-31,
   ]{
     {
       doc name        = mrcTimewarpIdentity,
@@ -287,7 +329,7 @@
 
 \begin{docMrcKeys}[
     doc keypath = anim,
-    doc new     = 2023-07-31,
+    doc new     = 2024-07-31,
   ]{
     {
       doc name        = timewarp-identity,
@@ -300,7 +342,7 @@
 
 
 \begin{docCommands}[
-    doc new     = 2023-07-31,
+    doc new     = 2024-07-31,
   ]{
     {
       doc name        = mrcTimewarpSlowStart,
@@ -314,7 +356,7 @@
 
 \begin{docMrcKeys}[
     doc keypath = anim,
-    doc new     = 2023-07-31,
+    doc new     = 2024-07-31,
   ]{
     {
       doc name        = timewarp-slow-start,
@@ -332,7 +374,7 @@
 
 
 \begin{docCommands}[
-    doc new     = 2023-07-31,
+    doc new     = 2024-07-31,
   ]{
     {
       doc name        = mrcTimewarpSlowFinal,
@@ -346,7 +388,7 @@
 
 \begin{docMrcKeys}[
     doc keypath = anim,
-    doc new     = 2023-07-31,
+    doc new     = 2024-07-31,
   ]{
     {
       doc name        = timewarp-slow-final,
@@ -364,7 +406,7 @@
 
 
 \begin{docCommands}[
-    doc new     = 2023-07-31,
+    doc new     = 2024-07-31,
   ]{
     {
       doc name        = mrcTimewarpSlowStartFinal,
@@ -379,7 +421,7 @@
 
 \begin{docMrcKeys}[
     doc keypath = anim,
-    doc new     = 2023-07-31,
+    doc new     = 2024-07-31,
   ]{
     {
       doc name        = timewarp-slow-start-final,
@@ -402,7 +444,7 @@
 \subsection{Macros inside the Animation Environment}\label{ref:animMacros}
 
 \begin{docCommands}[
-    doc new     = 2023-07-31,
+    doc new     = 2024-07-31,
   ]{
     {
       doc name        = mrcAnimFrame,
@@ -416,7 +458,7 @@
 
 
 \begin{docCommands}[
-    doc new     = 2023-07-31,
+    doc new     = 2024-07-31,
   ]{
     {
       doc name        = mrcAnimTime,
@@ -430,7 +472,7 @@
 
 
 \begin{docCommands}[
-    doc new     = 2023-07-31,
+    doc new     = 2024-07-31,
   ]{
     {
       doc name        = mrcAnimScaleDenom,
@@ -444,7 +486,7 @@
 
 
 \begin{docCommands}[
-    doc new     = 2023-07-31,
+    doc new     = 2024-07-31,
   ]{
     {
       doc name        = mrcAnimLatitude,
@@ -457,9 +499,8 @@
 \end{docCommands}
 
 
-
 \begin{docCommands}[
-    doc new     = 2023-07-31,
+    doc new     = 2024-07-31,
   ]{
     {
       doc name        = mrcAnimLongitude,
@@ -472,6 +513,23 @@
 \end{docCommands}
 
 
+\begin{docCommands}[
+    doc new     = 2024-08-05,
+  ]{
+    {
+      doc name        = mrcAnimAngle,
+    },
+    {
+      doc name        = l_mermap_anim_angle_fp,
+    },
+  }
+  Current angle between the tangent vector to the orthodrome and
+  the current parallel circle.
+\end{docCommands}
+
+
+
+
 \docValue{AnimNP}\tcbdocmarginnote{\tcbdocnew{2024-07-31}}:
   The current named position.
 

Modified: trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap.doc.definition.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap.doc.definition.tex	2024-08-04 23:41:50 UTC (rev 71975)
+++ trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap.doc.definition.tex	2024-08-05 19:33:43 UTC (rev 71976)
@@ -298,9 +298,10 @@
 \end{docCommand}
 
 
-\begin{docCommand}{mrcNPlat}{\marg{name}}
+\begin{docCommand}[doc updated=2024-08-02]{mrcNPlat}{\marg{name}}
   Inserts the \emph{latitude} of a \emph{named position} with given \meta{name}.
   \refCom{mrcNPlat} is expandable and may be used in floating point expressions.
+  If the \meta{name} does not exist, the macro expands to |0|.
   \begin{dispExample}
     \mrcNPdef{nuremberg}{49.45522}{11.07631}
     Latitude: \mrcNPlat{nuremberg}\\
@@ -309,12 +310,19 @@
 \end{docCommand}
 
 
-\begin{docCommand}{mrcNPlon}{\marg{name}}
+\begin{docCommand}[doc updated=2024-08-02]{mrcNPlon}{\marg{name}}
   Inserts the \emph{longitude} of a \emph{named position} with given \meta{name}.
   \refCom{mrcNPlon} is expandable and may be used in floating point expressions.
+  If the \meta{name} does not exist, the macro expands to |0|.
 \end{docCommand}
 
 
+\begin{docCommand}[doc new=2024-08-02]{ifmrcNPexists}{\marg{name}\marg{true}\marg{false}}
+  If the given \emph{named position} with given \meta{name} exists, the \meta{true} code is executed, otherwise
+  the \meta{false} code.
+\end{docCommand}
+
+
 \clearpage
 %-------------------------------------------------------------------------------
 \subsection{Tests for Points to be inside or outside a Map}

Modified: trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap.doc.orthodromes.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap.doc.orthodromes.tex	2024-08-04 23:41:50 UTC (rev 71975)
+++ trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap.doc.orthodromes.tex	2024-08-05 19:33:43 UTC (rev 71976)
@@ -102,15 +102,15 @@
 \subsection{Orthodrome Points}
 
 \begin{docCommands}[
-    doc new     = 2024-08-01,
   ]{
     {
+      doc new and updated = {2024-08-01}{2024-08-05},
       doc name        = mrcNPfromOrthoFraction,
-      doc parameter   = \marg{name}\marg{lat1}\marg{lon1}\marg{lat2}\marg{lon2}\marg{fraction},
+      doc parameter   = \marg{name}\oarg{\textbackslash angle}\marg{lat1}\marg{lon1}\marg{lat2}\marg{lon2}\marg{fraction},
     },
     {
       doc name        = mrcNPfromOrthoFractionNamed,
-      doc parameter   = \marg{name}\marg{name1}\marg{name2}\marg{fraction},
+      doc parameter   = \marg{name}\oarg{\textbackslash angle}\marg{name1}\marg{name2}\marg{fraction},
     },
   }
   Defines a new named position \meta{name} which is located on a \meta{fraction}
@@ -121,6 +121,9 @@
   latitude \meta{lat2} and longitude \meta{lon2} (or described by a named position \meta{name2}).
   The given starting and final point of the orthodrome need to have a distance of more than
   \SI{1}{\meter}.
+  If \meta{\textbackslash angle} is given, this macro is set to the
+  angle between the tangent vector to the orthodrome and
+  the current parallel circle.
 
 \tikzsetnextfilename{ortho_orthodrome3}%
 \begin{dispExample}
@@ -142,8 +145,10 @@
     \mrcNPdraworthodrome[red,very thick] {munich}{newyork}
     \foreach \fraction in { 0.1,0.3,0.5,0.7,1.0,1.1 }
       {
-        \mrcNPfromOrthoFractionNamed{waypoint}{munich}{newyork}{\fraction}
-        \mrcmarker{type=pin,named position=waypoint,contents={\fraction}}
+        \mrcNPfromOrthoFractionNamed{waypoint}[\myangle]
+          {munich}{newyork}{\fraction}
+        \mrcmarker{type=pin,named position=waypoint,
+          contents={\fraction: \fpeval{round(\myangle)}\textdegree }}
       }
   \end{tikzpicture}
 \end{dispExample}
@@ -152,15 +157,15 @@
 \clearpage
 
 \begin{docCommands}[
-    doc new     = 2024-08-01,
   ]{
     {
+      doc new and updated = {2024-08-01}{2024-08-05},
       doc name        = mrcNPfromOrthoDistance,
-      doc parameter   = \marg{name}\marg{lat1}\marg{lon1}\marg{lat2}\marg{lon2}\marg{distance},
+      doc parameter   = \marg{name}\oarg{\textbackslash angle}\marg{lat1}\marg{lon1}\marg{lat2}\marg{lon2}\marg{distance},
     },
     {
       doc name        = mrcNPfromOrthoDistanceNamed,
-      doc parameter   = \marg{name}\marg{name1}\marg{name2}\marg{distance},
+      doc parameter   = \marg{name}\oarg{\textbackslash angle}\marg{name1}\marg{name2}\marg{distance},
     },
   }
   Defines a new named position \meta{name} which is located on a \meta{distance}
@@ -171,6 +176,9 @@
   latitude \meta{lat2} and longitude \meta{lon2} (or described by a named position \meta{name2}).
   The given starting and final point of the orthodrome need to have a distance of more than
   \SI{1}{\meter}. The unit for the \meta{distance} is kilometer.
+  If \meta{\textbackslash angle} is given, this macro is set to the
+  angle between the tangent vector to the orthodrome and
+  the current parallel circle.
 
 \tikzsetnextfilename{ortho_orthodrome4}%
 \begin{dispExample}

Modified: trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap.doc.sty
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap.doc.sty	2024-08-04 23:41:50 UTC (rev 71975)
+++ trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap.doc.sty	2024-08-05 19:33:43 UTC (rev 71976)
@@ -39,6 +39,8 @@
 \RequirePackage{\mrcpkgprefix mercatormap}
 \IfFileExists{../private/privatekeys.tex}{\input{../private/privatekeys.tex}}{}
 
+\RequirePackage{fontawesome5}
+
 \RequirePackage{csquotes}
 \RequirePackage[%style=authoryear,
   style=numeric-comp,

Modified: trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap.tex	2024-08-04 23:41:50 UTC (rev 71975)
+++ trunk/Master/texmf-dist/doc/latex/mercatormap/mercatormap.tex	2024-08-05 19:33:43 UTC (rev 71976)
@@ -2,7 +2,7 @@
 % !TeX encoding=UTF-8
 % !TeX spellcheck=en_US
 %%
-%% The LaTeX package mercatormap - version 1.1.0 (2024/08/01)
+%% The LaTeX package mercatormap - version 1.2.0 (2024/08/05)
 %% mercatormap.tex: Manual
 %%
 %% -------------------------------------------------------------------------------------------
@@ -32,8 +32,8 @@
 % The following personal API-keys are needed for compilation
 % \mrcsetapikey{thunderforest}{YOUR-API-KEY}     % registered key
 
-\def\version{1.1.0}%
-\def\datum{2024/08/01}%
+\def\version{1.2.0}%
+\def\datum{2024/08/05}%
 
 \mrcactivatescript% activates Python script
 

Modified: trunk/Master/texmf-dist/tex/latex/mercatormap/mercatormap.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/mercatormap/mercatormap.sty	2024-08-04 23:41:50 UTC (rev 71975)
+++ trunk/Master/texmf-dist/tex/latex/mercatormap/mercatormap.sty	2024-08-05 19:33:43 UTC (rev 71976)
@@ -1,4 +1,4 @@
-%% The LaTeX package mercatormap - version 1.1.0 (2024/08/01)
+%% The LaTeX package mercatormap - version 1.2.0 (2024/08/05)
 %% mercatormap.sty: geographic coordinates (Mercator projection) and map tiles for TikZ pictures
 %%
 %% -------------------------------------------------------------------------------------------
@@ -18,7 +18,7 @@
 %% This work consists of all files listed in README
 %%
 \NeedsTeXFormat{LaTeX2e}[2023-11-01]
-\ProvidesExplPackage{mercatormap}{2024/08/01}{1.1.0}
+\ProvidesExplPackage{mercatormap}{2024/08/05}{1.2.0}
   {A Web Mercator projection package with map tile support}
 
 \RequirePackage{siunitx,graphicx,tikz}
@@ -330,7 +330,7 @@
   }
 
 
-\prg_new_conditional:Npnn \__mermap_if_in_map:nn #1#2 { p, TF }
+\prg_new_conditional:Npnn \__mermap_if_in_map:nn #1#2 { p, T, F, TF }
   {
     \fp_compare:nNnTF {#1} > \l__mermap_mapnorth_fp
     {
@@ -368,7 +368,7 @@
   }
 
 
-\prg_new_conditional:Npnn \__mermap_if_in_vicinity:nn #1#2 { p, TF }
+\prg_new_conditional:Npnn \__mermap_if_in_vicinity:nn #1#2 { p, T, F, TF }
   {
     \fp_compare:nNnTF {#1} > \l__mermap_vic_north_fp
     {
@@ -445,19 +445,13 @@
 
 \NewExpandableDocumentCommand \mrcNPlat { m }
   {
-    \cs_if_exist_use:cF{__mermap__lat__#1}
-    {
-      \msg_error:nnx{ mercatormap }{ np-undefined }{ #1 }
-    }
+    \cs_if_exist_use:cF{ __mermap__lat__#1 }{ 0 }
   }
 
 
 \NewExpandableDocumentCommand \mrcNPlon { m }
   {
-    \cs_if_exist_use:cF{__mermap__lon__#1}
-    {
-      \msg_error:nnx{ mercatormap }{ np-undefined }{ #1 }
-    }
+    \cs_if_exist_use:cF{ __mermap__lon__#1 }{ 0 }
   }
 
 
@@ -467,15 +461,75 @@
   }
 
 
+\prg_new_conditional:Npnn \__mermap_if_NP_exists:n #1 { p, TF }
+  {
+    \cs_if_exist:cTF{ __mermap__lat__#1 }
+      {
+        \cs_if_exist:cTF{ __mermap__lon__#1 }
+        {
+          \prg_return_true:
+        }
+        {
+          \prg_return_false:
+        }
+      }
+      {
+        \prg_return_false:
+      }
+  }
+
+
+\NewDocumentCommand{\ifmrcNPexists}{ m }
+  {
+    \__mermap_if_NP_exists:nTF{ #1 }
+  }
+
+
+\prg_new_conditional:Npnn \__mermap_if_NP_in_map:n #1 { p, TF }
+  {
+    \__mermap_if_NP_exists:nTF { #1 }
+    {
+      \__mermap_if_in_map:nnTF{ \mrcNPlat{#1} }{ \mrcNPlon{#1} }
+      {
+        \prg_return_true:
+      }
+      {
+      \prg_return_false:
+      }
+    }
+    {
+      \prg_return_false:
+    }
+  }
+
+
 \NewDocumentCommand{\ifmrcNPinmap}{ m }
   {
-    \__mermap_if_in_map:nnTF{\mrcNPlat{#1}}{\mrcNPlon{#1}}
+    \__mermap_if_NP_in_map:nTF { #1 }
   }
 
 
+\prg_new_conditional:Npnn \__mermap_if_NP_in_vicinity:n #1 { p, TF }
+  {
+    \__mermap_if_NP_exists:nTF { #1 }
+    {
+      \__mermap_if_in_vicinity:nnTF{ \mrcNPlat{#1} }{ \mrcNPlon{#1} }
+      {
+        \prg_return_true:
+      }
+      {
+      \prg_return_false:
+      }
+    }
+    {
+      \prg_return_false:
+    }
+  }
+
+
 \NewDocumentCommand{\ifmrcNPinvicinity}{ m }
   {
-    \__mermap_if_in_vicinity:nnTF{\mrcNPlat{#1}}{\mrcNPlon{#1}}
+    \__mermap_if_NP_in_vicinity:nTF{ #1 }
   }
 
 
@@ -2264,12 +2318,16 @@
 \fp_new:N \l__mermap_b_x_fp
 \fp_new:N \l__mermap_b_y_fp
 \fp_new:N \l__mermap_b_z_fp
+\fp_new:N \l__mermap_alpha_fp
 \fp_new:N \l__mermap_delta_lambda_fp
 \fp_new:N \l__mermap_delta_phi_fp
+\fp_new:N \l__mermap_n_x_fp
+\fp_new:N \l__mermap_n_y_fp
+\fp_new:N \l__mermap_n_z_fp
 \fp_new:N \l__mermap_psi_fp
 \fp_new:N \l__mermap_sin_psi_fp
+\fp_new:N \l__mermap_t_fp
 \fp_new:N \l__mermap_t_psi_fp
-\fp_new:N \l__mermap_t_fp
 \fp_new:N \l__mermap_t_x_fp
 \fp_new:N \l__mermap_t_y_fp
 \fp_new:N \l__mermap_t_z_fp
@@ -2364,6 +2422,31 @@
   }
 
 
+\cs_new_protected:Npn \__mermap_angle_at_orthodrome:
+  {
+    \bool_if:NTF \l__mermap_linearization_bool
+    {
+      \fp_set:Nn \l__mermap_alpha_fp { 90 }
+    }
+    {
+      \fp_set:Nn \l__mermap_tmpa_fp { cosd( \l__mermap_psi_fp - \l__mermap_t_psi_fp ) }
+      \fp_set:Nn \l__mermap_tmpb_fp { cosd( \l__mermap_t_psi_fp ) }
+      \fp_set:Nn \l__mermap_n_x_fp { \l__mermap_tmpb_fp*\l__mermap_b_x_fp - \l__mermap_tmpa_fp*\l__mermap_a_x_fp }
+      \fp_set:Nn \l__mermap_n_y_fp { \l__mermap_tmpb_fp*\l__mermap_b_y_fp - \l__mermap_tmpa_fp*\l__mermap_a_y_fp }
+      \fp_set:Nn \l__mermap_n_z_fp { \l__mermap_tmpb_fp*\l__mermap_b_z_fp - \l__mermap_tmpa_fp*\l__mermap_a_z_fp }
+      \fp_set:Nn \l__mermap_tmpa_fp { sqrt( \l__mermap_n_x_fp^2 + \l__mermap_n_y_fp^2 + \l__mermap_n_z_fp^2 ) }
+      \fp_set:Nn \l__mermap_n_x_fp { \l__mermap_n_x_fp / \l__mermap_tmpa_fp }
+      \fp_set:Nn \l__mermap_n_y_fp { \l__mermap_n_y_fp / \l__mermap_tmpa_fp }
+      \fp_set:Nn \l__mermap_n_z_fp { \l__mermap_n_z_fp / \l__mermap_tmpa_fp }
+      \fp_set:Nn \l__mermap_alpha_fp { acosd( \l__mermap_n_y_fp*cosd(\l__mermap_cs_lon_fp) - \l__mermap_n_x_fp*sind(\l__mermap_cs_lon_fp) ) }
+      \fp_compare:nNnT \l__mermap_n_z_fp < 0
+        {
+          \fp_set:Nn \l__mermap_alpha_fp { 360 - \l__mermap_alpha_fp }
+        }
+    }
+  }
+
+
 \NewDocumentCommand \mrcdraworthodrome { O{} mmmm }
   {
     \__mermap_draw_orthodrome:nnnnn {#1}{#2}{#3}{#4}{#5}
@@ -2442,50 +2525,65 @@
 
 \NewDocumentCommand \mrcNPprettyloxodistance { mm }
   {
-    \__mermap_loxo_distance:nnnn {\mrcNPlat{#1}}{\mrcNPlon{#1}}{\mrcNPlat{#2}}{\mrcNPlon{#2}}
+    \__mermap_loxo_distance:nnnn { \mrcNPlat{#1} }{ \mrcNPlon{#1} }{ \mrcNPlat{#2} }{ \mrcNPlon{#2} }
     \__mermap_pretty_distance:n { \l__mermap_result_fp }
   }
 
 
-\NewDocumentCommand \mrcNPfromOrthoFraction { mmmmmm }
+\cs_new_protected:Npn \__mermap_orthodrome_point:nnn #1#2#3
   {
-    \__mermap_setup_orthodrome:nnnn { #2 }{ #3 }{ #4 }{ #5 }
-    \__mermap_point_on_orthodrome:n { #6 }
+    \__mermap_point_on_orthodrome:n { #3 }
     \__mermap_set_named_position { #1 }{ \l__mermap_cs_lat_fp }{ \l__mermap_cs_lon_fp }
+    \IfNoValueF { #2 }
+      {
+        \__mermap_angle_at_orthodrome:
+        \cs_set:Npe #2 { \fp_to_decimal:N \l__mermap_alpha_fp }
+      }
   }
 
-\NewDocumentCommand \mrcNPfromOrthoFractionNamed { mmmm }
+\NewDocumentCommand \mrcNPfromOrthoFraction { mo mm mm m }
   {
-    \__mermap_setup_orthodrome:nnnn { \mrcNPlat{#2} }{ \mrcNPlon{#2} }{ \mrcNPlat{#3} }{ \mrcNPlon{#3} }
-    \__mermap_point_on_orthodrome:n { #4 }
-    \__mermap_set_named_position { #1 }{ \l__mermap_cs_lat_fp }{ \l__mermap_cs_lon_fp }
+    \__mermap_setup_orthodrome:nnnn { #3 }{ #4 }{ #5 }{ #6 }
+    \__mermap_orthodrome_point:nnn { #1 }{ #2 }{ #7 }
   }
 
-\NewDocumentCommand \mrcNPfromOrthoDistance { mmmmmm }
+\NewDocumentCommand \mrcNPfromOrthoFractionNamed { mo m m m }
   {
-    \__mermap_ortho_distance:nnnn { #2 }{ #3 }{ #4 }{ #5 }
+    \__mermap_setup_orthodrome:nnnn { \mrcNPlat{#3} }{ \mrcNPlon{#3} }{ \mrcNPlat{#4} }{ \mrcNPlon{#4} }
+    \__mermap_orthodrome_point:nnn { #1 }{ #2 }{ #5 }
+  }
+
+\NewDocumentCommand \mrcNPfromOrthoDistance { mo mm mm m }
+  {
+    \__mermap_ortho_distance:nnnn { #3 }{ #4 }{ #5 }{ #6 }
     \fp_compare:nNnTF \l__mermap_result_fp > { 0.001 }
       {
-        \__mermap_setup_orthodrome:nnnn { #2 }{ #3 }{ #4 }{ #5 }
-        \__mermap_point_on_orthodrome:n { #6 / \l__mermap_result_fp }
-        \__mermap_set_named_position { #1 }{ \l__mermap_cs_lat_fp }{ \l__mermap_cs_lon_fp }
+        \__mermap_setup_orthodrome:nnnn { #3 }{ #4 }{ #5 }{ #6 }
+        \__mermap_orthodrome_point:nnn { #1 }{ #2 }{ #7 / \l__mermap_result_fp }
       }
       {
-        \__mermap_set_named_position { #1 }{ #2 }{ #3 }
+        \__mermap_set_named_position { #1 }{ #3 }{ #4 }
+        \IfNoValueF { #2 }
+          {
+            \cs_set:Npn #2 { 90 }
+          }
       }
   }
 
-\NewDocumentCommand \mrcNPfromOrthoDistanceNamed { mmmm }
+\NewDocumentCommand \mrcNPfromOrthoDistanceNamed { mo m m m }
   {
-    \__mermap_ortho_distance:nnnn { \mrcNPlat{#2} }{ \mrcNPlon{#2} }{ \mrcNPlat{#3} }{ \mrcNPlon{#3} }
+    \__mermap_ortho_distance:nnnn { \mrcNPlat{#3} }{ \mrcNPlon{#3} }{ \mrcNPlat{#4} }{ \mrcNPlon{#4} }
     \fp_compare:nNnTF \l__mermap_result_fp > { 0.001 }
       {
-        \__mermap_setup_orthodrome:nnnn { \mrcNPlat{#2} }{ \mrcNPlon{#2} }{ \mrcNPlat{#3} }{ \mrcNPlon{#3} }
-        \__mermap_point_on_orthodrome:n { #4 / \l__mermap_result_fp }
-        \__mermap_set_named_position { #1 }{ \l__mermap_cs_lat_fp }{ \l__mermap_cs_lon_fp }
+        \__mermap_setup_orthodrome:nnnn { \mrcNPlat{#3} }{ \mrcNPlon{#3} }{ \mrcNPlat{#4} }{ \mrcNPlon{#4} }
+        \__mermap_orthodrome_point:nnn { #1 }{ #2 }{ #5 / \l__mermap_result_fp }
       }
       {
-        \__mermap_set_named_position { #1 }{ \mrcNPlat{#2} }{ \mrcNPlon{#2} }
+        \__mermap_set_named_position { #1 }{ \mrcNPlat{#3} }{ \mrcNPlon{#3} }
+        \IfNoValueF { #2 }
+          {
+            \cs_set:Npn #2 { 90 }
+          }
       }
   }
 
@@ -2503,6 +2601,7 @@
 \fp_new:N \l__mermap_anim_b_lon_fp
 \fp_new:N \l__mermap_anim_b_scaledenom_fp
 \fp_new:N \l__mermap_anim_b_time_fp
+\fp_new:N \l_mermap_anim_angle_fp
 \fp_new:N \l_mermap_anim_lat_fp
 \fp_new:N \l_mermap_anim_lon_fp
 \fp_new:N \l_mermap_anim_scaledenom_fp
@@ -2579,11 +2678,13 @@
         \fp_set:Nn \l_mermap_anim_time_fp { \l__mermap_anim_timewarp_tl { \l_mermap_anim_time_fp } }
 
         \__mermap_point_on_orthodrome:n { \l_mermap_anim_time_fp }
-
         \fp_set_eq:NN \l_mermap_anim_lat_fp \l__mermap_cs_lat_fp
         \fp_set_eq:NN \l_mermap_anim_lon_fp \l__mermap_cs_lon_fp
         \__mermap_set_named_position{ AnimNP }{ \l_mermap_anim_lat_fp }{ \l_mermap_anim_lon_fp }
 
+        \__mermap_angle_at_orthodrome:
+        \fp_set_eq:NN \l_mermap_anim_angle_fp \l__mermap_alpha_fp
+
         \fp_while_do:nNnn \l_mermap_anim_time_fp > \l__mermap_anim_b_time_fp
           {
             \fp_set_eq:NN \l__mermap_anim_a_time_fp \l__mermap_anim_b_time_fp
@@ -2730,6 +2831,7 @@
 \NewExpandableDocumentCommand\mrcAnimScaleDenom{}{\fp_to_decimal:N \l_mermap_anim_scaledenom_fp}
 \NewExpandableDocumentCommand\mrcAnimLatitude{}{\fp_to_decimal:N \l_mermap_anim_lat_fp}
 \NewExpandableDocumentCommand\mrcAnimLongitude{}{\fp_to_decimal:N \l_mermap_anim_lon_fp}
+\NewExpandableDocumentCommand\mrcAnimAngle{}{\fp_to_decimal:N \l_mermap_anim_angle_fp}
 
 
 %---- supplier -----------------------------------------------------------------

Modified: trunk/Master/texmf-dist/tex/latex/mercatormap/mercatorpy.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/mercatormap/mercatorpy.def	2024-08-04 23:41:50 UTC (rev 71975)
+++ trunk/Master/texmf-dist/tex/latex/mercatormap/mercatorpy.def	2024-08-05 19:33:43 UTC (rev 71976)
@@ -1,6 +1,6 @@
 \begin{filecontents}[force,noheader,nowarn]{maptiles.texpy}
 """
-The LaTeX package mercatormap - version 1.1.0 (2024/08/01)
+The LaTeX package mercatormap - version 1.2.0 (2024/08/05)
 maptiles.texpy: Python script for map tile download
 
 -------------------------------------------------------------------------------------------
@@ -28,7 +28,7 @@
 from PIL import Image
 
 
-packageversion = '1.1.0 (2024/08/01)'
+packageversion = '1.2.0 (2024/08/05)'
 
 
 def gd(x):

Modified: trunk/Master/texmf-dist/tex/latex/mercatormap/mercatorsupplier.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/mercatormap/mercatorsupplier.def	2024-08-04 23:41:50 UTC (rev 71975)
+++ trunk/Master/texmf-dist/tex/latex/mercatormap/mercatorsupplier.def	2024-08-05 19:33:43 UTC (rev 71976)
@@ -1,4 +1,4 @@
-%% The LaTeX package mercatormap - version 1.1.0 (2024/08/01)
+%% The LaTeX package mercatormap - version 1.2.0 (2024/08/05)
 %% mercatorsupplier.def: predefined map supplier list
 %%
 %% -------------------------------------------------------------------------------------------



More information about the tex-live-commits mailing list.