Questions tagged [number]
The number tag has no usage guidance.
122 questions
3
votes
3
answers
217
views
number decimal digits
The \test command below always rounds a number to 3 decimal places. How to modify this command so that a number not to be rounded unless an optional argument is explicitly provided?
\documentclass{...
0
votes
1
answer
61
views
if there is a better way to round a floating number using expl3?
% here is some code. not sure if it is a right way to define a new command . But it work as expected.
\documentclass{article}
\begin{document}
\ExplSyntaxOn
\newcommand{\ro}[2][2]{\fp_eval:n { round ...
0
votes
0
answers
22
views
Change font style figure number
I'm sorry if this question sounds a bit naive, I'm quite new to LateX. I'm using \autoref to cross-reference figures. I've used this command to personalize the appearance of it:
\renewcommand{\...
7
votes
1
answer
328
views
Fast way to test if an argument is an integer in LaTeX3?
In the latest version of LaTeX3, what would be the fastest way to test if an argument is a string representing an integer (without LuaTex)?
Basically, I am looking for a function that would do the ...
0
votes
2
answers
71
views
Multirow spanning vertical lines in the content of a tabular instead of vertical dots
I will provide a MWE if you think it is necessary but I believe it is not.
I have created the following (cropped) tabular:
I have used $\vdots$ in order to recall that some data are the same among ...
0
votes
1
answer
72
views
(/maketitle) Missing number, treated as zero,using overleaf
\documentclass[a4paper,fleqn,hyperfootnotes=true,colorlinks=true,allcolors=blue]{cas-dc}
\usepackage[numbers]{natbib}
\usepackage{hyperref}
\hypersetup{
citecolor=blue,
linkcolor=red,
}
\...
3
votes
2
answers
190
views
I want to number two formula in equation, aligned and split environment
This is my code:
\begin{equation}
\begin{aligned}
&\begin{split}
\max\,\, z=&P_1d_1^-+P_2d_2^-+P_3(240d_3^-+220d_4^-+250d_5^-)\\
&+P_4(240d_6^-+220d_7^-+250d_8^-)+P_5d_9^-+...
1
vote
1
answer
62
views
how can I auto number quantikz
I want quantikz to be able to number automatically,like this:
which I currently use align
\documentclass[12pt,reqno]{report}
\usepackage{amsfonts}
\usepackage{stmaryrd}
\usepackage{amsmath}
\...
2
votes
2
answers
66
views
Convert list to table, number of rows
A small program that recalculates the number of records in the source list (array) and converts the list of data into a table.
It works if the number of rows in the table is \def\nRows{3} is ...
0
votes
1
answer
82
views
The Theatre Ticket [closed]
\begin{tikzpicture}[scale=0.8]
\draw[->] (0,0) -- (10,0) node[right] {Quantity};
\draw[->] (0,0) -- (0,10) node[above] {Price};
\draw (2,8) -- (8,2) node[midway,below] {Demand Curve};
\draw (1,9)...
0
votes
0
answers
21
views
page numbering order for table of content, list of figures, list of tables, and nomenclature
I don't know how to fix the order of page numbering for table of contents, list of figures, list of tables, and nomenclature. I use \renewcommand to change the Arabic numbers to Roman; however, for ...
0
votes
1
answer
101
views
How to make Brill use lining figures in ConTeXt?
There's another question but it uses regular LaTeX instead of ConTeXt. I've tried but idk how to make this font have lining numerals. I checked via an online website to see that it is possible.
\...
1
vote
0
answers
57
views
Highlight the numbers on Number line
I would like to highlight the numbers with different colors like in first number line highlight the numbers from 0 to onwards, in second number line from 0 to onwards and in third number line ...
0
votes
1
answer
36
views
Align bold numbers with roman ones in table of contents
General overview
In TOC the page numbers of chapters (in bold) and section (in normal font) occur a ugly shift. I search a way to make them aligned.
MWE
Here is a MWE to reproduce this behavior:
\...
2
votes
1
answer
271
views
Siunitx: formatting range
Following this, I obtain
\sisetup{
range-phrase=—
}
\SIrange{40}{50}{\liter}
40 L—50 L
Is there a way that can give me output in this format?
40—50 L
1
vote
0
answers
234
views
Is there a basic float number type in LaTeX?
I've tried some examples with counters and numbers in LaTeX. I create a counter with \newcounter. I understand that it declares an integer. So if we make like this
\newcounter{num}
\setcounter{num}{10}...
0
votes
0
answers
69
views
How can I set the chapter-counter to infinity?
My professor introduced us to infinite graph-theory and made a little gimmick: Instead of increasing the chapter number by one, he set it right to infinity. Now I want to get it into my LaTeX-...
3
votes
1
answer
109
views
How can I include comma separator in Latex word count?
I have a word count command in Latex that works well, based on the code here. However, I want the output number to be comma separated for thousands (e.g., 1,000 instead of 1000). I have tried using \...
1
vote
0
answers
155
views
ConTeXt: Numbers as verbal strings (e.g. 1=“first”)
With LaTeX, I can use the fmtcount package to typeset numbers as verbal strings and print e.g. “one”, “One”, “first” or “First” instead of 1 and “twenty-two”, “Twenty-two”, “twenty-second” or “Twenty-...
0
votes
0
answers
49
views
Is it possible to deactive comma , in maths so we can write 3,1416 without 3{,}1416 or siunitx \num{3,1416}? [duplicate]
Is it possible to deactive comma , in maths so in Spanish (for example) we can write 3,1416 without 3{,}1416 or siunitx \num{3,1416}?
0
votes
1
answer
60
views
How to give space between theorem number and theorem?
\documentclass[12pt,openany]{book}
\usepackage{extsizes}
\renewcommand{\baselinestretch}{1.2}
\usepackage[
top=1.75cm, % Top margin
bottom=3.5cm, % Bottom margin
left=3.25cm, % Left ...
4
votes
3
answers
814
views
How to truncate a floating point number to an arbitrary decimal place?
Are there packages that provide a command that can truncate a floating point number not to the nearest integer, but to an arbitrary decimal place? For instance, 2.59 truncated to the first decimal ...
0
votes
0
answers
70
views
How to label and refer to appendix correctly
I am writing a report and I've tried to solve this problem by looking at other similar questions, however I'm not able to find a question matching mine exactly.
All I want is to refer to something in ...
3
votes
2
answers
59
views
How can number comparison be terminated in general way for macro parameter?
I'm wondering if there's a nice, generalized way to terminate a number which is given as a macro parameter either explicitly (as a number) or implicitly (as a register value or \chardef). This would ...
12
votes
1
answer
1k
views
How to write Graham's number in LaTeX?
I'm looking to write this image in LaTeX but every attempt has ended in failure. Help would be appreciated.
0
votes
1
answer
272
views
Algorithm Caption Numbering Restarting Each Chapter [duplicate]
I'm having an issue getting the caption numbering to restart per chapter. For background, to follow guidelines of the publisher, algorithms get forced into something called an "object," ...
0
votes
1
answer
285
views
What is the usefulness of the package "erewhon"?
I'm using a preset overleaf project for MSc thesis and I found that the package erewhon produces numbers that do not align with the text. In my thesis I have many numbers that are not necessarily ...
3
votes
1
answer
348
views
I would like to number the figure in my presentation in LaTeX
I need to number the figure in my presentation, but I do not know why the figure appears without the number. I try what I could find on the Internet, but I still do not get the number. Instead of ...
1
vote
0
answers
47
views
datetime2 "number too big" error when eliminating separators
I'm trying to produce a date/time output as a string of numbers without any separators: yyyymmddHHMMss. I was able to use the yearmonthsep= and other options in datetime2 to eliminate any colons or ...
0
votes
1
answer
229
views
How to change number font in equation to text number font in LaTeX?
I am using a template which is very long and has a lot of no-English characters. I found the numbers' font in the equations is different from the numbers in the text, so I hope to make the numbers' ...
0
votes
1
answer
82
views
How to make Chapter numbers to be in position of dropcap like in the Bible
How to make Chapter numbers to be in position of dropcap like in the Bible (see picture)?
And how can I avoid number '1' for first verse between Chapter number and first letter in first line?
1
vote
4
answers
109
views
Numbered equation, alignedat enviroment, tall curly brace [duplicate]
I want to get a single equation number for this multiple equation with \label I need for cross referencing. Also, I need a tall curly brace prior to the equation number.
0
votes
1
answer
87
views
\num changes font after Ubuntu upgrade
There is a certain font I would like to use for a document, and the rendered numbers look like this.
{1234}
I would like to control the placement of the decimal point too, however, once a number goes ...
0
votes
1
answer
93
views
Set page numbering on specific pages
I have an article in which I'm using fancyhdr to make a header with section names and a footer on the right side of the pages.
However I want to remove the header on some specific pages while keeping ...
0
votes
1
answer
79
views
How do I get the equation number on the same line as the equation?
My equation number ends up on a new line. I am writing in Tufte class.
This is example code:
\begin{equation}
\begin{alignedat}{2}
&p_{u} &&\leftarrow p_{u}\cdot \frac{\Sigma_{i\in ...
4
votes
2
answers
270
views
Symbol for blanks as ambiguous bits
I display bit strings with ambiguous bits, like 11-101-0011---10-1-1. So, "-" means could be "1" or "0".
All symbols I tried like squares, circles display in a ...
3
votes
1
answer
230
views
SIunitx and non-integer exponents
I'm going through a number of old documents where I used siunitx to display numbers in scientific notation with non-integer exponents, like:
\documentclass{article}
\usepackage{siunitx}
\begin{...
0
votes
1
answer
72
views
Missing number error in pgfplot [closed]
I got a weird error when I use add yshift=-1mm to my plot. The error does not appear when I use positive value. The shift works, but looking at the red error is really annoying.
Can anyone suggest a ...
14
votes
3
answers
550
views
How can I create custom accents?
I need to make number accents above and below like this:
How can I do it?
0
votes
1
answer
22
views
repeat image but number don't repeat (ascending count)
i want to use same icon, repeat image but number (\dataNo) need to increase
My current code:
\documentclass[a4paper,oneside,14pt]{article}
\usepackage[a4paper,landscape,left=0.0cm,right=0cm,top=0.0cm,...
1
vote
1
answer
48
views
Getting custom output from numtoname
We can expand digits to words in memoir class using numtoname command. But when I expand 125000 using numtoname, I get an output one hundred and twenty-five thousands. Instead I would like to get an ...
0
votes
1
answer
1k
views
`Problem with enumerate
So I have been having issues with the enumerate command on my document.
It initially works fine until I add a margin then it does this weird thing where It completely forgets about the previous ...
0
votes
0
answers
163
views
Coloring numbers outside string and variables using lstlisting and parsing don't work as expected. Need Help to fix with PDFLaTeX
I am writing my thesis and i need to put extract of code into it. Having developed all my C# code in Visual Studio, I would like to have more or less the same colors, so I have taken different ...
9
votes
4
answers
521
views
Compact/short number range representation
I googled, but couln't find a package to make number ranges in a compact/short form.
In siunitx there's is a \numrange command, but this feature seems not to exist.
Explaining: I'd like something like ...
0
votes
0
answers
498
views
Does LATEX produce more pages than MS Words if they have the exact same output?
My thesis should NOT exceed 30 pages and the nature of my research compels me to go beyond that limit. So I thought would it be the same number of pages IF I convert my latex document into MS Word? In ...
5
votes
3
answers
440
views
Add hyphens to mobile number
I want to add my mobile number in a pdf line being generated using LaTeX
how I want it to render: (+91) 7887-61x-xxx
usage: \mobile{91}{788761xxxx}
% Usage: \mobile{<countrycode><mobile ...
3
votes
1
answer
171
views
Automatic calculation of check number for ISBN-13
Here is a simple example.
If I have the first 12 digits of ISBN-13 number.
\documentclass[12pt]{report} \parskip=12pt
\def\ISBNnumber{978-618-5645-08}
\pagestyle{empty}
\begin{document}
...
0
votes
1
answer
85
views
Printing large numbers with numeric suffix
Is there any LaTeX package that pretty-prints a large number with appropriate numeric suffix, e.g., 6260563 -> 6.2M?
1
vote
1
answer
125
views
How to import a sentence from a .txt file that will preserve the font characteristics of the rest of the paragraph?
I have numbers from an R script that I would like to include in a report that I am typing in LaTeX. There are enough numbers that I am concerned about making a typo, and I don't want to do copy/paste ...
0
votes
2
answers
53
views
Picture number sticking to image caption in Table of Figures
Problem
In Table of Figures: When Chapter number and Pic number become too large, Pic number sticks to picture caption.
(Same problem probably also exists in Table List but I don't have many tables so ...