Hot answers tagged

9

The fancyvrb package allows you to define your own environments. If you use this you can just change the definition: \documentclass[]{article} \usepackage{fancyvrb} \usepackage{fvextra} \DefineVerbatimEnvironment{MyVerbatim}{Verbatim}{breaklines=true,numbers=left,breakafter=\},breakbefore=\\} \begin{document} \begin{MyVerbatim} text text text text text \...


3

I cannot recommend using a macro with undelimited-argument-syntax for producing multiline-verbatim-material: The question of handling indentation of the source code will cause confusion because with verbatim-material indentation-spaces in the source-code are tokenizend and therefore show up as horizontal space/visible space in the output. In order to exhibit ...


2

This tokcycle based approach is set up to handle tokens (and groups) in the input stream in a successive manor. It can thus be programmed to emulate verbatim in most ways (the exception being that the grouping tokens {} must be balanced) But as we see in the MWE, special characters like {#$%^&\_} are all handled. I have further set up the cycle to ...


2

You should use unicode-math for this, which supports STIX2 Math. \documentclass[12pt,a4paper]{memoir} \usepackage{fontspec} \usepackage[math-style=ISO]{unicode-math} \setmainfont[ Extension=.otf, UprightFont=*-Regular, BoldFont=*-Bold, ItalicFont=*-Italic, BoldItalicFont=*-BoldItalic, ]{STIXTwoText} \setmathfont[ Extension=.otf, ]{STIXTwoMath-...


1

Use titlesec features. \documentclass[a4paper,oneside]{book} \usepackage[pagestyles,clearempty]{titlesec} \titleformat{\chapter}[display] {\huge\bfseries\filright} {}% no number {0pt} {} [\vspace{2.5ex}{\titlerule[2pt]}] \begin{document} \frontmatter \tableofcontents \mainmatter \chapter{Introduction} \chapter{Another} \end{document} The ...


1

\colorbox wraps things into something like an \fbox whose frame-lines have a thickness of 0pt and wherein the background of things is colored. Seems with star you wish this box with background-coloring while without star you don't wish any wrapping into a box at all. This way measurements of things differ depending on whether coloring the background is ...


Only top voted, non community-wiki answers of a minimum length are eligible