From d5497910b09cbaf7364d0cdf968d0d242eecb931 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 2 Jan 2021 22:02:58 +0000 Subject: latex-doc-ptr (2jan21) git-svn-id: svn://tug.org/texlive/trunk@57293 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/latex-doc-ptr/LICENSE | 5 + Master/texmf-dist/doc/latex/latex-doc-ptr/Makefile | 70 +- Master/texmf-dist/doc/latex/latex-doc-ptr/README | 36 +- Master/texmf-dist/doc/latex/latex-doc-ptr/dash.sty | 11 + .../doc/latex/latex-doc-ptr/latex-doc-ptr.css | 148 ++++ .../doc/latex/latex-doc-ptr/latex-doc-ptr.html | 779 +++++++++++++++++++++ .../doc/latex/latex-doc-ptr/latex-doc-ptr.pdf | Bin 153456 -> 169317 bytes .../doc/latex/latex-doc-ptr/latex-doc-ptr.sty | 263 +++++-- .../doc/latex/latex-doc-ptr/latex-doc-ptr.tex | 637 +++++++++++------ .../doc/latex/latex-doc-ptr/massage_html.awk | 27 + 10 files changed, 1699 insertions(+), 277 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/latex-doc-ptr/LICENSE create mode 100644 Master/texmf-dist/doc/latex/latex-doc-ptr/dash.sty create mode 100644 Master/texmf-dist/doc/latex/latex-doc-ptr/latex-doc-ptr.css create mode 100644 Master/texmf-dist/doc/latex/latex-doc-ptr/latex-doc-ptr.html create mode 100644 Master/texmf-dist/doc/latex/latex-doc-ptr/massage_html.awk (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/latex-doc-ptr/LICENSE b/Master/texmf-dist/doc/latex/latex-doc-ptr/LICENSE new file mode 100644 index 00000000000..060b41738e7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/latex-doc-ptr/LICENSE @@ -0,0 +1,5 @@ +LICENSE + +This material, called latex-doc-ptr, is Public Domain. + +2020-Dec-31 Jim Hefferon, Karl Berry \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/latex-doc-ptr/Makefile b/Master/texmf-dist/doc/latex/latex-doc-ptr/Makefile index 3c72b22cce0..14eb181f4ba 100644 --- a/Master/texmf-dist/doc/latex/latex-doc-ptr/Makefile +++ b/Master/texmf-dist/doc/latex/latex-doc-ptr/Makefile @@ -1,2 +1,70 @@ -latex-doc-ptr.pdf: latex-doc-ptr.tex latex-doc-ptr.sty +# Makefile +# For latex-doc-ptr. +# 2020-Dec-31 Jim Hefferon + +latex-doc-ptr.pdf: latex-doc-ptr.tex latex-doc-ptr.sty dash.sty pdflatex --file-line-error --interaction=nonstopmode $< + +latex-doc-ptr.html: latex-doc-ptr.tex latex-doc-ptr.sty dash.sty + make4ht latex-doc-ptr.tex + cp latex-doc-ptr.css.bak latex-doc-ptr.css + # Get subsections headers + awk -f massage_html.awk latex-doc-ptr-massaged.html + # Correct lost ligatures (all very fragile, but I can't grok tex4ht) + sed -e 's/>\Wname\WnameIf you have trouble finding something/' \ + -e 's/any document containing signi\W*cant amounts of mathematics/any document containing significant amounts of mathematics/' \ + -e 's/control \W*oating environments/control floating environments/' \ + -e 's/override automatic \W*oat placement/override automatic float placement/' \ + -e 's/cause issues \W what if/cause issues\ \— what if/' \ + -e 's/left? \W but it/left?\ \— but it/' \ + -e 's/and \W*le paths that can break/and file paths that can break/' \ + -e 's/The \W*rst/The first/' \ + -e 's/which lets you de\W*ne your own/which lets you define your own/' \ + -e 's/scienti\W*c units,/scientific units,/' \ + -e 's/often want to generate \W*ller text./often want to generate filler text./' \ + -e 's/give the \W*le name without/give the file name without/' \ + -e 's/lists of \W*gures/lists of figures/' \ + -e 's/to an external \W*le/to an external file/' \ + -e 's/via a completely di\W*erent/via a completely different/' \ + -e 's/as \W*la-tech\W* or \W*lay-tech,\W*/as \'la-tech\' or \'lay-tech\', /' \ + -e 's/as as \Wla-tech\W or \Wlay-tech,\W apos;la-techas \Wla-tech\W or \Wlay-tech,\W apos; or as \Wla-tech\W or \Wlay-tech,\W apos;lay-techas \Wla-tech\W or \Wlay-tech,\W apos;,/as \'la-tech' or \'lay-tech\', /' \ + -e 's/We prefer the \Wrst,/We prefer the first,/' \ + -e 's/the \Wrst syllable./the first syllable./' \ + < latex-doc-ptr-massaged.html > latex-doc-ptr-massaged-ligs.html + # Correct lost paragraphs inside subsections + sed -e 's/Many people use/

&/' \ + -e 's/If you have trouble/

&/' \ + -e 's/As referred to above,/

&/' \ + -e 's/Also, include/

&/' \ + -e 's/Enhance captions/

&/' \ + -e 's/Get hyperlinks/

&/' \ + -e 's/Inside verbatim/

&/' \ + -e 's/If you use Python,/

&/' \ + -e 's/Make boxes that/

&/' \ + -e 's/Use &/' \ + -e 's/Finally, when/

&/' \ + -e 's/To include/

&/' \ + -e 's/In your plots/

&/' \ + -e 's/For footnotes,/

&/' \ + -e 's/Bibliographies are/

&/' \ + -e 's/There are many/

&/' \ + -e 's/To make presentations,/

&/' < latex-doc-ptr-massaged-ligs.html > latex-doc-ptr-massaged-pars.html + # Correct misc + sed -e 's/X E

/Books <\/span>/' \ + -e 's/filler text.

