# All Questions

217,341 questions
Filter by
Sorted by
Tagged with
2k views

### Defining a custom ‘wrapfig’ environment

[ This is an updated version of https://stackoverflow.com/questions/3233031/latex-defining-a-custom-wrapfig-environment ] The wrapfig package interacts badly with the setup and teardown done by \...
57k views

### Which graphics formats can be included in documents processed by latex or pdflatex?

There several types of graphics files. In no particular order .jpeg .eps .pdf .png .tif .jif (and no doubt others). Some work with latex, dvips and some work with pdflatex. How am I supposed to know ...
7k views

### Insert code into a latex doc. without leading tabs

When I write latex I usually indent my sections like this (it allows easier folding in vim, is like reading code, etc). section{section} bla bla bla bla bla subsection{a} bla bla ...
2k views

### Full-page figure without extraneous whitespace in text?

My question is along the lines of How do I ensure that figures appear in the section they're associated with?, but slightly different. I have a figure that occupies a full page. By default, LaTeX ...
67k views


I just spotted someone use \newcommand* in an answer and realised that I'd never quite sorted out in my head what the star (asterisk) was there for. (This one is practically impossible to search for ...
10k views

411 views

### How can I test if a command is followed by an argument?

Imagine I have two commands defined as \def\witharg#1{something with #1} \def\without{something without arg} and I want to define a new command \mycmd that behaves as \witharg if it's followed by an ...
2k views

### Infinite-depth list

I want to create a command set that allows me to do something like \nestedlist{ \listitem An item \sublist{ \listitem A sub item \listitem Another sub item } } and get An item 1.1 A ...