Tag Info

New answers tagged

1

To build on David Carlisle's comment, there's a judgement call to make for plots with PNG (raster) vs PDF (vector). If you have a scatter plot with thousands of data points for example, there comes a point where vector graphics can make the resulting PDF document (alone or compiled into a LaTeX-produced document) large, slow and unresponsive. In such cases I ...


2

Note that it is not possible to work with the code you posted as is as it does not compile and relies on non-standard packages. When I tried to compile it, I got countless compilation errors. When I fixed those, I got complaints about missing packages. When I removed those, more errors. Do you want something like this? As far as I can tell, answers to ...


5

New answer If you want to use Consolas font, you have to use xelatex which means to use fontspec but NOT inputenc. You can read why in Using XeLaTeX instead of pdfLaTeX ph command doesn't need fontspec as Paul Gessler showed to you. scrbook perfectly works with pdflatex, xelatex or lualatex. This is what I get from your code commenting out fontenc and ...


2

Same as your other question, you need style=Matlab-editor to tell listings what style should be applied to the listing. Font size changes can be incorporated into the setting of the basicstyle key, such as basicstyle=\lstconsolas\small. If you want to set these keys for more than one listing at a time, you may want to look into \lstset which can be used to ...


3

This is quite similar to an example in the matlab-prettifier package manual. First, we need to tell listings which style to apply, with style=Matlab-editor. Second, if you want to use \ph as shorthand for the placeholders, you must do \newcommand\ph\mlplaceholder to define the shorthand as discussed in the manual. Third, even with the shorthand, you still ...



Top 50 recent answers are included