/filler text. /' \ + < latex-doc-ptr-massaged-pars.html > latex-doc-ptr-massaged-misc.html + # Bring it back to latex-doc-ptr.html + cp latex-doc-ptr-massaged-misc.html latex-doc-ptr.html + rm latex-doc-ptr-massaged-ligs.html \ + latex-doc-ptr-massaged-pars.html \ + latex-doc-ptr-massaged-misc.html + +all: latex-doc-ptr.pdf latex-doc-ptr.html diff --git a/Master/texmf-dist/doc/latex/latex-doc-ptr/README b/Master/texmf-dist/doc/latex/latex-doc-ptr/README index 37b17350749..127d8586732 100644 --- a/Master/texmf-dist/doc/latex/latex-doc-ptr/README +++ b/Master/texmf-dist/doc/latex/latex-doc-ptr/README @@ -1,20 +1,44 @@ latex-doc-ptr -This is intended as the document that comes up when a person runs + This is intended as the document that comes up when a person runs 'texdoc latex'. The idea is that an exhaustive reference for LaTeX is not what the overwhelming majority of users would find useful at -that point. So instead, in addition to naming such a reference, -it points to a selection of docs that may be of value to a variety -of users. +that point. Instead, it gives a selection of resources, for a +variety of users. + + See also http://www.ctan.org/tex-archive/info/first-latex-doc . -See also http://www.ctan.org/tex-archive/info/first-latex-doc . License: public domain + +Install: + If you have a recent TeX distribution, + pdflatex latex-doc-ptr +should do nicely. + + My version of TeX is old, so I have some trouble with tex4ht. If you +are in my situation then try the Makefile, which does a lot of hacking. + + +Notes: + +1) My version of make4ht requires that I change + \def\IfFileExists#1#2#3{% +to + \long\def\IfFileExists#1#2#3{% +in a local copy of tex4ht.sty. See https://tex.stackexchange.com/a/423729/339 + +2) Repo is here. + https://gitlab.com/jim.hefferon/latex-doc-ptr + + Comments to: - Jim Hefferon email ftpmaint at tug.ctan.org + Jim Hefferon email jhefferon@smcvt.edu + History: + 2021-Jan-02 JH, KB Merged with another doc, first-packages. 2009-Mar-24 Jim Hefferon, Manuel Pégourié-Gonnard, Karl Berry diff --git a/Master/texmf-dist/doc/latex/latex-doc-ptr/dash.sty b/Master/texmf-dist/doc/latex/latex-doc-ptr/dash.sty new file mode 100644 index 00000000000..3654dd2d692 --- /dev/null +++ b/Master/texmf-dist/doc/latex/latex-doc-ptr/dash.sty @@ -0,0 +1,11 @@ +% Dash code stolen from tugboat.dtx +\def\thinskip{\hskip 0.16667em\relax} +\def\endash{--} +\def\emdash{\endash-} +\def\d@sh#1#2{\unskip#1\thinskip#2\thinskip\ignorespaces} +\def\dash{\d@sh\nobreak\endash} +\def\Dash{\d@sh\nobreak\emdash} +\def\ldash{\d@sh\empty{\hbox{\endash}\nobreak}} +\def\rdash{\d@sh\nobreak\endash} +\def\Ldash{\d@sh\empty{\hbox{\emdash}\nobreak}} +\def\Rdash{\d@sh\nobreak\emdash} diff --git a/Master/texmf-dist/doc/latex/latex-doc-ptr/latex-doc-ptr.css b/Master/texmf-dist/doc/latex/latex-doc-ptr/latex-doc-ptr.css new file mode 100644 index 00000000000..db1fcd494c4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/latex-doc-ptr/latex-doc-ptr.css @@ -0,0 +1,148 @@ + +/* start css.sty */ +.Spectral-Light-osf-t-1x-x-109{} +.Spectral-Bold-osf-t-1x-x-172{font-size:156%;} +.ectt-1095{ font-family: monospace;} +.ectt-1095{ font-family: monospace;} +.ectt-1095{ font-family: monospace;} +.Spectral-Bold-osf-t-1x-x-109{} +.cmr-8{font-size:72%;} +.cmr-6{font-size:54%;} +.cmmi-10x-x-109{font-style: italic;} +.Spectral-Light-osf-t-1{font-size:90%;} +.ectt-1000{font-size:90%; font-family: monospace;} +.ectt-1000{ font-family: monospace;} +.ectt-1000{ font-family: monospace;} +.Spectral-LightItalic-osf-t-1x-x-109{} +.Spectral-Light-osf-sc-t-1x-x-109{} +.ectt-0900{font-size:81%; font-family: monospace;} +.ectt-0900{ font-family: monospace;} +.ectt-0900{ font-family: monospace;} +p.noindent { text-indent: 0em } +td p.noindent { text-indent: 0em; margin-top:0em; } +p.nopar { text-indent: 0em; } +p.indent{ text-indent: 1.5em } +@media print {div.crosslinks {visibility:hidden;}} +a img { border-top: 0; border-left: 0; border-right: 0; } +center { margin-top:1em; margin-bottom:1em; } +td center { margin-top:0em; margin-bottom:0em; } +.Canvas { position:relative; } +img.math{vertical-align:middle;} +li p.indent { text-indent: 0em } +li p:first-child{ margin-top:0em; } +li p:last-child, li div:last-child { margin-bottom:0.5em; } +li p~ul:last-child, li p~ol:last-child{ margin-bottom:0.5em; } +.enumerate1 {list-style-type:decimal;} +.enumerate2 {list-style-type:lower-alpha;} +.enumerate3 {list-style-type:lower-roman;} +.enumerate4 {list-style-type:upper-alpha;} +div.newtheorem { margin-bottom: 2em; margin-top: 2em;} +.obeylines-h,.obeylines-v {white-space: nowrap; } +div.obeylines-v p { margin-top:0; margin-bottom:0; } +.overline{ text-decoration:overline; } +.overline img{ border-top: 1px solid black; } +td.displaylines {text-align:center; white-space:nowrap;} +.centerline {text-align:center;} +.rightline {text-align:right;} +div.verbatim {font-family: monospace; white-space: nowrap; text-align:left; clear:both; } +.fbox {padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +div.fbox {display:table} +div.center div.fbox {text-align:center; clear:both; padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +div.minipage{width:100%;} +div.center, div.center div.center {text-align: center; margin-left:1em; margin-right:1em;} +div.center div {text-align: left;} +div.flushright, div.flushright div.flushright {text-align: right;} +div.flushright div {text-align: left;} +div.flushleft {text-align: left;} +.underline{ text-decoration:underline; } +.underline img{ border-bottom: 1px solid black; margin-bottom:1pt; } +.framebox-c, .framebox-l, .framebox-r { padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +.framebox-c {text-align:center;} +.framebox-l {text-align:left;} +.framebox-r {text-align:right;} +span.thank-mark{ vertical-align: super } +span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; } +div.tabular, div.center div.tabular {text-align: center; margin-top:0.5em; margin-bottom:0.5em; } +table.tabular td p{margin-top:0em;} +table.tabular {margin-left: auto; margin-right: auto;} +td p:first-child{ margin-top:0em; } +td p:last-child{ margin-bottom:0em; } +div.td00{ margin-left:0pt; margin-right:0pt; } +div.td01{ margin-left:0pt; margin-right:5pt; } +div.td10{ margin-left:5pt; margin-right:0pt; } +div.td11{ margin-left:5pt; margin-right:5pt; } +table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +td.td00{ padding-left:0pt; padding-right:0pt; } +td.td01{ padding-left:0pt; padding-right:5pt; } +td.td10{ padding-left:5pt; padding-right:0pt; } +td.td11{ padding-left:5pt; padding-right:5pt; } +table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +.hline hr, .cline hr{ height : 1px; margin:0px; } +.tabbing-right {text-align:right;} +span.TEX {letter-spacing: -0.125em; } +span.TEX span.E{ position:relative;top:0.5ex;left:-0.0417em;} +a span.TEX span.E {text-decoration: none; } +span.LATEX span.A{ position:relative; top:-0.5ex; left:-0.4em; font-size:85%;} +span.LATEX span.TEX{ position:relative; left: -0.4em; } +div.float, div.figure {margin-left: auto; margin-right: auto;} +div.float img {text-align:center;} +div.figure img {text-align:center;} +.marginpar {width:20%; float:right; text-align:left; margin-left:auto; margin-top:0.5em; font-size:85%; text-decoration:underline;} +.marginpar p{margin-top:0.4em; margin-bottom:0.4em;} +table.equation {width:100%;} +.equation td{text-align:center; } +td.equation { margin-top:1em; margin-bottom:1em; } +td.equation-label { width:5%; text-align:center; } +td.eqnarray4 { width:5%; white-space: normal; } +td.eqnarray2 { width:5%; } +table.eqnarray-star, table.eqnarray {width:100%;} +div.eqnarray{text-align:center;} +div.array {text-align:center;} +div.pmatrix {text-align:center;} +table.pmatrix {width:100%;} +span.pmatrix img{vertical-align:middle;} +div.pmatrix {text-align:center;} +table.pmatrix {width:100%;} +span.bar-css {text-decoration:overline;} +img.cdots{vertical-align:middle;} +.partToc a, .partToc, .likepartToc a, .likepartToc {line-height: 200%; font-weight:bold; font-size:110%;} +.index-item, .index-subitem, .index-subsubitem {display:block} +div.caption {text-indent:-2em; margin-left:3em; margin-right:1em; text-align:left;} +div.caption span.id{font-weight: bold; white-space: nowrap; } +h1.partHead{text-align: center} +p.bibitem { text-indent: -2em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } +p.bibitem-p { text-indent: 0em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } +.paragraphHead, .likeparagraphHead { margin-top:2em; font-weight: bold;} +.subparagraphHead, .likesubparagraphHead { font-weight: bold;} +.quote {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; margin-right:1em; text-align:justify;} +.verse{white-space:nowrap; margin-left:2em} +div.maketitle {text-align:center;} +h2.titleHead{text-align:center;} +div.maketitle{ margin-bottom: 2em; } +div.author, div.date {text-align:center;} +div.thanks{text-align:left; margin-left:10%; font-size:85%; font-style:italic; } +div.author{white-space: nowrap;} +.quotation {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; } +.abstract p {margin-left:5%; margin-right:5%;} +div.abstract {width:100%;} +.figure img.graphics {margin-left:10%;} +.lstlisting .label{margin-right:0.5em; } +div.lstlisting{font-family: monospace; white-space: nowrap; margin-top:0.5em; margin-bottom:0.5em; } +div.lstinputlisting{ font-family: monospace; white-space: nowrap; } +.lstinputlisting .label{margin-right:0.5em;} +.columns-2 p:first-child { margin-top: 0em; } +/* .columns-2{-moz-column-count:2; -webkit-column-count:2; column-count:2; -moz-column-gap: 27.2197pt; -webkit-column-gap: 27.2197pt; column-gap: 27.2197pt; -moz-column-rule-width: 0.0pt; -webkit-column-rule-width: 0.0pt; column-rule-rule-width: 0.0pt; -moz-column-rule-color: #555;; -webkit-column-rule-color: #555;; column-rule-color: #555;; -moz-column-rule-style: outset; -webkit-column-rule-style: outset; column-rule-style: outset; -moz-column-fill: balance; -webkit-column-fill: balance; column-fill: balance; } */ +/* end css.sty */ + +/* added JH */ +/* Adjust the generated defs */ +.Spectral-Bold-lf-t-1x-x-172 {font-size:156%; + font-weight: bold;} /* doc title in bold */ +.Spectral-Bold-lf-t-1x-x-109 {margin-top:2em; + font-weight: bold; + margin-right: 0.25em} /* run-in subsection name */ +p.indent{ text-indent: 0em } /* make all paragraphs un-indented */ +a { text-decoration: none; } /* remove underlines, since below LaTeX is ugly*/ + +.Spectral-LightItalic-osf-t-1x-x-109 { font-style: italic; + } /* make "name" in `texdoc name' */ diff --git a/Master/texmf-dist/doc/latex/latex-doc-ptr/latex-doc-ptr.html b/Master/texmf-dist/doc/latex/latex-doc-ptr/latex-doc-ptr.html new file mode 100644 index 00000000000..a6c1d20a626 --- /dev/null +++ b/Master/texmf-dist/doc/latex/latex-doc-ptr/latex-doc-ptr.html @@ -0,0 +1,779 @@ + + + + + + + + + + + + + +

