How to make small numbers on google docs on android

When doing high school and university assignments, inputting an answer like “H2O” after “what is the chemical formula for water?” is an incredibly useful feature. That small “2” is what’s known as a subscripted figure or character that appears below the middle of the line you’re typing on. On the other hand, superscript is something like 4 2 , where the small “2” appears above the middle of the line you’re typing on. Let’s go over how to do subscript and superscript in Google Docs.

QUICK ANSWER

To turn on subscript in Google Docs, click Format Text X2 Subscript. This will turn on subscript, and everything you type will be in subscript until you turn it off.

To turn on superscript in Google Docs, click Format Text X 2 Superscript. This will turn on superscript, and everything you type will be in superscript until you turn it off.

JUMP TO KEY SECTIONS

Using subscript and superscript in Google Docs allows you to create more accurate content. For example, instead of writing “H2O” as the chemical for water, you can properly write it as “H2O.”

How to format text as subscript in Google Docs

Android and iOS

In your Google Doc, press the Format button in the top toolbar; this looks like a capital letter ‘A’ to the left of four horizontal lines.

How to make small numbers on google docs on android

In the Text tab at the bottom, press the X2 button to turn on subscript. Press the X2 button again to turn this off so it isn’t highlighted.

PC and Mac

On Google Docs, click the Format tab at the top. You can highlight what you wish to subscript as shown below, or, if you simply want to type in subscript, click where you want to start typing.

Hover your cursor over Text and click X2 Subscript from the extended menu.

How to make small numbers on google docs on android

When finished, your text will be in subscript and look like this:

How to make small numbers on google docs on android

How to format text as superscript in Google Docs

Android and iOS

In your Google Doc, press the Format button in the top toolbar; this looks like a capital letter ‘A’ to the left of four horizontal lines.

In the Text tab at the bottom, press the X 2 button to turn on superscript. To turn this off, press the X 2 button again to avoid highlighting it.

PC and Mac

On Google Docs, click the Format tab at the top. You can highlight what you wish to subscript as shown below, or, if you simply want to type in subscript, click where you wish to start typing.

Hover your cursor over Text and click X 2 Superscript from the extended menu.

How to make small numbers on google docs on android

When finished, your text will be formatted in superscript and look like this:

How to make small numbers on google docs on android

How to insert special characters in Google Docs

If you were looking for some other small character that you can’t type in superscript or subscript, then you may be looking for a special character.

To insert special characters into your Google Doc, you must be using it on your computer. Alternatively, you can try accessing Google Docs from your mobile browser in Desktop site mode.

In your Google Doc, click the Insert tab at the top.

How to make small numbers on google docs on android

From the following dropdown, click Ω Special characters.

How to make small numbers on google docs on android

Locate the special character you are looking for by scrolling through the list, typing its name in the Search by keyword (e.g. arrow) or codepoint field, or drawing the symbol in the bottom box on the right. Click it from the list on the left to insert it when you find it.

How to make small numbers on google docs on android

What is the shortcut for subscript in Google Docs?

Google provides a quick keyboard shortcut to turn on subscript in Google Docs. On your keyboard, press Ctrl + , to activate subscript.

What is the shortcut for superscript in Google Docs?

Google provides a quick keyboard shortcut to turn on superscript in Google Docs. On your keyboard, press Ctrl + . to activate superscript.

How to make small numbers on google docs on android

Did you know that Google Docs, Google’s text editing tool has a mobile app? No? Well, users on mobile can download the Docs mobile app to create and edit text documents.

Compared to the web version, features on the Docs mobile app are quite limited. And this is understandable because mobile views are much more smaller than desktop interfaces. However, there are still a number of features that can be utilized.

Tho post covers how to do 5 easy-to-do tricks on the Google Docs mobile app.

Download Google Docs mobile app for Android and iOS.

5 Tips And Tricks to Use Google Docs On Mobile

1. Numbering Google Docs Pages

How to make small numbers on google docs on android

Follow these steps to number your pages while editing in Docs. Numbering helps you keep track of the document.

  • While editing in Docs, click on the ‘+’ icon at the top of the document.
  • Select “Page Number”.
  • Select the page number format you want to display.
  • The page number displays.
  • You can still edit this manually while editing the document.

