Skip to content

LaTeX package for drawing a ΛΧΑ cross and crescent

License

Notifications You must be signed in to change notification settings

lcamichigan/cross-and-crescent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cross-and-crescent

Build status Build Status

This is a LaTeX package for drawing the logo of Lambda Chi Alpha Fraternity using TikZ or Asymptote.

Installing

To install the cross-and-crescent package, download cross-and-crescent.sty from the Releases, and then move this file to your TeX local installation directory. If you use TeX Live on Windows, this directory is probably C:\texlive\texmf-local, and you can move cross-and-crescent.sty by entering in PowerShell:

$crossAndCrescent = 'C:\texlive\texmf-local\tex\latex\local\cross-and-crescent'
New-Item $crossAndCrescent -ItemType directory -Force
Move-Item cross-and-crescent.sty $crossAndCrescent -Force

or in Command Prompt:

set crossAndCrescent=C:\texlive\texmf-local\tex\latex\local\cross-and-crescent
if not exist %crossAndCrescent%\nul mkdir %crossAndCrescent%
move /y cross-and-crescent.sty %crossAndCrescent%

If you use MacTeX on macOS, your TeX local installation directory is probably /usr/local/texlive/texmf-local, and you can move cross-and-crescent.sty by entering in Terminal:

crossAndCrescent=/usr/local/texlive/texmf-local/tex/latex/local/cross-and-crescent
sudo mkdir -p $crossAndCrescent
sudo mv -f cross-and-crescent.sty $crossAndCrescent

Regardless of what platform you use, remember to run mktexlsr after moving cross-and-crescent.sty to your TeX local installation directory.

If you’d rather create cross-and-crescent.sty from its source, enter in PowerShell:

foreach ($i in 1..2) { lualatex cross-and-crescent.dtx }

or in Command Prompt:

for /l %G in (1, 1, 2) do lualatex cross-and-crescent.dtx

or in Terminal:

for i in {1..2}; do lualatex cross-and-crescent.dtx; done

Usage

You can use the cross-and-crescent package in a LaTeX document like this:

\documentclass{article}
\usepackage{cross-and-crescent}
\begin{document}
\begin{tikzpicture}
  \crossAndCrescentSetMacros
  \draw \crossAndCrescentPath
\end{tikzpicture}
\end{document}

If you just want to create a PDF file of a cross and crescent, you can enter in PowerShell or Command Prompt:

pdflatex -jobname logo "\documentclass{standalone}\usepackage{cross-and-crescent}\begin{document}\crossAndCrescent\end{document}"

or in Terminal:

pdflatex -jobname logo '\documentclass{standalone}\usepackage{cross-and-crescent}\begin{document}\crossAndCrescent\end{document}'

You can use the Asymptote script by include-ing it. The Asymptote script contains a single function crossAndCrescentPath that returns an array of paths for a cross and crescent. For example, to create the GitHub profile picture for the lcamichigan organization, enter in Terminal:

asy -outformat png -noView -command '
include crossAndCrescent;
real size = 400; size(size);
fill(scale(size) * shift(-0.5, -0.5) * unitsquare, cmyk(1, 0.6, 0, 0.6));
fill(scale(42) * crossAndCrescentPath(), cmyk(0, 0.18, 1, 0) + evenodd);
' picture.png