texlive[51627] Master/texmf-dist: codeanatomy (12jul19)

commits+karl at tug.org commits+karl at tug.org
Fri Jul 12 22:45:27 CEST 2019


Revision: 51627
          http://tug.org/svn/texlive?view=revision&revision=51627
Author:   karl
Date:     2019-07-12 22:45:27 +0200 (Fri, 12 Jul 2019)
Log Message:
-----------
codeanatomy (12jul19)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/codeanatomy/README.md
    trunk/Master/texmf-dist/doc/latex/codeanatomy/codeanatomy.lstlisting.pdf
    trunk/Master/texmf-dist/doc/latex/codeanatomy/codeanatomy.lstlisting.tex
    trunk/Master/texmf-dist/doc/latex/codeanatomy/codeanatomy.pdf
    trunk/Master/texmf-dist/doc/latex/codeanatomy/codeanatomy.usage.pdf
    trunk/Master/texmf-dist/source/latex/codeanatomy/codeanatomy.dtx
    trunk/Master/texmf-dist/tex/latex/codeanatomy/codeanatomy.sty

Modified: trunk/Master/texmf-dist/doc/latex/codeanatomy/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/codeanatomy/README.md	2019-07-12 20:45:15 UTC (rev 51626)
+++ trunk/Master/texmf-dist/doc/latex/codeanatomy/README.md	2019-07-12 20:45:27 UTC (rev 51627)
@@ -1,4 +1,5 @@
-# `codeanatomy` -- Draw Code Anatomy
+`codeanatomy` -- Draw Code Anatomy
+==================================
 
 (C) 2019 Hồng-Phúc Bùi
 
@@ -11,13 +12,14 @@
 
 Some illustrations can be found here: 
 
-https://introcs.cs.princeton.edu/java/home/ 
+<a href="https://introcs.cs.princeton.edu/java/home/">https://introcs.cs.princeton.edu/java/home/</a>
 
 for example the origin illustation of static method in java: 
 <img src="https://introcs.cs.princeton.edu/java/11cheatsheet/images/function.png">
 
 
-## Licence
+Licence
+-------
 
 This package may be distributed and/or modified under the conditions of the
 LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -24,7 +26,9 @@
 License or any later version.  The latest version
 of this license is in the file https://www.latex-project.org/lppl.txt
 
-## Build and Install (for Distributor)
+Build and Install (for Distributor)
+-----------------------------------
+
 * To build the style file `codeanatomy.sty` just run **one** of 
 
 ```
@@ -46,7 +50,9 @@
 
 (`lualatex` because of my name, really ego right! It needs unicode to be typeset correctly.)
 
-## Development
+Development
+-----------
+
 I try to use latex3 as much as posible. You can use 
 
 ```

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

Modified: trunk/Master/texmf-dist/doc/latex/codeanatomy/codeanatomy.lstlisting.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/codeanatomy/codeanatomy.lstlisting.tex	2019-07-12 20:45:15 UTC (rev 51626)
+++ trunk/Master/texmf-dist/doc/latex/codeanatomy/codeanatomy.lstlisting.tex	2019-07-12 20:45:27 UTC (rev 51627)
@@ -438,10 +438,10 @@
 \fitExtrem{b}{(tr) (bl) (br)}
 % Annotation 
 \codeAnnotation{eText}  (1,3.5)  {boolean\\expression}
-\codeAnnotation{bText} (-1,1.125)  {sequence\\of\\statements}
+\codeAnnotation{bText} (-1,1.125)  {sequence\\of \extremPoint{bPoint}[0.75ex]\\statements}
 % Arrow
 \draw[->,annotation] (eText) -- (e);
-\draw[->,annotation] (bText) -- (b);
+\draw[->,annotation] (bPoint) -- (b);
 \end{tikzpicture}
 \end{filecontents}
 
@@ -514,14 +514,17 @@
 };
 \fitExtrem{b}{(left) (right) (bottom)}
 % Annotations