2. Change Text Style, Font, Size, Color

To configure your text to your taste, you can change a lot of things about it. This includes the style, font, size, color, among other text-related properties. Follow these steps to make that happen.

How to make small numbers on google docs on android

  • While editing in Docs, click the large “A” icon at the top of the document.
  • It brings up a small box with different components.
  • To change the text style, select “Style” and pick either “Normal”, “Heading 1”, “Heading 2” and so on.
  • To change font, select “Font” and choose which font you want your text in.
  • To change size, toggle the pointer in front of “Size” up or down to increase or decrease the font size.
  • To change color, select “Text color” and choose which color you prefer most.

3. Find And Replace

How to make small numbers on google docs on android

Follow these steps below to find and replace words in a Google Docs document. This functionality can help you replace certain words at scale in a Google document.

  • While editing in Docs, click on the 3 vertical dots at the top right corner.
  • Click “Find and Replace”.
  • Type in the word you want to find.
  • Click on the search icon at the bottom right corner.
  • This brings up all the occurences of the word.
  • Click on the 3 vertical dots at the top right corner again.
  • Click either “Replace” or “Replace all”.
  • The former replaces one occurrence of the found word while the latter replaces all occurrences.
  • Type in the word you want to replace with.
  • Tap the “Replace” button located at the bottom-right corner.
  • This replaces the word you searched for with the word you typed in.

4. Add Comments to a Doc

To drop your comments on a particular part of a Doc, you can follow the steps below.

  • While editing, highlight the word, sentence or section you want to comment on. (You can highlight on mobile by long pressing a word, then dragging the blue icon through the area you want to highlight.)
  • After highlighting, click on the 3 vertical dots that show up, tap “Add Comment”.
  • Type in your comment in the space provided.
  • Tap “Comment”.

5. Insert Image In a Document

Follow the steps below to insert images in a Google Docs document on mobile.

  • While editing, put your cursor where you want the image to be and tap the “+” icon at the top.
  • Select “Images” and proceed to select the directory/folder where the image is located. It could be either “From photos”, “From camera” or “From web”.
  • If it’s from photos, select the photo you want to insert from your gallery.
  • If it’s from camera, take the photo after it takes you to your camera app.
  • If it’s from the web, search web photos with the relevant keywords and select which one suits you best.

Do you have other tips, tricks, and how-tos that can help us navigate Google Docs more productively on mobile? Let us know in the comment box. Ask us too if there’s something you’re trying to do but can’t seem to find your way around.

Brady Gavin
How to make small numbers on google docs on androidBrady Gavin
Writer

Brady Gavin has been immersed in technology for 15 years and has written over 150 detailed tutorials and explainers. He’s covered everything from Windows 10 registry hacks to Chrome browser tips. Brady has a diploma in Computer Science from Camosun College in Victoria, BC. Read more.

How to make small numbers on google docs on android

Whether you’re citing content that requires footnotes or discussing chemical or mathematical formulas, knowing how to use superscript or subscript text is extremely important. Here’s how to format text in Google Docs or Slides using a couple of different methods.

For this guide, we will be using Google Docs for the entirety of our examples. However, the methods can be used for Google Slides as well.

How to Format Superscript or Subscript

Fire up your browser, head over to Google Docs or Slides, and open up a document. To format text in superscript or subscript, you can either select some text first or place the cursor where you want to insert it into your document.

Next, click Format > Text and then select either “Superscript” or “Subscript” from the choices provided.

How to make small numbers on google docs on android

Alternatively, you can use keyboard shortcuts to achieve the same effect. Press Ctrl+. (Windows/ChromeOS) or Cmd+. (macOS) for superscript and Ctrl+, (Windows/ChromeOS) or Cmd+, (macOS) for subscript.

Start typing and your text will now appear as superscript or subscript.

How to make small numbers on google docs on android

How to Insert Superscript or Subscript

Alternatively, you can use the special character insertion tool built right into Google Docs and Slides to format your document with superscript or subscript text. It’s a tool that lets you insert arrows, scripts from different languages, and emojis directly into your document.

