diff options
author | Norbert Preining <norbert@preining.info> | 2022-09-27 03:02:45 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-09-27 03:02:45 +0000 |
commit | 358efc294299fa1b336a63da305121fb8b71447b (patch) | |
tree | 0c0b70e0c71feb835e4645799d4d9b4eba1fdd3a /macros/latex/contrib/wargame/doc | |
parent | 3416c5679e9cfa1ebba2296ecf401319a9f1cfe6 (diff) |
CTAN sync 202209270302
Diffstat (limited to 'macros/latex/contrib/wargame/doc')
-rw-r--r-- | macros/latex/contrib/wargame/doc/README.md | 265 | ||||
-rw-r--r-- | macros/latex/contrib/wargame/doc/compat.pdf | bin | 432794 -> 432806 bytes | |||
-rw-r--r-- | macros/latex/contrib/wargame/doc/symbols.pdf | bin | 184481 -> 184493 bytes | |||
-rw-r--r-- | macros/latex/contrib/wargame/doc/tutorial/Makefile | 2 | ||||
-rw-r--r-- | macros/latex/contrib/wargame/doc/tutorial/README.md | 2 | ||||
-rw-r--r-- | macros/latex/contrib/wargame/doc/tutorial/export.tex | 59 | ||||
-rw-r--r-- | macros/latex/contrib/wargame/doc/tutorial/game.pdf | bin | 583710 -> 583838 bytes | |||
-rw-r--r-- | macros/latex/contrib/wargame/doc/tutorial/patch.py | 22 | ||||
-rw-r--r-- | macros/latex/contrib/wargame/doc/wargame.pdf | bin | 1308051 -> 1310006 bytes |
9 files changed, 42 insertions, 308 deletions
diff --git a/macros/latex/contrib/wargame/doc/README.md b/macros/latex/contrib/wargame/doc/README.md deleted file mode 100644 index a66da25247..0000000000 --- a/macros/latex/contrib/wargame/doc/README.md +++ /dev/null @@ -1,265 +0,0 @@ -# A package to make Hex'n'Counter wargames in LaTeX - -## Version 0.2.1 - -This package can help make classic [Hex'n'Counter -wargames](https://en.wikipedia.org/wiki/Wargame) using LaTeX. The -package provide tools for generating - -- Hex maps and boards -- Counters (called *chits* since TeX have already taken *counters*) - for units, markers, and so on -- Counter sheets -- Order of Battle charts -- Illustrations in the rules using the defined maps and counters - -The result will often be a PDF (or set of PDFs) that contain everything -one will need for a game (rules, charts, boards, counter sheets). - -- The package uses [NATO App6](#nato-app6 "Section below") symbology - for units. -- The package uses [TikZ](https://github.com/pgf-tikz/pgf) for most - things. -- The package support exporting the game to a - [VASSAL](#vassal-support%20'Section%20below') module - -## Sources - -The sources of the package are kept at -[GitLab](https://gitlab.com/wargames_tex/wargame_tex) - -## CTAN - -The package is available from -[CTAN](https://ctan.org/tex-archive/macros/latex/contrib/wargame) in the -directory `/macros/latex/contrib/wargame`. As of this writing, the -package has not hit any of the major distributions (e.g., -[TeXLive](https://tug.org/texlive/index.html)). - -If you get the sources (`wargame.ins`, all `.dtx` and `.py`) files, then -to install do - - latex wargame.ins - pdflatex beach - pdflatex city - pdflatex light_woods - pdflatex mountains - pdflatex rough - pdflatex swamp - pdflatex town - pdflatex village - pdflatex woods - -(You need to use `pdflatex`, `xelatex`, or `lualatex` - plain `latex` -with DVI output will not work) - -Then copy the relevant files to your TeX tree (e.g., `~/texmf/`) as - - mkdir ~/texmf/tex/latex/wargame - cp tikzlibrary*.tex ~/texmf/tex/latex/wargame/ - cp wargame.sty ~/texmf/tex/latex/wargame/ - cp wgexpor.sty ~/texmf/tex/latex/wargame/ - cp city.pdf ~/texmf/tex/latex/wargame/ - cp light_woods.pdf ~/texmf/tex/latex/wargame/ - cp mountains.pdf ~/texmf/tex/latex/wargame/ - cp rough.pdf ~/texmf/tex/latex/wargame/ - cp swamp.pdf ~/texmf/tex/latex/wargame/ - cp town.pdf ~/texmf/tex/latex/wargame/ - cp village.pdf ~/texmf/tex/latex/wargame/ - cp woods.pdf ~/texmf/tex/latex/wargame/ - cp export.py ~/texmf/tex/latex/wargame/ - cp svg2tikz.py ~/texmf/tex/latex/wargame/ - -To generate the documentation, after having done the above, do - - pdflatex wargame.dtx - makeindex -s gind -o wargame.ind wargame.idx - pdflatex wargame.dtx - pdflatex wargame.dtx - pdflatex symbols.tex - pdflatex compat.tex - pdflatex compat.tex - -(You need to use `pdflatex`, `xelatex`, or `lualatex` - plain `latex` -with DVI output will not work) - -You can install these into your TeX tree with (e.g., `~/texmf/`) - - mkdir -p ~/texmf/doc/latex/wargame/ - cp wargame.pdf ~/texmf/doc/latex/wargame/ - cp symbols.py ~/texmf/doc/latex/wargame/ - cp compat.py ~/texmf/doc/latex/wargame/ - -If you want to generate the tutorial document, do - - cd tutorial - pdflatex game - pdflatex game - -If you also want to make the tutorial VASSAL module, do (also in -`tutorial`), do - - pdflatex export.tex - ../export.py export.pdf export.json -o Game.vmod \ - -d "Example module from LaTeX PnP game" \ - -t "LaTeX wargame tutorial" -v 0.1 \ - -p patch.py - -## Download from GitLab - -- [Zip file of package and support - files](https://gitlab.com/wargames_tex/wargame_tex/-/jobs/artifacts/master/download?job=dist) -- [Browse content of - package](https://gitlab.com/wargames_tex/wargame_tex/-/jobs/artifacts/master/browse?job=dist) -- [Documentation](https://gitlab.com/wargames_tex/wargame_tex/-/jobs/artifacts/master/file/public/doc/latex/wargame/wargame.pdf?job=dist) -- [Tutorial](https://gitlab.com/wargames_tex/wargame_tex/-/jobs/artifacts/master/file/public/doc/latex/wargame/tutorial.pdf?job=dist) - (and associated VASSAL - [module](https://gitlab.com/wargames_tex/wargame_tex/-/jobs/artifacts/master/file/public/doc/latex/wargame/Game.vmod?job=dist)) -- [Table of - symbols](https://gitlab.com/wargames_tex/wargame_tex/-/jobs/artifacts/master/file/public/doc/latex/wargame/symbols.pdf?job=dist) -- [Compatibility](https://gitlab.com/wargames_tex/wargame_tex/-/jobs/artifacts/master/file/public/doc/latex/wargame/compat.pdf?job=dist) - -To install, get the ([zip -file](https://gitlab.com/wargames_tex/wargame_tex/-/jobs/artifacts/master/download?job=dist)) -and unzip into your TeX tree, for example - - mkdir -p ~/texmf - (cd ~/texmf && unzip ../artifacts.zip) - -on Un\*x like systems. - -## Tutorial - -See the [tutorial](tutorial/README.md "Link works on GitLab only") page -for more -([here](https://ctan.org/tex-archive/macros/latex/contrib/wargame/doc/tutorial/) -if you browse from CTAN). - -## Examples - -Below are some print'n'play board wargames made with this package. These -are not original games but rather revamps of existing games. All credits -goes to the original authors of these games. - -- WWII - - Eastern Front - - [Battle for Moscow](https://gitlab.com/wargames_tex/bfm_tex) - - [Hell's Gate](https://gitlab.com/wargames_tex/hellsgate_tex) - (private) - - [Unternehmung - 25](https://gitlab.com/wargames_tex/unternehmung_tex) - (private) - - Western Front - - [D-Day](https://gitlab.com/wargames_tex/dday_tex) (Avalon - Hill classic) - - [Paul Koenig's Market - Garden](https://gitlab.com/wargames_tex/pkmg_tex) - - [Paul Koenig's - D-Day](https://gitlab.com/wargames_tex/pkdday_tex) - - Pacific theatre - - [First - Blood](https://gitlab.com/wargames_tex/firstblood_tex) - (Avalon Hill International Kriegspiel Association classic) - - [Malaya](https://gitlab.com/wargames_tex/malaya_tex) - (private) - - Africa - - [Afrika - Korps](https://gitlab.com/wargames_tex/afrikakorps_tex) - (Avalon Hill classic) - - [Battles of El - Alamein](https://gitlab.com/wargames_tex/boel_tex) (private) -- Modern/Speculative - - [Strike Force One](https://gitlab.com/wargames_tex/sfo_tex) - - [Kriegspiel](https://gitlab.com/wargames_tex/kriegspiel_tex) - (Avalon Hill classic) - -## VASSAL support - -The packages has the script [`export.py`](utils/export.py) to generate a -draft [VASSAL](https://vassalengine.org) module from the defined charts, -boards, counters, OOBs, and so on. More about this is given in the -documentation. - -The script will generate a first draft of a module, which then can be -edited in the VASSAL editor for the final thing. - -Alternatively, one can provide a Python script to do more on the -generated module, such as defining starting positions, fixing grid -layouts, and so on. Using such a patch script, one can get an (almost) -final module. This means, that even if one makes changes to the original -content, it is easy to remake the module without much need for the -VASSAL editor. - -An example of this is given in the [Battle for -Moscow](https://gitlab.com/wargames_tex/bfm_tex) project, and of course -in the [tutorial](tutorial/ "Link works on GitLab only") - -## NATO App6 - -The package supports - -- All air, equipment, installation, land, sea surface, sub surface, - and space command symbols, including amplifiers and modifiers -- All friendly, hostile, neutral, and unknown faction frame. Undecided - faction frames can be made by specifying `dashed` line styles. -- Some, but very few, other kinds of symbology. - -Here are some references for more information on the NATO App6 symbology -standard. - -- The [Wikipedia - page](https://en.wikipedia.org/wiki/NATO_Joint_Military_Symbology) - on NATO Joint Military Symbology -- The [NATO - page](https://nso.nato.int/nso/nsdd/main/standards/ap-details/1912/EN). - If this does not work for you, then try to go to the [standards - page](https://nso.nato.int/nso/nsdd/main/standards) and put in and - write in `SYMBOLOGY` in the *Document Title Contains Words* field - and press *Start*. -- Other LaTeX package for making NATO symbology - [XMilSymb](https://github.com/ralphieraccoon/MilSymb) - -## Copyright and license - -(c) 2022 Christian Holm Christensen - -This work is licensed under the Creative Commons Attribution-ShareAlike -4.0 International License (CC-BY-SA-4.0). To view a copy of this -license, visit [CC](http://creativecommons.org/licenses/by-sa/4.0/) or -send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, -USA. - -### Some comments on copyright - -*Caveat*: I am not a lawyer. - -Note that this license applies to the `wargame` package as such. What -you generate using the package is *not* required to be licensed -according to the *ShareAlike* clause of CC-BY-SA-4.0. That is, you can -license your materials *any way you want*. - -However, that copyright rights on games is not as prohibitive as you may -think (see [this thread on -BGG](https://boardgamegeek.com/thread/493249/)). What you *can* -copyright is original, artistic expression. That is, the copyrighted -work must not be a copy of something else (originality) and must be some -form of expression. One *cannot* copyright ideas, only their expression -in so far as it is *artistic* (i.e., not a trivial expression that -anyone knowledgeable within the field can do with rudimentary effort). - -So you *can not* copyright your game mechanics, for example, only how -you described them. You *can not* copyright a title (but you may be able -to claim trademark on it). You *can* copyright the wording of the rules, -the graphics that you use, and so on. - -This also means, that you are essentially free to make your own version -of previously published game, *as long as* - -- you do not copy existing text -- you do not copy existing graphics -- you respect any kind of trademark claims - -However, it is advisable to contact the copyright holders of the -previously published game to avoid -[SNAFU](https://en.wikipedia.org/wiki/SNAFU). If in doubt, seek -professional help. diff --git a/macros/latex/contrib/wargame/doc/compat.pdf b/macros/latex/contrib/wargame/doc/compat.pdf Binary files differindex 3e9956c6d7..70583eca2f 100644 --- a/macros/latex/contrib/wargame/doc/compat.pdf +++ b/macros/latex/contrib/wargame/doc/compat.pdf diff --git a/macros/latex/contrib/wargame/doc/symbols.pdf b/macros/latex/contrib/wargame/doc/symbols.pdf Binary files differindex 20dcb7101b..b7f8a0a6c0 100644 --- a/macros/latex/contrib/wargame/doc/symbols.pdf +++ b/macros/latex/contrib/wargame/doc/symbols.pdf diff --git a/macros/latex/contrib/wargame/doc/tutorial/Makefile b/macros/latex/contrib/wargame/doc/tutorial/Makefile index 5d4061c347..4947d84ee0 100644 --- a/macros/latex/contrib/wargame/doc/tutorial/Makefile +++ b/macros/latex/contrib/wargame/doc/tutorial/Makefile @@ -6,7 +6,7 @@ LATEX_FLAGS := -interaction=nonstopmode \ -file-line-error \ --synctex=15 \ -shell-escape -EXPORT := ../utils/export.py +EXPORT := ../utils/wgexport.py EXPORT_FLAGS := ifdef VERBOSE diff --git a/macros/latex/contrib/wargame/doc/tutorial/README.md b/macros/latex/contrib/wargame/doc/tutorial/README.md index 92c884f6ef..38fd222142 100644 --- a/macros/latex/contrib/wargame/doc/tutorial/README.md +++ b/macros/latex/contrib/wargame/doc/tutorial/README.md @@ -33,7 +33,7 @@ LaTeX from there. To build the VASSAL module, simply do pdflatex export.tex - `kpsewhich export.py` export.pdf export.json -o Game.vmod \ + `kpsewhich wgexport.py` export.pdf export.json -o Game.vmod \ -d "Example module from LaTeX PnP game" \ -t "LaTeX wargame tutorial" -v 0.1 \ -p patch.py diff --git a/macros/latex/contrib/wargame/doc/tutorial/export.tex b/macros/latex/contrib/wargame/doc/tutorial/export.tex index adbb65ba6e..d51ecf0e5c 100644 --- a/macros/latex/contrib/wargame/doc/tutorial/export.tex +++ b/macros/latex/contrib/wargame/doc/tutorial/export.tex @@ -15,7 +15,7 @@ % % The trick is to prepare a separate \LaTeX{} document, say % \texttt{export.tex} as in this tutorial, which exports the images as -% single pages. Then, the Python script \texttt{export.py} +% single pages. Then, the Python script \texttt{wgexport.py} % distributed with the \textsf{wargame} package picks up this output % (\texttt{export.pdf} and \texttt{export.json}) and generates a draft % VASSAL module. @@ -202,14 +202,16 @@ % \end{macrocode} % % This looks like -% \tikz{\draw[fill=friendly] (.1,0) rectangle(.5,-.1); -% \draw[fill=friendly] (.1,-.15) rectangle(.3,-.25); -% \draw[fill=friendly] (.1,-.3) rectangle(.2,-.4); -% \draw[fill=hostile] (-.1,0) rectangle(-.3,-.25);} -% -% Normally the \texttt{export.py} script used the \emph{undo} image +% \tikz{ +% \draw[fill=friendly] (.1,0) rectangle(.5,-.1); +% \draw[fill=friendly] (.1,-.15) rectangle(.3,-.25); +% \draw[fill=friendly] (.1,-.3) rectangle(.2,-.4); +% \draw[fill=hostile] (-.1,0) rectangle(-.3,-.25);} +% +% Normally the \texttt{wgexport.py} script used the \emph{undo} mage % for the flip button. However, that may be a bit confusing, so we -% will use a large ``F'' instead. \tikz{\node[color=blue!75!black,font=\sffamily\bfseries\LARGE]{F}} +% will use a large ``F'' +% instead. \tikz{\node[color=blue!75!black,font=\sffamily\bfseries\LARGE]{F}} % % And similarly for the ``Eliminate''\tikz{\node[color=red!75!black,font=\sffamily\bfseries\LARGE]{E}} % @@ -245,11 +247,11 @@ % We run \LaTeX{} on the above \texttt{export.tex} file (the source of % this section) to generate \texttt{export.pdf} and % \texttt{export.json}. We then process these with the -% \texttt{export.py} Python script to get the draft VASSAL module +% \texttt{wgexport.py} Python script to get the draft VASSAL module % \texttt{Draft.vmod}. % % \begin{verbatim} -% `kpsewhich export.py` export.pdf export.json +% `kpsewhich wgexport.py` export.pdf export.json % \end{verbatim} % % The utility \texttt{kpsewhich}\footnotemark{\TeX{}Live and similar @@ -273,7 +275,7 @@ % \texttt{game.pdf}, then we can do % % \begin{verbatim} -% `kpsewhich export.py` export.pdf export.json \ +% `kpsewhich wgexport.py` export.pdf export.json \ % -r game.pdf -o Game.vmod % \end{verbatim} % @@ -298,7 +300,7 @@ % complete module, we would do something like % % \begin{verbatim} -% `kpsewhich export.py` export.pdf export.json \ +% `kpsewhich wgexport.py` export.pdf export.json \ % -r game.pdf -o Game.vmod \ % -t "LaTeX Wargame tutorial" \ % -d "Example of using wargame to make a module" \ @@ -313,7 +315,7 @@ % % We will take one more step on the VASSAL module, and then we will % get back to the Print'n'Play version of the game. We can provide -% the \texttt{export.py} script with an additional Python script that +% the \texttt{wgexport.py} script with an additional Python script that % can tweak the VASSAL module any way we like. We can for example % move counters into their starting positions, to the OOB, adjust % grids, add more materials, and so on. It is only your imagination, @@ -322,7 +324,7 @@ % % Here we will make a simple \texttt{patch.py} Python script which % does very little. The \textsf{wargame} package, -% \textsf{wgexport} class, and \texttt{export.py} script has already +% \textsf{wgexport} class, and \texttt{wgexport.py} script has already % done the heavy work for us. Not least be because we have taken care % to add in \texttt{zone} styles where needed. % @@ -332,7 +334,7 @@ % do much. % % \begin{verbatim} -% `kpsewhich export.py` export.pdf export.json \ +% `kpsewhich wgexport.py` export.pdf export.json \ % -r game.pdf -o Game.vmod % -t "LaTeX Wargame tutorial" \ % -d "Example of using wargame to make a module" \ @@ -344,37 +346,34 @@ % \begin{verbatim} % def patch(build,data,vmod,verbose=False): % # We need to import the export module :-) -% import export +% import wgexport as wg % % # Get the game and last free GPID -% game = export.get_game(build) +% game = wg.get_game(build) % gpid = int(game.getAttribute('nextPieceSlotId')) % % # Get all boards -% maps = export.get_maps(build) +% maps = wg.get_maps(build) % board = maps['Board'] % -% mkeys = export.get_masskey(board,'name') -% export.set_node_attr(mkeys['Eliminate'], -% icon='eliminate-icon.png') -% export.set_node_attr(mkeys['Flip'], -% icon='flip-icon.png') +% mkeys = wg.get_masskey(board,'name') +% wg.set_node_attr(mkeys['Eliminate'],icon='eliminate-icon.png') +% wg.set_node_attr(mkeys['Flip'],icon='flip-icon.png') % % # Get main map % pool = maps['DeadMap'] -% export.set_node_attr(pool,icon='pool-icon.png') +% wg.set_node_attr(pool,icon='pool-icon.png') % -% mkeys = export.get_masskey(pool,'name') -% export.set_node_attr(mkeys['Restore'], -% icon='restore-icon.png') +% mkeys = wg.get_masskey(pool,'name') +% wg.set_node_attr(mkeys['Restore'],icon='restore-icon.png') % % # Get the OOB map -% oob = export.get_chartwindows(game)['OOBs'] -% export.set_node_attr(oob,icon='oob-icon.png') +% oob = wg.get_chartwindows(game)['OOBs'] +% wg.set_node_attr(oob,icon='oob-icon.png') % \end{verbatim} % % In the \texttt{patch.py} script we can use all the functionality -% provided by \texttt{export.py}. Elements are XML elements that we +% provided by \texttt{wgexport.py}. Elements are XML elements that we % apply \texttt{xml.dom.minidom} operations on. % % \iffalse diff --git a/macros/latex/contrib/wargame/doc/tutorial/game.pdf b/macros/latex/contrib/wargame/doc/tutorial/game.pdf Binary files differindex 875523b4d4..14bcde8f98 100644 --- a/macros/latex/contrib/wargame/doc/tutorial/game.pdf +++ b/macros/latex/contrib/wargame/doc/tutorial/game.pdf diff --git a/macros/latex/contrib/wargame/doc/tutorial/patch.py b/macros/latex/contrib/wargame/doc/tutorial/patch.py index 71785252bb..0fcdd49645 100644 --- a/macros/latex/contrib/wargame/doc/tutorial/patch.py +++ b/macros/latex/contrib/wargame/doc/tutorial/patch.py @@ -1,29 +1,29 @@ def patch(build,data,vmod,verbose=False): # We need to import the export module :-) - import export + import wgexport as wg # Get the game and last free GPID - game = export.get_game(build) + game = wg.get_game(build) gpid = int(game.getAttribute('nextPieceSlotId')) # Get all boards - maps = export.get_maps(build) + maps = wg.get_maps(build) board = maps['Board'] - mkeys = export.get_masskey(board,'name') - export.set_node_attr(mkeys['Eliminate'],icon='eliminate-icon.png') - export.set_node_attr(mkeys['Flip'],icon='flip-icon.png') + mkeys = wg.get_masskey(board,'name') + wg.set_node_attr(mkeys['Eliminate'],icon='eliminate-icon.png') + wg.set_node_attr(mkeys['Flip'],icon='flip-icon.png') # Get main map pool = maps['DeadMap'] - export.set_node_attr(pool,icon='pool-icon.png') + wg.set_node_attr(pool,icon='pool-icon.png') - mkeys = export.get_masskey(pool,'name') - export.set_node_attr(mkeys['Restore'],icon='restore-icon.png') + mkeys = wg.get_masskey(pool,'name') + wg.set_node_attr(mkeys['Restore'],icon='restore-icon.png') # Get the OOB map - oob = export.get_chartwindows(game)['OOBs'] - export.set_node_attr(oob,icon='oob-icon.png') + oob = wg.get_chartwindows(game)['OOBs'] + wg.set_node_attr(oob,icon='oob-icon.png') diff --git a/macros/latex/contrib/wargame/doc/wargame.pdf b/macros/latex/contrib/wargame/doc/wargame.pdf Binary files differindex a030c938f4..c25e83c175 100644 --- a/macros/latex/contrib/wargame/doc/wargame.pdf +++ b/macros/latex/contrib/wargame/doc/wargame.pdf |