Install miktex for linux

Prerequisites

  • C/C++ compiler

    Building MiKTeX requires a modern C/C++ compiler. The minimum
    required standard versions are C99 and C++14.

  • CMake

    The MiKTeX build is driven by CMake, a tool which will create
    Makefiles suited for the local system. The minimum required CMake
    version is 3.7.0.

  • Various build utilities

    In addition to the compiler and the CMake build system, you will need these utilities:

    All platforms:

    • cat
    • fop
    • sed
    • xsltproc

    Windows only:

    • hhc
    • makehm
    • mc
    • midl
    • mt
    • pandoc
  • Libraries

    On Unix-like platforms (including macOS), you will need development
    packages for these libraries:

    • apr
    • aprutil
    • bzip2
    • cairo
    • expat
    • fontconfig
    • freetype2
    • fribidi
    • gd
    • gmp
    • graphite2
    • harfbuzz-icu
    • hunspell
    • icu
    • jpeg
    • log4cxx
    • lzma
    • mpfr
    • mspack
    • LibreSSL (or OpenSSL)
    • pixman
    • png
    • poppler
    • popt
    • potrace
    • uriparser
    • zzip

    When building UI components with Qt5:

    poppler-qt5

Please consult the platform-specific HOWTO, for more information.

Description

This man page is an adaption of the corresponding TeX Live man page.

METAFONT reads the program in the specified files and outputs
font rasters (in GF format) and font metrics (in
TFM format). The METAFONT language is described
in The METAFONTbook.

Like TeX, METAFONT is normally used with a large body of
precompiled macros, and font generation in particular requires the
support of several macro files. This version of METAFONT looks at
its command line to see what name it was called under. Both inimf
and virmf are links to the miktex-mf executable. When called as
inimf (or when the option is given) it
can be used to precompile macros into a
file. When called as virmf it will use the
plain base. When called under any other name,
METAFONT will use that name as the name of the base to use. For
example, when called as miktex-mf the mf base is
used, which is identical to the plain base.
Other bases than plain are rarely used.

The commands given on the command line to the METAFONT program
are passed to it as the first input line. (But it is often easier to
type extended arguments as the first input line, since shells tend to
gobble up or misinterpret METAFONT’s favorite symbols, like
semicolons, unless you quote them.) As described in The
METAFONTbook, that first line should begin with a
filename, a \controlsequence, or a
.

The normal usage is to say to start processing
. (Or you can
just say miktex-mf and give the other stuff on the next line.) Other
control sequences, such as (for
silent operation) can also appear. The name
will be the “jobname”,
and is used in forming output file names. If METAFONT doesn’t get a
file name in the first line, the job name is
. The default extension,
, can be overridden by specifying an extension
explicitly.

A log of error messages goes into the file
. The
output files are
and
,
where depends on the resolution and
magnification of the font. The mode in this example is shown
generically as , a symbolic term
for which the name of an actual device or, most commonly, the name
(see below) must be substituted. If
the mode is not specified or is not valid, METAFONT will default to
proof mode which produces large character images for use in font
design and refinement. Proof mode can be recognized by the suffix
after the job name. Examples of proof
mode output can be found in Computer Modern
Typefaces (VolumeE of Computers and
Typesetting). The system of magsteps is
identical to the system used by TeX, with values generally in the
range 0.5, 1.0, 2.0, 3.0, 4.0 and 5.0.

Magnification can also be specified not as a magstep but as an
arbitrary value, such as 1.315, to create special character
sizes.

Before font production can begin, it is necessary to set up the
appropriate base files. The minimum set of components for font
production for a given printengine is the
macro file and the local mode_def file. The macros in
can be studied in an appendix to
The METAFONTbook; they were developed by
DonaldE. Knuth, and this file should never be altered except
when it is officially upgraded. Each mode_def specification helps adapt fonts to a
particular printengine. The local ones in use on this

computer should be in .

The response to METAFONT’s
error-recovery prompt causes the default editor to start up at the
current line of the current file. The configuration value can be used to change the
editor used. It may contain a string with
indicating where the file name goes and
indicating where the decimal line number (if any) goes. For example,
an string for
emacs can be set with the command

Настройка установленных программ

