I found this LaTeX template online on this link https://www.sharelatex.com/templates/other/us-patent

However, I could not find any way to add my TikZ diagrams into the drawing section. Also, I am not sure how to scale my figures that are in .jpg or .png. Please someone help me with this?

Thank you

1 Answer 1


How to add tikz diagrams

  • Put your tikz diagram (\begin{tikzpicture}...\end{tikzpicture}) into a file named e.g. TikzDrawing.tex. As an example, put the line


    into this file. (This will draw a box with an A in it).

  • Add the following lines at the beginning of the document, near \begin{document}. In the ShareLaTeX template, you can add the lines to the file Drawings.tex that is included by the main document.

    \figureDescription{is an example drawing created with Tikz}
  • In the text of the patent, refer to the figure using


Then the reference is typeset as enter image description here and the TikZ picture appears in the appendix as

enter image description here

How to scale pdf/png/jpg figures

You have to add the following definitions to your preamble (i.e., between \documentclass[...]{...} and \begin{document}).

\expandafter\ifx\csname anofigoptions \the\@annotationfigurenumber\endcsname\relax
\expandafter\def\csname anofigoptions \the\@annotationfigurenumber\endcsname{#1}
\message{error while assigning option(s) ``#1'' to annotation figure number
``\the\@annotationfigurenumber'' - it was already defined as
\def\annotationListFigureOptions#1{\csname anofigoptions #1\endcsname}
\edef\options{\annotationListFigureOptions{\csname fignum#1 \endcsname}}%
\figureReference{#1}~~#3 \par
\expandafter\let\csname showfigure unk\endcsname\showfigureincgraphics
\expandafter\let\csname showfigure pdf\endcsname\showfigureincgraphics

Now you can load all images with an extension acceptable to \includegraphics by adding lines like the following ones to Drawings.tex (or whereever you have your image definitions).

\figureDescription{is an example jpg image with options}

\figureDescription{is an example png image with options}

\figureDescription{is an example pdf image with options}

If we add these lines to the example document that comes with the template, we get the following output; see figures 3, 4, and 5.

enter image description here

enter image description hereenter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .