From f63e647a88edee003f483a9baf00fc4e58c2cbfc Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 12 Jul 2019 20:45:27 +0000 Subject: codeanatomy (12jul19) git-svn-id: svn://tug.org/texlive/trunk@51627 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/codeanatomy/README.md | 16 +++++++++++----- .../latex/codeanatomy/codeanatomy.lstlisting.pdf | Bin 123700 -> 123921 bytes .../latex/codeanatomy/codeanatomy.lstlisting.tex | 13 ++++++++----- .../doc/latex/codeanatomy/codeanatomy.pdf | Bin 96388 -> 97601 bytes .../doc/latex/codeanatomy/codeanatomy.usage.pdf | Bin 82656 -> 82738 bytes 5 files changed, 19 insertions(+), 10 deletions(-) (limited to 'Master/texmf-dist/doc/latex') diff --git a/Master/texmf-dist/doc/latex/codeanatomy/README.md b/Master/texmf-dist/doc/latex/codeanatomy/README.md index bc619b60850..32d85cfa5ba 100644 --- a/Master/texmf-dist/doc/latex/codeanatomy/README.md +++ b/Master/texmf-dist/doc/latex/codeanatomy/README.md @@ -1,4 +1,5 @@ -# `codeanatomy` -- Draw Code Anatomy +`codeanatomy` -- Draw Code Anatomy +================================== (C) 2019 Hồng-Phúc Bùi @@ -11,20 +12,23 @@ This package just provides tools to draw those figures. Some illustrations can be found here: -https://introcs.cs.princeton.edu/java/home/ +https://introcs.cs.princeton.edu/java/home/ for example the origin illustation of static method in java: -## 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 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 codeanatomy.lstlisting.tex (`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 ``` diff --git a/Master/texmf-dist/doc/latex/codeanatomy/codeanatomy.lstlisting.pdf b/Master/texmf-dist/doc/latex/codeanatomy/codeanatomy.lstlisting.pdf index f941650eab3..4279660c8c3 100644 Binary files a/Master/texmf-dist/doc/latex/codeanatomy/codeanatomy.lstlisting.pdf and b/Master/texmf-dist/doc/latex/codeanatomy/codeanatomy.lstlisting.pdf differ diff --git a/Master/texmf-dist/doc/latex/codeanatomy/codeanatomy.lstlisting.tex b/Master/texmf-dist/doc/latex/codeanatomy/codeanatomy.lstlisting.tex index 2c8e536dbc6..b8956cea221 100644 --- a/Master/texmf-dist/doc/latex/codeanatomy/codeanatomy.lstlisting.tex +++ b/Master/texmf-dist/doc/latex/codeanatomy/codeanatomy.lstlisting.tex @@ -438,10 +438,10 @@ if (!\cPart{e}{x > y}!) \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 @@ for ( !\cPart{i}{int i = 0}!; !\cPart{c}{i <= n}!; !\cPart{u}{i++}! ) }; \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); diff --git a/Master/texmf-dist/doc/latex/codeanatomy/codeanatomy.pdf b/Master/texmf-dist/doc/latex/codeanatomy/codeanatomy.pdf index 5a4ba57817d..3348439ed5a 100644 Binary files a/Master/texmf-dist/doc/latex/codeanatomy/codeanatomy.pdf and b/Master/texmf-dist/doc/latex/codeanatomy/codeanatomy.pdf differ diff --git a/Master/texmf-dist/doc/latex/codeanatomy/codeanatomy.usage.pdf b/Master/texmf-dist/doc/latex/codeanatomy/codeanatomy.usage.pdf index df989ae7c00..5057ad4a547 100644 Binary files a/Master/texmf-dist/doc/latex/codeanatomy/codeanatomy.usage.pdf and b/Master/texmf-dist/doc/latex/codeanatomy/codeanatomy.usage.pdf differ -- cgit v1.2.3