Fleshed out the PDF docs (very rudimentary). Disabled index.

+ readability improvements in README
main
Taha Ahmed 1 year ago
parent 31037be7d6
commit f7957f8cc1

1
.gitignore vendored

@ -12,3 +12,4 @@
# *.pdf # *.pdf
# *.sty # *.sty
*.log *.log
*.code-workspace

@ -9,7 +9,7 @@ but for two other documentclass options, namely,
The `.dtx` file is the source, in combination with the `.ins` file. The `.dtx` file is the source, in combination with the `.ins` file.
**Step 1**: generate the `.sty` file using TeX. **Step 1**: generate the `.sty` file using TeX: `tex ifprintedition.ins`
``` ```
taha@luxor:/usr/local/texlive/texmf-local/tex/latex/ifprintedition taha@luxor:/usr/local/texlive/texmf-local/tex/latex/ifprintedition
$ tex ifprintedition.ins $ tex ifprintedition.ins
@ -65,7 +65,7 @@ is very annoying.
> the interactive confirmation step. > the interactive confirmation step.
**Step 2**: generate PDF documentation from `dtx` using LaTeX. **Step 2**: generate PDF documentation from `dtx` using LaTeX: `pdflatex ifprintedition.dtx`
``` ```
taha@luxor:/usr/local/texlive/texmf-local/tex/latex/ifprintedition taha@luxor:/usr/local/texlive/texmf-local/tex/latex/ifprintedition
$ pdflatex ifprintedition.dtx $ pdflatex ifprintedition.dtx
@ -97,7 +97,7 @@ Now is a good time to edit the `% \CheckSum{0}` line in the `dtx` file
with the correct number. with the correct number.
> Note, during development you might want to reset to `\CheckSum{0}` to > Note, during development you might want to reset to `\CheckSum{0}` to
> avoid compilation errors. > avoid compilation errors and having to reset it manually on every re-compile.
And you might want to use `latexmk -pdf ...` instead of `pdflatex ...` And you might want to use `latexmk -pdf ...` instead of `pdflatex ...`
to run the requisite number of compilations and also generate index, etc. to run the requisite number of compilations and also generate index, etc.
@ -116,14 +116,14 @@ This package works in conjunction with the following settings in
\@printeditionfalse \@printeditionfalse
\DeclareOption{webedition}{ \DeclareOption{webedition}{
\PassOptionsToClass{\CurrentOption}{book} \PassOptionsToClass{\CurrentOption}{book}
\@webeditiontrue \@webeditiontrue
\@printeditionfalse \@printeditionfalse
} }
\DeclareOption{printedition}{ \DeclareOption{printedition}{
\PassOptionsToClass{\CurrentOption}{book} \PassOptionsToClass{\CurrentOption}{book}
\@printeditiontrue \@printeditiontrue
\@webeditionfalse \@webeditionfalse
} }
``` ```
@ -141,3 +141,4 @@ You will need to set something similar in your own documentclass for the
+ https://tex.stackexchange.com/questions/34175/how-do-i-create-a-latex-package + https://tex.stackexchange.com/questions/34175/how-do-i-create-a-latex-package
+ https://www.overleaf.com/learn/latex/Writing_your_own_package + https://www.overleaf.com/learn/latex/Writing_your_own_package
+ https://tex.stackexchange.com/questions/21909/classes-and-packages-whats-the-difference + https://tex.stackexchange.com/questions/21909/classes-and-packages-whats-the-difference
+ https://tex.stackexchange.com/questions/74941/add-option-to-class-with-command

@ -37,7 +37,6 @@
\begin{document} \begin{document}
\DocInput{ifprintedition.dtx} \DocInput{ifprintedition.dtx}
\PrintChanges \PrintChanges
\PrintIndex
\end{document} \end{document}
%</driver> %</driver>
% \fi % \fi
@ -70,31 +69,35 @@
% %
% \title{The \textsf{ifprintedition} package\thanks{This document % \title{The \textsf{ifprintedition} package\thanks{This document
% corresponds to \textsf{ifprintedition}~\fileversion, dated \filedate.}} % corresponds to \textsf{ifprintedition}~\fileversion, dated \filedate.}}
% \author{Taha Ahmed \\ \texttt{taha+ltx@chepec.se}} % \author{Taha Ahmed \\ \texttt{taha@chepec.se}}
% %
% \maketitle % \maketitle
% %
% \section{Introduction} % \section{Introduction}
% %
% Put text here. % Please also see the adjoining \texttt{README.md} file.
% %
% \section{Usage} % \section{Usage}
% %
% Put text here. % The two macros in this package are purposefully designed to work similar to
% % \texttt{\\ifdraft\{\}\{\}} from the \texttt{ifdraft} package.
% \DescribeMacro{\dummyMacro} %
% This macro does nothing.\index{doing nothing|usage} It is merely an % \DescribeMacro{\ifwebedition\{\}\{\}}
% example. If this were a real macro, you would put a paragraph here % Code in the first block will be executed if the documentclass option
% describing what the macro is supposed to do, what its mandatory and % \texttt{webedition} was set (this is controlled in the documentclass
% optional arguments are, and so forth. % \texttt{cls} file, see this
% % \href{https://git.solarchemist.se/config/texmf-latex/commit/ba83966ffb39037547e2b800629972f8bf5e6706}{commit}
% \DescribeEnv{dummyEnv} % for an example).
% This environment does nothing. It is merely an example. % Conversely, code in the second block will be executed if the option \texttt{webedition}
% If this were a real environment, you would put a paragraph here % was \emph{not} set (which means that \texttt{printedition} is set, just like
% describing what the environment is supposed to do, what its % the \texttt{draft} and \texttt{final} options behave).
% mandatory and optional arguments are, and so forth. %
% % \DescribeMacro{\ifprintedition\{\}\{\}}
% \StopEventually{\PrintIndex} % Provided for convenience, as it is not really necessary in light of its
% sister function above.
% If it suits you better, use it.
%
% \StopEventually{}
% %
% \section{Implementation} % \section{Implementation}
% %

Binary file not shown.
Loading…
Cancel
Save