- Questo topic ha 10 risposte, 5 partecipanti ed è stato aggiornato l'ultima volta 19 anni, 6 mesi fa da .
-
Topic
-
Ho recentemente messo un po’ a posto i comandi che uso spesso, e mi sono creato un paio di pacchetti per facilitarmi il lavoro. Vi sarei molto grato se, dall’alto della vostra esperienza, vorreste darci un’occhiata e darmi qualsiasi suggerimento e consiglio vi venisse in mente. Grazie!Questo è il pacchetto che richiamo nel documento che devo scrivere. Naturalmente ne ho creati altri in corrispondenza degli altri tipi di documento. In teoria dovrebbe gestire solo le impostazioni relative al tipo di documento e alla lingua adottata.
`% Author: Simonetto Paolo\ProvidesPackage{a4EnBook}
% Provides a setted a4 book environment for English language.% ——————————————————————————
% Include personal packages\usepackage{mathEnhan} % personal math enhancement
\usepackage{textEnhan} % personal text enhancement% ——————————————————————————
% Page settings\usepackage{layaureo} % aurea section layout
\usepackage{fancyhdr} % headers formatter
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhead[LE,RO]{\small \slshape \leftmark}
\fancyhead[LO,RE]{\small \slshape \rightmark}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection \ – #1}}% ——————————————————————————
% Text settings\usepackage[english]{babel} % language
\linespread{1} % linespread coefficient% ——————————————————————————
% Index and sections settings\setcounter{tocdepth}{3} % max section depth in index
\setcounter{secnumdepth}{3} % max section depth\usepackage{sectsty} % sections style
\sectionfont{\color{TealBlue} \sectionrule{3ex}{1.2pt}{-1.5ex}{0.6pt}}
\subsectionfont{\color{TealBlue} \sectionrule{3ex}{0.6pt}{-1.5ex}{0pt}}
\subsubsectionfont{\color{TealBlue} \sectionrule{3ex}{0.0pt}{-1.5ex}{0pt}}\usepackage[Lenny]{fncychap} % chapter styles
% ——————————————————————————
% Images and floats\usepackage{float} % floating elements
\renewcommand{\floatpagefraction}{0.7} % max page fraction for floats
\renewcommand{\topfraction}{0.5} % max top page fraction for floats
\renewcommand{\bottomfraction}{0.4} % max bottom page fraction for floats
\renewcommand{\textfraction}{0.2} % min page fraction for text
\setcounter{totalnumber}{3} % max number of floats in a page
\setcounter{topnumber}{2} % max number of floats on top
\setcounter{topnumber}{1} % max number of floats on bottom\usepackage{caption2} % captions formatter
\renewcommand{\captionfont}{\footnotesize}
\renewcommand{\captionlabelfont}{\bfseries}\usepackage[english]{varioref} `
Questi chiamano un alto paio di pacchetti che contengono comandi e impostazioni indipendenti dalla lingua e dal tipo di documento, e che sono quindi gli stessi per tutti i precedenti:
`
% Author: Simonetto Paolo\ProvidesPackage{mathEnhan}
% Provides new formula commands.\usepackage{amsmath} % advanced mathematical style
\usepackage{amssymb} % advanced mathematical symbols
\usepackage{amsthm} % theorem environments
\usepackage{amsfonts} % mathematical fonts\setcounter{MaxMatrixCols}{15} % extend the maximal number of columns to 15
% Generic commands
\newcommand{\ve}[1]{\ensuremath{\boldsymbol{#1}}}
\newcommand{\ma}[1]{\ensuremath{\mathcal{#1}}}
\newcommand{\propr}[1]{\ensuremath{\mathcal{#1}}}
\newcommand{\cors}[1]{\ensuremath{\mathfrak{#1}}}
\newcommand{\campo}[1]{\ensuremath{\mathbb{#1}}}% Numeric sets
\newcommand{\N}{\ensuremath{\mathbb{N}}}
\newcommand{\Z}{\ensuremath{\mathbb{Z}}}
\newcommand{\Q}{\ensuremath{\mathbb{Q}}}
\newcommand{\R}{\ensuremath{\mathbb{R}}}
\newcommand{\I}{\ensuremath{\mathbb{I}}}
\newcommand{\C}{\ensuremath{\mathbb{C}}}
\newcommand{\Nn}{\ensuremath{\mathbb{N}^n}}
\newcommand{\Zn}{\ensuremath{\mathbb{Z}^n}}
\newcommand{\Qn}{\ensuremath{\mathbb{Q}^n}}
\newcommand{\Rn}{\ensuremath{\mathbb{R}^n}}
\newcommand{\Cn}{\ensuremath{\mathbb{C}^n}}
\newcommand{\Nm}{\ensuremath{\mathbb{N}^m}}
\newcommand{\Zm}{\ensuremath{\mathbb{Z}^m}}
\newcommand{\Qm}{\ensuremath{\mathbb{Q}^m}}
\newcommand{\Rm}{\ensuremath{\mathbb{R}^m}}
\newcommand{\Cm}{\ensuremath{\mathbb{C}^m}}% Complexity classes
\renewcommand{\P}{\ensuremath{\mathcal{P}}}
\newcommand{\NP}{\ensuremath{\mathcal{NP}}}
\newcommand{\NPC}{\ensuremath{\mathcal{NPC}}}
\newcommand{\NPH}{\ensuremath{\mathcal{NPH}}}
\newcommand{\CoNP}{\ensuremath{\mathcal{C}o\mathcal{NP}}}
\newcommand{\RI}{\ensuremath{R}}
\newcommand{\RE}{\ensuremath{RE}}% Forumula divisors
\newcommand{\s}{\;}
\renewcommand{\ss}{\ }
\newcommand{\sss}{\quad}
\newcommand{\ssss}{\qquad}
\newcommand{\sssss}{\qquad\quad}\newcommand{\spaces}[1]{\s #1 \s}
\newcommand{\spacess}[1]{\ss #1 \ss}
\newcommand{\spacesss}[1]{\sss #1 \sss}
\newcommand{\spacessss}[1]{\ssss #1 \ssss}
\newcommand{\spacesssss}[1]{\sssss #1 \sssss}\newcommand{\eqs}{\spaces{=}}
\newcommand{\eqss}{\spacess{=}}
\newcommand{\eqsss}{\spacesss{=}}
\newcommand{\eqssss}{\spacesssss{=}}\newcommand{\gs}{\spaces{>}}
\newcommand{\gss}{\spacess{>}}
\newcommand{\gsss}{\spacesss{>}}
\newcommand{\gssss}{\spacesssss{>}}\newcommand{\ls}{\spaces{<}} \newcommand{\lss}{\spacess{<}} \newcommand{\lsss}{\spacesss{<}} \newcommand{\lssss}{\spacesssss{<}} \newcommand{\neqs}{\spaces{\neq}} \newcommand{\neqss}{\spacess{\neq}} \newcommand{\neqsss}{\spacesss{\neq}} \newcommand{\neqssss}{\spacesssss{\neq}} \newcommand{\leqs}{\spaces{\leq}} \newcommand{\leqss}{\spacess{\leq}} \newcommand{\leqsss}{\spacesss{\leq}} \newcommand{\leqssss}{\spacesssss{\leq}} \newcommand{\geqs}{\spaces{\geq}} \newcommand{\geqss}{\spacess{\geq}} \newcommand{\geqsss}{\spacesss{\geq}} \newcommand{\geqssss}{\spacesssss{\geq}} \newcommand{\las}{\spaces{\leftarrow}} \newcommand{\lass}{\spacess{\leftarrow}} \newcommand{\lasss}{\spacesss{\leftarrow}} \newcommand{\lassss}{\spacesssss{\leftarrow}} \newcommand{\Las}{\spaces{\Leftarrow}} \newcommand{\Lass}{\spacess{\Leftarrow}} \newcommand{\Lasss}{\spacesss{\Leftarrow}} \newcommand{\Lassss}{\spacesssss{\Leftarrow}} \newcommand{\ras}{\spaces{\rightarrow}} \newcommand{\rass}{\spacess{\rightarrow}} \newcommand{\rasss}{\spacesss{\rightarrow}} \newcommand{\rassss}{\spacesssss{\rightarrow}} \newcommand{\Ras}{\spaces{\Rightarrow}} \newcommand{\Rass}{\spacess{\Rightarrow}} \newcommand{\Rasss}{\spacesss{\Rightarrow}} \newcommand{\Rassss}{\spacesssss{\Rightarrow}} \newcommand{\lras}{\spaces{\leftrightarrow}} \newcommand{\lrass}{\spacess{\leftrightarrow}} \newcommand{\lrasss}{\spacesss{\leftrightarrow}} \newcommand{\lrassss}{\spacesssss{\leftrightarrow}} \newcommand{\LRas}{\spaces{\Leftrightarrow}} \newcommand{\LRass}{\spacess{\Leftrightarrow}} \newcommand{\LRasss}{\spacesss{\Leftrightarrow}} \newcommand{\LRassss}{\spacesssss{\Leftrightarrow}} ` e per il testo: ` % Author: Simonetto Paolo \ProvidesPackage{textEnhan} % Provides text settings and new commands. % ------------------------------------------------------------------------------ % Input settings \usepackage[utf8]{inputenc} % input encoding \usepackage[active]{srcltx} % allows forwardDVI \usepackage[usenames]{color} % colors % ------------------------------------------------------------------------------ % Index and sections settings \usepackage{makeidx} % index maker \usepackage{subsections} % sections formatter \newcommand{\sect}[1]{\section{#1} \label{#1}} \newcommand{\ssect}[1]{\subsection{#1} \label{#1}} \newcommand{\sssect}[1]{\subsubsection{#1} \label{#1}} \newcommand{\concept}[1]{\subsubsubsection{#1}} % ------------------------------------------------------------------------------ % Images and floats \usepackage[dvips]{graphicx} % pictures \usepackage{wrapfig} % wrap figure with text \usepackage{subfigure} % gerarchic numbers on figures \usepackage{ctable} % tables % ------------------------------------------------------------------------------ % Other \usepackage{verbatim} % comments % ------------------------------------------------------------------------------ % New commands \newcommand{\defin}[1]{\textcolor{TealBlue}{#1}} \newcommand{\virg}[1]{``#1''} \newcommand{\refsec}[1]{(\S\ref{#1})} \newcommand{\refequ}[1]{($\digamma$\ref{#1})} \newcommand{\refcod}[1]{($\Psi$\ref{#1})} \newcommand{\divisorio}{\begin{center} \rule{\textwidth / (2)}{0.5pt} \end{center}} \graphicspath{{./Figures/},{./}} \newcommand{\fig}[2]{\begin{figure}[tb] \begin{centering} \includegraphics[keepaspectratio, width=0.7\textwidth]{#1} \caption{#2}\end{centering} \end{figure}} \newcommand{\smallfig}[2]{\begin{figure}[tb] \begin{centering} \includegraphics[keepaspectratio, width=0.4\textwidth]{#1} \caption{#2}\end{centering} \end{figure}} \newcommand{\bigfig}[2]{\begin{figure}[tb] \begin{centering} \includegraphics[keepaspectratio, width=0.95\textwidth]{#1} \caption{#2}\end{centering} \end{figure}} \newcommand{\doublefig}[4]{\begin{figure}[tb] \includegraphics[keepaspectratio, width=0.4\textwidth]{#1} \caption{#2} \label{#1} \hspace{4em} \includegraphics[keepaspectratio, width=0.4\textwidth]{#3} \caption{#4} \label{#4} \end{figure}} %\newcommand{\doublefig}[4]{\begin{tabular}{@{}l@{}c@{}r@{}} \begin{minipage}{6.7cm} %\begin{figure}[H] \begin{centering} \includegraphics[keepaspectratio, width=5.5cm, %height=6.5cm]{#1} \caption{#2} \end{centering} \end{figure} \end{minipage} & \hspace{0.5cm} %& \begin{minipage}{6.7cm} \begin{figure}[H] \begin{centering} %\includegraphics[keepaspectratio, width=5.5cm, height=6.5cm]{#3}\caption{#4} \end{centering} %\end{figure} \end{minipage} \vspace{0.7cm} \end{tabular}} ` ho parecchi dubbi sul comando commentato alla fine.. vorrei che mi mettesse le due figure affiancate e in modo che ciascuna occupi la sua metà pagina. Come posso adattare il comando immediatamente precedente in maniera che faccia esattamente questo lavoro, senza dover ricorrere a quest'ultima accozzaglia di comandi? Grazie!
- Devi essere connesso per rispondere a questo topic.