Historique des modifications [retour]
cliquez ici pour masquer/afficher la révision 6
suppression d'espace indésirable

20 Fév '20, 19:35

touhami's gravatar image

touhami
9.8k410

Voici un code qui répond à votre demande. \documentclass[chapterprefix,twoside,12pt,DIV=12]{scrbook} \KOMAoptions{headsepline=true, chapterprefix=true} \usepackage{lmodern} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage[onehalfspacing]{setspace} \usepackage[bottom]{footmisc} \usepackage[acronym,smallcaps]{glossaries} \makeglossaries \makeatletter \defglsentryfmt[acronym]{\glsgenacfmt \ifglsused{\glslabel}{\if@mainmatter\marginpar{{\footnotesize\glsentrylong{\glslabel}}}\fi}{}} \makeatother \newacronym{unesco}{unesco}{United Nations Educational, Scientific and Cultural Organization} \begin{document} \frontmatter \mainmatter \gls{unesco} ...... \gls{unesco} \newpage \gls{unesco} \appendix \backmatter \gls{unesco} \printglossary[type=acronym, style=long]\label{listofacronyms} \end{document} [EDIT] Je ne suis pas sûr mais il se peut que la question soit plus simple que ce que j'ai supposé. Pour choisir manuellement entre la version courte et la version longue dans un tableaux, il suffit de définir deux nouvelles commandes comme suit : `\newcommand{\mhacrshort}[1]{\acronymfont{\glsentryshort{#1}}} \newcommand{\mhacrlong}[1]{\glsentrylong{#1}}` **ECM** \documentclass[chapterprefix,twoside,12pt,DIV=12]{scrbook} \KOMAoptions{headsepline=true, chapterprefix=true} \usepackage{lmodern} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage[onehalfspacing]{setspace} \usepackage[bottom]{footmisc} \usepackage{booktabs} \usepackage{longtable} \usepackage[acronym,smallcaps]{glossaries} \makeglossaries \makeatletter \defglsentryfmt[acronym]{\glsgenacfmt \ifglsused{\glslabel}{\if@mainmatter\marginpar{{\scriptsize \textsf{\glsentrylong{\glslabel}}}}\fi}{}} \makeatother \newcommand{\mhacrshort}[1]{\acronymfont{\glsentryshort{#1}}} \newcommand{\mhacrlong}[1]{\glsentrylong{#1}} \newacronym{unesco}{unesco}{United Nations Educational, Scientific and Cultural Organization} \newacronym{onu}{onu}{Organisation des Nations Unies} \begin{document} \frontmatter \mainmatter \chapter{test} \section{test} \gls{unesco} ...... \gls{onu} \gls{onu} ... \gls{unesco} \newpage \begin{table}[p] \begin{tabular}{@{}rcl@{}} \toprule \textbf{Colonne 1} & \textbf{Colonne 2} & \textbf{Colonne 3} \\ \midrule \mhacrlong{onu} & 1 & \mhacrshort{unesco} \\ \mhacrshort{onu} & 4 & \mhacrshort{unesco} \\ \bottomrule \end{tabular} \end{table} \appendix \backmatter \gls{unesco} \printglossary[type=acronym, style=long]\label{listofacronyms} \end{document} **[EDIT]** Voici le code modifié qui répond à votre demande. \documentclass[chapterprefix,twoside,12pt,DIV=12]{scrbook} \KOMAoptions{headsepline=true, chapterprefix=true} \usepackage{lmodern} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage[onehalfspacing]{setspace} \usepackage[bottom]{footmisc} \usepackage{booktabs} \usepackage{longtable} \usepackage{etoolbox} \usepackage[acronym,smallcaps]{glossaries} \makeglossaries \makeatletter \defglsentryfmt[acronym]{\glsgenacfmt \ifglsused{\glslabel}{\if@mainmatter \expandafter\ifx\csname mhused\glslabel\endcsname\relax \expandafter\gdef\csname mhused\glslabel\endcsname{} mhused\glslabel\endcsname{}% \xappto\mhclearacrmargin{\global\expandafter\expandafter\expandafter\let\expandafter\noexpand\csname mhused\glslabel\endcsname\relax}\marginpar{{\scriptsize \textsf{\glsentrylong{\glslabel}}}}\fi\fi}{}} \patchcmd\@outputpage{\botmark}{\botmark \mhclearacrmargin \gdef\mhclearacrmargin{}}{}{}{} \makeatother \newcommand{\mhacrshort}[1]{\acronymfont{\glsentryshort{#1}}} \newcommand{\mhacrlong}[1]{\glsentrylong{#1}} \newcommand{\mhclearacrmargin}{} \newacronym{unesco}{unesco}{United Nations Educational, Scientific and Cultural Organization} \newacronym{onu}{onu}{Organisation des Nations Unies} \begin{document} \frontmatter \mainmatter \chapter{test} \section{test} \gls{unesco} ...... \gls{onu} \gls{onu} ... \gls{unesco} \gls{onu} ... \gls{unesco} \newpage \gls{unesco} ...... \gls{onu} \gls{onu} ... \gls{unesco} \gls{onu} ... \gls{unesco} \begin{table}[p] \begin{tabular}{@{}rcl@{}} \toprule \textbf{Colonne 1} & \textbf{Colonne 2} & \textbf{Colonne 3} \\ \midrule \mhacrlong{onu} & 1 & \mhacrshort{unesco} \\ \mhacrshort{onu} & 4 & \mhacrshort{unesco} \\ \bottomrule \end{tabular} \end{table} \appendix \backmatter \gls{unesco} \printglossary[type=acronym, style=long]\label{listofacronyms} \end{document}
cliquez ici pour masquer/afficher la révision 5