Осталось немного настроить программы. Дело в том, что если работать при текущих настройках, то при рисовании графиков через пакет pgfplots памяти, выделяемой для компиляции будет не хватать. Поэтому надо произвести некоторые манипуляции.

Вначале увеличим объем памяти для компиляции отдельного графика.

  1. Нажимаем ПускВыполнить.
  2. Вводим там следующее:

initexmf —edit-config-file=pdflatex

1 initexmf—edit-config-file=pdflatex

После нажатия на Ok мелкнет черное окно и откроется пустой файл pdflatex.ini.

Вводим следующий текст и сохраняем, закрываем:

main_memory=10000000

1 main_memory=10000000

Аналогично вводим команду:

initexmf —dump=pdflatex

1 initexmf—dump=pdflatex

Появится черное окно, в котором начнет идти список файлов. Ничего не делаем и ждем, когда окно само закроется.

Всё. Теперь памяти для компиляции выделено гораздо больше.

Теперь сделаем так, чтобы каждый график компилировался отдельно:

  1. Открываем TeXstudio.
  2. Идем в настройки OptionsConfigure TeXstudio...:

Идем в настройки Commands. И там находим строчку PdfLaTeX:

И меняем содержимое строчки с

pdflatex.exe -synctex=1 -interaction=nonstopmode %.tex

1 pdflatex.exe-synctex=1-interaction=nonstopmode%.tex

на следующую строчку:

pdflatex -shell-escape -interaction=nonstopmode %.tex

1 pdflatex-shell-escape-interaction=nonstopmode%.tex

И нажмите на Ok.

Всё. Теперь при компиляции следующего кода (используется шаблон Harrix LaTeXDocumentTemplate):

\documentclass{report}

\input{packages} %Подключаем модуль пакетов
\input{styles} %Подключаем модуль стилей

\usepgfplotslibrary{external}
\tikzexternalize

\begin{document}

\input{names} %Подключаем модуль переименования некоторых команд

\begin{tikzpicture}
\begin{axis}[view/h=70]
\addplot3
{sin(deg(x+y^2))};
\end{axis}
\end{tikzpicture}

\begin{tikzpicture}
\begin{axis}[view/h=70]
\addplot3
{sin(deg(x+y^2))};
\end{axis}
\end{tikzpicture}

\begin{tikzpicture}
\begin{axis}[view/h=70]
\addplot3
{sin(deg(x+y^2))};
\end{axis}
\end{tikzpicture}

\end{document}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

\documentclassa4paper,12pt{report}

\input{packages}%Подключаеммодульпакетов

\input{styles}%Подключаеммодульстилей
 

\usepgfplotslibrary{external}

\tikzexternalizeprefix=TikzPictures

\begin{document}

\input{names}%Подключаеммодульпереименованиянекоторыхкоманд

\begin{tikzpicture}

\begin{axis}viewh=70

\addplot3

surf,

shader=flat,

samples=50,

domain=-33,ydomain=-22

{sin(deg(x+y^2))};

\end{axis}

\end{tikzpicture}

\begin{tikzpicture}

\begin{axis}viewh=70

\addplot3

surf,

shader=flat,

samples=50,

domain=-33,ydomain=-22

{sin(deg(x+y^2))};

\end{axis}

\end{tikzpicture}

\begin{tikzpicture}

\begin{axis}viewh=70

\addplot3

surf,

shader=flat,

samples=50,

domain=-33,ydomain=-22

{sin(deg(x+y^2))};

\end{axis}

\end{tikzpicture}

\end{document}

Мы не получим ошибку о переполнении памяти и получим следующую картину:

Это достигается тем, что при таких настройках каждый рисунок компилируется отдельно, а потом добавляется в итоговый pdf файл.

Обратите внимание, что разделение на отдельные файлы достигается не только изменением настроек программы, но и строчками:

\usepgfplotslibrary{external}
\tikzexternalize

1
2

\usepgfplotslibrary{external}

\tikzexternalizeprefix=TikzPictures/

На всякий случай перезагрузите компьютер.

В статье Проверка орфографии в TeXstudio рассказано как настроить проверку орфографии.

Description

This man page is an adaption of the corresponding TeX Live man page.

