diff options
author | Karl Berry <karl@freefriends.org> | 2021-03-15 22:04:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-03-15 22:04:54 +0000 |
commit | 22373b731e871a68df2dad1b8b9f4577b970532e (patch) | |
tree | bea8acc01e58f58953362630f27bf602601fd2cb /Master/texmf-dist/tex/latex/minimalist/minimart.cls | |
parent | 641254b2ef0f7fa3faa2cdd144019b68ec55f2b9 (diff) |
minimalist (15mar21)
git-svn-id: svn://tug.org/texlive/trunk@58395 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/minimalist/minimart.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/minimalist/minimart.cls | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/minimalist/minimart.cls b/Master/texmf-dist/tex/latex/minimalist/minimart.cls new file mode 100644 index 00000000000..b9a5a27142f --- /dev/null +++ b/Master/texmf-dist/tex/latex/minimalist/minimart.cls @@ -0,0 +1,132 @@ +%% +%% This is file `minimalist/minimart.cls', +%% generated with the docstrip utility. + +%% Copyright (C) 2021 by Jinwen XU +%% +%% This is part of the minimalist class series. +%% +%% This work may be distributed and/or modified under the conditions of the +%% LaTeX Project Public License, either version 1.3c of this license or (at +%% your option) any later version. The latest version of this license is in +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3c or later is part of all distributions of LaTeX version +%% 2005/12/01 or later. +%% +\NeedsTeXFormat{LaTeX2e}[2020-10-01] +\ProvidesClass{minimart} + [2021/03/15 A simple and clear article style] +\def\minimclass@baseclass{article} +\RequirePackage{kvoptions} +\RequirePackage{etoolbox} +\SetupKeyvalOptions{ + family = @minimclass, + prefix = @minimclass@, +} +\DeclareBoolOption[false]{draft} +\DeclareBoolOption[false]{fast} +\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{\minimclass@baseclass}} +\ProcessKeyvalOptions*\relax +\LoadClass{\minimclass@baseclass} +\if@minimclass@draft + \@minimclass@fasttrue +\fi + +%%================================ +%% Page layout +%%================================ +\RequirePackage[heightrounded]{geometry} +\geometry{ + papersize={7in,10in}, + total={40em,60em}, + hmarginratio=1:1, + vmarginratio=1:1, + footnotesep=2em plus 2pt minus 2pt, +} + +\if@minimclass@fast + \PassOptionsToPackage{fast}{minimalist} +\fi +\RequirePackage{minimalist} +\AtEndPreamble{\RequirePackage{parskip}} + +%%================================ +%% Fonts +%%================================ +\RequirePackage{iftex} +\ifPDFTeX +\RequirePackage[T1]{fontenc} +\RequirePackage{inputenc} +\fi +\RequirePackage{mathpazo} +\RequirePackage{newpxtext} + +\RequirePackage[verbose=silent]{microtype} + +%%================================ +%% Graphics +%%================================ +\RequirePackage{graphicx} +\graphicspath{{images/}} +\RequirePackage{wrapfig} +\RequirePackage{caption} + +%%================================ +%% Index +%%================================ +\RequirePackage{imakeidx} +\pretocmd{\printindex}{\LocallyStopLineNumbers}{}{\FAIL} +\apptocmd{\printindex}{\ResumeLineNumbers}{}{\FAIL} + +%%================================ +%% Draft mark +%%================================ +\def\dnfFont{\ttfamily} +\def\needgraphFont{\ttfamily} + +\def\dnfTextEN{To be finished here} +\def\needgraphTextEN{A graph is needed here} +\def\dnfTextFR{À terminer ici} +\def\needgraphTextFR{Il manque encore un graphique ici} +\def\dnfTextCN{这里的内容尚未完成} +\def\needgraphTextCN{这里需要一张图片} + +\definecolor{dnfColor}{RGB}{21,122,20} +\definecolor{needgraphColor}{RGB}{70,130,180} + +\if@minimclass@fast + \newcommand{\plainBox}[2][-paper]{\textcolor{#1}{% + \setlength{\fboxsep}{1.5pt}% + \setlength{\fboxrule}{1.2pt}% + \fbox{#2}}} +\else + \PassOptionsToPackage{many}{tcolorbox} + \RequirePackage{tcolorbox} + \newtcbox{\plainBox}[1][-paper]{enhanced jigsaw,% + on line, arc = 1.2pt, outer arc = 1pt,breakable,% + colframe = #1,colupper=#1,opacityback=0,% + boxsep = 1pt,boxrule = 1.2pt,% + left = 1pt, right = 1pt, top = 0pt, bottom = 0pt,% + } +\fi + +\NewDocumentCommand{\dnf}{d<>}{% + \noindent\plainBox[dnfColor]% + {\normalfont\dnfFont\bfseries\small% + \csname dnfText\csname\languagename ABBR\endcsname\endcsname% + \IfNoValueF{#1}{ : #1}}% +} +\NewDocumentCommand{\needgraph}{d<>}{% + \par% + \centerline{\plainBox[needgraphColor]% + {\normalfont\needgraphFont\bfseries\small% + \csname needgraphText\csname\languagename ABBR\endcsname\endcsname% + \IfNoValueF{#1}{ : #1}}}% + \par% +} + +\endinput +%% +%% End of file `minimalist/minimart.cls'. |