Wordwrap in Code Blocks [PDF-Export] #3632
-
Hello Everyone I'm trying to write a two column summary for a programming course at college. Inside the doc, I've used the inline-Latex commands Did anybody else have this issue? And how can I fix this? Following you can find my config.tex file and quarto YAML-config. config.tex\usepackage{amssymb, amsmath}
\numberwithin{equation}{section}
\usepackage[utf8]{inputenc}
\usepackage{lastpage} % counts all the pages, used in footer
% Flexible Multicolumn Option
\usepackage{multicol}
\setlength\columnsep{20pt}
% Package for enabling colors (colorful output)
\usepackage[dvipsnames]{xcolor}
\definecolor{darkgreen}{HTML}{014f32}
% Icons - http://mirrors.ctan.org/fonts/fontawesome5/doc/fontawesome5.pdf
\usepackage{fontawesome5}
\usepackage[nodisplayskipstretch]{setspace}
% Font Configuration
\usepackage{lmodern}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{cmbright}
%
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{} % clear all header fields
\makeatletter
\fancyhead[R]{\@title}
\makeatother
\fancyhead[L]{HSLU T\&A}
\fancyfoot{} % clear all footer fields
\fancyfoot[C]{\thepage\ / \pageref{LastPage}}
\fancyfoot[R]{APROG}
\fancyfoot[L]{\today} Quarto Doc YAMLtitle: "Blablabla"
author: "BlaBlaBla"
date: "01.01.2022"
lang: de
# [RENDER CONFIGURATION] ==============================
format:
pdf:
include-in-header:
- config.tex
keep-tex: true
pdf-engine: pdflatex
# [DOCUMENT CONFIGURATION] ============================
geometry:
- "top=25mm"
- "bottom=30mm"
- "left=15mm"
- "right=15mm"
papersize: a4paper
fontsize: 10pt
code-block-border-left: false
code-block-bg: "#f7f7f7"
toc: true
toc-depth: 3
number-sections: true
number-depth: 3
pagenumbering: none
highlight-style: github |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The |
Beta Was this translation helpful? Give feedback.
-
Hello, thanks for the response. Sadly it doesn't support UTF8 and being required to update the template is a whole other cake for me, which I'm not going to pursue. For now I'm using the following work around: \usepackage{fvextra}
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{
breaklines,
breaksymbolleft={\textcolor{gray}{\scriptsize\ensuremath\hookrightarrow}},
commandchars=\\\{\}
} |
Beta Was this translation helpful? Give feedback.
The
listings
LaTeX package supports automatic line breaks in code. According to https://quarto.org/docs/reference/formats/pdf.html#code it should work with Quarto. The package has a lot of options and it comes with its own syntax highlighter.