Fire up your browser, head over to Google Docs or Slides, and open up a document.

In your document, open the “Insert” tab and then click the “Special Characters” option.

How to make small numbers on google docs on android

When the Special Characters dialog opens, click the drop-down box on the right and click “Superscript” from the list of choices.

How to make small numbers on google docs on android

After you find a symbol you want to insert, click on it to add it to your document.

How to make small numbers on google docs on android

You can now close the tool and the superscript or subscript symbol will appear in your document in the cursor’s place.

  • › What Does “Rent Free” Mean Online?
  • › PSA: Your Old Gadgets Are a Fire Hazard, Here’s What to Do
  • › Can Cleaning a Phone’s Display Ruin the Oleophobic Coating?
  • › Stop Using Notepad
  • › Stop Using Flashlight Apps
  • › How Fast Will Wi-Fi 7 Be?

How to make small numbers on google docs on android Brady Gavin
Brady Gavin has been immersed in technology for 15 years and has written over 150 detailed tutorials and explainers. He’s covered everything from Windows 10 registry hacks to Chrome browser tips. Brady has a diploma in Computer Science from Camosun College in Victoria, BC.
Read Full Bio »

How to make small numbers on google docs on android

If you do not ask for much, some keyboards for Android, such as Gboard or SwiftKey, already allow you to write small numbers on the cell phone (superscripts or exponents) so you can put references to citations in Word, “squared” in Excel or use these characters in any app that supports them.

Unlike a PC, where you can use a key combination to enter superscripts and other special characters (for example, Alt +253 to generate squared), on Android you generally only have to hold down the number key you want. This is limited to some superscripts and only with some keyboards and apps that support these characters. If this is not enough, there are other more complete tools that I will indicate below.

How to put small numbers on the Gboard and SwiftKey keyboard

How to make small numbers on google docs on android How to make small numbers on google docs on androidHow to make small numbers on google docs on android

  1. Tap on the “123” number key (usually at the bottom of the keyboard, next to the space bar).
  2. Press and hold on the number you need and slide your finger to the superscript to enter it.

Unfortunately, this way you can only put numbers from 1 to 4. If you need to enter the rest of the numbers or you have a keyboard that does not support this feature at all (such as the Samsung keyboard), you will need an additional tool.

Before finishing these keyboards, if you use Gboard, I recommend you go to its settings and put the numbers above the letters on the keyboard . (Gboard> Preferences> Row of numbers). This will allow you to add superscripts quickly, without the need to switch to the number block. I mean, you save the first step.

How to make small numbers on google docs on android

More numbers, letters above, subscripts, etc.

To expand the superscript function on your cell phone, the simplest thing is to copy these special characters from an application or from the Internet. This will be the only way to add “small numbers” from 1 to 10. You can also put numbers below or subscripts (chemical formulas) or letters above a number in your Word, Excel, Power Point documents or in any app that supports them. .

How to make small numbers on google docs on android

For Android you have applications like Character Pad or Unicode Pad, (in its list of characters look for “Superscripts and Subscripts”). If you are a student, the Engineering Keyboard may suit you . And if you just want to have fun on WhatsApp, Facebook and social networks, Tiny Keyboard . You shouldn’t use these last two keyboards to enter sensitive data.

How to make small numbers on google docs on android

You can also convert normal characters to superscripts or subscripts in online utilities like lingojam.com, and then copy the result. Or you can copy them from Wikipedia, where you will find all the characters that exist of this type, according to the UNICODE standard. Here I leave you the most used ones in case you want to copy them right now:

Lowercase alphabet except q (ᵃ ᵇ ᶜ ᵈ ᵉ ᶠ ᵍ ʰ ⁱ ʲ ᵏ ˡ ᵐ ⁿ ᵒ ᵖ ʳ ˢ ᵗ ᵘ ᵛ ʷ ˣ ʸ ᶻ)

Limited uppercase alphabet (ᴬ ᴮ ᴰ ᴱ ᴳ ᴴ ᴵ ᴶ ᴷ ᴸ ᴹ ᴺ ᴼ ᴾ ᴿ ᵀ ᵁ ⱽ ᵂ)