+
+

This page suggests documentation, add-on components, and other resources for a beginning LATEX +user. +

The links here are to freely available materials, so you can click to see the documentation online. Where +the documentation is also available offline in a typical TEX installation, we provide its name as an end note. +View it by running `texdoc name' in a terminal. +

+

Starting

+

To run LATEX, you must use an online service or install a distribution. Online services are commercial; +find them by entering `online latex' in a search engine. For distributions, your choices are TEX Live on a +Unix system, including GNU/Linux, or on Windows, or the related MacTEX on Macintosh, or MiKTEX on +Windows or a Unix system. +

Tutorials The site learnlatex.org teaches you the basics in a sound way, and also lets you play with the +commands to see the results. For a more traditional document, the most widely recommended one is The +Not-So Short Guide to LATEX2ε, available in many languages.1 +

Many people use LATEX to write mathematical text and for this the premier choice is from the +American Mathematical Society. See their Getting up and running with AMS-LATEX,2 and more detail is +in Users Guide for the amsmath package.3 +

+

Documentation

+

References The nearest thing to a general reference for LATEX is LATEX2ε unofficial reference manual.4 +Look for symbols in the Comprehensive List of Symbols.5 And, TUGboat, the journal of the TEX Users +Group, has published many articles, at levels from beginner to expert, almost since the inception of +TEX. +

FAQs Many web pages offer quick help with LATEX, although they can be out of date. Particularly useful +and reliable are the TEX FAQ,6 as well as TEX Resources on the Web. You can also get a handy +general LATEX Cheat Sheet,7 as well as the Math for Undergraduates Cheat Sheet.8 Also, +An essential guide to LATEX2ε usage9 helps you develop sound habits, by saying what not to +do. +

Questions If you are stuck on an issue, the TEX-LATEX Stack Exchange site and the mailing list +texhax@tug.org are where knowledgeable people hang out. You are likely to find an answer in their past +discussions, which cover decades, and if not then you can post a question yourself. +

Books There are many excellent books about LATEX. Visit the TEX Users Group's book list for a +selection, and for discounts. +

Packages

+

One of LATEX's strengths is the tremendous number of available add-on packages. This list covers most of +what beginners want to do. (There are some comments in parentheses that often come up in conjunction + + +with these recommendations.) +

Our archive The Comprehensive TEX Archive Network, CTAN, has the latest official versions of the +packages that are in the distributions, along with documentation. Browsing by topic can be very +handy. + +

If you have trouble finding something, it may be the house package of a journal or institution. Look on +their web page as well as on CTAN. +

Every document To change page size, margins, and orientation, use geometry.10 Get multiple columns +with multicol.11 +

As referred to above, any document containing significant amounts of mathematics should use the +American Mathematical Society's packages amsmath12 and amsfonts.13 Also use their amsthm14 for +producing theorem environments. Notes: (1) amssymb inputs amsfonts so load the former instead of the +latter, (2) many authors also use the calligraphic characters in rsfs,15 (3) get bold math symbols with bm,16 +(4) don't load amsmath directly, instead get it by loading mathtools17 for some useful improvements, and +(4) load amsthm after mathtools. +

Also, include microtype.18 It will make your document have fewer awkward lines. +

Inside a document Tweak the layout of lists with enumitem.19 +

