### tabular - Triangle with Latex

How can I reproduce this table with Latex?Some help would be appreciated....Read more

### prevent page break within \item in latex document

I have a long document consisting of an enumeration. Each item consists of several lines, and possibly also includes other elements such as graphics and lists. The document type requires that each of these items appears on a single page, with no page break within item. Unused white space at the bottom of the page is acceptable.Here is an example\documentclass[a5paper,12pt]{article}\usepackage{blindtext}\begin{document}\begin{enumerate} \item \blindtext \item \blindtext % don't break this apart \item very long text here \end{enumerate}\end{do...Read more

### latex - How do I make a reference to a figure in markdown using pandoc?

I'm currently writing a document in markdown and I'd like to make a reference to an image from my text.this is my text, I want a reference to my image1 [here]. blablabla![image1](img/image1.png)I want to do that reference because after converting my markdown to pdf, images get placed in one or two pages after and the document doesn't make any sense.UPDATE:I've tried Ryan's answer in that post and I can't make it working.Apparently the code :[image]: image.png "Image Title" ![Alt text][image] A reference to the [image](#image).should produce:\be...Read more

### latex - Display polynomials in reverse order in SageMath

So I would like to print polynomials in one variable (s) with one parameter (a), say a·s^3 − s^2 - a^2·s − a + 1. Sage always displays it with decreasing degree, and I would like to get something like 1 - a - a^2·s - s^2 + a·s^3to export it to LaTeX. I can't figure out how to do this... Thanks in advance....Read more

### latex - How to code tables with multi-line cells

I am trying to write a short paper with LaTeX and need to add a table with 3 columns.+-------------+-----------------+--------------------------------------+| AAAAAAAAAA | BBBBBBBBBBBBBBB | Betty Botter Bought a Bit of Butter || | | but the Butter's Bitter |+-------------+-----------------+--------------------------------------+| CCCCCCCC | DDDD | Betty Botter Thought: || | | If I Put This Bitter Butter in My || | |...Read more

### Latex: how to break the line in multirow inside the tabular

I cannot find out how to break the line inside the multirow in tabular. I need to make some table where I have one cell which is two row high, and I have long text in it, but it does not break the line and text is overlapping another cell on the left side.Any suggestions?Sample of code:\begin{center} \begin{tabular}{|p{1cm}|p{2.5cm}|p{2cm}|p{2cm}|p{2cm}|p{2cm}|} \hline \multirow{2}{*}{Long text to break} % HERE IS A PROBLEM & Thing & \multicolumn{2}{|c|}{Thing 2} & \multicolumn{2}{|c|}{Thing 3} \\ \cline{2-6}...Read more

### tabular - Centering Text Horizontally and Vertically in LaTeX

I would like to produce the following: a b xxxxx xxxxx 1 xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx 2 xxxxx xxxxx xxxxx xxxxxWhere the blocks of 'x's are images, and 'a', 'b', '1' and '2' are text.Here are my two attempts so far:\begin{figure}\begin{center}\begin{tabular}{ccc} & a & b \\1 & \subfloat[]{\includegraphics[width=0.47\textwidth]{im.png}} & \subfloat[]{\includegraphics[width=0.47\textwidth]{im.png}} \\2 & \subfloat[]{\includegraphics[width=0.47\textwidth]{im.png}} & \subfloa...Read more

### LaTeX source code listing like in professional books

How should a latex source code listing look like to produce an output like in known books, for example one for the Spring Framework? I've tried with the latex listings package but wasn't able to produce something that looked as nice as the one below. So I'm primarely interested in the formatting instructions to produce something like the sample below (from Manning's sample chapter for Spring in Action):EDITWith the help especially of Tormod Fjeldskår here's the complete snippet to produce the desired look:\usepackage{listings}\usepackage{courie...Read more

### wrapping - How to wrap text in LaTeX tables?

I am creating a report in LaTeX which involves a few tables. I'm stuck on that as my cell data in the table is exceeding the width of the page. Can I somehow wrap the text so that it falls into the next line in the same cell of the table?Is it somehow related to the table's width? But as it's overshooting the page's width, it won't make a difference, will it?...Read more

### Breaking a list into multiple columns in Latex

Hopefully this is simple: I have a relatively long list where each list item contains very little text. For example:* a* b* c* d* e* fI wish to format it like so:* a * d* b * e* c * fI would rather not create a table with 2 lists as I want to be able to easily change the list without worrying about updating all the columns.What is the best way to do this in latex?...Read more

### Inserting code in this LaTeX document with indentation

How do I insert code into a LaTeX document? Is there something like:\begin{code}## Heading ##...\end{code}The only thing that I really need is indentation and a fixed width font. Syntax highlighting could be nice although it is definitely not required....Read more

### How to write LaTeX in IPython Notebook?

How can I display LaTeX code in a IPython Notebook?...Read more

### latex - Change the font size after the first chapter/section

The command \documentclass[12pt,a4paper]{book} changes the font size of the entire document. However, I like to maintain the table of content and other summaries in 12pt, but after the first chapter I like to change to 14pt.How can I do it?...Read more

### tex - Some abundant text when inserting code into latex with listing

My lstset as below:\lstset{ %language = c++,basicstyle = \footnotesize,numbers = left,numberstyle = \tiny\color{gray},stepnumber = 2,keepspaces = true,numbersep = 5pt,backgroundcolor = \color{white},showspaces = false,showstringspaces = false,showtabs = false,frame = single,rulecolor = \color{black}tabsize = 2,captionpos = b,breaklines = true,breakatwhitespace = false,title = \lstname,keywordstyle = \color{blue},commentstyle = \color{dkgreen},stringstyle = \color{mauve},escapeinside = {\%*}{*)},morekeywords = {*,...}}and I insert my code throug...Read more