Subscripts lowercase letters (ₐ ₑ ₕ ᵢ ⱼ ₖ ₗ ₘ ₙ ₒ ₚ ᵣ ₛ ₜ ᵤ ᵥ ₓ)

Some Greek letters (ᵅ ᵝ ᵞ ᵟ ᵋ ᶿ ᶥ ᶲ ᵠ ᵡ ᵦ ᵧ ᵨ ᵩ ᵪ)

Related articles :

How to put the Ñ on the mobile keyboard

How to change the keyboard BACKGROUND

How to change Android keyboard

Receive updates: SUBSCRIBE by email and join 10,000+ readers. Follow this blog on Facebook and Twitter.

You can sign in to apps and sites on different devices using passwords saved to your Google Account when you either:

  • Turn on sync in Chrome on Android
  • Sign in to Chrome on your computer

Save passwords to your Google Account

If Offer to save passwords is on, you’ll be prompted to save your password when you sign in to sites and apps on Android or Chrome.

To save your password for the site or app, select Save. If you have more than one Google Account signed in to your Android device, you can choose the account where you want to save the password.

You can manage your saved passwords any time at passwords.google.com or in Chrome.

Manage offers to save passwords

You can let Chrome remember passwords for sites and sign you in automatically using the passwords saved in your Google Account.

Offer to save passwords is on by default, and you can turn it off or back on.

  1. On your computer, open Chrome.
  2. At the top right, click Profile Passwords.
  3. Turn Offer to save passwords on or off.

Manage offers to save passwords for specific sites or apps

You can choose to never save passwords for specific sites. When you’re prompted to save a password, select Never. You won’t see an offer to save that password again.

You can view or manage the sites that will never offer to save passwords:

  1. On your computer, open Chrome.
  2. At the top right, click Profile Passwords.
    • If you don’t see your Google Account, learn how to turn sync on in Chrome.
  3. Under “Never Saved,” see the websites that will never offer to save passwords. To remove a site, click Remove .

Manage auto sign-in

You can automatically sign in to sites and apps using info you’ve saved. You can also turn Auto sign-in off if you want to provide confirmation before signing in.

This page describes an old version of the Text Recognition API, which was part of ML Kit for Firebase. The functionality of this API has been split into two new APIs (learn more):

    is part of the new standalone ML Kit SDK, which you can use with or without Firebase. is part of Firebase ML, which includes all of Firebase’s cloud-based ML features.

Вы можете использовать ML Kit для распознавания текста на изображениях. ML Kit имеет как API общего назначения, подходящий для распознавания текста на изображениях, например текста уличного знака, так и API, оптимизированный для распознавания текста документов. API общего назначения имеет модели как на устройстве, так и в облаке. Распознавание текста документа доступно только в виде облачной модели. См. обзор для сравнения облачной модели и модели на устройстве.

Прежде чем вы начнете

  1. Если вы еще этого не сделали, добавьте Firebase в свой проект Android .
  2. Добавьте зависимости для библиотек ML Kit Android в файл Gradle вашего модуля (на уровне приложения) (обычно app/build.gradle ):
  3. Необязательно, но рекомендуется . Если вы используете встроенный в устройство API, настройте приложение для автоматической загрузки модели машинного обучения на устройство после установки приложения из Play Store.

Для этого добавьте следующее объявление в файл AndroidManifest.xml вашего приложения:

Если вы хотите использовать облачную модель и еще не включили облачные API для своего проекта, сделайте это сейчас:

    Откройте страницу API ML Kit в консоли Firebase.

Если вы еще не обновили свой проект до тарифного плана Blaze, нажмите « Обновить », чтобы сделать это. (Вам будет предложено обновиться, только если ваш проект не входит в план Blaze.)

Только проекты уровня Blaze могут использовать облачные API.

Если вы хотите использовать только модель на устройстве, вы можете пропустить этот шаг.

Теперь вы готовы начать распознавать текст на изображениях.

Инструкции по входному изображению