-\codeAnnotation{initText} (-1.5,2.7)   {initialize another\\variable in a\\separate\\statement}
-\codeAnnotation{iText}       (1,3.5)   {declare and initialize\\a loop control variable}
+\codeAnnotation{initText} (-1.5,2.7)   {initialize another\\
+                                        variable in a \extremPoint{initPoint}[0.75ex]\\
+                                        separate\\statement}
+\codeAnnotation{iText}       (1,3.5)   {declare and initialize\\
+                                        a loop control variable}
 \codeAnnotation{cText}     (3.5,3)     {loop-\\continuation\\condition}
 \codeAnnotation{uText}       (6,3)     {increment}
 \codeAnnotation{bText}     (3.5,-0.25) {body}
 % arrows on the background
 {[on background layer]
-\draw[->,annotation] (initText.350) -- (init.north west);
+\draw[->,annotation] (initPoint) -- (init.north west);
 \draw[->,annotation] (iText) -- (i);
 \draw[->,annotation] (cText) -- (c);
 \draw[->,annotation] (uText) -- (u);

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

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

Modified: trunk/Master/texmf-dist/source/latex/codeanatomy/codeanatomy.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/codeanatomy/codeanatomy.dtx	2019-07-12 20:45:15 UTC (rev 51626)
+++ trunk/Master/texmf-dist/source/latex/codeanatomy/codeanatomy.dtx	2019-07-12 20:45:27 UTC (rev 51627)
@@ -23,7 +23,7 @@
 %
 % \iffalse
 %<package>\NeedsTeXFormat{LaTeX2e}[2018/12/01]
-%<package>\ProvidesPackage{codeanatomy}[2019/07/10 v0.2-Alpha draw Code Anatomy]
+%<package>\ProvidesPackage{codeanatomy}[2019/07/12 v0.4-Alpha draw Code Anatomy]
 % \fi
 %
 % \iffalse
@@ -38,6 +38,7 @@
 \addbibresource{literatur.bib}
 \newcommand{\slsh}{\textbackslash{}}
 \newcommand{\TikZ}{Ti\textit{k}Z}
+\newcommand{\fixedBug}[1]{\tikz[baseline=(X.base)]\node[cross out,draw] (X) {#1};}
 \def\thinmargin{\list{}{\rightmargin-50pt\leftmargin-90pt}\item[]}
 \let\endthinmargin=\endlist
 
@@ -69,7 +70,7 @@
 %
 % \title{^^A
 %   \pkg{codeanatomy} -- Draw Code Anatomy^^A
-%   \thanks{This file describes \fileversion,^^A
+%   \thanks{This file describes \fileversion, ^^A
 %     last revised \filedate.}\\[1ex]^^A
 %     \normalsize{Reference}^^A
 % }^^A
@@ -98,14 +99,15 @@
 % ^^A %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % \section{Implementation}
 %
-%
-%
-% \subsection{Package Dependenies}
 % \changes{v0.2-Alpha}
 %         {2019/07/10}
 %         {This package does not load \pkg{xcolor} anymore. 
 %         It relies on \pkg{tikz}, that \pkg{tikz} loads \pkg{xcolor} 
 %         in a way that \pkg{codeanatomy} can define RGB color}
+%
+%
+% \subsection{Package Dependenies}
+%
 %    \begin{macrocode}
 \RequirePackage{expl3}
 \RequirePackage{xparse}
@@ -210,6 +212,11 @@
 % |\tikz{\draw[] (1,0) circle(3ex); \draw[->,annotation] (0,0) -- (1,0);}|\\
 % yields 
 % \tikz{\draw[] (1,0) circle(3ex); \draw[->,annotation] (0,0) -- (1,0);}
+%
+% \changes{v0.4-Alpha}
+%         {2019/07/12}
+%         {Set \texttt{fill} to \texttt{annotationcolor} explicit for arrow style}
+%
 %    \begin{macrocode}
 \tikzset{annotation/.style={%
       preaction={
@@ -220,8 +227,11 @@
       draw=annotationcolor,%
       arrows={-Latex[%
           round,%
-          color=annotationcolor]
-      }
+          color=annotationcolor,
+          fill=annotationcolor
+        ]
+      },
+      shorten >=0.25pt
     }
 }
 %    \end{macrocode}
@@ -483,7 +493,7 @@
 % ^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % \section{Known Bugs}
 %
-% \paragraph*{Arrows color}
+% \paragraph*{\fixedBug{Arrows color}}
 % Arrows appear in some cases with mysterious color. I don't know why! 
 % For example:
 %
@@ -493,7 +503,9 @@
 % |code with some long text\extremPoint{b}[-0.5ex]|\\
 % |};|\\
 % |\fitExtrem{l}{(a) (b)}|\\
-% |\codeAnnotation{n} (-2,0){here is\\a\extremPoint{point}\\long line}|\\
+% |\codeAnnotation{n} (-2,0){here is|\\
+% |                            a\extremPoint{point}[0.75ex][0.5ex]|\\
+% |                          long line}|\\
 % |\draw[->, annotation] (point) -- (l);|\\
 % |\end{tikzpicture}|
 %
@@ -505,7 +517,9 @@
 % code with some long text\extremPoint{b}[-0.5ex]
 % };
 % \fitExtrem{l}{(a) (b)}
-% \codeAnnotation{n} (-2,0){here is\\a\extremPoint{point}\\long line}
+% \codeAnnotation{n} (-2,0){here is\\
+%                             a\extremPoint{point}[0.75ex][0.5ex]\\
+%                          long line}
 % \draw[->, annotation] (point) -- (l);
 % \end{tikzpicture}
 %    

Modified: trunk/Master/texmf-dist/tex/latex/codeanatomy/codeanatomy.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/codeanatomy/codeanatomy.sty	2019-07-12 20:45:15 UTC (rev 51626)
+++ trunk/Master/texmf-dist/tex/latex/codeanatomy/codeanatomy.sty	2019-07-12 20:45:27 UTC (rev 51627)
@@ -7,7 +7,7 @@
 %% codeanatomy.dtx  (with options: `package')
 %% 
 \NeedsTeXFormat{LaTeX2e}[2018/12/01]
-\ProvidesPackage{codeanatomy}[2019/07/10 v0.2-Alpha draw Code Anatomy]
+\ProvidesPackage{codeanatomy}[2019/07/12 v0.4-Alpha draw Code Anatomy]
 
 \RequirePackage{expl3}
 \RequirePackage{xparse}
@@ -64,8 +64,11 @@
       draw=annotationcolor,%
       arrows={-Latex[%
           round,%
-          color=annotationcolor]
-      }
+          color=annotationcolor,
+          fill=annotationcolor
+        ]
+      },
+      shorten >=0.25pt
     }
 }
 \tikzset{code annotation/.style={%



More information about the tex-live-commits mailing list