What’s the difference: {hsize, linewidth, textwidth, pagewidth}?

There are many more lengths useful to layout in LaTeX. The ones related to “page” layout are mostly here: http://en.wikibooks.org/wiki/LaTeX/Page_Layout \linewidth is width of text in current environment. I myself am not sure about how \hsize relates to the others, although I think it’s supposed to be the width of text on the page.

How to insert plain text?

Have you tried the verbatim environment? \begin{verbatim} Your text here. \end{verbatim} Without knowing what your “weird symbols” are, it’s difficult to suggest a solution to your problem. Update: In order to embed a verbatim environment in a table cell, you need to change the column to a paragraph column (using either p, m, or b … Read more

LaTeX: Numbering only last line of multi-line equation in \align

From the amsmath documentatiom (amsldoc.pdf): You can suppress the number on any particular line by putting \notag before the \\; So your equation should look like this (some bits removed from your equation to make it shorter): \begin{align} z_1^2 &= \left( … \right) \left( … \right)\notag\\ &= 4 e^{i \frac{2 \pi}{3}} \end{align}

When you write TeX source, how do you use your editor’s word wrap?

I recently switched to hard-wrapping per sentence (i.e., newline after sentence end only; one-to-one mapping between lines and sentences) for two reasons: softwrap for a whole paragraph makes typos impossible to spot in version control diffs. hardwrapped paragraphs look nice until you start to edit them, and if you re-flow a hard wrapped paragraph you … Read more

latex – including a landscape pdf

You may want to have a look at the pdfpages package which “sim­pli­fies the in­clu­sion of ex­ter­nal multi-page PDF doc­u­ments in LATEX doc­u­ments”. To include pages as landscape you can use the following: \usepackage{pdfpages} \includepdf[landscape=true]{circuit.pdf}

Preventing \texttt LaTeX tag from letting its content passing over the margin [closed]

This hasn’t got much to do with \texttt. The word is simply too long, and LaTeX doesn’t know how to hyphenate it. You can tell it how to do this manually, by declaring hyphenation rules: \hyphenation{base-Admin-Configuration} The \hyphenation command may take arbitrarily many words, separated by whitespace. Alternatively, if this doesn’t the trick, you can … Read more

Highlighting a Chunk of Code within a lstlisting

You can use \colorbox and an escape character inside your listing: Add to your preamble \usepackage{color} \definecolor{light-gray}{gray}{0.80} then use it like this in your document: \begin{lstlisting}[escapechar=!] def mult(m: Matrix[Int], n: Matrix[Int]) { val p = !\colorbox{light-gray}{new MatrixInt}!(m.rows, n.cols) } \end{lstlisting}

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)