Чтобы ML Kit точно распознавал текст, входные изображения должны содержать текст, представленный достаточным количеством данных пикселей. В идеале для латинского текста размер каждого символа должен быть не менее 16×16 пикселей. Для текста на китайском, японском и корейском языках (поддерживается только облачными API) размер каждого символа должен составлять 24×24 пикселя. Для всех языков, как правило, нет преимущества в точности для символов, размер которых превышает 24×24 пикселя.

Так, например, изображение размером 640×480 может хорошо подойти для сканирования визитной карточки, занимающей всю ширину изображения. Для сканирования документа, напечатанного на бумаге формата Letter, может потребоваться изображение размером 720×1280 пикселей.

Плохая фокусировка изображения может снизить точность распознавания текста. Если вы не получаете приемлемых результатов, попробуйте попросить пользователя повторно захватить изображение.

Если вы распознаете текст в приложении реального времени, вы также можете учитывать общие размеры входных изображений. Меньшие изображения могут обрабатываться быстрее, поэтому, чтобы уменьшить задержку, захватывайте изображения с более низким разрешением (с учетом приведенных выше требований к точности) и следите за тем, чтобы текст занимал как можно большую часть изображения. Также см. Советы по повышению производительности в реальном времени .

Распознавать текст на изображениях

Чтобы распознать текст на изображении с помощью встроенной в устройство или облачной модели, запустите распознаватель текста, как описано ниже.

1. Запустите распознаватель текста

Чтобы создать объект FirebaseVisionImage из объекта media.Image , например, при захвате изображения с камеры устройства, передайте объект media.Image и поворот изображения в FirebaseVisionImage.fromMediaImage() .

Если вы используете библиотеку CameraX , классы OnImageCapturedListener и ImageAnalysis.Analyzer вычисляют для вас значение поворота, поэтому вам просто нужно преобразовать поворот в одну из констант ROTATION_ ML Kit перед вызовом FirebaseVisionImage.fromMediaImage() :

Котлин+КТХ

Если вы не используете библиотеку камеры, которая дает вам вращение изображения, вы можете рассчитать его по вращению устройства и ориентации датчика камеры в устройстве:

Котлин+КТХ

Затем передайте объект media.Image и значение поворота в FirebaseVisionImage.fromMediaImage() :

Котлин+КТХ

Котлин+КТХ

Затем создайте объект FirebaseVisionImageMetadata , содержащий высоту, ширину, формат кодирования цвета и поворот изображения:

Котлин+КТХ

Используйте буфер или массив и объект метаданных для создания объекта FirebaseVisionImage :

This page outlines the core tenets of testing Android apps, including the central best practices and their benefits.

Benefits of testing

Testing is an integral part of the app development process. By running tests against your app consistently, you can verify your app's correctness, functional behavior, and usability before you release it publicly.

You can manually test your app by navigating through it. You might use different devices and emulators, change the system language, and try to generate every user error or traverse every user flow.

However, manual testing scales poorly, and it can be easy to overlook regressions in your app's behavior. Automated testing involves using tools that perform tests for you, which is faster, more repeatable, and generally gives you more actionable feedback about your app earlier in the development process.

Types of tests in Android

Mobile applications are complex and must work well in many environments. As such, there are many types of tests.

Subject

For example, there are different types of tests depending on the subject:

  • Functional testing: does my app do what it's supposed to?
  • Performance testing: does it do it quickly and efficiently?
  • Accessibility testing: does it work well with accessibility services?
  • Compatibility testing: does it work well on every device and API level?

Scope

Tests also vary depending on size, or degree of isolation:

  • Unit tests or small tests only verify a very small portion of the app, such as a method or class.
  • End-to-end tests or big tests verify larger parts of the app at the same time, such as a whole screen or user flow.
  • Medium tests are in between and check the integration between two or more units.

There are many ways to classify tests. However, the most important distinction for app developers is where tests run.

Instrumented versus local tests

You can run tests on an Android device or on another computer:

  • Instrumented tests run on an Android device, either physical or emulated. The app is built and installed alongside a test app that injects commands and reads the state. Instrumented tests are usually UI tests, launching an app and then interacting with it.
  • Local tests execute on your development machine or a server, so they're also called host-side tests. They're usually small and fast, isolating the subject under test from the rest of the app.

