Jump to content

Template:Infobox nutritional value/doc

From Wikipedia, the free encyclopedia


This is the {{infobox nutritional value}} template.

Basic usage

[edit]
{{Infobox nutritional value
| name    = 
| kJ      = 
| carbs   = 
| fat     = 
| protein = 
| note    = 
}}

Parameters

[edit]
  • Required fields: name, kJ, carbs, fat, protein. You must state the units of measurement that are being used, except for kJ, which is in kilojoules (1 Calorie = 1 kcal = 4.2 kJ). The units are usually expressed in grams (g), for example: |fat=3 g.
    • Note: To specify energy in kcal rather than kJ, use kcal instead.
  • Optional fields: image, caption, serving_size, sugars, lactose, satfat, transfat, monofat, polyfat, omega3fat, omega6fat, fibre, starch, water, cholesterol, alcohol and caffeine. Again, you must state the units that are being used.
  • Contributor defined fields: Additional fields can be added using the opt1n and opt1v fields, where n is for name and v is for value. Up to four optional fields are supported, opt1n & opt1v up to opt4n & opt4v.
The following optional variables are converted into percentages of RDA (taken as averages for males and females aged 25–50 years from the USDA 2000 recommendation)
  • Minerals (in mg) - calcium_mg, copper_mg, iron_mg, phosphorus_mg, magnesium_mg, manganese_mg, selenium_ug, sodium_mg, potassium_mg, zinc_mg. Write the number without the unit.
  • Vitamins (in mg, μg, or international units) - vitA_ug, vitA_iu (in IU), vitA_asbeta_iu (in IU), betacarotene_ug (subcategory of vitamin A!), thiamin_mg (vit. B1), riboflavin_mg (vit. B2), niacin_mg (vit. B3), pantothenic_mg (pantothenic acid), vitB6_mg, folate_ug, vitB12_ug, choline_mg, vitC_mg, vitD_ug, vitD_iu (in IU), vitE_mg, vitE_iu, vitK_ug. Write the number without the unit.
Other optional variables and flags
  • note - a convenient way to indicate serving sizes or edible parts, e.g., 1 banana is 100 to 150 g or other information.
  • source - sets the data source of the information used in the template.
    • source_usda - a 1 in this field will automatically set the source as the USDA database.
  • noRDA - optional suppression of RDA message: noRDA=1
  • float - |float=left will cause the table to appear on the left side of the article, |float=center for centered, and |float=none to place it on the left, but without wrapping text around it. The default is |float=right.
Additional notes
  • According to SI rules, there should be a non-breaking space between the number and the unit: "14 g" (which displays as "14 g") and not "14g".
  • Don't specify numbers to too many decimal places.
  • Splitting up components that are present in trace amounts is not very meaningful (e.g. 1.5 g fats of which 0.5 g unsaturated).
  • Only vitamins and minerals for which this product is considered to be a good source should be included, in order to prevent clogging up the article with a huge table.

Nutritional values can be found in the USDA's FoodData Central (formerly National Nutrient Database). Note that fibres are counted as carbohydrates. Note also that the calculated energy value given in the USDA database sometimes includes 4 kcal per gram of fibre, which is not really correct, and it would be better for Wikipedia articles to exclude the fibre from the energy value. (The USDA documentation says, "For multi-ingredient processed foods, kilocalorie values (source codes 8 or 9; ...) generally reflect industry practices (as permitted by NLEA) of calculating kilocalories as 4, 4, or 9 kilocalories per gram of protein, carbohydrate, and fat, respectively, or as 4, 4, or 9 kilocalories per gram of protein, carbohydrate minus insoluble fiber, and fat. The latter method is often used for high-fiber foods.")

Full syntax