08 Jan '20, 22:03

touhami's gravatar image

touhami
9.8k410

Voici un code qui répond à votre demande. \documentclass[chapterprefix,twoside,12pt,DIV=12]{scrbook} \KOMAoptions{headsepline=true, chapterprefix=true} \usepackage{lmodern} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage[onehalfspacing]{setspace} \usepackage[bottom]{footmisc} \usepackage[acronym,smallcaps]{glossaries} \makeglossaries \makeatletter \defglsentryfmt[acronym]{\glsgenacfmt \ifglsused{\glslabel}{\if@mainmatter\marginpar{{\footnotesize\glsentrylong{\glslabel}}}\fi}{}} \makeatother \newacronym{unesco}{unesco}{United Nations Educational, Scientific and Cultural Organization} \begin{document} \frontmatter \mainmatter \gls{unesco} ...... \gls{unesco} \newpage \gls{unesco} \appendix \backmatter \gls{unesco} \printglossary[type=acronym, style=long]\label{listofacronyms} \end{document} [EDIT] Je ne suis pas sûr mais il se peut que la question soit plus simple que ce que j'ai supposé. Pour choisir manuellement entre la version courte et la version longue dans un tableaux, il suffit de définir deux nouvelles commandes comme suit : `\newcommand{\mhacrshort}[1]{\acronymfont{\glsentryshort{#1}}} \newcommand{\mhacrlong}[1]{\glsentrylong{#1}}` **ECM** \documentclass[chapterprefix,twoside,12pt,DIV=12]{scrbook} \KOMAoptions{headsepline=true, chapterprefix=true} \usepackage{lmodern} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage[onehalfspacing]{setspace} \usepackage[bottom]{footmisc} \usepackage{booktabs} \usepackage{longtable} \usepackage[acronym,smallcaps]{glossaries} \makeglossaries \makeatletter \defglsentryfmt[acronym]{\glsgenacfmt \ifglsused{\glslabel}{\if@mainmatter\marginpar{{\scriptsize \textsf{\glsentrylong{\glslabel}}}}\fi}{}} \makeatother \newcommand{\mhacrshort}[1]{\acronymfont{\glsentryshort{#1}}} \newcommand{\mhacrlong}[1]{\glsentrylong{#1}} \newacronym{unesco}{unesco}{United Nations Educational, Scientific and Cultural Organization} \newacronym{onu}{onu}{Organisation des Nations Unies} \begin{document} \frontmatter \mainmatter \chapter{test} \section{test} \gls{unesco} ...... \gls{onu} \gls{onu} ... \gls{unesco} \newpage \begin{table}[p] \begin{tabular}{@{}rcl@{}} \toprule \textbf{Colonne 1} & \textbf{Colonne 2} & \textbf{Colonne 3} \\ \midrule \mhacrlong{onu} & 1 & \mhacrshort{unesco} \\ \mhacrshort{onu} & 4 & \mhacrshort{unesco} \\ \bottomrule \end{tabular} \end{table} \appendix \backmatter \gls{unesco} \printglossary[type=acronym, style=long]\label{listofacronyms} \end{document} **[EDIT]** Voici le code modifié qui répond à votre demande. \documentclass[chapterprefix,twoside,12pt,DIV=12]{scrbook} \KOMAoptions{headsepline=true, chapterprefix=true} \usepackage{lmodern} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage[onehalfspacing]{setspace} \usepackage[bottom]{footmisc} \usepackage{booktabs} \usepackage{longtable} \usepackage{etoolbox} \usepackage[acronym,smallcaps]{glossaries} \makeglossaries \makeatletter \defglsentryfmt[acronym]{\glsgenacfmt \ifglsused{\glslabel}{\if@mainmatter \expandafter\ifx\csname mhused\glslabel\endcsname\relax \expandafter\gdef\csname mhused\glslabel\endcsname{} \xappto\mhclearacrmargin{\global\expandafter\expandafter\expandafter\let\expandafter\noexpand\csname mhused\glslabel\endcsname\relax}\marginpar{{\scriptsize \textsf{\glsentrylong{\glslabel}}}}\fi\fi}{}} \patchcmd\@outputpage{\botmark}{\botmark \mhclearacrmargin \gdef\mhclearacrmargin{}}{}{}{} \makeatother \newcommand{\mhacrshort}[1]{\acronymfont{\glsentryshort{#1}}} \newcommand{\mhacrlong}[1]{\glsentrylong{#1}} \newcommand{\mhclearacrmargin}{} \newacronym{unesco}{unesco}{United Nations Educational, Scientific and Cultural Organization} \newacronym{onu}{onu}{Organisation des Nations Unies} \begin{document} \frontmatter \mainmatter \chapter{test} \section{test} \gls{unesco} ...... \gls{onu} \gls{onu} ... \gls{unesco} \gls{onu} ... \gls{unesco} \newpage \gls{unesco} ...... \gls{onu} \gls{onu} ... \gls{unesco} \gls{onu} ... \gls{unesco} \begin{table}[p] \begin{tabular}{@{}rcl@{}} \toprule \textbf{Colonne 1} & \textbf{Colonne 2} & \textbf{Colonne 3} \\ \midrule \mhacrlong{onu} & 1 & \mhacrshort{unesco} \\ \mhacrshort{onu} & 4 & \mhacrshort{unesco} \\ \bottomrule \end{tabular} \end{table} \appendix \backmatter \gls{unesco} \printglossary[type=acronym, style=long]\label{listofacronyms} \end{document}
cliquez ici pour masquer/afficher la révision 4

05 Jan '20, 16:50

touhami's gravatar image

touhami
9.8k410

cliquez ici pour masquer/afficher la révision 3

03 Jan '20, 19:26

touhami's gravatar image

touhami
9.8k410

cliquez ici pour masquer/afficher la révision 2

03 Jan '20, 19:20

touhami's gravatar image

touhami
9.8k410

cliquez ici pour masquer/afficher la révision 1

03 Jan '20, 14:29

touhami's gravatar image

touhami
9.8k410

C'est votre première visite ici ? Consultez la FAQ !

×