Skip to content

pvinod13/pyansys-cheat-sheet

 
 

Repository files navigation

PyAnsys cheat sheets

Introduction

This repository contains cheat sheets for PyAnsys libraries. Procedures follow for creating and deploying a cheat sheet.

Create cheat sheet

You use a template to create a cheat sheet. Here is the procedure to follow:

  1. In the cheat_sheets folder, create a child folder with an appropriate project name. For example, pymapdl_cheat_sheet.

  2. In the cheat_sheet_template folder, copy pyansys_cheat_sheet.tex and then paste it into your new project folder.

  3. Rename this copy of pyansys_cheat_sheet.tex so that it uses your project folder name. For example, pymapdl_cheat_sheet.tex.

  4. Inside this LaTeX file, do the following:

    1. Change the PDF title from PyAnsys Cheat Sheet to your project title.

    2. In pdfinfo, add a subject and keywords.

    3. Change the title of the cheat sheet from Cheat sheet for PyAnsys to Cheat sheet for <project title>`

    4. In Add heading here, add the heading name.

    5. In Add description of code block here, add a description.

    6. In the block Add code here, add the Python code.

    7. If you have more than one code block, add the following code:

      \begin{lstlisting}[language=Python]
      Add code here
      \end{lstlisting}
  5. In References from PyAnsys documentation, add references to the library's documentation, replacing link names with the names of the guides. For example, this reference adds a link to the PyAnsys Developer's Guide:

    item \href{https://dev.docs.pyansys.com/}{\color{blue}{PyAnsys Developer's Guide}}

Generate cheat sheet

  1. In makefile, add a new makefile command:

    <your_project>_cheatsheat:
            latexmk -f -pdf -use-make cheat_sheats/<your_folder_name>/<your_tex_file_name>.tex -cd -outdir=../../$(BUILD) -interaction=nonstopmode || true
  2. In makefile, add this command to make all.

About

This repository contains the cheat-sheets for PyAnsys

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TeX 96.1%
  • Makefile 3.9%