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}

LaTeX math in github wikis

You can use chart.apis.google.com to render LaTeX formulas as PNG. It work nicely with Githhub’s markdown: Example (Markdown): The ratio of the momentum to the velocity is the relativistic mass, m. ![f1] And the relativistic mass and the relativistic kinetic energy are related by the formula: ![f2] Einstein wanted to omit the unnatural second term … Read more

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}

Make an unbreakable block in TeX [closed]

You could try: \begin{samepage} This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. \nopagebreak This the second. This the second. This the second. This the second. This the second. This the second. This the second. This the second. \end{samepage} samepage prevents LaTeX from pagebreaking … Read more

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