Latex: Difference between revisions
| (One intermediate revision by the same user not shown) | |||
| Line 174: | Line 174: | ||
Be sure to use vector figures (pdf or pgf) instead of raster ones (png, jpeg).<br> | Be sure to use vector figures (pdf or pgf) instead of raster ones (png, jpeg).<br> | ||
See [https://timodenk.com/blog/exporting-matplotlib-plots-to-latex/ https://timodenk.com/blog/exporting-matplotlib-plots-to-latex/] on how to export matplotlib to pgf. | See [https://timodenk.com/blog/exporting-matplotlib-plots-to-latex/ https://timodenk.com/blog/exporting-matplotlib-plots-to-latex/] on how to export matplotlib to pgf. | ||
In the snippet <code>[!htbp]</code> represents the placement preferences. | |||
* <code>!</code> means to ignore some placement limitations | |||
* <code>h</code> mean to place the figure here | |||
* <code>t</code> means top of the page. | |||
* <code>b</code> means bottom of the page. | |||
* <code>p</code> means to place it on a figure only page. | |||
If you add the [https://ctan.mirrors.hoobly.com/macros/latex/contrib/float/float.pdf the float package], you can also use <code>[!H]</code> which is a more strict version of <code>[!h]</code>. | |||
===Subfigure=== | ===Subfigure=== | ||
| Line 400: | Line 409: | ||
</pre> | </pre> | ||
* <code>-r</code> specifies the DPI. Default is 150. | * <code>-r</code> specifies the DPI. Default is 150. | ||
===Latex Cleanup=== | |||
If you need to submit the latex, e.g. to Arxiv, you can use this tool to help clean it up: | |||
https://github.com/google-research/arxiv-latex-cleaner | |||
==Resources== | ==Resources== | ||