Questions tagged [code-snippets]

30 questions
3
votes
1 answer

define several languages for code snippets

After consulting this link: https://en.wikibooks.org/wiki/LaTeX/Source_Code_Listings in order to write some code, I concluded to this: \lstset{ language=C, backgroundcolor=\color{highlight}, blah, blah,…
1
vote
1 answer

Use special symbols in snippets

I want to write some LaTeX code and insert it in a snippet, so I used \lstset in my main code, like this: \documentclass[11pt]{article} \usepackage{listings} \usepackage{color} \lstset{ language=TeX, backgroundcolor=\color{white},…
0
votes
0 answers

Fancier verbatim?

I was going through enumitem's documentation (here) and I really like how it includes text in angle brackets in its code snippets (e.g. label=⟨commands⟩ on p. 4). I took a look at the .tex file (here), but I can't figure out how the author made it…
0
votes
0 answers

creating snippets of Latex code

please refer the web page https://www.latex-tutorial.com/tutorials/circuitikz/ I would like to create my own library of useful snippets from around the www and there output compilation How to make a headstart in this direction --Code can be copied…
js bibra
  • 21,280
0
votes
0 answers

Repeatedly used snippets of code - how to shortcut?

I use LaTeX and TexStudio. I work with transripts and have so far found \longtable to be my best friend, e.g.: \begin{longtable}[H]{p{1.7cm}p{11.5cm}} Ignoramus & Richard, what are your favourite animals? \\ Richard & Gnus, penguins…
jbahn
  • 443
0
votes
0 answers

Greek characters in snippets

I have this document class in which I type both in English and Greek. \documentclass[12pt, a4]{article} \usepackage{microtype} \usepackage{fontspec} \usepackage{hyperref} \usepackage{xltxtra}…