[edit]
{{Infobox nutritional value
| name            = 
| image           = <!-- Filename is enough -->
| image_size      = <!-- Defaults to 235px -->
| image_alt       = 
| caption         = 
| serving_size    = 
| kJ              = <!-- or | kcal = -->
| carbs           = 
| starch          = 
| sugars          = 
| sucrose         = 
| glucose         = <!-- or | dextrose = -->
| fructose        = 
| lactose         = 
| fibre           = <!-- or |fiber= -->
| fat             = 
| satfat          = 
| transfat        = 
| monofat         = 
| polyfat         = 
| omega3fat       = 
| omega6fat       = 
| protein         = 
| tryptophan      = 
| threonine       = 
| isoleucine      = 
| leucine         = 
| lysine          = 
| methionine      = 
| cystine         = 
| phenylalanine   = 
| tyrosine        = 
| valine          = 
| arginine        = 
| histidine       = 
| alanine         = 
| aspartic acid   = 
| glutamic acid   = 
| glycine         = 
| proline         = 
| serine          = 
| hydroxyproline  = 
| water           = 
| cholesterol     = 
| alcohol         = 
| caffeine        = 
| vitA_iu         = <!-- or | vitA_ug = -->
| betacarotene_ug = 
| lutein_ug       = 
| thiamin_mg      = <!-- or | thiamin_ug = -->
| riboflavin_mg   = <!-- or | riboflavin_ug = -->
| niacin_mg       = 
| pantothenic_mg  = 
| vitB6_mg        = <!-- or | vitB6_ug = -->
| folate_ug       = 
| vitB12_ug       = 
| choline_mg      = 
| vitC_mg         = 
| vitD_iu         = <!-- or | vitD_ug = -->
| vitE_mg         = 
| vitK_ug         = 
| calcium_mg      = 
| copper_mg       = 
| iron_mg         = 
| magnesium_mg    = 
| manganese_mg    = 
| phosphorus_mg   = 
| potassium_mg    = 
| selenium_ug     = 
| sodium_mg       = 
| zinc_mg         = 
| opt1n           = 
| opt1v           = 
| opt2n           = 
| opt2v           = 
| opt3n           = 
| opt3v           = 
| opt4n           = 
| opt4v           = 
| note            = 
| source          = 
| source_usda     = 
| noRDA           = 
| float           = 
}}

Examples

[edit]
Foonuts
Nutritional value per 100 g (3.5 oz)
Energy2,450 kJ (590 kcal)
22 g
Starch8 g
Sugars 5 g
1 g
Dietary fibre9 g
50 g
Saturated7 g
Trans3 g
Monounsaturated25 g
Polyunsaturated16 g
1 g
2 g
24 g
Tryptophan70 mg
Threonine490 mg
Isoleucine570 mg
Leucine920 mg
Lysine690 mg
Methionine200 mg
Cystine230 mg
Phenylalanine610 mg
Tyrosine380 mg
Valine750 mg
Arginine890 mg
Histidine250 mg
Alanine640 mg
Aspartic acid2.850 g
Glutamic acid2.260 g
Glycine780 mg
Proline2.310 g
Serine610 mg
Hydroxyproline0 mg
Vitamins and minerals
VitaminsQuantity
%DV
Vitamin A equiv.
1%
12 μg
1%
120 μg
Thiamine (B1)
83%
1 mg
Riboflavin (B2)
154%
2 mg
Niacin (B3)
3%
0.5 mg
Pantothenic acid (B5)
2%
0.1 mg
Vitamin B6
59%
1 mg
Folate (B9)
0%
1.5 μg
Vitamin B12
21%
0.5 μg
Vitamin C
22%
20 mg
Vitamin D
50%
10 μg
Vitamin E
33%
5 mg
Vitamin K
8%
10 μg
MineralsQuantity
%DV
Calcium
15%
200 mg
Copper
100%
0.9 mg
Iron
28%
5 mg
Magnesium
0%
1.2 mg
Manganese
52%
1.2 mg
Phosphorus
4%
50 mg
Potassium
3%
80 mg
Selenium
42%
23 μg
Sodium
2%
40 mg
Zinc
4%
0.4 mg
Other constituentsQuantity
Water5 g
Alcohol (ethanol)1 g
Caffeine20 mg
Cholesterol2 mg

