How to use the command 'tlmgr info' (with examples)
The ’tlmgr info’ command is used to show information about TeX Live packages. It provides a way to get details about available packages, collections, schemes, and installed packages. This article will showcase several use cases of the ’tlmgr info’ command and explain how to use them effectively.
Use case 1: List all available TeX Live packages
Code:
tlmgr info
Motivation: This use case is useful when you want to browse through the complete list of available TeX Live packages. It helps you identify packages that you might need for your TeX projects.
Explanation: The command ’tlmgr info’ without any additional arguments lists all available TeX Live packages. It prefixes installed packages with ‘i’.
Example output:
i abntex2: LaTeX class for writing Brazilian ABNT conforming documents.
i achemso: Support for American Chemical Society journal submissions.
i acro: Typeset acronyms.
...
Use case 2: List all available collections
Code:
tlmgr info collections
Motivation: Collections in TeX Live are groups of related packages. This use case is helpful when you want to see the available collections and their contents. It allows you to easily identify collections that might be useful for your TeX projects.
Explanation: By providing the argument ‘collections’ to the ’tlmgr info’ command, you can list all available collections.
Example output:
abntex2
collection-basic
collection-bibtexextra
collection-binextra
...
Use case 3: List all available schemes
Code:
tlmgr info scheme
Motivation: Schemes in TeX Live are predefined sets of collections that fulfill specific purposes. If you are unsure which scheme is suitable for your needs, you can use this use case to list all available schemes and decide accordingly.
Explanation: By using the argument ‘scheme’, you can list all available schemes using the ’tlmgr info’ command.
Example output:
scheme-basic
scheme-conTeXt
scheme-context-minimals
scheme-full
...
Use case 4: Show information about a specific package
Code:
tlmgr info package
Motivation: When you need detailed information about a specific package, you can use this use case to retrieve the desired information. It helps you check the package’s version, dependencies, and additional details.
Explanation: Replace ‘package’ in the command with the name of the package you want to get information about. This will show all available information about that specific package.
Example output:
Package: achemso
Version: 3.15
Category: Package/latex/achemso
...
Use case 5: List all files contained in a specific package
Code:
tlmgr info package --list
Motivation: If you need to know which files are included in a specific package, you can use this use case. It allows you to get a comprehensive list of all files contained in the package.
Explanation: Replace ‘package’ in the command with the name of the package you want to get the file list for. Adding the ‘–list’ flag after the package name will list all the files contained in that package.
Example output:
...
doc/latex/biblatex-abnt/biblatex-abnt.pdf
doc/latex/biblatex-abnt/README.md
...
Use case 6: List all installed packages
Code:
tlmgr info --only-installed
Motivation: When you want to list all installed packages in TeX Live, you can use this use case. It provides a convenient way to see what packages are currently installed on your system.
Explanation: By using the ‘–only-installed’ flag, the ’tlmgr info’ command will only display information about the installed packages.
Example output:
i abntex2: LaTeX class for writing Brazilian ABNT conforming documents.
i achemso: Support for American Chemical Society journal submissions.
...
Use case 7: Show only specific information about a package
Code:
tlmgr info package --data "name,category,installed,size,depends,..."
Motivation: If you are only interested in specific information about a package, you can use this use case. It allows you to customize the output and display only the information you need.
Explanation: Replace ‘package’ in the command with the name of the package you want to retrieve specific information about. After the package name, use the ‘–data’ flag followed by a comma-separated list of the desired information fields.
Example output:
Name: achemso
Category: Package/latex/achemso
Installed: Yes
Size: 939k
...
Use case 8: Print all available packages as JSON encoded array
Code:
tlmgr info --json
Motivation: When you want to programmatically process the list of available packages, using JSON format can be beneficial. This use case allows you to list all available packages in TeX Live as a JSON encoded array.
Explanation: By providing the ‘–json’ flag, the ’tlmgr info’ command will print the available packages in JSON format.
Example output:
[
{
"Package": "abntex2",
"Version": "3.9.6",
"Category": "Package/latex/abntex2",
...
},
{
"Package": "achemso",
"Version": "3.15",
"Category": "Package/latex/achemso",
...
},
...
]
Conclusion:
The ’tlmgr info’ command provides a wealth of information about TeX Live packages. By utilizing different arguments and flags, you can list available packages, collections, and schemes, as well as retrieve package-specific details and manipulate the output to suit your needs. Understanding the various use cases showcased in this article will help you effectively use the ’tlmgr info’ command in your TeX projects.