.STY

Файл STY

LaTeX Style / Package File
Задать вопрос
БЫСТРЫЙ ОТВЕТ

A STY file is a LaTeX package (style) file - plain-text TeX macros that add features or formatting to a LaTeX document, loaded with \usepackage{name}. Any text editor opens it to read or edit the code; to use it, place it next to your .tex file and compile with pdflatex. Most common packages already ship with TeX Live and MiKTeX.

Разработчик: LaTeX Project (Leslie Lamport; built on Donald Knuth's TeX) Категория: Файлы разработчика Открыть стандартное MIME: text/x-tex
ОТКРЫВАЕТСЯ НА Windows macOS Linux Web
Связанные: .DO · .MD · .HEX · .XSD

На этой странице

Проиндексировано расширений: 19k+
Последняя проверка: Aug 20, 2026

Не знаете, что это за файл?

Перетащите любой файл в наш идентификатор - мы прочитаем первые байты, чтобы определить формат.

Идентифицировать файл

Что такое формат файла STY?

A .sty file is a plain-text file that contains style definitions used for formatting LaTeX documents. Commands are introduced with a backslash (` \ ), while comments are marked with a percentage sign (%). .sty files are loaded by .tex or .ltx documents via the \usepackage{name}` command to apply their formatting to the given document.

.sty files can be reused across any number of documents. Style definitions can also be set directly in a document's preamble; packaging them in .sty form makes them shareable. A modern .sty opens with a \ProvidesPackage declaration that stamps the package name, date, and version.

LaTeX is very popular in scientific and academic publishing, where .sty files are commonly used to standardize document layouts and formatting. Packages are distributed through CTAN and bundled in TeX distributions such as TeX Live and MiKTeX. Many .sty files are generated from a .dtx source using a .ins script; the .cls format serves the same role for overall document structure.

Безопасность и защита

РИСК: MEDIUM

A .sty is executable TeX code that runs when LaTeX compiles your document. TeX can read and (with \write18/shell-escape enabled) even run external commands, so a malicious style file could in principle write files or execute programs during compilation. Most distributions ship with shell-escape restricted by default, which limits this. Treat .sty files from unknown sources like any downloaded code: prefer packages from CTAN/your distribution, read an unfamiliar one before compiling with it, and don't enable unrestricted shell-escape for files you don't trust. Viewing a .sty in a text editor is harmless.

Детали формата

в двух словах
ПОЛНОЕ НАЗВАНИЕLaTeX Style / Package Fileтакже известен как LaTeX style file, LaTeX package
РАЗРАБОТЧИКLaTeX Project (Leslie Lamport; built on Donald Knuth's TeX)с 1985 (LaTeX); package mechanism formalised in LaTeX2e, 1994
MIME-ТИПtext/x-tex
ТИПPlain-text LaTeX/TeX macro source defining a package or style
СТАНДАРТОткрытый · без роялти
СВЯЗАННЫЕ.do.md.hex.xsd

Программы, открывающие файлы STY

Windows4 apps
MiKTeX Открытый код The TeX distribution that supplies thousands of .sty files; install missing ones via its Package Manager. \usepackage finds them automatically.
Texmaker Открытый код Open and edit the .sty as source; compile the parent .tex with the bundled tools.
TeXstudio Открытый код Open the .sty to read/edit it. To use it: keep it beside your .tex or in a local texmf tree, then compile. (Pairs with a MiKTeX/TeX Live backend.)
Notepad / VS Code Открытый код Open as plain text to read or quickly edit the macros; no TeX install needed just to view.
macOS3 apps
TeXworks Открытый код Open and edit the style file; compile documents that \usepackage it.
TeX Live / MacTeX Открытый код Install MacTeX (TeX Live for macOS); it ships the standard packages and finds new .sty in the local texmf tree.
TeXShop Открытый код Open the .sty in this macOS LaTeX editor to read/edit; typesets via MacTeX.
Linux3 apps
TeX Live Открытый код Install via your distro or upstream; 'tlmgr install <pkg>' adds missing .sty files, found automatically by \usepackage.
Texmaker / TeXstudio Открытый код Open the .sty to edit; build the parent document with the TeX Live backend.
Any text editor (gedit, vim, Emacs) Открытый код Open as plain text; AUCTeX (Emacs) gives full LaTeX editing support.
Web1 app
Overleaf Freemium Upload the .sty into your project alongside the .tex; \usepackage it and compile in the browser - no local install.

Технические подробности

глубокая спецификация
File typePlain-text TeX macro source file
MIME typetext/x-tex (also accepted: application/x-tex, text/plain)
Character encodingASCII or UTF-8; UTF-8 is the default input encoding since the LaTeX 2018 release
Load command\usepackage{name} in the document preamble; options passed as \usepackage[opt1,opt2]{name}
Package self-declaration\ProvidesPackage{name}[YYYY/MM/DD vX.Y description] stamps identity and version in the compilation log
Option handling\DeclareOption{key}{code} defines accepted options; \ProcessOptions executes those chosen by the user
Dependency declaration\RequirePackage{name}[min-date] declares dependencies, equivalent to \usepackage but safe inside package code
Binary signatureNone - plain text; modern files conventionally start with % comment lines followed by \NeedsTeXFormat{LaTeX2e}
Typical file size1 KB - 200 KB depending on package complexity
Companion format.cls document class - same TeX macro language but loaded with \documentclass and governs overall document structure
Source formatMany .sty files are extracted from a .dtx documented source file using a .ins install driver script
DistributionPublished on CTAN; bundled in TeX Live (cross-platform) and MiKTeX (Windows)
Platform supportAny operating system with a TeX distribution installed: Windows, macOS, Linux, BSD
Syntax markersBackslash (\) introduces every command; percent (%) starts a comment extending to end of line
Modern programming layerPackages may use the LaTeX3 / expl3 layer (\ExplSyntaxOn...\ExplSyntaxOff) for structured macro programming
Выпущен1985 (LaTeX); package mechanism formalised in LaTeX2e, 1994
Последняя версияN/A (no version number on the format itself; tracked per package and by LaTeX2e/LaTeX3 releases)
Открыть стандартноеДа · без роялти
Спецификацияwww.latex-project.org

Конвертации STY

Вопросы и ответы сообщества

спрошено пользователями
Задать быстрый вопрос
Получите помощь от людей, работающих с файлами STY. Будьте конкретны - укажите вашу систему и версию ПО.
Аккаунт не нужен · ответы обычно в течение дня

Вопросов пока нет - станьте первым, кто спросит о файлах STY.

Часто задаваемые вопросы

How do I install a .sty file for LaTeX?
Simplest: put the .sty in the same folder as your .tex and compile - LaTeX finds it. For permanent use, place it in your local texmf tree (e.g. ~/texmf/tex/latex/<name>/) and run 'texhash'/'mktexlsr', or install the package via MiKTeX Package Manager or 'tlmgr'.
What is a .sty file used for?
It's a LaTeX package: reusable macros that add features or formatting (math, graphics, hyperlinks, page layout). You load it in your document with \usepackage{name}.
What's the difference between a .sty and a .cls file?
Both are LaTeX macro source. A .sty (package) is loaded with \usepackage and adds features to any document; a .cls (class) is loaded with \documentclass and defines the whole document type (article, report, a journal template).
How do I open a .sty file?
It's plain text - open it in any editor (Notepad++, VS Code, vim) or a LaTeX IDE (TeXstudio, TeXmaker, Overleaf). You read/edit the macros there; you don't 'run' it on its own.
LaTeX says 'File name.sty not found' - what do I do?
The package isn't where LaTeX searches. Install it (MiKTeX Package Manager, or 'tlmgr install name'), or drop the .sty next to your .tex. On MiKTeX, on-the-fly install usually offers to fetch it automatically.
Can I convert a .sty to PDF?
No - it's not a document. Compile a small .tex that uses the package to PDF instead, or read the package's own documentation PDF (built from its .dtx).

Ссылки

1The LaTeX Project - Documentationwww.latex-project.org
2CTAN - Comprehensive TeX Archive Networkctan.org

Узнать больше

по всей базе данных

Популярные расширения на этой неделе

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.PARTPartial Download File
4.DATProgram Data File (generic)
5.EXEWindows Executable (Portable Executable)
6.NOMEDIAAndroid No-Media Marker File
7.RPMSGRestricted Permission Message
8.MDMarkdown Document
9.TMPTemporary File
10.BINCD/DVD Disc Image (BIN/CUE)

Похожие расширения

.DOStata Do-File
.MDMarkdown Document
.HEXIntel HEX File
.XSDXML Schema Definition
.MAPSource Map (JavaScript / CSS)
.CONFIGConfiguration File

Бесплатные инструменты для файлов

Идентификатор файлов и конвертер изображений в браузере - все работает на вашем устройстве.

Открыть инструменты

Обзор расширений файлов A-Z