New answers tagged

15

tex accepts . or , in its number syntax at the core level it doesn't need any packages it has always been this way. If you look in the WEB (Pascal) source code of TeX the Progam you find @d continental_point_token=other_token+"," {decimal point, Eurostyle}


0

I've found the mathpix is great for boosting latex productivity as it enables you to derive latex from an image and then that can be used as a template for further copy/pasting. https://mathpix.com/docs/snip/overview


8

Here is a solution based on this answer. \documentclass[12pt]{article} \usepackage{graphicx} \usepackage{lcg} \usepackage{soul} \makeatletter \def\SOUL@soeverytoken{% \efect{\the\SOUL@token}} \makeatother \newcommand{\jumpingbox}[1]{\rand\raisebox{\therand pt}{\fbox{#1}}} \newcommand{\rotationbox}[1]{\rand\rotatebox{\therand}{\fbox{#1}}} \def\decorate#1#...


12

You can make the argument of \aux delimited by a space, so it operates word-by-word, rather than token-by-token (which is why it doesn't work with accented characters: they are made of multiple tokens). \documentclass[12pt]{article} \usepackage{graphicx} \usepackage{lcg} % decoration \def\effect{} \def\decorateEND{\decorateEND} \edef\decorate#1#2{% \...


0

Main changes based on your (incomplete) example: option escapeinside=|| is added to minted environment code snippet |\setcounter{FancyVerbLine}{1}| is appended after java code line protected void onCreate(Bundle savedInstanceState){. Here FancyVerbLine is the counter used in line numbering. Note: This may break other line-number minted options. \...


3

I'm not sure what \hspace{-0.25} is supposed to do. \documentclass{article} \usepackage{xcolor} \colorlet{sectioncolor}{red!80!blue} \newcommand{\partc}[2][]{% \par\addvspace{\bigskipamount}% \noindent\hspace*{-0.25cm}% {\color{sectioncolor}\fontsize{11}{13.2}\bfseries#2\par}% \if\relax\detokenize{#1}\relax\else \noindent\textbf{#1}% \fi \...


2

Do you need a loop? Trick: the normal interword space in the current font is available as \fontdimen2\font. With the following code you can also say \insertspaces{2.5}, if you want, or even \insertspaces{-3}. \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \newcommand{\...


1

You almost did it. Only a few modifications are needed to get the thing working: \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \newcount\foo \newcommand{\insertspace}[1]{% \foo=#1\relax \loop ~% \advance\foo-1 % \ifnum \foo>0 % \repeat ...


3

Syntax for low-level TeX counters is \foo <optional equal> <number> <space or \relax> and no braces (it is not an argument). But you shouldn't put \newcount into your definition but outside. Otherwise you will allocate a register each time you call your macro.


4

Yes you can use any number, although note the magsteps are based on sqrt 1.2 not multiples of 500: \def\magstephalf{1095 } \def\magstep#1{\ifcase#1 \@m\or 1200\or 1440\or 1728\or 2074\or 2488\fi\relax} The reason for sticking to known sizes originally is it avoids needing to generate the bitmaps at non standard sizes, but these days you are probably using ...


Top 50 recent answers are included