Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
aneitel committed Jan 28, 2018
0 parents commit 229a459
Show file tree
Hide file tree
Showing 23 changed files with 246 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Ignore macOS specific files
.DS_Store
.AppleDouble
.LSOverride
._*
.fseventsd
.Spotlight-V100

# Ignore all existing snippets of the Texpad creators
Bold.snippet
Description.snippet
Displaymath.snippet
Enumerate.snippet
Equation.snippet
Verbatim.snippet
Typewriter.snippet
Tabular.snippet
Quotation.snippet
Itemize.snippet
Italic.snippet
Floating Table.snippet
Preamble.snippet
Matrix.snippet
Figure.snippet
21 changes: 21 additions & 0 deletions 2FiguresIn1.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
% A snippet to insert a floating figure that consists of more than one figure
% Needs \usepackage{graphicx}
% and \usepackage{subcaption}
group = Floating
insert at cursor =
\begin{figure}[hbt]
\centering
\begin{subfigure}[b]{0.49\textwidth}
\includegraphics[width=\textwidth]{}
\caption{}
\label{subfigure:}
\end{subfigure}
~ % add some space between the images: ~, \hfill, \quad, \qquad, <blank line>, ...
\begin{subfigure}[b]{0.49\textwidth}
\includegraphics[width=\textwidth]{}
\caption{}
\label{subfigure:}
\end{subfigure}
\caption{<SELECTION>}
\label{figure:}
\end{figure}
20 changes: 20 additions & 0 deletions 2FiguresSideBySide.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
% Displays 2 figures side by side with separate labels and captions
% Needs \usepackage{graphicx}
ctrl key = w
group = Floating
insert at cursor =
\begin{figure}[hbt]
\centering
\begin{minipage}{0.49\textwidth}
\centering
\includegraphics[scale=0.2]{images/}
\caption{}
\label{figure:}
\end{minipage}
\begin{minipage}{0.49\textwidth}
\centering
\includegraphics[scale=0.2]{images/}
\caption{}
\label{figure:}
\end{minipage}
\end{figure}
11 changes: 11 additions & 0 deletions BibLaTeX-Article.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
% BibLaTeX - Article in a journal
ctrl key =
group = BibLaTeX
insert at cursor =
@article{<SELECTION>,
author = {},
title = {},
journaltitle = {},
year = {}
% more options available
}
10 changes: 10 additions & 0 deletions BibLaTeX-ArticleInConferenceProceeding.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
% BibLaTeX - Article in a conference proceeding
ctrl key =
group = BibLaTeX
insert at cursor =
@InProceedings{<SELECTION>,
author = {},
title = {},
booktitle = {}
% more options available
}
10 changes: 10 additions & 0 deletions BibLaTeX-Book.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
% BibLaTeX - Book
ctrl key =
group = BibLaTeX
insert at cursor =
@book{<SELECTION>,
author = {},
title = {},
year = {}
% more options available
}
10 changes: 10 additions & 0 deletions BibLaTeX-Misc.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
% BibLaTeX - Misc
ctrl key =
group = BibLaTeX
insert at cursor =
@misc{<SELECTION>,
author = {},
title = {},
year = {}
% more options available
}
10 changes: 10 additions & 0 deletions BibLaTeX-Multi-Volume-Book.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
% BibLaTeX - MV book
ctrl key =
group = BibLaTeX
insert at cursor =
@mvbook{<SELECTION>,
author = {},
title = {},
year = {}
% more options available
}
11 changes: 11 additions & 0 deletions BibLaTeX-OnlineResource.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
% BibLaTeX - Online resource
ctrl key =
group = BibLaTeX
insert at cursor =
@online{<SELECTION>,
author = {},
title = {},
year = {},
url = {}
% more options available
}
11 changes: 11 additions & 0 deletions BibLaTeX-PartOfABook.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
% BibLaTeX - Part of a book
ctrl key =
group = BibLaTeX
insert at cursor =
@inbook{<SELECTION>,
author = {},
title = {},
booktitle = {},
year = {}
% more options available
}
12 changes: 12 additions & 0 deletions BibLaTeX-Report.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
% BibLaTeX - Report
ctrl key =
group = BibLaTeX
insert at cursor =
@report{<SELECTION>,
author = {},
title = {},
type = {},
institution = {},
year = {}
% more options available
}
10 changes: 10 additions & 0 deletions BibLaTeX-TechnicalDocumentation.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
% BibLaTeX - Technical manual
ctrl key =
group = BibLaTeX
insert at cursor =
@manual{<SELECTION>,
author = {},
title = {},
year = {}
% more options available
}
12 changes: 12 additions & 0 deletions BibLaTeX-Thesis.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
% BibLaTeX - Thesis
ctrl key =
group = BibLaTeX
insert at cursor =
@thesis{<SELECTION>,
author = {},
title = {},
type = {},
institution = {},
year = {}
% more options available
}
5 changes: 5 additions & 0 deletions Enquote.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
% Quotes a text
% Needs \usepackage[autostyle=true,german=quotes]{csquotes}
ctrl key = n
group = Inline
insert at cursor = \enquote{<SELECTION>}
5 changes: 5 additions & 0 deletions IncludeFile.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
% Include is basically like \input{} with \clearpage before and after \input{}. It's faster than \input{}, but can't be nested, can't appear in preamble and forces page breaks around the included text.
ctrl key = j
group = Other
insert at cursor =
\include{<SELECTION>}
6 changes: 6 additions & 0 deletions IncludePDF.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
% Include a PDF file
% Needs \usepackage{pdfpages}
ctrl key = s
group = Other
insert at cursor =
\includepdf[pages=-]{<SELECTION>}
5 changes: 5 additions & 0 deletions InputFile.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
% Imports commands from another TeX file into the target file. It's equivalent to typing all commands from the other TeX file right into the target file.
ctrl key = k
group = Other
insert at cursor =
\input{<SELECTION>}
9 changes: 9 additions & 0 deletions ListingBlock.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
% Include source code in a block environment within latex
% Needs \usepackage{listings}
% See also \lstloadlanguages and \lstset
ctrl key = c
group = Environment
insert at cursor =
\begin{lstlisting}
<SELECTION>
\end{lstlisting}
7 changes: 7 additions & 0 deletions ListingInline.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
% Include source code inline
% Needs \usepackage{listings}
% See also \lstloadlanguages and \lstset
ctrl key = o
group = Inline
insert at cursor =
\lstinline[columns=fixed]{<SELECTION>}
6 changes: 6 additions & 0 deletions ListingInputFile.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
% Include source code from a file
% Needs \usepackage{listings}
% See also \lstloadlanguages and \lstset
ctrl key = h
group = Environment
insert at cursor = \lstinputlisting{<SELECTION>}
4 changes: 4 additions & 0 deletions MathmodeInline.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
% Inline math mode
ctrl key = r
group = Inline
insert at cursor = $<SELECTION>$
22 changes: 22 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Texpad snippets

