General ⇒ Create a value to be cross-referenced
Create a value to be cross-referenced
I am new to LaTeX, and was wondering if it's possible to create a value to be cross-referenced. For example, I would like to create a variable ("sample") that holds a number for the sample size (e.g., 70), and to be able to reference that value throughout the paper by calling the variable and not having to manually change the value in all places. Is this possible? Thanks so much!
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Create a value to be cross-referenced
Code: Select all
\newcommand*{\sample}{70}
If you want something you can use as a length, etc., there may be better options, but we don't have quite enough information on what you plan on doing with this.