Not all unit tests are local, and not all end-to-end tests run on a device. For example:

  • Big local test: You can use an Android simulator that runs locally, such as Robolectric.
  • Small instrumented test: You can verify that your code works well with a framework feature, such as a SQLite database. You might run this test on multiple devices to check the integration with multiple versions of SQLite.

Examples

The following snippets demonstrate how to interact with the UI in an instrumented UI test that clicks on an element and verifies that another element is displayed.

Espresso

Compose UI

This snippet shows part of a unit test for a ViewModel (local, host-side test):

Defining a testing strategy

In an ideal world, you would test every line of code in your app on every device that your app is compatible with. Unfortunately, this approach is too slow and costly to be practical.

A good testing strategy finds an appropriate balance between the fidelity of a test, its speed, and its reliability. The similarity of the test environment to a real device determines the test’s fidelity. Higher fidelity tests run on emulated devices or the physical device itself. Lower fidelity tests might run on your local workstation’s JVM. High-fidelity tests are often slower and require more resources, so not every test should be a high-fidelity test.

Flaky tests

Errors occur even in correctly designed and implemented test runs. For example, when running a test on a real device, an automatic update might start in the middle of a test and cause it to fail. Subtle race conditions in your code might occur only a small percentage of the time. Tests that do not pass 100% of the time are flaky.

Testable architecture

With a testable app architecture, the code follows a structure that allows you to easily test different parts of it in isolation. Testable architectures have other advantages, such as better readability, maintainability, scalability, and reusability.

An architecture that is not testable produces the following:

  • Bigger, slower, more flaky tests. Classes that can't be unit-tested might have to be covered by bigger integration tests or UI tests.
  • Fewer opportunities for testing different scenarios. Bigger tests are slower, so testing all possible states of an app might be unrealistic.

To learn more about architecture guidelines, see the guide to app architecture.

Approaches to decoupling

If you can extract part of a function, class, or module from the rest, testing it is easier, and more effective. This practice is known as decoupling, and it is the concept most important to testable architecture.

Common decoupling techniques include the following:

  • Split an app into layers such as Presentation, Domain, and Data. You can also split an app into modules, one per feature.
  • Avoid adding logic to entities that have large dependencies, such as activities and fragments. Use these classes as entry points to the framework and move UI and business logic elsewhere, such as to a Composable, ViewModel, or domain layer.
  • Avoid direct framework dependencies in classes containing business logic. For example, don't use Android Contexts in ViewModels.
  • Make dependencies easy to replace. For example, use interfaces instead of concrete implementations. Use Dependency injection even if you don't use a DI framework.

Next steps

Now that you know why you should test and the two main types of tests, you can read What to test.

Alternatively, if you want to create your first test and learn by doing, check out the Testing codelabs.

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

How to make small numbers on google docs on android

Write enough academic papers and you learn to love footnotes.

They can provide useful context and allow you to show your work, giving the reader access to, and an idea of, all the hours you spent researching and synthesizing complex information.

But you don’t have to be an academic to use footnotes. In general, the most useful footnotes provide not just a notation about where the information in the text came from, but also gives a link for quick access.

If you use Google Docs, footnotes are a built-in feature you can take advantage of right away. Here’s how to add them to any document, whether you’re on the web or using the Google Docs mobile app.

How to add footnotes in Google Docs

1. Click your cursor at the point in the document where you want to add a footnote (this way, a notation will automatically be added to the correct spot).

2. In the toolbar at the top of the document, select “Insert” and then “Footnote.” Alternatively, you can use the shortcut Control-Alt-F on PC, or Command-Option-F on Mac.

3. The document will automatically add a superscript number to where you placed the cursor, and a footnote notation at the bottom of the page, along with a line of delineation.

4. Type out your footnote in the space provided. Format the footnote in the citation style of your choice.

How to add footnotes in Google Docs using the mobile app

If you’re using the Google Docs mobile app for Android or iOS, adding footnotes is just as easy as it is on the web.

The parseInt() function parses a string argument and returns an integer of the specified radix (the base in mathematical numeral systems).

