TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

this code doesn't compile for me. Could it be a bug or is something wrong with my LaTex installation?

\gll Isso é um exemplo.\\
This is an example\\
\trans `This is an example.'
source code

My goal: have glossed examples AND indented source code (the verbatim environment did not indent the code).

share|improve this question
Because gb4e messes with catcodes, it's best to load it last or almost last in your list of packages. – Alan Munn Jan 1 '13 at 22:14
up vote 3 down vote accepted

load it the other way round:


but remember that listings cannot handle UTF-8 characters when using pdflatex

share|improve this answer
Thank you both (@Herbert and @AllanMunn), it works now :) @Herbert, by UTF-8 characters, you mean the non-English characters (é, ã, ...)? But these do come out for me within listings and I am indeed using pdflatex. Probably because I have other packages loaded such as [brazilian,english]{babel}, [latin1]{inputenc}, [T1]{fontenc}? – Rodrigo Jan 2 '13 at 8:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.