Enhance captions with caption20 and control floating environments with float.21 (In particular, this +package provides the `H' option to override automatic float placement and put something exactly where you +ask. This may cause issues — what if you want to include a two inch tall graphic on a page that has only an +inch left? — but it sometimes is what you want.) +

Get hyperlinks and turn references into links with hyperref22 (make sure to set it up, for +example with \hypersetup{colorlinks=true}). Have cross-references that say `Theorem 1.2' +instead of just `1.2' with cleveref.23 For URL's and file paths that can break across lines, use +url.24 (If you use hyperref then note that it has its own commands for the cleveref and url +functions.) +

Inside verbatim text, make single quotes come out correctly with upquote.25 For including computer +code, the listings26 package is very popular. (Copy and paste for computer code is especially convenient. +This is a start for the listings package.

+
\lstset{basicstyle=\ttfamily, 
        keepspaces=true, 
        columns=fullflexible} + +
+ But it is not a full solution. The results depend on the PDF viewer and worse, if your code line begins +with blank spaces then after copy and paste those spaces are gone.) +

If you use Python, pythontex27 will show code listings, but it also allows you to execute Python and put +the results in your output. Do the same for the Sage mathematics software with sagetex, and similar +support exists for other languages. +

There are many packages that add table capabilities, such as multirow entries and breaking across +pages. The first package to try is array,28 which lets you define your own column types. To handle +scientific units, use siunitx29 (which also has a table column type for aligning on a decimal +point). +

Make boxes that are colored or framed, such as boxes for theorems, with tcolorbox.30 +

Use babel31 for internationalization, including changing the title of the abstract or the bibliography. +(Note that LATEX now defaults to UTF-8 encoded input.) +

Finally, when developing a document, you often want to generate filler text. Use lipsum.32 +

Color and graphics For colors, use xcolor.33 +

To include graphics and do simple manipulations such as resizing, use graphicx.34 Use the JPG format + + +for photos, PNG for other kinds of raster graphics, and PDF for vector graphics. If your graphic is in another +format then convert it to one of these three. (Usually in your LATEX source, you give the file name without +the extension, as with \includegraphics{myplot}.) Include parts of an outside PDF document with +pdfpages.35 Include video or sound using media9.36 +

In your plots and graphics, you want that the fonts and notations match your document. You have a few +choices. Draw inside your document with TikZ.37 You can instead draw using an external command +language such as Asymptote,38 and bring the results in as graphics. And there are other options, such as +that the Gnuplot plotting software will output TikZ commands, and the Inkscape vector graphics editor +allows you to embed LATEX-generated equations. +

Front and back matter, headers, footers To style chapter and section titles, use titlesec.39 For page +headers and footers, reach for fancyhdr.40 You can tweak the format of tables of contents, lists of figures, +etc., with tocloft.41 +

For footnotes, use footmisc.42 Make an index with makeindex.43 With answers44 you can send exercise +answers to an external file, where you can make them a separate document or include them at the end of the +current one. +

Bibliographies are a thorny area. Often you have strict requirements, such as from the MLA.45 CTAN is a +big help here; check out the many styles for both BibTEX46 and BibLATEX.47 +

Special documents Make exams and problem sets with the exam48 class. +

There are many, many resume and CV packages. Start with CTAN's cv topic. +

To make presentations, use the beamer49 class. (However, with this package you are entering another +world, where many of the packages discussed here do not work. For example, section title styling happens +via a completely different mechanism.) +

Fonts and engines

+

The documentation for font use commands from the LATEX developers is LATEX2ε font selection.50 +

To move beyond the default fonts, visit the LATEX Font Catalogue, which includes copy and paste code +to make each one work. +

Beyond that list, you can also use your computer system's fonts (beware this makes your source le +harder to share with friends, though). The background is: to convert LATEX source to PDF +output there are three varieties of the TEX engine. Currently the most common is pdfTEX.51 +For instance, this document was generated with pdflatex latex-doc-ptr.tex. Two further +developments, XeTEX,52 and LuaTEX,53 can leverage the fontspec54 package to use your system's fonts, +such as OpenType and TrueType fonts, in addition to the ones from your TEX distribution. +(Mathematics requires much special tuning, though, so most of the time you cannot use system fonts for +math.) +

More is on the TEX Users Group's font page. +

+

Writing LATEX

+

There are many ways to make writing LATEX source easier. Most people use a source code editor, such as +TEXstudio, or Emacs with the add-on mode AUC-TEX, or TEXShop on a Mac. +

+

Pronunciation

+

Pronounce LATEX as 'la-tech' or 'lay-tech', with emphasis on either syllable. We prefer the first, with +emphasis on the first syllable. +

+ + +

Welcome to the community!

+

One reason that all of these resources are available is the work of the many user groups, including the TEX +Users Group. Please consider joining. +

_________________________________________________________________________________________ +

+

Package names, for texdoc

+

1lshort 2amshelp 3amsmath 4latex2e 5comprehensive 6faq 7latexcheat 8undergradmath 9l2tabuen 10geometry +11multicol 12amsmath 13amssymb 14amsthm 15rsfs 16bm 17mathtools 18microtype 19enumitem 20caption 21float +22hyperref 23cleveref 24url 25upquote 26listings 27pythontex 28array 29siunitx 30tcolorbox 31babel 32lipsum +33xcolor 34graphics 35pdfpages 36media9 37tikz 38asymptote 39titlesec 40fancyhdr 41tocloft 42footmisc +43makeindex 44answers 45mla 46bibtex 47biblatex 48exam 49beamer 50fntguide 51pdftex 52xetex 53luatex +54fontspec +

+
+ + + + + + diff --git a/Master/texmf-dist/doc/latex/latex-doc-ptr/latex-doc-ptr.pdf b/Master/texmf-dist/doc/latex/latex-doc-ptr/latex-doc-ptr.pdf index 8ae9e94e7b2..7b829bf358a 100644 Binary files a/Master/texmf-dist/doc/latex/latex-doc-ptr/latex-doc-ptr.pdf and b/Master/texmf-dist/doc/latex/latex-doc-ptr/latex-doc-ptr.pdf differ diff --git a/Master/texmf-dist/doc/latex/latex-doc-ptr/latex-doc-ptr.sty b/Master/texmf-dist/doc/latex/latex-doc-ptr/latex-doc-ptr.sty index 097cfce6023..c9982ad3693 100644 --- a/Master/texmf-dist/doc/latex/latex-doc-ptr/latex-doc-ptr.sty +++ b/Master/texmf-dist/doc/latex/latex-doc-ptr/latex-doc-ptr.sty @@ -1,31 +1,132 @@ % latex-doc-ptr.sty style for LaTeX doc pointer document -% Jim Hefferon public domain -\usepackage[margin=1in]{geometry} +% 2021-Jan-02 Jim Hefferon, Karl Berry public domain + + +% include graphics +\usepackage{graphicx} % needed for \XeLaTeX command + +% Color, for links and titles +\usepackage{xcolor} +% Color theme from Rodryggo Sylva +% https://color.adobe.com/explore?page=2 +\definecolor{darkblue}{HTML}{274375} % {023059} +\definecolor{lightblue}{HTML}{094085} %{023E73} +% \definecolor{papyrus}{HTML}{D9D8D7} +\definecolor{papyrus}{HTML}{E4E4E4} +\definecolor{darkred}{HTML}{BF1E0F} +\definecolor{lightred}{HTML}{F24141} +% \pagecolor{papyrus} -\usepackage{color,graphicx} %\usepackage{dash} -\usepackage{url} +% \usepackage{url} \usepackage{hyperref} \hypersetup{colorlinks,breaklinks, - linkcolor=black,citecolor=blue, - filecolor=blue,urlcolor=blue, + linkcolor=black,citecolor=lightblue, + filecolor=blue,urlcolor=lightblue, pdfpagemode=UseNone} -\usepackage{tgbonum} - -\usepackage[para]{footmisc} -% Change horiz room between fn mark and fn hskip from .5em -% Suggested to RF making this settable -\long\def\@makefntext#1{\leavevmode -\@makefnmark\nobreak -\hskip.05em\relax#1% + +% fonts +% \usepackage{cochineal} +\usepackage[light,lining]{spectral} +\usepackage[T1]{fontenc} + +\usepackage{microtype} + + +% ====== Page design ========= +% margins, multicolumn +\usepackage[margin=1in]{geometry} +\usepackage{multicol} +\setlength{\columnsep}{2.5em} + +% space between paragraphs +\setlength{\parskip}{.15ex plus .02ex minus .01ex} + +% Page headers and footers +\pagestyle{empty} + +% Section titles +\usepackage{titlesec} +\titleformat{\section}[hang]{\color{black}\large\bf}{}{0pt}{} +% \titlespacing{\section}{0pt}{2ex plus 0.1ex minus 0.05ex}{0.85ex plus 0.05ex} +\titlespacing{\section}{0pt}{*2}{*0.66} + +\titleformat{\subsection}[runin]{\color{black}\normalsize\bf}{}{0.65em}{} +% \titlespacing{\subsection}{0pt}{0.5ex plus 0.1ex minus 0.05ex}{0.15ex plus 0.05ex} +\titlespacing{\subsection}{0pt}{*0.5}{*1} + +\setcounter{secnumdepth}{0} % Number the sections only if level -1 or less + + +% footnotes and package macro\patchcmd{\@makefntext}{.5em}{0em}{}{} +\usepackage{ragged2e} +\usepackage{etoolbox} % for patchcmd +\usepackage{endnotes} +\usepackage[para, norule, hang]{footmisc} % from https://tex.stackexchange.com/a/60949 +\patchcmd{\@makefntext}{.5em}{0em}{}{} +\def\theendnotes{\immediate\closeout\@enotes \global\@enotesopenfalse + \begingroup + \makeatletter + \edef\@tempa{`\string >}% + \ifnum\catcode\@tempa=12% + \let\@ResetGT\relax + \else + \edef\@ResetGT{\noexpand\catcode\@tempa=\the\catcode\@tempa}% + \@makeother\>% + \fi + \def\@doanenote##1##2>{\def\@theenmark{##1}\begingroup + \@ResetGT + \edef\@currentlabel{\csname p@endnote\endcsname\@theenmark}% + \enoteformat} + \def\@endanenote{\hspace{0.65em plus 0.1em}\endgroup}% + \enoteheading + \enotesize % worth a look: \RaggedRight + \input{\jobname.ent}% + \endgroup} +% ENDNOTE INDENT +% \patchcmd{\enoteformat}{1.8em}{0em}{}{} +% \def\makeenmark{\hbox{XX$^\theenmark$}} +\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=0em + \leavevmode\hbox{\makeenmark}} + +\renewcommand\enoteheading{% from https://tex.stackexchange.com/a/62425 + \setcounter{secnumdepth}{-2} + \section{\notesname} + % \mbox{}\par\vskip-\baselineskip + \mbox{}\par\vspace{-1.08\baselineskip}% \vskip-0.9\baselineskip + \let\@afterindentfalse\@afterindenttrue } +\renewcommand{\notesname}{Package names, for texdoc} +% \long\def\@makefntext#1{\leavevmode +% \@makefnmark\nobreak +% \hskip.04em\relax#1% +% } + +% computer code +\usepackage{listings} +\lstset{basicstyle = \small\ttfamily, + keepspaces=true, + columns=fullflexible, + xleftmargin=10pt} +\usepackage{upquote} + +% Get ISO dates +\usepackage[style=iso]{datetime2} + +% Definitions for this doc + +% Refer to texdoc +\newcommand{\texdoc}[1]{\footnote{\protect\pkg{#1}}} +\let\footnote=\endnote -\newcommand{\texdoc}[1]{\/\footnote{\protect\texttt{#1}}} +% Name package by CTAN and texdoc name +\newcommand{\pkglink}[2]{\href{https://ctan.org/pkg/#1}{\texttt{#2}}} +% \newcommand{\pkg}[1]{\href{https://ctan.org/pkg/#1}{\texttt{#1}}} +\newcommand{\pkg}[1]{\pkglink{#1}{#1}} -\setlength{\parskip}{-.25ex plus -.05ex minus -.05ex} % \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE} % optional * [ALTHEADING]{HEADING} % Generic command to start a section. @@ -46,20 +147,16 @@ % is normally defined to \@startsection + its first six arguments. % \makeatletter -\def\section{\@startsection {section}{1}{\z@}{-3ex plus -.45ex minus - -.20ex}{4.75ex plus .45ex minus .20ex}{\centering\Large\bf}} -\def\subsection{\@startsection {subsection}{2}{\z@}{-2.5ex plus -.15ex minus - -.10ex}{.80ex plus .1ex}{\centering\large\bf}} -\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-.85ex plus -.15ex minus - -.05ex}{-.75em}{\normalsize\sc}} +% \def\section{\@startsection {section}{1}{\z@}{-3ex plus -.45ex minus +% -.20ex}{4.75ex plus .45ex minus .20ex}{\centering\Large\bf}} +% \def\subsection{\@startsection {subsection}{2}{\z@}{-2.5ex plus -.15ex minus +% -.10ex}{.80ex plus .1ex}{\centering\large\bf}} +% \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-.85ex plus -.15ex minus +% -.05ex}{-.75em}{\normalsize\sc}} % \makeatother -\setcounter{secnumdepth}{0} % Number the sections only if level -1 or less -\setlength{\parskip}{.85ex plus .15ex minus .05ex} - -\pagestyle{empty} -\newcommand{\program}[1]{\texttt{#1}} -\newcommand{\package}[1]{\textit{#1}} +% \newcommand{\program}[1]{\texttt{#1}} +% \newcommand{\package}[1]{\textit{#1}} % Used for backslash \newcommand\SLASH{\char`\\} % Last thing before the document: define the \XeTeX logo (stolen from @@ -70,24 +167,110 @@ % least a chance to look ok. % % \begin{macrocode} +% \def\tubreflect#1{% +% \ifx\reflectbox\relax +% \errmessage{A graphics package must be loaded for \string\XeTeX}% +% \else +% \ifdim \fontdimen1\font>0pt +% \raise 1.35ex \hbox{\kern.1em\rotatebox{180}{#1}}\kern-.1em +% \else +% \reflectbox{#1}% +% \fi +% \fi +% } +% \def\tubhideheight#1{\setbox0=\hbox{#1}\ht0=0pt \dp0=0pt \box0 } +% \DeclareRobustCommand\Xe[1]{\leavevmode +% \tubhideheight{\hbox{X% +% \setbox0=\hbox{\TeX}\setbox1=\hbox{E}% +% \lower\dp0\hbox{\raise\dp1\hbox{\kern-.125em\tubreflect{E}}}% +% \kern-.1667em #1}}} +% \newcommand{\xetex}{\Xe\TeX} +% \newcommand{\pdftex}{pdf\TeX} +% \newcommand{\luatex}{Lua\TeX} +% \newcommand{\texworks}{\TeX{}works} + + + +% Logos and acronyms, some of them to match TUGboat commands +% \RequirePackage{mflogo} % for MetaPost \MP + +% \newcommand\pdfLaTeX{pdf\LaTeX} +% \newcommand\PDFLaTeX{\pdfLaTeX} +% \newcommand\LuaLaTeX{Lua\LaTeX} + +% Stuff from ltugboat.cls +\def\smc{\sc} +\def\ninepoint{\small} +\DeclareRobustCommand{\SMC}{% + \ifx\@currsize\normalsize\small\else + \ifx\@currsize\small\footnotesize\else + \ifx\@currsize\footnotesize\scriptsize\else + \ifx\@currsize\large\normalsize\else + \ifx\@currsize\Large\large\else + \ifx\@currsize\LARGE\Large\else + \ifx\@currsize\scriptsize\tiny\else + \ifx\@currsize\tiny\tiny\else + \ifx\@currsize\huge\LARGE\else + \ifx\@currsize\Huge\huge\else + \small\SMC@unknown@warning + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi +} +\newcommand{\SMC@unknown@warning}{\TBWarning{\string\SMC: nonstandard + text font size command -- using \string\small}} +\newcommand{\textSMC}[1]{{\SMC #1}} +\newcommand{\acro}[1]{\textSMC{#1}\@} + \def\tubreflect#1{% - \ifx\reflectbox\relax - \errmessage{A graphics package must be loaded for \string\XeTeX}% - \else + \@ifundefined{reflectbox}{% + \TBerror{A graphics package must be loaded for \string\XeTeX}% + }{% \ifdim \fontdimen1\font>0pt - \raise 1.35ex \hbox{\kern.1em\rotatebox{180}{#1}}\kern-.1em + \raise 1.75ex \hbox{\kern.1em\rotatebox{180}{#1}}\kern-.1em \else \reflectbox{#1}% \fi - \fi + }% } \def\tubhideheight#1{\setbox0=\hbox{#1}\ht0=0pt \dp0=0pt \box0 } -\DeclareRobustCommand\Xe[1]{\leavevmode +\def\XekernbeforeE{-.125em} +\def\XekernafterE{-.1667em} +\DeclareRobustCommand{\Xe}{\leavevmode \tubhideheight{\hbox{X% \setbox0=\hbox{\TeX}\setbox1=\hbox{E}% - \lower\dp0\hbox{\raise\dp1\hbox{\kern-.125em\tubreflect{E}}}% - \kern-.1667em #1}}} -\newcommand{\xetex}{\Xe\TeX} -\newcommand{\pdftex}{pdf\TeX} -\newcommand{\luatex}{Lua\TeX} -\newcommand{\texworks}{\TeX{}works} + \lower\dp0\hbox{\raise\dp1\hbox{\kern\XekernbeforeE\tubreflect{E}}}% + \kern\XekernafterE}}} +\def\XeTeX{\Xe\TeX} +\def\XeLaTeX{\Xe{\kern.11em \LaTeX}} +\def\LuaTeX{Lua\TeX} +\def\pdfTeX{pdf\TeX} + +\def\Bib{% + \ifdim \fontdimen1\font>0pt + B{\SMC\SMC IB}% + \else + B\textsc{ib}% + \fi +} +\def\BibLaTeX{\Bib\kern.02em \LaTeX} +\def\BibTeX{\Bib\kern-.08em \TeX} + +\newcommand{\PDF}{\acro{PDF}} +\newcommand{\CTAN}{\acro{CTAN}} +\newcommand{\URL}{\acro{URL}} +\newcommand{\TikZ}{Ti{\textit k}Z} % from TUB +\newcommand{\Asymptote}{Asymptote} % the manual uses typewriter +\newcommand{\gnuplot}{Gnuplot} % the FAQ says lower case first letter + +% Style I chopped out of ltugboat.cls +\usepackage{dash} + + +\newcommand{\program}[1]{\texttt{#1}} +\newcommand{\package}[1]{#1} +% stubs +% \newcommand{\texdoc}[1]{\relax} + +% Give paras just a bit of room +% \setlength{\parskip}{0.45ex} + +\pagestyle{empty} diff --git a/Master/texmf-dist/doc/latex/latex-doc-ptr/latex-doc-ptr.tex b/Master/texmf-dist/doc/latex/latex-doc-ptr/latex-doc-ptr.tex index 8cf2c86fb18..1752d462dcd 100644 --- a/Master/texmf-dist/doc/latex/latex-doc-ptr/latex-doc-ptr.tex +++ b/Master/texmf-dist/doc/latex/latex-doc-ptr/latex-doc-ptr.tex @@ -1,257 +1,434 @@ -\documentclass[10pt]{article} +\documentclass[11pt]{article} \usepackage{latex-doc-ptr} - -% This document is intended as the result of a "texdoc latex" in TeX Live. -% The license is Public Domain. See README file for more. +\usepackage{endnotes} \begin{document}\thispagestyle{empty} -\section{\LaTeX} - -\LaTeX{} is the most popular macro package for \TeX{}. -(A macro package is a set of commands that an author typically uses -to write documents.) - -This page does not try to answer all questions about \LaTeX; -rather -we suggest some documentation, add-on components, and resources -that a \LaTeX{} user can start with. -We limit our recommendations to freely-available materials, -and you can click on the text to see the documentation on the Internet. -(In case the Internet is not convenient, when the documentation is also -available -in a typical \TeX{} installation we provide its name in a footnote; -to view it locally using -\href{http://tug.org/texdoc}{\package{texdoc}},\texdoc{texdoc} -run ``\texttt{texdoc \textit{name}}'' at a command prompt.) - - - - -\subsection{Starting out} - -The article -\href{http://mirror.ctan.org/info/first-latex-doc/first-latex-doc.pdf}{Getting something out of \LaTeX} -walks a beginner through writing a sample document. -In particular, to use \LaTeX{}, users must install a \TeX{} distribution, -such as -\href{http://miktex.org/}{MiK\TeX{}} on Windows, or -\href{http://www.tug.org/texlive/}{\TeX{}~Live} on -a Unix system such as GNU/Linux or on Windows, +\begin{center} + {\color{black}\LARGE\bf A First Set of \LaTeX{} Resources} +\end{center} +\vspace{1.5ex} + +\begin{multicols*}{2} +% \section{\LaTeX} + +% \LaTeX{} is a collection of commands for +% writing documents with the \TeX{} typesetting system. +% It is by far the most popular way to use that system. +This page suggests documentation, add-on components, and other resources +for a beginning \LaTeX{} user. + +The links here are to freely available materials, +so you can click to see the documentation online. +Where the documentation is also available +offline in a typical \TeX{} installation, we provide its name as an end note. +View it +by running `\texttt{texdoc {\it name}}' in a terminal. + + + +% ======================================================== +\section{Starting} + +To run \LaTeX{}, you must use an online service or +install a distribution. +Online services are commercial; find them by entering `online latex' in +a search engine. +For distributions, your choices are +\href{https://tug.org/texlive/}{\TeX{}~Live} on +a Unix system, including GNU/Linux, or on Windows, +or the related +\href{https://tug.org/mactex/}{Mac\TeX{}} on Macintosh, or -\href{http://www.tug.org/mactex/}{Mac\TeX{}} on Macintosh OS~X. - - +\href{https://miktex.org/}{MiK\TeX{}} on Windows or a Unix system. + +\subsection{Tutorials} +The site \href{https://www.learnlatex.org/}{\texttt{learnlatex.org}} +teaches you the basics in a sound way, and also +lets you play with the commands to see the results. +For a more traditional document, +the most widely recommended one is +\href{https://ctan.org/pkg/lshort-english} + {\package{The Not-So Short Guide to \LaTeXe}}, available in many + languages.\texdoc{lshort} +% and another good one is from the +% \href{https://tug.org/tutorials/tugindia/}{\package{Indian \TeX{} User Group}}. +% The article +% \href{http://mirror.ctan.org/info/first-latex-doc/first-latex-doc.pdf}{\package{Getting something out of \LaTeX}} +% walks a beginner through writing a sample document. + +Many people use \LaTeX{} to write mathematical text and +for this the premier choice is from the American Mathematical Society. +See their +\href{http://mirror.ctan.org/info/amslatex/primer/amshelp.pdf} + {\package{Getting up and running with AMS-\LaTeX}},\texdoc{amshelp} +and more detail is in +\href{http://mirror.ctan.org/macros/latex/required/amsmath/amsldoc.pdf} + {\package{Users Guide for the {\tt amsmath} package}}.\texdoc{amsmath} -\subsection{Documentation} -\subsubsection{Essentials} -The most widely-recommended introduction is -\href{http://mirror.ctan.org/info/lshort/} - {\package{The Not-So Short Guide to \LaTeXe}}.\texdoc{lshort} -Another good one is from the -\href{http://tug.org/tutorials/tugindia/}{\package{TUGIndia user group}}. -For typesetting mathematics, use the -the American Mathematical Society's -AMS-\LaTeX{} package, -introduced in the primer, -\href{http://mirror.ctan.org/info/amslatex/primer/amshelp.pdf} - {\package{Getting up and running with AMS-\LaTeX}}.\texdoc{amshelp} +% ======================================================== +\section{Documentation} -\subsubsection{References} -The official \LaTeX{} documentation from the development team -is -\href{http://mirror.ctan.org/macros/latex/doc/usrguide.pdf} - {\package{\LaTeXe{} for Authors}};\texdoc{usrguide} this focuses on -changes made in recent versions of \LaTeX{}. -The nearest thing to a general reference manual for \LaTeX{} is the unofficial +\subsection{References} +The nearest thing to a general reference for \LaTeX{} is \href{http://mirror.ctan.org/info/latex2e-help-texinfo/latex2e.html} - {\package{\LaTeX: Structured documents for \TeX}}.\texdoc{latex2e} + {\package{\LaTeXe{} unofficial reference manual}}.\texdoc{latex2e} Look for symbols in the \href{http://mirror.ctan.org/info/symbols/comprehensive/symbols-letter.pdf} {\package{Comprehensive List of Symbols}}.\texdoc{comprehensive} -A two-page -\href{http://mirror.ctan.org/info/latexcheat/latexsheet.pdf} - {\package{\LaTeX{} Cheat Sheet}}\texdoc{latexcheat} is available. -The document -\href{http://mirror.ctan.org/info/l2tabu/} - {\textit{l2tabu}}\texdoc{l2tabuen} -can help you to acquire sound habits by -suggesting what you should consider taboo. - - -\subsubsection{FAQ's} -Many web pages offer help with \TeX{} and \LaTeX{}. -Particularly useful is the -\href{http://www.tex.ac.uk/faq}{\package{English FAQ}}\texdoc{faq} -and the -\href{http://tug.org/interest.html}{\package{TUG web resources page}}. -The \href{http://tug.org/pracjourn/}{\package{Prac\TeX{} Journal}} -is an online magazine aimed at beginning and intermediate users, and -\href{http://tug.org/TUGboat/}{\package{TUGboat}} -has published many articles at all levels nearly since the inception of -\TeX{}. - -\subsubsection{Books} -There are many books about \LaTeX{}; +And, \href{https://tug.org/TUGboat/}{\package{TUGboat}}, +the journal of the +\href{https://tug.org}{\TeX{} Users Group}, +has published many articles, at levels from beginner to expert, +almost since the inception of \TeX{}. + + + +\subsection{FAQs} +Many web pages offer quick help with \LaTeX{}, +although they can be out of date. +Particularly useful and reliable are the +\href{https://texfaq.org/}{\package{\TeX{} FAQ}},\texdoc{faq} +as well as +\href{https://tug.org/interest.html}{\package{\TeX{} Resources on the Web}}. +You can also get a handy general +\href{http://mirror.ctan.org/info/latexcheat/latexcheat/latexsheet.pdf} + {\package{\LaTeX{} Cheat Sheet}},\texdoc{latexcheat} +as well as the +\href{http://mirrors.ctan.org/info/undergradmath/undergradmath.pdf} + {\package{Math for Undergraduates Cheat Sheet}}.\texdoc{undergradmath} +Also, +\href{http://mirror.ctan.org/info/l2tabu/english/l2tabuen.pdf} + {An essential guide to \LaTeXe{} usage}\texdoc{l2tabuen} +helps you develop sound habits, by +saying what not to do. + +\subsection{Questions} +If you are stuck on an issue, the +\href{https://tex.stackexchange.com/}{\TeX{}-\LaTeX{} Stack Exchange} site +and the mailing list +\href{https://lists.tug.org/texhax}{texhax@tug.org} +are where knowledgeable people hang out. +You are likely to find an answer in their past discussions, which cover +decades, and if not then you can post a question yourself. + + +\subsection{Books} +There are many excellent books about \LaTeX{}. +Visit the +\href{https://tug.org/books/} + {\package{\TeX{} Users Group's book list}} for a selection, and for discounts. + + + + +% ========================================================= +\section{Packages} + +One of \LaTeX's strengths is the tremendous number of available add-on +packages. +This list covers most of what +beginners want to do. +(There are some comments in parentheses that +often come up in conjunction with these recommendations.) + + +\subsection{Our archive} +The Comprehensive \TeX{} Archive Network, +\href{https://ctan.org}{\color{darkblue}\CTAN}, +has the latest official versions of +the packages that are in the distributions, +along with documentation. +\href{https://ctan.org/topics/cloud}{\color{darkblue}Browsing by topic} +can be very handy. + +% If you develop a package, please upload it to \CTAN. +If you have trouble finding something, it may be +the house package of a journal or institution. +Look on their web page as well as on \CTAN. + + + +\subsection{Every document} +To change page size, margins, and orientation, use +\pkg{geometry}.\texdoc{geometry} +Get multiple columns with \pkg{multicol}.\texdoc{multicol} + +As referred to above, any document containing significant amounts of +mathematics should use +the American Mathematical Society's packages +\pkg{amsmath}\texdoc{amsmath} +and +\pkg{amsfonts}.\texdoc{amssymb} +Also use their \pkg{amsthm}\texdoc{amsthm} +for producing theorem environments. +Notes: (1)~\pkglink{amsfonts}{amssymb} inputs \pkg{amsfonts} so load the former +instead of the latter, +(2)~many authors also use the calligraphic characters in +\pkg{rsfs},\texdoc{rsfs} +(3)~get bold math symbols with \pkg{bm},\texdoc{bm} +(4)~don't load \pkg{amsmath} directly, instead get it by loading +\pkg{mathtools}\texdoc{mathtools} for some useful improvements, +and +(4)~load \pkg{amsthm} after \pkg{mathtools}. + +Also, include +\pkg{microtype}.\texdoc{microtype} +It will make +your document have fewer awkward lines. + + + +\subsection{Inside a document} +Tweak the layout of lists with \pkg{enumitem}.\texdoc{enumitem} + +Enhance captions with +\pkg{caption}\texdoc{caption} +and control floating environments with +\pkg{float}.\texdoc{float} +(In particular, this package provides the `\texttt{H}' option +to override automatic float placement and put something +exactly where you ask. +This may cause issues\Dash what if you want to include a two inch tall +graphic on a page that has only an inch left?\Dash but it sometimes +is what you want.) + +Get hyperlinks and turn references into links with +\pkg{hyperref}\texdoc{hyperref} +(make sure to set it up, +for example with \lstinline!\hypersetup{colorlinks=true}!). +Have cross-references that say `Theorem~1.2' instead of just `1.2' +with \pkg{cleveref}.\texdoc{cleveref} +For \acro{URL}'s and file paths that can break across lines, use +\pkg{url}.\texdoc{url} +(If you use \pkg{hyperref} then note that it has its own +commands for the \pkg{cleveref} and \pkg{url} functions.) + +Inside verbatim text, make single quotes come out correctly with +\pkg{upquote}.\texdoc{upquote} +For including computer code, the +\pkg{listings}\texdoc{listings} package is very popular. +% although \pkg{minted}\texdoc{minted} +% has many things to recommend it. +(Copy and paste for computer code is especially +convenient. +This is a start for the \pkg{listings} package. +\begin{lstlisting} +\lstset{basicstyle=\ttfamily, + keepspaces=true, + columns=fullflexible} +\end{lstlisting} +But it is not a full solution. +The results depend on the \PDF{} viewer and +worse, if your code line begins with +blank spaces then after copy and paste those spaces are gone.) + +If you use Python, +\pkg{pythontex}\texdoc{pythontex} +will show code listings, but it also allows you to execute +Python and put the results in your output. +Do the same for +the \textit{Sage} mathematics software with +\pkg{sagetex}, % \texdoc{sagetex}? not in TL +and similar support exists for other languages. + +There are many packages that add table capabilities, such as +multirow entries and breaking across pages. +The first package to try is \pkg{array},\texdoc{array} +which lets you define your own column +types. +To handle scientific units, +use \pkg{siunitx}\texdoc{siunitx} +(which also has a table column type for aligning on a decimal point). + +Make boxes that are colored or framed, such as boxes for theorems, +with +\pkg{tcolorbox}.\texdoc{tcolorbox} + +Use \pkg{babel}\texdoc{babel} +for internationalization, including changing the +title of the abstract or the bibliography. +(Note that \LaTeX{} now defaults to UTF-8 encoded input.) + +Finally, when developing a document, you often want to +generate filler text. +Use +\pkg{lipsum}.\texdoc{lipsum} + + + +\subsection{Color and graphics} +For colors, use +\pkg{xcolor}.\texdoc{xcolor} + +To include graphics and do simple manipulations such as resizing, +use \pkg{graphicx}.\texdoc{graphics} +Use the \acro{JPG} format for photos, +\acro{PNG} for other kinds of raster graphics, +and \PDF{} for vector graphics. +If your graphic is in another format then convert it to one of these three. +(Usually in your \LaTeX{} source, you give the file name without the extension, +as with \lstinline!\includegraphics{myplot}!.) +Include parts of an outside \PDF{} document with +\pkg{pdfpages}.\texdoc{pdfpages} +Include video or sound using +\pkg{media9}.\texdoc{media9} + +In your plots and graphics, you want that +the fonts and notations match your document. +You have a few choices. +Draw inside your document with +\href{https://ctan.org/pkg/pgf}{\TikZ}.\texdoc{tikz} +You can instead draw using an external command language such as +\href{https://asymptote.sourceforge.io/}{\Asymptote{}},\texdoc{asymptote} +and bring the results in as graphics. +And there are other options, such as that the +\href{http://www.gnuplot.info/}{\gnuplot{}} plotting software +will output \TikZ{} commands, +and the +\href{https://inkscape.org/}{Inkscape} vector graphics editor allows +you to embed \LaTeX{}-generated equations. + + +\subsection{Front and back matter, headers, footers} +To style chapter and section titles, use +\pkg{titlesec}.\texdoc{titlesec} +For page headers and footers, reach for +\pkg{fancyhdr}.\texdoc{fancyhdr} +You can tweak the format of tables of contents, lists of figures, etc., +with +\pkg{tocloft}.\texdoc{tocloft} + +For footnotes, use +\pkg{footmisc}.\texdoc{footmisc} +Make an index with +\pkg{makeindex}.\texdoc{makeindex} +With \pkg{answers}\texdoc{answers} +you can send exercise answers to an external file, where you can make them +a separate document or include them at the end of the current one. + +Bibliographies are a thorny area. +Often you have strict requirements, such as from the +\pkg{MLA}.\texdoc{mla} +\CTAN{} is a big help here; check out the many styles for both +\href{https://ctan.org/topic/bibtex-sty}{\BibTeX}\texdoc{bibtex} +and +\href{https://ctan.org/topic/biblatex}{\BibLaTeX}.\texdoc{biblatex} + + + + +\subsection{Special documents} +Make exams and problem sets with the +\pkg{exam}\texdoc{exam} +class. + +There are many, many resume and CV packages. +Start with \acro{CTAN}'s +\href{https://ctan.org/topic/cv}{cv topic}. + +To make presentations, use the +\pkg{beamer}\texdoc{beamer} +class. +(However, with this package you are entering another world, where many of the +packages discussed here do not work. +For example, section title styling happens via a completely +different mechanism.) + + +% ===================================================== +\section{Fonts and engines} +The documentation for font use commands from the \LaTeX{} developers is +\href{http://mirror.ctan.org/macros/latex/base/fntguide.pdf} + {\package{\LaTeXe{} font selection}}.\texdoc{fntguide} + +To move beyond the default fonts, visit the -\href{http://tug.org/books/} - {\package{\TeX{} Users Group Bookstore}} for discounts. - - - -\subsection{Selected \LaTeX{} packages} - -\subsubsection{Page size and shape} -Adjust the page dimensions -and orientation with -\href{http://mirror.ctan.org/macros/latex/contrib/geometry/geometry.pdf} - {\package{geometry}}.\texdoc{geometry} -Control headers and footers with -\href{http://mirror.ctan.org/macros/latex/contrib/fancyhdr/fancyhdr.pdf} - {\package{fancyhdr}}.\texdoc{fancyhdr} - -\subsubsection{Graphics} -Import graphics into a \LaTeX{} document with the \LaTeX{} team's -\href{http://mirror.ctan.org/macros/latex/required/graphics/} - {\package{graphicx}} package, and the related \textit{graphics}. -The official documentation is -\href{http://mirror.ctan.org/macros/latex/required/graphics/grfguide.pdf} - {\package{Packages in the `graphics' bundle}}.\texdoc{grfguide} -Another package in the same bundle is \package{color}.\texdoc{color} -For even more color capability use -\href{http://mirror.ctan.org/macros/latex/contrib/xcolor/xcolor.pdf} - {\package{xcolor}}.\texdoc{xcolor} -An excellent introduction to using these is the article -\href{http://tug.org/pracjourn/2005-3/hoeppner/hoeppner.pdf} - {\package{Strategies for including graphics in \LaTeX{} documents}}. -% not free: -% \href{http://www.ctan.org/tex-archive/info/epslatex/}{\textit{Using Imported Graphics in \LaTeX{} and pdf\LaTeX{}}}. - - -\subsubsection{Index and bibliography} -Make an index with \href{http://mirror.ctan.org/macros/latex/base/makeindx.dtx} - {\package{makeidx}}.\texdoc{makeindex} -For bibliographies, people use -\href{http://en.wikipedia.org/wiki/BibTeX}{\package{B{\footnotesize IB}\TeX{}}}.\texdoc{bibtex} -Two powerful tools based on it are: produce your bibliography -in a natural science styles with -\href{http://mirror.ctan.org/macros/latex/contrib/natbib/natbib.pdf} - {\package{natbib}},\texdoc{natbib} -and generate your own style by answering a sequence of questions with -\href{http://mirror.ctan.org/macros/latex/contrib/custom-bib/makebst.pdf} - {\package{custom-bib}}.\texdoc{custom-bib} - -\subsubsection{Computer code and commenting out} -For computer code, look at -\href{http://mirror.ctan.org/macros/latex/contrib/listings/listings.pdf} - {\package{listings}}.\texdoc{listings} -The -\href{http://mirror.ctan.org/macros/latex/required/tools/verbatim.pdf} - {\package{verbatim}}\texdoc{verbatim} -package is also useful for computer code, and -includes a \texttt{comment} environment to suppress parts of the document. - -\subsubsection{Hypertext} -The -\href{http://mirror.ctan.org/macros/latex/contrib/hyperref/hyperref.pdf} - {\package{hyperref}}\texdoc{hyperref} -package gives you -hyper-document features, such as making table of contents -entries link to the corresponding document part. -If you don't need active links, typeset web addresses with -\href{http://mirror.ctan.org/macros/latex/contrib/misc/url.sty} - {\package{url}},\texdoc{url} -which also does computer file names. - -\subsubsection{Presentations} -You can get presentation slides by -adjusting the page geometry and writing a regular document. -For more sophisticated effects use -\href - {http://mirror.ctan.org/macros/latex/contrib/beamer/doc/beameruserguide.pdf} - {\package{beamer}}.\texdoc{beamer} -The article -\href{http://tug.org/pracjourn/2005-4/mertz/mertz.pdf} - {\package{Beamer by example}} will get you started. - - - -\subsection{Output and fonts} - -\subsubsection{Output} -The -\href{http://tug.org/applications/pdftex/}{\package{pdf\TeX}}\texdoc{pdftex} -program extends \TeX{}: -it can directly produce web-friendly PDF files, as well as the -traditional DVI format. -For instance, this document was generated under \TeX{}~Live with -\verb!pdflatex latex_doc_ptr.tex!. -A further extension to that, -\href{http://en.wikipedia.org/wiki/XeTeX}{\package{\xetex}},\texdoc{xetex} -can use fonts from your underlying computer platform, -in addition to the fonts from your \TeX{} distribution. +\href{https://tug.org/FontCatalogue/}{\LaTeX\ Font Catalogue}, +which includes copy and paste code to make each one work. + +Beyond that list, you can also use your computer system's fonts +(beware this makes your source file harder to share with friends, though). +The background is:~to convert \LaTeX{} source to \PDF{} output +there are three varieties of the \TeX{} engine. +Currently the most common is +\href{https://tug.org/applications/pdftex/}{\package{\pdfTeX}}.\texdoc{pdftex} +For instance, this document was generated with +\verb!pdflatex latex-doc-ptr.tex!. +Two further developments, +\href{https://tug.org/xetex/}{\package{\XeTeX}},\texdoc{xetex} +and +\href{http://www.luatex.org/}{\package{\LuaTeX}},\texdoc{luatex} +can leverage +the \pkg{fontspec}\texdoc{fontspec} +package to use your system's fonts, +such as OpenType and TrueType fonts, +in addition to the ones from your \TeX{} distribution. (Mathematics requires much special tuning, though, so most -system fonts cannot be used for math.) - +of the time you cannot use system fonts for math.) +% (A word about the preprint site \texttt{arXiv.org}. +% If your document was produced with \XeLaTeX{} or \LuaLaTeX{} then +% you can only submit a \PDF, not the document source.) -\subsubsection{Fonts} -The font system documentation from the \LaTeX{} developers is -\href{http://mirror.ctan.org/macros/latex/doc/fntguide.pdf} - {\package{\LaTeXe{} font selection}}.\texdoc{fntguide} -To move beyond \TeX's default fonts, these two -documents describe some reasonable and free alternatives: -\href{http://mirror.ctan.org/info/Free_Math_Font_Survey/en/survey.html} - {\package{A Survey of Free Math Fonts for \TeX{} and \LaTeX{}}} -and -\href{http://www.tug.dk/FontCatalogue/}{\package{The \LaTeX{} Font Catalogue}}. More is on the -\href{http://tug.org/fonts/}{\TeX{} Users Group's font page}. +\href{https://tug.org/fonts/}{\TeX{} Users Group's font page}. -\subsection{Tools for composing \LaTeX{}} - -There are many environments to make writing \LaTeX{} source easier. -For instance, many people use a text editor of some sort, such as -Emacs with the add-on mode -\href{http://www.gnu.org/software/auctex/}{\package{AUC-\TeX{}}}. -A new environment that is free, runs on all major -computer platforms, and combines the best ideas -from available environments while retaining simplicity, is -\href{http://tug.org/texworks/}{\texworks}. - - -\subsection{Community} - -There are many -\href{http://tug.org/usergroups.html}{user groups} -for \TeX{}. -The -\href{http://www.ctan.org/}{Comprehensive \TeX{} Archive Network} -contains many more packages than any distribution. -In addition, if you are stuck on an issue, the Usenet group -\href{http://groups.google.com/group/comp.text.tex}{\texttt{comp.text.tex}} -and -\href{http://lists.tug.org/texhax}{\texttt{texhax@tug.org}} -are the most popular mailing lists. -You can search more than a decade of -\LaTeX{} discussions, or post a question yourself. -\subsection{Miscellaneous} +% ========================================================= +\section{Writing \LaTeX{}} -\subsubsection{History} -\LaTeX{} was first written in 1985 by Leslie Lamport, building on -Donald Knuth's \TeX{}. -It is now maintained and developed by the -\href{http://www.latex-project.org}{\LaTeX{}3 Project}\texdoc{latex3} group. - -\subsubsection{Pronunciation} -\LaTeX{} can be pronounced as +There are many ways to make writing \LaTeX{} source easier. +Most people use a source code editor, such as +\href{https://www.texstudio.org/}{\TeX{}studio}, or +Emacs with the add-on mode +\href{https://www.gnu.org/software/auctex/}{\package{AUC-\TeX{}}}, +or \href{https://pages.uoregon.edu/koch/texshop/}{\TeX{}Shop} on +a Mac. +% A new environment that is free, runs on all major +% computer platforms, and combines the best ideas +% from available environments while retaining simplicity, is +% \href{https://tug.org/texworks/}{\texworks}. + + +% ==================================================== +\section{Pronunciation} +Pronounce \LaTeX{} as ``la-tech'' or ``lay-tech,'' with emphasis on either syllable. -(We prefer the first, with emphasis on the first syllable.) +We prefer the first, with emphasis on the first syllable. + + +% ==================================================== +\section{Welcome to the community!} + +One reason that all of these resources are available is +the work of the many +\href{https://tug.org/usergroups.html}{user groups}, +including the \href{https://tug.org/}{\TeX{} Users Group}. +Please consider joining. +% The +% \href{https://www.ctan.org/}{Comprehensive \TeX{} Archive Network} +% contains more packages than any distribution. + +% \vfill\null +% \columnbreak +\vspace*{2ex} +\noindent{\color{lightblue}\rule{\linewidth}{0.4pt}} + +\hbadness=10000 % we know +\theendnotes + +% \subsection{Feedback?} +% Contact me via +% \href{https://hefferon.net}{\color{lightblue}\texttt{hefferon.net}}. +% (This version is from \today.) +% The source is at +% \href{https://gitlab.com/jim.hefferon/latexpackages}{\color{lightblue}my GitLab repository}.) +\end{multicols*} \end{document} diff --git a/Master/texmf-dist/doc/latex/latex-doc-ptr/massage_html.awk b/Master/texmf-dist/doc/latex/latex-doc-ptr/massage_html.awk new file mode 100644 index 00000000000..64f988417bd --- /dev/null +++ b/Master/texmf-dist/doc/latex/latex-doc-ptr/massage_html.awk @@ -0,0 +1,27 @@ +# massage_html.awk +# Part of latex-doc-ptr +# make4ht loses the subsection run-in headers. It puts the resulting material +# on two lines. So this small state machine passes through the .html file +# and creates subsection classes from paragraphs. +# +# 2020-Dec-31 Jim Hefferon + +BEGIN { lastLine = ""} + +# Look for second line of two-line patterns for subsections +/^class="Spectral-Bold-lf-t-1x-x-109">/ { + if(lastLine == "%s\n", lastLine) + } else { + print lastLine + } +} + +!/^class="Spectral-Bold-lf-t-1x-x-109">/ { + print lastLine +} + +{ lastLine = $0 } + +END {print lastLine} + -- cgit v1.2.3