Try it

Syntax

Parameters

The value to parse. If this argument is not a string, then it is converted to one using the ToString abstract operation. Leading whitespace in this argument is ignored.

radix _ Optional _

An integer between 2 and 36 that represents the radix (the base in mathematical numeral systems) of the string . Be careful—this does not default to 10 ! If the radix value is not of the Number type it will be coerced to a Number .

Warning: The description below explains in more detail what happens when radix is not provided.

Return value

An integer parsed from the given string .

  • the radix modulo 2**32 is smaller than 2 or bigger than 36 , or
  • the first non-whitespace character cannot be converted to a number.

Description

The parseInt function converts its first argument to a string, parses that string, then returns an integer or NaN .

If not NaN , the return value will be the integer that is the first argument taken as a number in the specified radix . (For example, a radix of 10 converts from a decimal number, 8 converts from octal, 16 from hexadecimal, and so on.)

For radices above 10 , letters of the English alphabet indicate numerals greater than 9 . For example, for hexadecimal numbers (base 16 ), A through F are used.

If parseInt encounters a character that is not a numeral in the specified radix , it ignores it and all succeeding characters and returns the integer value parsed up to that point. parseInt truncates numbers to integer values. Leading and trailing spaces are allowed.

Because some numbers use the e character in their string representation (e.g. 6.022E23 for 6.022 × 10^23), using parseInt to truncate numbers will produce unexpected results when used on very large or very small numbers. parseInt should not be used as a substitute for Math.floor() .

parseInt understands exactly two signs: + for positive, and – for negative (since ECMAScript 1). It is done as an initial step in the parsing after whitespace is removed. If no signs are found, the algorithm moves to the following step; otherwise, it removes the sign and runs the number-parsing on the rest of the string.

A value passed as the radix argument is coerced to a Number (if necessary), then if the value is 0, NaN or Infinity (undefined is coerced to NaN ), JavaScript assumes the following:

  1. If the input string begins with ” 0x ” or ” 0X ” (a zero, followed by lowercase or uppercase X), radix is assumed to be 16 and the rest of the string is parsed as a hexadecimal number.
  2. If the input string begins with any other value, the radix is 10 (decimal).

Else if the radix value (coerced if necessary) is not in range [2, 36] (inclusive) parseInt returns NaN .

If the first character cannot be converted to a number with the radix in use, parseInt returns NaN .

For arithmetic purposes, the NaN value is not a number in any radix. You can call the isNaN function to determine if the result of parseInt is NaN . If NaN is passed on to arithmetic operations, the operation result will also be NaN .

To convert a number to its string literal in a particular radix, use thatNumber.toString(radix) .

Warning: parseInt converts a BigInt to a Number and loses precision in the process. This is because trailing non-numeric values, including ” n “, are discarded.

Octal interpretations with no radix

Please note that following information doesn’t apply to recent implementations as of 2021.

Although discouraged by ECMAScript 3, many ECMAScript 3 implementations had interpreted a numeric string beginning with a leading 0 as octal. The following might have had an octal result, or it might have had a decimal result.

The ECMAScript 5 specification of the function parseInt no longer allows implementations to treat Strings beginning with a 0 character as octal values. Many implementations have adopted this behavior as of 2021.

A stricter parse function

It is sometimes useful to have a stricter way to parse integers.

Regular expressions can help:

Examples

Using parseInt

The following examples all return 15 :

The following examples all return NaN :

The following examples all return -15 :

The following examples all return 4 .

If the number is greater than 1e+21 (including) or less than 1e-7 (including), it will return 1 . (when using radix 10).

Learn how to display text set apart from your main document in Google Docs with either a table or an inserted drawing.

How to make small numbers on google docs on android
Illustration: Andy Wolber / TechRepublic

There are at least two ways to insert a text box in a Google Doc: Insert | Table or Insert | Drawing. Both methods allow you to add text within a Doc that displays slightly set apart from other text. Both methods also result in a text box that you can copy/paste or select-and-move around within or between documents.

But the different methods—text in a table and text in a drawing—offer distinct formatting and layout capabilities. Here’s how the two text box techniques differ.

