New answers tagged

0

My macro \replaceiandreplicate{<term with i>}% {<loop-start-index>}% {<loop-end-index>}% {<separator>}% {<end index>} presented in the discussion Loop code for repeated sums and in the discussion How to make a command to automate creation of ...


4

This is an adaptation of my answer at How to make a command to automate creation of prime factorization-like products? \documentclass{article} \usepackage{amsmath} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{\elliptic}{O{i}mmmm} {% #1 = item to substitute % #2 = main term % #3 = first index % #4 = last index % #5 = operation \...


4

For the example given where the argument comes at the end of the placeholder, you do not need to define any internal command, but for the general case the form \ellipsisb takes as the first argument the body of any one-argument command definition. This allows the 0^2...5^2 form shown at the end. \documentclass{article} \begin{document} \newcommand\...


2

Perhaps I don't understand what you want but as far as I can see you don't need \csuse here and can define: \newcommand\ellip[4]{{#1}^{#3}#2\dots#2{#1}^{#4}} This way $\ellip x+04$ and $\ellip y-{-1}2$, respectively, produce If you really do need a fancier version that supports a macro then I suggest not putting the macro in the exponent and, instead, ...


4

Giving frequency, period and amplitude of sine wave with color as options in pic set. The grid is drawn according to the frequency, period and amplitude values. foreach loop in tikzset is started with zero, and the frequency is drawn with 0 to f-1. Drawing the sinusoid is based on TiKz fundamentals. \documentclass[tikz,border=10pt]{standalone} \tikzset{% ...


5

For drawing of your sinus function I would use plot macro: \documentclass[tikz, margin=3mm]{standalone} \begin{document} \begin{tikzpicture} \draw[gray,thin] (0,-2) grid[xstep=pi/2,ystep=1] (8*pi,2); %Grid \draw (0, 0) -- (8*pi,0) %X-Axis (0,-2) -- (0 ,2); %Y-Axis % Sine-Wave, \x r means to convert '\x' from degrees to radians \draw[...


4

A very crude starting point with foreach loops. Not elegant (IMO), but gives one possibility. \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[gray!20] (0,-2) grid (32,2); %Grid \draw[black,-] (0, 0) -- (32,0); %X-Axis \draw[black,-] (0,-2) -- (0 ,2); %Y-Axis %% incorporating @marmot's (...


Top 50 recent answers are included