Run the TeX typesetter on ,
usually creating
. If the file
argument has no extension, will be appended
to it. Instead of a filename, a set of TeX commands can be given,
the first of which must start with a backslash. With a
argument TeX uses a different set of
precompiled commands, contained in
; it is
usually better to use the
option
instead.

TeX formats the interspersed text and commands contained in
the named files and outputs a typesetter independent file (called
DVI, which is short for DeVice Independent). TeX’s capabilities
and language are described in The TeXbook.
TeX is normally used with a large body of precompiled macros, and
there are several specific formatting systems, such as LaTeX, which
require the support of several macro files.

This version of TeX looks at its command-line to see what name
it was called under. Both initex and virtex are links to the
miktex-tex executable. When called as initex (or when the
option is given) it can be used to
precompile macros into a file. When called
as virtex it will use the plain format. When called under any other
name, TeX will use that name as the name of the format to use. For
example, when called as miktex-tex the tex
format is used, which is identical to the plain format. The commands
defined by the plain format are documented in The
TeXbook. Other formats that are often available include
latex and amstex.

The non-option command line argiments to the TeX program are
passed to it as the first input line. (But it is often easier to type
extended arguments as the first input line, since shells tend to
gobble up or misinterpret TeX’s favorite symbols, like backslashes,
unless you quote them.) As described in The
TeXbook, that first line should begin with a file name,
a \controlsequence, or a
&.

The normal usage is to say to start processing .
The name paper will be the
“jobname”, and is used in forming output file names. If
TeX doesn’t get a file name in the first line, the job name is
. When looking for a file, TeX looks for
the name with and without the default extension
() appended, unless the name already contains
that extension. If paper is the “jobname”, a log of
error messages, with rather more detail than normally appears on the
screen, will appear in , and the output
file will be in .

This version of TeX will look in the first line of the file
to see if it begins with the magic
sequence . If the first line begins with
, then
TeX will use the named format and transation table
to process the source file. Either
the format name or the specification
may be omitted, but not both. This overrides the format selection
based on the name by which the program is invoked. The
option or the configuration value
controls whether this behaviour is enabled.

The response to TeX’s error-recovery
prompt causes the default editor to start up at the current line of
the current file. The configuration value can be used to change the
editor used. It may contain a string with
indicating where the file name goes and
indicating where the decimal line number (if any) goes. For example,
an string for
emacs can be set with the command

Напоминание при дальнейшей работе с программой

Когда вы будете в дальнейшем работать с tex файлами и будете подключать дополнительные пакеты, например, используя шаблон Harrix LaTeXDocumentTemplate, то при первом подключении пакетов будет вылазить окошко:

Нажимайте Install, чтобы установились пакеты. При этом требуется подключение к интернету. В шаблоне Harrix LaTeXDocumentTemplate используется более 10 пакетов, так что надо будет более 10 раз установить пакеты.