Footnote text here
Percentages estimated using US recommendations for adults,[1] except for potassium, which is estimated based on expert recommendation from the National Academies.[2]
{{Infobox nutritional value
| name = Foonuts
| kJ = 2450
| carbs = 22 g
| starch = 8 g
| sugars = 5 g
| lactose = 1 g
| fibre = 9 g
| fat = 50 g
| satfat = 7 g
| transfat = 3 g
| monofat = 25 g
| polyfat = 16 g
| omega3fat = 1 g
| omega6fat = 2 g
| protein = 24 g
| tryptophan = 70 mg
| threonine = 490 mg
| isoleucine = 570 mg
| leucine = 920 mg
| lysine = 690 mg
| methionine = 200 mg
| cystine = 230 mg
| phenylalanine = 610 mg
| tyrosine = 380 mg
| valine = 750 mg
| arginine = 890 mg
| histidine = 250 mg
| alanine = 640 mg
| aspartic acid = 2.850 g
| glutamic acid = 2.260 g
| glycine = 780 mg
| proline = 2.310 g
| serine = 610 mg
| hydroxyproline = 0 mg
| water = 5 g
| cholesterol = 2 mg
| alcohol = 1 g
| caffeine = 20 mg
| vitA_ug = 12
| betacarotene_ug = 120
| thiamin_mg = 1
| riboflavin_mg = 2
| niacin_mg = 0.5
| pantothenic_mg = 0.1
| vitB6_mg = 1
| folate_ug = 1.5
| vitB12_ug = 0.5
| vitC_mg = 20
| vitD_ug = 10
| vitE_mg = 5
| vitK_ug = 10
| calcium_mg    = 200
| copper_mg     = 0.9
| iron_mg       = 5
| magnesium_mg  = 1.2
| manganese_mg  = 1.2
| phosphorus_mg = 50
| potassium_mg  = 80
| sodium_mg     = 40
| selenium_ug   = 23
| zinc_mg       = 0.4
| note = Footnote text here
| source_usda = 1
| float =
}}

will generate →

Translations

[edit]

If you translate this template for use in other language Wikipedias, you could consider keeping the English variable names, so that you can simply copy/paste existing tables from English to your language (and back). Or you could make two versions, one using native-language variable names, and the other using the English names.

TemplateData

[edit]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Infobox nutritional value in articles based on its TemplateData.

TemplateData for Infobox nutritional value

A template (that is US-centric) for recording the nutritional value of foods. SI units must be inserted manually with a {{nbsp}} between the unit and the value. (g = grams, μg = micrograms, IU = international units). Percentage daily value (%DV) are roughly. estimated using US recommendations for adults from the USDA.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Namename

The name of the food

Unknownrequired
Kilojoules (kJ)kJ

no description

Unknownsuggested
Carbohydratescarbs

Total carbohydrates per 100 grams of food. State the unit being used (usually g for grams).

Unknownsuggested
Fatsfat

Total fat per 100 grams of food. State the unit being used (usually g for grams).

Unknownsuggested
Proteinprotein

Total protein per 100 grams of food. State the unit being used.

Unknownsuggested
notenote

Any explanatory notes, e.g., which parts of the vegetable are edible

Unknownoptional
floatfloat

no description

Unknownoptional
imageimage

no description

Unknownoptional
image_sizeimage_size

no description

Unknownoptional
image_altimage_alt

no description

Unknownoptional
captioncaption

no description

Unknownoptional
Serving sizeserving_size

Defaults to "Nutritional value per 100 g” and shows the equivalent, can show something else

Unknownoptional
Kilocalories (kcal)kcal

An alternative to kilojoules, if preferred

Unknownsuggested
starchstarch

no description

Unknownoptional
sugarssugars

no description

Unknownoptional
lactoselactose

no description

Unknownoptional
fiberfiber

no description

Unknownoptional
fibrefibre

no description

Unknownoptional
satfatsatfat

no description

Unknownoptional
transfattransfat

no description

Unknownoptional
monofatmonofat

no description

Unknownoptional
polyfatpolyfat

no description

Unknownoptional
omega3fatomega3fat

no description

Unknownoptional
omega6fatomega6fat

no description

Unknownoptional
tryptophantryptophan

no description

Unknownoptional
threoninethreonine

no description

Unknownoptional
isoleucineisoleucine

no description

Unknownoptional
leucineleucine

no description

Unknownoptional
lysinelysine

no description

Unknownoptional
methioninemethionine

no description

Unknownoptional
cystinecystine

no description

Unknownoptional
phenylalaninephenylalanine

no description

Unknownoptional
tyrosinetyrosine

no description

Unknownoptional
valinevaline