How to insert text in a table in Google Docs

If you want to edit a text box in Google Docs on Android or iOS mobile devices or in Google Docs on the web, insert a table. The app offers the ability to edit the contents of a table on any device. While the default table size features three columns and three rows, you may choose to reduce a table to a single cell, with one column and one row, into which you add text.

To add a text box within a single-cell table in a Google Doc on iOS or Android (Figure A):

  1. Tap +.
  2. Tap Table.
  3. To the right of Columns, tap the down arrow to reduce the number of columns to 1.
  4. To the right of Rows, tap the down arrow to reduce the number of rows to 1.
  5. Tap Insert Table.
  6. The system will display a one-cell table into which you can enter text.

Figure A

How to make small numbers on google docs on androidTo insert a text box in a Google Doc on Android or iOS: 1. Tap +. 2. Tap Table. 3. Adjust Columns. 4. Adjust Rows. 5. Tap Insert Table. 6. Enter text in the table cell.

To add a text box within a single-cell table in a Google Doc in desktop Chrome (Figure B):

  1. Place the cursor at the location in the Doc where you want to insert your table.
  2. Select Insert | Table.
  3. Select a single 1×1 cell.
  4. Enter text in the cell.

Figure B

/>In Google Docs on the web, select Insert, then Table, choose a 1×1 cell, then add text.

In every case, you can select any text you enter in the table and adjust the font, font size, style, and color. On mobile devices, select text in the cell, then tap the text format icon near the top of the screen—an A with four horizontal lines to the right of it. In Google Docs in Chrome on the web, select text in the cell, then adjust the format with font controls in the menu bar or with Format | Text Options.

In Google Docs on the web, you may adjust the width of an inserted table by selecting a side of the table, then dragging the side to the left or right. Similarly, you may adjust the height of a table by selecting either the top or bottom of a table and dragging it up or down. You may not reduce the size of the table to be less than a height that displays the contents of the cell.

How to insert text in a drawing in Google Docs

For maximum control over text appearance, use Google Docs on the web to insert a drawing, then place text within the drawing.

To add text within a drawing while in Google Docs on the web:

  1. Select Insert | Drawing | New to create a new drawing in your Google Doc (Figure C).

Figure C

    How to make small numbers on google docs on android

2. While the drawing controls display, select the text box icon, which is indicated by the letter T surrounded by four lines, with small circles at each corner (Figure D).

Figure D

    How to make small numbers on google docs on android

3. Place your cursor within the drawing and click or tap to add the text box.

4. Enter text (Figure E).

5. Select Save And Close when finished.

Figure E

    How to make small numbers on google docs on android

Within a drawing, you may select the text box, then move or resize the text box within the drawing. You also may adjust the font, style, and format of the text with the menu controls at the top of the drawing area. Note: The horizontal three-dot menu offers access to additional settings. Or, select the small dot at the end of the line that extends above a text area, then move your cursor to rotate the text box.

For access to additional text formatting options while in an inserted drawing, choose Actions | Word Art. This inserts larger letters filled with a color of your choice.

To adjust the size of an inserted drawing, select it within your Google Doc on the web. Select any corner of the drawing and then drag it to adjust the drawing size. You also may select In Line, Wrap Text, or Break Text below the drawing to modify how document text flows around the drawing. Similarly, with a drawing selected, choose Edit in the lower left corner to review and/or modify drawing content (Figure F).

Figure F

How to make small numbers on google docs on android

Note that a drawing inserted into a Google Doc will display within Google Docs on Android and iOS devices. However, as of July 2019, you cannot edit the contents of an inserted drawing with the mobile Google Docs apps, although you may copy, move, or delete an inserted drawing.

Your thoughts?

If you use Google Docs, how often do you use either of the above methods to insert a text box into a document? Do you prefer to add text in a table, so you can edit it on any device? Or do you more often insert text in a drawing, for maximum control over the display? Let me know—either in the comments below or on Twitter (@awolber).

How to make small numbers on google docs on android

Google Weekly Newsletter

Learn how to get the most out of Google Docs, Google Cloud Platform, Google Apps, Chrome OS, and all the other Google products used in business environments.