Если пакеты не загружаются всё-таки, то посмотрите эту статью (может у вас такая же ошибка, как у меня была на Windows 8.1): Ошибка при загрузке пакетов в TeXstudio: «File `cmap.sty’ not found».

Вроде всё После такой вот непростой установки у нас есть полноценная связка для работы с Latex файлами.

В статье Harrix LaTeXDocumentTemplate – шаблон документов Latex рассмотрены примеры .tex файлов.

Running CMake

It is recommended that you build outside the source code
directory:

Here you have to specify the path to the MiKTeX source code directory
( in the example above).

CMake for Windows may require a generator specification. If you want
to generate Makefiles for , run this:

Useful build variables

When running CMake to generate the Makefiles, it is possible to set
build variables as follows:

The most useful build variables are:

  • PATH

    The installation directory used by (see below). This
    variable defaults to on Unix-like systems (including
    macOS).

    Suitable prefixes are:

    • Use this prefix, if you want to install MiKTeX just for yourself.
      No administrative privileges are required.

    • Use this prefix, if you want to create a self-contained MiKTeX
      setup which does not conflict with other system packages.

  • Build UI applications (experimental).

Установка MiKTeX

Переходим на сайт http://www.miktex.org/download.
И скачиваем установочный файл (он должен весить больше 100 Мб)

Обратите внимание, что он должен быть под нужную “битность” системы. Нам нужно скачать для 64 бит.

Или скачайте тут (хотя, когда вы будете читать, то на сайте будет более свежая версия):

А теперь немного про установку. Можно запустить установку с параметрами по умолчанию и наслаждаться процессом установки. Например, на основной свой комп я так и сделал. Но иногда у многих при установке вылетает ошибка The thread function could not be started. Причем в интернете много жалоб, но мало помогающих советов. И вроде проблема присутствует именно на Windows 7. Поэтому далее будет описан способ, который у меня не вызывал такую ошибку, а стандартная установка вызывала. Надеюсь, что у вас все будет в порядке. Итак, перейдите к скаченному файлу. У меня это basic-miktex-2.9.5105-x64.exe

Исправление ошибки

  1. Щелкните правой кнопкой по файлу и выберете пункт Исправление неполадок совместимости:

Появится вот это окно:

Отметьте следующие проблемы:

Скажите, что в Windows Vista все запускалось хорошо:

В следующем окне запустите программу для начала установки:

Согласитесь с соглашением:

Программа может быть использована кем угодно:

Путь к программе можете оставить по умолчанию:

Update 2017.02.13. Появился вот такой пункт. Рекомендую включить автоматическую подзагрузку недостающих пакетов:

После этого начнется установка:

Если все прошло хорошо, то установка завершится этим окном:

Этот пункт нужен, если исправляли ошибку под сплойером выше. После этого надо довершить процесс работы по устранению несовместимостей:

Перезагрузите комп.

Для Windows 8.1 некоторые окна отличаются. Вот те скриншоты, которые немного изменились по сравнению с Windows 7:

Sponsors

MiKTeX packaging is sponsored by:

Зоран Филиповић,
Laure Helme-Guizon (€20)
Ludwik Turko,
Mustafa Al-tekreeti,
Pieter van der Walt,
Giacomo Lanza (€50),
Otmar Bauer,
Tian Lin,
Indranil Banik (€20),
André Crespo (€20),
Walter Parry (€10),
Walter Kehowski (€10),
Wan Siti Halimatul Munirah Wan Ahmad (€10),
Mateus Marcuzzo da Rosa (€5),
Joel Tomiche,
Laurent Kegel (€10),
Catherine Rui Jin Findlay (€5),
D. Matthew Burt,
Martin Visby Berthelsen
José A. Jurado (€10),
Wolfgang Konen (TH Köln),
Valentina Baljak,
Debapriya Sengupta,
Stephen Kraemer (€10),
Ramnaresh Yadav (€5),
Faysal Andary (€20),
Marcus V. da S. Simões,
Juan Jose Garcia Ripoll,
Benjamin Herrmann (€10),
Matti Övermark (€10),
Zsombor Cseres-Gergely,
Marcus Simões,
Mathias Herrmann (€10),
Saverio Mori (€10),
Tahir Rehman,
Harald Uhlig (€10),
Joan Vaccaro (€10),
Stephan Lauermann,
Oskar Kowalewski,
Marzio De Biasi,
Rubin Landau,
Gérard Degrève,
Ruth Chabay (€50),
Rolf Niederhauser (€20),
Yves Bouchard (€10),
Sanjay Rawat,
Volker RW Schaa (€50),
Andre Crespo (€10),
Richard Leigh,
Darek Maksimiuk (€10),
Tamas Kiss (€10),
Fabian Ackle (€10),
Patrick Dubus (€50),
Lianbao QIAO (€10),
Stanislav Syekirin (€5),
Fabrizio Iozzi,
Isabelle Jeanne (€10),
Paul Benioff (€10),
Hans-Joachim Müller,
Bernardus Heijdra (€50),
Seungbum Koo,
Guido Wolf Reichert (€20),
Frank Lemmer (€10),
Lian Cheng (€10),
Michael Wagner (€50),
Giacomo Bucci,
Rainer Friedrich,
Maarten Batens,
Magnus Schlösser,
Sebastian Wenz (€20),
Daniel Malguy,
Frank Contrepois (€20),
David Cardon (€10),
Peter Enders,
Alberto Takase (€10),
Manfred Hampe (€20),
Zakaria Kasmi,
Michael Diers,
Jorg Wenninger,

Julius Muschaweck,
Paul Cravens,
Yannic Meyer,
Tammy Kolda (€20),
Andrew Lorenc (€10),
H. Sebastian Buck,
Paul Schweinzer,
Steven Wei Ho, UBC (€5),
Stephen Lawless (€20),
Ken MacLean (€10),
Israel Zadok (€10),
André Crespo (€10),
Pieter Visscher (€10),
李诗旸 (€20),
Rudolf Thiemann (€30),
Marco Guglielmi,
Jean-Jacques Hunsinger (€10),
Vincent Englebert,
Volodymyr Vakhitov (€10),
Charlotte van Tongeren,
Anonymous retired teacher (€100),
Hans J. Micheelsen (€10),
Siyuan Zhang
Duc Khanh To (€10),
Carla Rampichini,
Gerard Degreve,
Jong Sook Lee (€10),
Erick Ogam,
Ariovaldo Garcia,
Claudio Mendoza,
John Wrana,
DP Story (€10),
Anonymous_2 (€10),
Markus Ziegler (€10),
Diego Martin Maza Ozcoidi (€10),
Giovanni Vulpetti,
David Cardon (€10),
Abdelkader Djerad (€10),
Ruben Garrido,
Kurt Speich (€10),
John Considine (€10),
Matthijs Suijlen,
Janice Epstein,
Roi Baer,
Thomas Pohl,
Тимофеев Игорь,
Peeter Luikmel,
Marko Jankovic,
Marc Fargas,
Ian Paczek,
Andrew P. Paplinski (€10),
Robert Shour,
Jan Backhaus,
Peter Zgraggen (€50),
D. S. Jessop (€5),
Brunello Tirozzi,
Arnaldo Armida,
Alexander Liberzon,
Jorge Sánchez Ruiz (€10),
Savan Rangegowda (€10),
Constantine Kakoyiannis,
Paulo Sergio D. Silva (€10),
John Daicopoulos,
René Locher (€10),
Sergio Gonzalez de Castro (€5),
Christoph M. Friedrich (€20),
Elena Ornig,
Olaf Milbredt,
Marvin Kastner,
Richard Leigh (€20),
Yves Bouchard (€10),
Jan-Hendrik Hofmeyr (€20),

Matthias Weidlich,
Ivo Pavlik (€5),
Pieter van der Walt,
Oliver Kopp http://www.jabref.org (€20),
Bikash Kanungo (€10),
Domenico Valori (€10),
Jialin Li,
José Paulo Coelho,
Robin Hill (€30),
Kai Nyman,
Michael Ambrosi,
Johannes Bruski (€50),
CTJ Chan (€10),
Mariusz Żal,
Ugur Duran,
Rainer Thiel (€20),
Stefan Schank,
Zhiyu Wan (€10),
Jim Post (€10),
Hongbo Zhao,
Sascha Eichstädt (€5),
Mattia Bergomi (€5),
George Apostolopoulos (€10),
Luis Cervantes  Garcia Rulfo,
Nicolas Jeker,
Hans-Jörg Schulz,
Alberto Marcone,
Garrett Jordan,
Kamarul Musa (€5),
Pierre Burg (€10),
William McEneaney (€10),
Sinan Sertoz,
Bernd Jürgen Steitz (€10),
国亮 赵 (€5),
Albert Ulmer,
Witold Dobrowolski (€10),
Rodrigo Schulz,
Sachin Garg (€20),
Fausto Granda Gutiérrez,
Rolf Moers,
Avik Dutt,
Richard Leigh (€20),
Anonymous (€10),
Pierre Burg (€10),
Bernhard Maertl,
DR S B JAN (€10),
Ricardo Carlos Martini,
Gert Rubbrecht.
张 慧明,
Robert Lauktien (€5),
Helmut Haberzettl,
Ivor Bowden (€20),
Ibrahim Inal,
David Stang (€50),
Malcolm Field (€10),
Tiago Fardilha (€5),
Peter von Rohr,
John Carter,
Ning Zhao (€20),
Ian Chivers,
Catalin Gherghe (€30),
Roland Koerner,
Paul Block,
Jaroslav Fait,
Tine Ningal (€10),
Klaus Causemann,
Sumanth Swaminathan,
Miroslav Joler (€10),
Francois Meunier (€30),
John Bonnett (€10).

Thank you!

Copying conditions for MiKTeX

To the best of our knowledge, all software in the MiKTeX distribution
is freely redistributable (libre, that is, not necessarily gratis),
within the Free Software Foundation’s definition and the Debian Free
Software Guidelines. Where the two conflict, we generally follow the
FSF. If you find any non-free files included, please contact us
(reference given at the end).

That said, MiKTeX has neither a single copyright holder nor a single
license covering its entire contents, since it is a collection of many
independent packages. Therefore, you may copy, modify, and/or
redistribute software from MiKTeX only if you comply with the
requirements placed thereon by the owners of the respective packages.

To most easily learn these requirements, we suggest checking the
MiKTeX package catalogue (reference given at the end). Of course the
legal statements within the packages themselves are the final
authority.

Guidelines for redistribution

In general, you may redistribute MiKTeX, with or without modification,
for profit or not, according to the usual free software tenets. Here
are some general guidelines for doing this:

  • If you make any changes to the MiKTeX distribution or any package it
    contains, besides complying with any licensing requirements, you
    must prominently mention such changes in your modified distribution
    so that users do not take your work for ours, and know to contact
    you, not us, in case of questions or problems.

  • Especially (but not necessarily) if changes or additions are made,
    we recommend a clearly different title, such as “Your work, based on
    MiKTeX x.y.zzzz”, where x.y.zzzz is the Git tag of the MiKTeX
    version you are using. This credits both our work and yours.

  • You absolutely may not place your own copyright on the entire
    distribution, since it is not your work. Statements such as “all
    rights reserved” and “may not be reproduced” are especially
    reprehensible, since they are antithetical to the free software
    principles under which MiKTeX is produced.

  • You may use any cover or media label designs that you wish. Such
    packaging and marketing details are not covered by any MiKTeX
    license.

  • Finally, we make the following requests (not legal requirements):

    a. Acknowledging that the MiKTeX distribution is developed as a
    joint effort by all TeX user groups, and encouraging the
    user/reader to join their user group of choice, as listed on the
    web page http://www.tug.org/usergroups.html.

    b. Referencing the MiKTeX project page: https://miktex.org/.

    Such information may be placed on the label of your media, your
    cover, and/or in accompanying text (for instance, in the
    acknowledgements section of a book).

Finally, although it is certainly not a requirement, we’d like to
invite any redistributors to make a donation to the project, whether
cash or in-kind, for example via
https://miktex.org/giveback. Thanks.

References

MiKTeX package catalogue: https://miktex.org/packages/

Copying conditions for TeX Live: http://tug.org/texlive/LICENSE.TL

The FSF’s free software definition: https://www.gnu.org/philosophy/free-sw.html

Debian Free Software Guidelines: https://www.debian.org/intro/free

FSF commentary on existing licenses: https://www.gnu.org/licenses/license-list.html

First steps

Initialize the package database

MiKTeX has the ability to install missing packages «on-the-fly». The
package database must have been set up for this to work:

The option is only required if you are building a shared
MiKTeX setup. If you are setting up MiKTeX just for yourself (i.e.,
in your user directory), you have to omit this option.

Please consult the mpm(1) man page, for more information about the
utility.

Enabling «on-the-fly» package installation

In order to enable the automatic package installer, run the MiKTeX
Configuration Utility as follows:

Again, you have to omit , if you intend to use MiKTeX just
for yourself.

The option updates the file name database.

Please consult the initexmf(1) man page, for more information about
the MiKTeX Configuration Utility.

Symbolic links

Most of the MiKTeX executables are prefixed with . For
example, the file name of the pdfTeX executable is .
You can create symbolic links targetting the prefixed
executables:

After running this command, the pdfTeX engine can be invoked as
, provided that did not exist before (use the
option to overwrite existing link names).

The option will also create symbolic links for format
files and scripts. For example, you can invoke (pdfTeX
with format loaded) and (wrapper for the Perl
script ).

Installing basic packages

You use the MiKTeX Package Manager to install basic MiKTeX packages:

In order to make newly installed font map files available for the
various TeX engines, you must run

Finalizing

These are the final steps: update the file name database again and, if
you used the option, remove the directory, which
was created in the previous steps:

Оцените статью
Рейтинг автора
5
Материал подготовил
Андрей Измаилов
Наш эксперт
Написано статей
116
Добавить комментарий