mathsoftware

A course about LaTeX and SageMath
git clone https://git.tronto.net/mathsoftware
Download | Log | Files | Refs | README | LICENSE

commands.tex (502B)


      1 \documentclass[10pt,a5paper]{article}
      2 \usepackage[utf8]{inputenc}
      3 \usepackage{amsmath}
      4 \usepackage{amsfonts}
      5 \usepackage{amssymb}
      6 \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
      7 
      8 
      9 \newcommand{\myvec}[2]{({#1}_1,{#1}_2,\dots,{#1}_{#2})}
     10 \newcommand{\myvecn}[1]{\myvec{#1}{n}}
     11 
     12 \newcommand{\myvecopt}[2][n]{({#2}_1,{#2}_2,\dots,{#2}_{#1})}
     13 \providecommand{\vec}[1]{\overleftarrow{#1}}
     14 
     15 \begin{document}
     16 
     17 \[
     18 	\vec{v}=\myvecopt{v} 
     19 \]
     20 
     21 later...
     22 
     23 \[
     24 	\vec{w}=\myvecopt[10]{w}
     25 \]
     26 
     27 \end{document}