Modérateur: gdm_tex
rebouxo a écrit:Ben déjà que slashbox ne fonctionnait pas bien, alors une croix, pffffou....
MB a écrit:Oui, je ne n'ai pas trop d'espoirs mais bon ... qui sait !
MB a écrit:Bonjour, je souhaite pouvoir barrer certaines cases d'un tableau (tabular ou array). Il s'agit donc de faire un croix occupant l'intégralité de la case à barrer.
Un peu comme slashbox donc, mais avec deux traits.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% http://www.cnam.fr/maths/Membres/ghorbanzadeh/
\documentclass[12pt, twoside, a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage[table]{xcolor}
\usepackage{array, slashbox, multirow}
\usepackage{pstricks}
\usepackage{amsmath,amssymb}
\newcommand\Lignecouleur{{\let\noalign\relax\rowcolor{green!40!red!45}}}
\newlength{\LongH}
\setlength{\LongH}{\arraycolsep}
\addtolength{\LongH}{2cm}
\newlength{\LongV}
\setlength{\LongV}{4\tabcolsep}
\def\Casehachuree{%
\begin{pspicture}(0,0)(\the\LongH,\the\LongV)
\psframe[fillstyle=crosshatch,linecolor=white](-\arraycolsep,-1.5\tabcolsep)(\the\LongH,\the\LongV)
\end{pspicture}
}
\begin{document}
\renewcommand\arraystretch{2}
\begin{tabular}{l|*{5}{p{2cm}|}}
&\multicolumn{5}{>{\Lignecouleur}c}{$f_X\ast f_Y$} \\ \cline{2-6}
&\backslashbox{$f_X$}{$f_Y$} & 19 & 3 & $X^{\alpha}$ & \Casehachuree \\ \cline{2-6}
& $X^{\eta}$& \Casehachuree & 3 & \Casehachuree& 5 \\ \cline{2-6}
& \Casehachuree & 3 & 4 & 5 & \Casehachuree\\ \cline{2-6}
& -11 & $X-1$ & \Casehachuree & 6 & 7 \\\cline{2-6}
\end{tabular}
\end{document}MB a écrit:Bonsoir D.GH.
là elle est complètement hachurée
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% http://www.cnam.fr/maths/Membres/ghorbanzadeh/
\documentclass[12pt, twoside, a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage[table]{xcolor}
\usepackage{array, slashbox, multirow}
\usepackage{pstricks, pstricks-add}
\usepackage{amsmath,amssymb,calc}
\newcommand\Lignecouleur{{\let\noalign\relax\rowcolor{green!40!red!45}}}
\newlength{\LongH}
\setlength{\LongH}{\arraycolsep}
\addtolength{\LongH}{2cm}
\newlength{\LongV}
\setlength{\LongV}{4\tabcolsep}
\def\Casehachuree{%
\begin{pspicture}(0,0)(\the\LongH,\the\LongV)
%\psline[linewidth=2pt](-\arraycolsep,\the\LongV)(\the\LongH,-1.5\tabcolsep)
\psline[linewidth=2pt](-\arraycolsep,-1.5\tabcolsep)(\the\LongH,\the\LongV)
%\psframe[fillstyle=hlines,hatchangle=45,hatchsep=2,linecolor=white](-\arraycolsep,-1.5\tabcolsep)(\the\LongH,\the\LongV)
\end{pspicture}
}
\begin{document}
\renewcommand\arraystretch{2}
\begin{tabular}{l|*{5}{p{2cm}|}}
&\multicolumn{5}{>{\Lignecouleur}c}{$f_X\ast f_Y$} \\ \cline{2-6}
&\backslashbox{$f_X$}{$f_Y$} & 19 & 3 & $X^{\alpha}$ & \Casehachuree \\ \cline{2-6}
& $X^{\eta}$& \Casehachuree & 3 & \Casehachuree& 5 \\ \cline{2-6}
& \Casehachuree & 3 & 4 & 5 & \Casehachuree\\ \cline{2-6}
& -11 & $X-1$ & \Casehachuree & 6 & 7 \\\cline{2-6}
\end{tabular}
\end{document}
MB a écrit:Bon une seule barre ça fait qu'il en manque encore une pour faire une croix.![]()
Mais c'est pas grave de toutes façons. Je cherche avant tout une procédure compatible pdflatex.
% Compilation sous Miktex (win32) : pdflatex -enable-write18 doc.tex%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% http://www.cnam.fr/maths/Membres/ghorbanzadeh/
% Compilation sous Miktex (win32) : pdflatex -enable-write18 doc.tex
\documentclass[12pt,a4paper]{article}
\usepackage[on]{auto-pst-pdf}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage{array, slashbox,colortbl}
\usepackage{pstricks, pstricks-add}
\usepackage{amsmath,amssymb,calc}
\newcommand\Lignecouleur{{\let\noalign\relax\rowcolor{green!40!red!45}}}
\newlength{\LongH}
%\setlength{\LongH}{\arraycolsep}
\addtolength{\LongH}{2cm}
\newlength{\LongV}
\setlength{\LongV}{4\tabcolsep}
\def\Casehachuree{%
\begin{pspicture}(-2\arraycolsep,-4\tabcolsep)(\the\LongH,\the\LongV)
\psline[linewidth=2pt](\arraycolsep,\the\LongV)(\the\LongH,-4\tabcolsep)
\psline[linewidth=2pt](\arraycolsep,-4\tabcolsep)(\the\LongH,\the\LongV)
\end{pspicture}
}
\begin{document}
\renewcommand\arraystretch{2}
\begin{tabular}{l|*{5}{p{2cm}|}}
&\multicolumn{5}{>{\Lignecouleur}c}{$f_X\ast f_Y$} \tabularnewline \cline{2-6}
&\backslashbox{$f_X$}{$f_Y$} & 19 & 3 & $X^{\alpha}$ & 16 \tabularnewline \cline{2-6}
& $X^{\eta}$& \Casehachuree & 3 & \Casehachuree& 5 \tabularnewline \cline{2-6}
& \Casehachuree & 3 & 4 & 5 & \Casehachuree\tabularnewline \cline{2-6}
& -11 & $X-1$ & \Casehachuree & 6 & 7\tabularnewline\cline{2-6}
\end{tabular}
\end{document}
\slashbox{\backslashbox{}{}}{\backslashbox{}{}}Utilisateurs parcourant ce forum: Google Adsense [Bot] et 24 invités