New answers tagged

0

Since I can not comment or upvote, I have to post this as an answer. Thanks for all the answers here, especially Thorsten Donig's answer worked like a charm. One small thing, regarding Jay's comment on declaring a new advsection command on this answer. It is better to declare \newcommand{\advsection}[1]{\section*{}\begin{advanced}\section{#1}\end{advanced}}. ...


0

I quite like user4686's definition of skoverline, but I find LaTeX2e code a bit hard to read / understand / modify. As such I tried my hand at porting the code to LaTeX3. To my knowledge, the following code should produce the exact same results (that is an overline kerned by half the current font's slant "width"). % -- skoverline (ported from https:...


5

Welcome to TeX.SE!! As your image is quite repetitive you can draw this with \foreach commands. Something like this (I left the labels for you). \documentclass[border=2mm]{standalone} \usepackage{tikz} \definecolor{mygreen}{rgb}{0,0.4,0} \begin{document} \begin{tikzpicture} \draw[help lines] (0,0) grid [step=0.5] (10,11); \draw[thin,gray] (0,0) grid (10,...


2

Here is a starting point. \documentclass{article} \usepackage{nicematrix} \ExplSyntaxOn \NewDocumentCommand{ \cell } { mm } { \int_mod:nn{ #2 }{ 2 } \int_mod:nn{ \int_eval:n { #1 + 1 } }{ 2 } } \ExplSyntaxOff \begin{document} $\AutoNiceMatrix[hvlines]{11-11}{\cell{\arabic{iRow}}{\arabic{jCol}}}$ \end{document} This produces: It remains to add ...


4

Welcome to TeX SE. Here is something for you to start with: \documentclass{article} \usepackage{nicematrix} \setcounter{MaxMatrixCols}{20} \begin{document} \[ \begin{NiceMatrix}[light-syntax,hvlines] 10 00 10 00 10 00 10 00 10 00 10 ; 11 01 11 01 11 01 11 01 11 01 11 ; 10 00 10 00 10 00 10 00 10 00 10 ; \vdots ; 10 00 10 00 10 00 10 00 10 00 10 ; \...


3

At least for snake, it seems to work if I break down the segments into their own decorate{} block: \documentclass[margin=3mm,tikz]{standalone} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \newcommand{\segmentrect}[3]{ decorate{ #1 -- ++ (#2,0) } decorate{ -- ++ (0,#3) } decorate{ -- ++ ({-(#2)},0) } decorate{ -- cycle } } \begin{...


Top 50 recent answers are included