Starting with version 1.5, Texpad makes it easy to insert regularly used blocks of text into your document. Texpad ships only a small number of helpful snippets and misses some I often use. Feel free to contribute and extend my small collection.

## Required packages
Some of the snippets require the usage of additonal packages in LaTeX:
| Snippet | Package |
| ------------- |:-------------:|
| 2FiguresSideBySide | \usepackage{graphicx} |
| 2FiguresIn1 | \usepackage{graphicx} and \usepackage{subcaption} |
| IncludePDF | \usepackage{pdfpages} |
| ListingInline | \usepackage{listings} |
| ListingInputFile | \usepackage{listings} |
| ListingBlock | \usepackage{listings} |
| Url | \usepackage{hyperref} |
| Enquote | \usepackage[autostyle=true,german=quotes]{csquotes} |

# Installation
Copy the snippets to `~/Library/Application Support/Texpad/Snippets`.

# License ![CC BY-SA 4.0](https://i.creativecommons.org/l/by-sa/4.0/80x15.png)
The snippets are release under the [CC BY-SA 4.0 license](http://creativecommons.org/licenses/by-sa/4.0/). See the [license text](https://creativecommons.org/licenses/by-sa/4.0/legalcode) file for additional details.
5 changes: 5 additions & 0 deletions Url.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
% Transform a url as text into a clickable text (link) in pdf
% Needs \usepackage{hyperref}
ctrl key = u
group = Inline
insert at cursor = \url{<SELECTION>}

0 comments on commit 229a459

Please sign in to comment.