emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Code blocks and quotes export style


From: Tim Cross
Subject: Re: Code blocks and quotes export style
Date: Mon, 14 Mar 2022 08:13:03 +1100
User-agent: mu4e 1.7.9; emacs 28.0.91

"Barton, Mark" <Mark.Barton@disney.com> writes:

> I manually check the pdf to see if it fits and use a code formatter to get the
> line widths shorter. I use blacken for python and sqlformat for SQL within
> Emacs. Even then I still hit limits where I recently changed to font size to
> small for the code blocks.
>
> I use minted for syntax highlighting of code blocks.
> #+LaTeX_HEADER: \usepackage{minted}
>
> I set a local variable for org using minted to change the fontsize.
> # Local Variables:
> # org-latex-minted-options: (("fontsize" "\\small"))
> # End:
>

That is basically what I do as well. I use minted and a smaller font for
code listings. I also ensure that when programming, I use a fill column
of 80.

In this day of large monitors, a fill column of 80 for programming
languages can often seem frustrating as it means less code in a
'screen' (window). Increasing fill column to (lets say) 100 can work
well, until it comes time to generate documentation and PDFs etc. Then I
remember why 80 is a better default!

I do use local variables more these days and will set a larger fill
column setting for code when I know I won't be needing to print it or
use it in Latex, but the default is 80 so that whenever I do org blocks,
things wrap at a width which works better for export to PDF etc.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]