no description

Unknownoptional
argininearginine

no description

Unknownoptional
histidinehistidine

no description

Unknownoptional
alaninealanine

no description

Unknownoptional
aspartic acidaspartic acid

no description

Unknownoptional
glutamic acidglutamic acid

no description

Unknownoptional
glycineglycine

no description

Unknownoptional
prolineproline

no description

Unknownoptional
serineserine

no description

Unknownoptional
hydroxyprolinehydroxyproline

no description

Unknownoptional
vitA_ugvitA_ug

no description

Unknownoptional
betacarotene_ugbetacarotene_ug

no description

Unknownoptional
lutein_uglutein_ug

no description

Unknownoptional
vitA_iuvitA_iu

no description

Unknownoptional
vitA_asbeta_iuvitA_asbeta_iu

no description

Unknownoptional
thiamin_mgthiamin_mg

no description

Unknownoptional
riboflavin_mgriboflavin_mg

no description

Unknownoptional
niacin_mgniacin_mg

no description

Unknownoptional
pantothenic_mgpantothenic_mg

no description

Unknownoptional
vitB6_mgvitB6_mg

no description

Unknownoptional
folate_ugfolate_ug

no description

Unknownoptional
vitB12_ugvitB12_ug

no description

Unknownoptional
choline_mgcholine_mg

no description

Unknownoptional
vitC_mgvitC_mg

no description

Unknownoptional
vitD_ugvitD_ug

no description

Unknownoptional
vitD_iuvitD_iu

no description

Unknownoptional
vitE_mgvitE_mg

no description

Unknownoptional
vitE_iuvitE_iu

no description

Unknownoptional
vitK_ugvitK_ug

no description

Unknownoptional
calcium_mgcalcium_mg

no description

Unknownoptional
iron_mgiron_mg

no description

Unknownoptional
magnesium_mgmagnesium_mg

no description

Unknownoptional
manganese_mgmanganese_mg

no description

Unknownoptional
phosphorus_mgphosphorus_mg

no description

Unknownoptional
potassium_mgpotassium_mg

no description

Unknownoptional
sodium_mgsodium_mg

no description

Unknownoptional
zinc_mgzinc_mg

no description

Unknownoptional
copper_mgcopper_mg

no description

Unknownoptional
selenium_ugselenium_ug

no description

Unknownoptional
Waterwater

no description

Unknownoptional
Alcoholalcohol

no description

Unknownoptional
Caffeinecaffeine

no description

Unknownoptional
Cholesterolcholesterol

no description

Unknownoptional
opt1vopt1v

no description

Unknownoptional
opt2vopt2v

no description

Unknownoptional
opt3vopt3v

no description

Unknownoptional
opt4vopt4v

no description

Unknownoptional
opt1nopt1n

no description

Unknownoptional
opt2nopt2n

no description

Unknownoptional
opt3nopt3n

no description

Unknownoptional
opt4nopt4n

no description

Unknownoptional
notesnotes

no description

Unknownoptional
belowstylebelowstyle

no description

Unknownoptional
Suppress RDA messagenoRDA

Suppress RDA message at the bottom

Unknownoptional
Sourcesource

Link or ref in wiki text for source of data

Unknownsuggested
thiamin_ugthiamin_ug

no description

Unknownoptional
riboflavin_ugriboflavin_ug

no description

Unknownoptional
vitB6_ugvitB6_ug

no description

Unknownoptional

Tracking categories

[edit]

References

[edit]
  1. ^ United States Food and Drug Administration (2024). "Daily Value on the Nutrition and Supplement Facts Labels". FDA. Archived from the original on 2024-03-27. Retrieved 2024-03-28.
  2. ^ National Academies of Sciences, Engineering, and Medicine; Health and Medicine Division; Food and Nutrition Board; Committee to Review the Dietary Reference Intakes for Sodium and Potassium (2019). Oria, Maria; Harrison, Meghan; Stallings, Virginia A. (eds.). Dietary Reference Intakes for Sodium and Potassium. The National Academies Collection: Reports funded by National Institutes of Health. Washington, DC: National Academies Press (US). ISBN 978-0-309-48834-1. PMID 30844154. Archived from the original on 2024-05-09. Retrieved 2024-06-21.