Risposte nei forum create
-
AutoreRisposte
-
::
Riapro la discussione per un problema che è sorto di recente: In pratica la stessa immagine di cui discutevamo in questo topic la devo mettere in un articolo dove la classe è elsarticle e questa sfora grandemente e soprattutto crea problemi di posizionamento strani all’interno dell’immagine. Ci sono modi per adattare l’immagine a questa nuova classe oppure c’è un modo per generare un pdf di questa immagine in un file a parte e poi inserire quello scalandolo?
Grazie
Marco
Attachments:
You must be logged in to view attached files.::franen” post=79975http://tex.stackexchange.com/questions/69606/misplaced-omit-multispan-with-newcommand
Se usi [tt]\DeclareExpandableDocumentCommand{\itotal}{m}{%…[/tt] il tuo codice funziona, ma non ho ancora capito dove stia il problema.Così funziona, grazie! in che senso non hai capito dove sia il problema?
franen” post=79975
Perché non usi i comandi di booktabs? (\toprule, midrule e \bottomrule).
E in \iitem anziché lasciare una riga vuota potresti usare il comando opzionale per spaziare le righe delle tabelle \\[5pt] (o quel che vuoi tu) a fine riga.(ma è necessario?)
FranUso sempre i comandi di booktabs, ma essendo una ricevuta/fattura sinceramente non mi garbava molto il risultato che ottenevo!
Lo spazio lo metto per renderla più leggibile!Ciao
Marco
::Ciao.
La mia situazione è analoga alla tua. Produco in ambito professionale:
* lettere (alcune assomigliano ad una ricevuta per esse uso il pacchetto calctab di un noto autore);
* relazioni tecniche
* e fascicoli di calcolo.avevo letto stamattina il tuo articolo su arstexnica!! 😀
Ma sinceramente pensavo che non mi servisse dato che non devo fare somme…Per il problema specifico delle ricevute, considera anche una soluzione basata su database come ho illustrato in questo post.
Credo ti abbia dato un po’ di materiale su cui lavorare, e speriamo che qualche altro ti dia i suoi suggerimenti.A quello avevo già pensato, infatti sto organizzando una sorta di gestionale… ma non è per il momento!! 🙂
La soluzione che non ho avuto più il tempo di realizzare, è quella di scrivere una classe dove sistemare il codice comune a tutti i documenti, una sorta di superclasse nel senso della programmazione ad oggetti.
Da essa poi, costruire l esingole classi di documento con il codice specifico.
A mio avviso è la soluzione ideale ed anche semplice da realizzare: nella classe ‘derivata’ basta iniziare con la macro \LoadClass{nomeclassebase}.Io pensavo ad una classe unica, ma in effetti l’approccio ad oggetti non è male!! da studiare!!!
Grazie
Marco
::
Ciao a tutti.
Allora, ho studiato parecchio la classe isodoc ed ho iniziato a creare la mia, o meglio, dato che per l’associazione ho già un classe che funziona per carta stampata/verbali/convocazioni pensavo di mettere anche le ricevute nella stessa classe.Pensavo di aggiungere un opzione alla classe (invoice) e di aggiungere un nuovo comando \invoice per la stampa della ricevuta… ora, mi chiedevo, dato che questa classe fa “molte” cose, secondo voi qual’è il miglior modo per aggiungere i dati della persona a cui si sta emettendo la ricevuta? ed evitare che vengano usati se non si sta emettendo una ricevuta (ad esempio se sto scrivendo il verbale!)
spero di non aver fatto troppa confusione
Ciao
Marco
::
Ho provato un’altra soluzione, ma non mi piace tanto per due motivi:
1) le dimensioni sono “statiche”
2) avendo usato lo scope non posso mettere dei nodi da portare fuori. mi sbaglio?
`\documentclass[a4paper,10pt,twocolumn]{IEEEtran}\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% COMANDI VARI PER LE IMMAGINI
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{xparse}
\usepackage{tikz}
\usetikzlibrary{calc,positioning}\newcommand{\bigpicsize}[1]{\footnotesize{#1}}
\newcommand{\picsize}[1]{\scriptsize{#1}}
\newcommand{\picsizett}[1]{\scriptsize{\texttt{#1}}}
\newcommand{\smallpicsize}[1]{\tiny{#1}}\pgfmathtruncatemacro{\classwidth}{3}
\pgfmathtruncatemacro{\classheight}{2}
\newcommand{\setclasswidth}[1]{\pgfmathtruncatemacro{\classwidth}{#1}}
\newcommand{\setclassheight}[1]{\pgfmathtruncatemacro{\classheight}{#1}}\tikzset{class/.style args={#1 and #2}{%
rectangle,draw,rounded corners,thick,minimum width=#1, minimum height=#2
}
}\tikzset{classinside/.code n args={3}{%
\node at ($(#1.north)+(0,-0.30)$){\picsizett{#2}};
\draw($(#1.north west)+(0,-0.60)$)–($(#1.north east)+(0,-0.60)$);
\node[yshift=-\classheight,text width=\classwidth cm,align=center] at (#1){#3};
}
}% DRAWCLASS
% #1 – Coordinate
% #2 – Label
% #3 – Nome Classe
% #4 – Contenuto
\NewDocumentCommand{\drawclass}{d() m m m}{
\IfNoValueTF{#1}{%true
\node[class=\classwidth cm and \classheight cm,name=#2]{};
}
{%false
\node[class=\classwidth cm and \classheight cm,name=#2]at(#1){};
}
\node[classinside={#2}{#3}{#4}]{};
}\NewDocumentCommand{\classmark}{o m O{0.05}}{%
\IfNoValueTF{#1}{%true
\tikz[overlay,remember picture,baseline=-0.5ex,xshift=-0.3 cm] \node[draw,fill=black,circle,scale=#3] (#2) {};
}
{%false
\tikz[overlay,remember picture,baseline=-0.5ex,xshift=#1 cm] \node[draw,fill=black,circle,scale=#3] (#2) {};
}
}\NewDocumentCommand{\invisiblemark}{o m}{%
\IfNoValueTF{#1}{%true
\tikz[overlay,remember picture,baseline=-0.5ex,xshift=-0.3 cm] \node[scale=0.05] (#2) {};
}
{%false
\tikz[overlay,remember picture,baseline=-0.5ex,xshift=#1 cm] \node[scale=0.05] (#2) {};
}
}% DRAWFILE
% #1 – Coordinate
% #2 – Label
% #3 – Nome File
\NewDocumentCommand{\drawfile}{d() m m}{
\IfNoValueTF{#1}{%true
\begin{scope}[shift={(0,0)}]
\draw (0.25,1) — (-0.75,1) — (-0.75,-1) — (0.75,-1) — (0.75,0.5) — (0.25,1);
\draw (0.25,1)|-(0.75,0.5);
\node at (0,1.2) {\smallpicsize{#3}};
\end{scope}
}{%false
\begin{scope}[shift={(#1)}]
\draw (0.25,1) — (-0.75,1) — (-0.75,-1) — (0.75,-1) — (0.75,0.5) — (0.25,1);
\draw (0.25,1)|-(0.75,0.5);
\node at (0,1.2) {\smallpicsize{#3}};
\end{scope}
}
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}\begin{figure*}[tb]
\centering
% \begin{tikzpicture}[scale=0.8,remember picture,overlay]
\begin{tikzpicture}[scale=0.8,remember picture]\draw[help lines,yshift=-13cm] (0,0) grid (20,13);
% SYSTEMC
\nodeat (18,0.25) {\bigpicsize{SystemC design}};
\draw [dashed] (2,0) rectangle (18,-3);
% POWERSIM
\nodeat (20,-13.25) {\bigpicsize{Powersim}};
\draw [dashed] (0,-1.5) rectangle (20,-13);\drawclass(5,-1.5){m1}{sc\_module}{\vdots \\ \classmark{m1init} \picsizett{ps\_init()}}
\drawclass(10,-1.5){m2}{sc\_module}{\vdots \\ \classmark{m2init} \picsizett{ps\_init()}}
\drawclass(15,-1.5){m3}{sc\_module}{\vdots \\ \classmark{m3init} \picsizett{ps\_init()}}
\setclasswidth{5}
\setclassheight{3}\drawclass(10,-5.5){pskernel}{ps\_kernel}{%
\invisiblemark[0]{addmodule} \picsizett{add\_module\_to\_powersim()} \\[2ex]
\begin{tabular}{|c|l|}
\hline
M1 & \picsizett{ps\_module} for M1 \\
\hline
M2 & \picsizett{ps\_module} for M2 \\
\hline
M3 & \picsizett{ps\_module} for M3 \classmark[0.2]{m3module}[0.03] \\
\hline
\end{tabular}
\\[2ex]
\hspace{0.5\classwidth em}\vdots
}\setclasswidth{3}
\setclassheight{1}\drawclass(4.5,-5.5){psconfigure}{ps\_configure}{}
\drawfile(1,-5.5){fconfigure}{ps\_configure.txt};%FILE\drawclass(15.5,-4.5){psresults}{ps\_results}{}
\drawclass(15.5,-6.5){pstrace}{ps\_trace}{}
\drawfile(19,-4.5){fresults}{ps\_results.txt};%FILE
\drawfile(19,-6.5){ftrace}{ps\_trace.txt};%FILE\drawclass(6,-9){psenergy}{ps\_energy\_model}{}
\drawclass(2,-11){psconstant}{ps\_constant\_model}{}
\drawclass(6,-11){pshardware}{ps\_hardware\_model}{}
\drawclass(10,-11){psRTL}{ps\_RTL\_model}{}\draw [->,>=latex] (psconfigure.east) — (pskernel.west|-psconfigure.east);
\draw [<-,>=latex] (psresults.west) — (pskernel.east|-psresults.west);
\draw [<-,>=latex] (pstrace.west) — (pskernel.east|-pstrace.west);\setclasswidth{5}
\setclassheight{3}\drawclass(15.5,-10){psmodule}{\invisiblemark[0]{psmoduleclass} ps\_module}{%
{}\\[2ex]
\begin{tabular}{|c|lc|}
\hline
\picsizett{sc\_bit \&} & \picsize{constant} & \classmark[0.2]{modconstant}[0.03] \\
\hline
\picsizett{sc\_bit |} & \picsize{hardware} & \classmark[0.2]{modhardware}[0.03] \\
\hline
\picsizett{sc\_int +} & \picsize{RTL} & \classmark[0.2]{modRTL}[0.03] \\
\hline
\end{tabular}
\\[2ex]
\hspace{0.5\classwidth em}\vdots
}\end{tikzpicture}
\begin{tikzpicture}[scale=0.8,remember picture,overlay]
\draw (m1init.center) — ($(m1init)-(0,1.25)$)-|(m2init.center) — ($(m2init)-(0,1.25)$)-|(m3init.center);
\draw [<-,>=latex] (addmodule.center) |-($(m2init)-(0,1.25)$);
\draw [->,>=latex] (m3module.center) — (m3module.center|-psmoduleclass.center) — (psmoduleclass.center);
\draw [->,>=latex] (modconstant.center) — ($(modconstant.center)+(2.5,0)$) — ($(modconstant.center)+(2.5,-3.7)$) — ($(modconstant.center)+(2.5,-3.7)$)-|(psconstant.south);
\draw [->,>=latex] (modhardware.center) — ($(modhardware.center)+(2.25,0)$) — ($(modhardware.center)+(2.25,-2.7)$) — ($(modhardware.center)+(2.25,-2.7)$)-|(pshardware.south);
\draw [->,>=latex] (modRTL.center) — ($(modRTL.center)+(2,0)$) — ($(modRTL.center)+(2,-1.7)$) — ($(modRTL.center)+(2,-1.7)$)-|(psRTL.south);;
\end{tikzpicture}\caption{Scheme of the interaction of Powersim with a SystemC design.}
\label{fig:powersim}
\end{figure*}\end{document}`
come posso migliorarlo? Hai qualche idea Claudio? 😕
Grazie
Marco
::
Vado avanti per piccoli passi:
`\documentclass[a4paper,10pt,twocolumn]{IEEEtran}\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% COMANDI VARI PER LE IMMAGINI
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{xparse}
\usepackage{tikz}
\usetikzlibrary{calc,positioning}\newcommand{\bigpicsize}[1]{\footnotesize{#1}}
\newcommand{\picsize}[1]{\scriptsize{#1}}
\newcommand{\picsizett}[1]{\scriptsize{\texttt{#1}}}
\newcommand{\smallpicsize}[1]{\tiny{#1}}\pgfmathtruncatemacro{\classwidth}{3}
\pgfmathtruncatemacro{\classheight}{2}
\newcommand{\setclasswidth}[1]{\pgfmathtruncatemacro{\classwidth}{#1}}
\newcommand{\setclassheight}[1]{\pgfmathtruncatemacro{\classheight}{#1}}\tikzset{class/.style args={#1 and #2}{%
rectangle,draw,rounded corners,thick,minimum width=#1, minimum height=#2
}
}\tikzset{classinside/.code n args={3}{%
\node at ($(#1.north)+(0,-0.30)$){\picsizett{#2}};
\draw($(#1.north west)+(0,-0.60)$)–($(#1.north east)+(0,-0.60)$);
\node[yshift=-\classheight,text width=\classwidth cm,align=center] at (#1){#3};
}
}\tikzset{file/.code n args={2}{%
\draw (0,0) — (0,#2) — (#1,#2);
}
}% DRAWCLASS
% #1 – Coordinate
% #2 – Label
% #3 – Nome Classe
% #4 – Contenuto
\NewDocumentCommand{\drawclass}{d() m m m}{
\IfNoValueTF{#1}{%true
\node[class=\classwidth cm and \classheight cm,name=#2]{};
}
{%false
\node[class=\classwidth cm and \classheight cm,name=#2]at(#1){};
}
\node[classinside={#2}{#3}{#4}]{};
}\NewDocumentCommand{\classmark}{o m O{0.05}}{%
\IfNoValueTF{#1}{%true
\tikz[overlay,remember picture,baseline=-0.5ex,xshift=-0.3 cm] \node[draw,fill=black,circle,scale=#3] (#2) {};
}
{%false
\tikz[overlay,remember picture,baseline=-0.5ex,xshift=#1 cm] \node[draw,fill=black,circle,scale=#3] (#2) {};
}
}\NewDocumentCommand{\invisiblemark}{o m}{%
\IfNoValueTF{#1}{%true
\tikz[overlay,remember picture,baseline=-0.5ex,xshift=-0.3 cm] \node[scale=0.05] (#2) {};
}
{%false
\tikz[overlay,remember picture,baseline=-0.5ex,xshift=#1 cm] \node[scale=0.05] (#2) {};
}
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}\begin{figure*}[tb]
\centering
% \begin{tikzpicture}[scale=0.8,remember picture,overlay]
\begin{tikzpicture}[scale=0.8,remember picture]\draw[help lines,yshift=-13cm] (0,0) grid (20,13);
% SYSTEMC
\nodeat (18,0.25) {\bigpicsize{SystemC design}};
\draw [dashed] (2,0) rectangle (18,-3);
% POWERSIM
\nodeat (20,-13.25) {\bigpicsize{Powersim}};
\draw [dashed] (0,-1.5) rectangle (20,-13);\drawclass(5,-1.5){m1}{sc\_module}{\vdots \\ \classmark{m1init} \picsizett{ps\_init()}}
\drawclass(10,-1.5){m2}{sc\_module}{\vdots \\ \classmark{m2init} \picsizett{ps\_init()}}
\drawclass(15,-1.5){m3}{sc\_module}{\vdots \\ \classmark{m3init} \picsizett{ps\_init()}}
\setclasswidth{5}
\setclassheight{3}\drawclass(10,-5.5){pskernel}{ps\_kernel}{%
\invisiblemark[0]{addmodule} \picsizett{add\_module\_to\_powersim()} \\[2ex]
\begin{tabular}{|c|l|}
\hline
M1 & \picsizett{ps\_module} for M1 \\
\hline
M2 & \picsizett{ps\_module} for M2 \\
\hline
M3 & \picsizett{ps\_module} for M3 \classmark[0.2]{m3module}[0.03] \\
\hline
\end{tabular}
\\[2ex]
\hspace{0.5\classwidth em}\vdots
}\setclasswidth{3}
\setclassheight{1}\drawclass(4.5,-5.5){psconfigure}{ps\_configure}{}
\drawclass(15.5,-4.5){psresults}{ps\_results}{}
\drawclass(15.5,-6.5){pstrace}{ps\_trace}{}%%%%%%%%%%%%% FILE
\node[file={0.9}{1.5}] at (17,-4.5) {};
%%%%%%%%%%%%%\drawclass(6,-9){psenergy}{ps\_energy\_model}{}
\drawclass(2,-11){psconstant}{ps\_constant\_model}{}
\drawclass(6,-11){pshardware}{ps\_hardware\_model}{}
\drawclass(10,-11){psRTL}{ps\_RTL\_model}{}\draw [->,>=latex] (psconfigure.east) — (pskernel.west|-psconfigure.east);
\draw [<-,>=latex] (psresults.west) — (pskernel.east|-psresults.west);
\draw [<-,>=latex] (pstrace.west) — (pskernel.east|-pstrace.west);\setclasswidth{5}
\setclassheight{3}\drawclass(15.5,-10){psmodule}{\invisiblemark[0]{psmoduleclass} ps\_module}{%
{}\\[2ex]
\begin{tabular}{|c|lc|}
\hline
\picsizett{sc\_bit \&} & \picsize{constant} & \classmark[0.2]{modconstant}[0.03] \\
\hline
\picsizett{sc\_bit |} & \picsize{hardware} & \classmark[0.2]{modhardware}[0.03] \\
\hline
\picsizett{sc\_int +} & \picsize{RTL} & \classmark[0.2]{modRTL}[0.03] \\
\hline
\end{tabular}
\\[2ex]
\hspace{0.5\classwidth em}\vdots
}\end{tikzpicture}
\begin{tikzpicture}[scale=0.8,remember picture,overlay]
\draw (m1init.center) — ($(m1init)-(0,1.25)$)-|(m2init.center) — ($(m2init)-(0,1.25)$)-|(m3init.center);
\draw [<-,>=latex] (addmodule.center) |-($(m2init)-(0,1.25)$);
\draw [->,>=latex] (m3module.center) — (m3module.center|-psmoduleclass.center) — (psmoduleclass.center);
\draw [->,>=latex] (modconstant.center) — ($(modconstant.center)+(2.5,0)$) — ($(modconstant.center)+(2.5,-3.7)$) — ($(modconstant.center)+(2.5,-3.7)$)-|(psconstant.south);
\draw [->,>=latex] (modhardware.center) — ($(modhardware.center)+(2.25,0)$) — ($(modhardware.center)+(2.25,-2.7)$) — ($(modhardware.center)+(2.25,-2.7)$)-|(pshardware.south);
\draw [->,>=latex] (modRTL.center) — ($(modRTL.center)+(2,0)$) — ($(modRTL.center)+(2,-1.7)$) — ($(modRTL.center)+(2,-1.7)$)-|(psRTL.south);;
\end{tikzpicture}\caption{Scheme of the interaction of Powersim with a SystemC design.}
\label{fig:powersim}
\end{figure*}\end{document}`
Partendo dal disegno iniziale ho cercato ora di aggiungere i disegnini che rappresentano i file. Ho creato il tikzset file con dentro delle righe di prova, poi l’ho inserito all’interno del disegno dandogli delle coordinate. Purtroppo il simbolino del file viene stampato nella coordinata (0,0)… questo perché all’interno del tikzset ho fatto partire le linee da 0? ma le coordinate inserite all’interno del tikzset non sono relative rispetto a dove dopo viene posizionato il nodo?
Ciao
Marco
::
`\documentclass[a4paper,10pt,twocolumn]{IEEEtran}\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% COMANDI VARI PER LE IMMAGINI
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{xparse}
\usepackage{tikz}
\usetikzlibrary{calc,positioning}\newcommand{\bigpicsize}[1]{\footnotesize{#1}}
\newcommand{\picsize}[1]{\scriptsize{#1}}
\newcommand{\picsizett}[1]{\scriptsize{\texttt{#1}}}
\newcommand{\smallpicsize}[1]{\tiny{#1}}\pgfmathtruncatemacro{\classwidth}{3}
\pgfmathtruncatemacro{\classheight}{2}
\newcommand{\setclasswidth}[1]{\pgfmathtruncatemacro{\classwidth}{#1}}
\newcommand{\setclassheight}[1]{\pgfmathtruncatemacro{\classheight}{#1}}\tikzset{class/.style args={#1 and #2}{
rectangle,draw,rounded corners,thick,minimum width=#1, minimum height=#2
}
}\tikzset{classinside/.code n args={3}{%
\node at ($(#1.north)+(0,-0.30)$){\picsizett{#2}};
\draw($(#1.north west)+(0,-0.60)$)–($(#1.north east)+(0,-0.60)$);
\node[yshift=-\classheight,text width=\classwidth cm,align=center] at (#1){#3};
}
}% DRAWCLASS
% #1 – Coordinate
% #2 – Label
% #3 – Nome Classe
% #4 – Contenuto
\NewDocumentCommand{\drawclass}{d() m m m}{
\IfNoValueTF{#1}{%true
\node[class=\classwidth cm and \classheight cm,name=#2]{};
}
{%false
\node[class=\classwidth cm and \classheight cm,name=#2]at(#1){};
}
\node[classinside={#2}{#3}{#4}]{};
}\NewDocumentCommand{\classmark}{o m O{0.05}}{%
\IfNoValueTF{#1}{%true
\tikz[overlay,remember picture,baseline=-0.5ex,xshift=-0.3 cm] \node[draw,fill=black,circle,scale=#3] (#2) {};
}
{%false
\tikz[overlay,remember picture,baseline=-0.5ex,xshift=#1 cm] \node[draw,fill=black,circle,scale=#3] (#2) {};
}
}\NewDocumentCommand{\invisiblemark}{o m}{%
\IfNoValueTF{#1}{%true
\tikz[overlay,remember picture,baseline=-0.5ex,xshift=-0.3 cm] \node[scale=0.05] (#2) {};
}
{%false
\tikz[overlay,remember picture,baseline=-0.5ex,xshift=#1 cm] \node[scale=0.05] (#2) {};
}
}\NewDocumentCommand{\anchormark}{o m m}{%
\IfNoValueTF{#1}{%true
\tikz[overlay,remember picture,baseline=-0.5ex,xshift=-0.3 cm] \node[scale=0.05] (#2) at (#3){};
}
{%false
\tikz[overlay,remember picture,baseline=-0.5ex,xshift=#1 cm] \node[scale=0.05] (#2) at (#3) {};
}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}\begin{figure*}[tb]
\centering
% \begin{tikzpicture}[scale=0.8,remember picture,overlay]
\begin{tikzpicture}[scale=0.8]\draw[help lines,yshift=-13cm] (0,0) grid (20,13);
% SYSTEMC
\nodeat (18,0.25) {\bigpicsize{SystemC design}};
\draw [dashed] (2,0) rectangle (18,-3);
% POWERSIM
\nodeat (20,-13.25) {\bigpicsize{Powersim}};
\draw [dashed] (0,-1.5) rectangle (20,-13);\drawclass(5,-1.5){m1}{sc\_module}{\vdots \\ \classmark{m1init} \picsizett{ps\_init()}}
\drawclass(10,-1.5){m2}{sc\_module}{\vdots \\ \classmark{m2init} \picsizett{ps\_init()}}
\drawclass(15,-1.5){m3}{sc\_module}{\vdots \\ \classmark{m3init} \picsizett{ps\_init()}}
\setclasswidth{5}
\setclassheight{3}\drawclass(10,-5.5){pskernel}{ps\_kernel}{%
\invisiblemark[0]{addmodule} \picsizett{add\_module\_to\_powersim()} \\[2ex]
\begin{tabular}{|c|l|}
\hline
M1 & \picsizett{ps\_module} for M1 \\
\hline
M2 & \picsizett{ps\_module} for M2 \\
\hline
M3 & \picsizett{ps\_module} for M3 \classmark[0.2]{m3module}[0.03] \\
\hline
\end{tabular}
\\[2ex]
\hspace{0.5\classwidth em}\vdots
}\setclasswidth{3}
\setclassheight{1}\drawclass(4,-7){psconfigure}{ps\_configure}{}
\drawclass(6,-9){psenergy}{ps\_energy\_model}{}
\drawclass(2,-11){psconstant}{\invisiblemark[0]{constantsouth} ps\_constant\_model}{}
% \anchormark[0]{constantsouth}{psconstant.south}
\drawclass(6,-11){pshardware}{ps\_hardware\_model}{}
\drawclass(10,-11){psRTL}{ps\_RTL\_model}{}\draw [->,>=latex] (psconfigure.east) — (pskernel.west|-psconfigure.east);
\setclasswidth{5}
\setclassheight{3}\drawclass(15.5,-10){psmodule}{\invisiblemark[0]{psmoduleclass} ps\_module}{%
{}\\[2ex]
\begin{tabular}{|c|lc|}
\hline
\picsizett{sc\_bit \&} & \picsize{constant} & \classmark[0.2]{modconstant}[0.03] \\
\hline
\picsizett{sc\_bit |} & \picsize{hardware} & \classmark[0.2]{modhardware}[0.03] \\
\hline
\picsizett{sc\_int +} & \picsize{RTL} & \classmark[0.2]{modRTL}[0.03] \\
\hline
\end{tabular}
\\[2ex]
\hspace{0.5\classwidth em}\vdots
}\end{tikzpicture}
\begin{tikzpicture}[scale=0.8,remember picture,overlay]
\draw (m1init.center) — ($(m1init)-(0,1.25)$)-|(m2init.center) — ($(m2init)-(0,1.25)$)-|(m3init.center);
\draw [<-,>=latex] (addmodule.center) |-($(m2init)-(0,1.25)$);
\draw [->,>=latex] (m3module.center) — (m3module.center|-psmoduleclass.center) — (psmoduleclass.center);
\draw [->,>=latex] (modconstant.center) — ($(modconstant.center)+(2.5,0)$) — ($(modconstant.center)+(2.5,-3.5)$) — ($(modconstant.center)+(2.5,-3.5)$)-|(constantsouth.center);
\draw [->,>=latex] (modhardware.center) — ($(modhardware.center)+(2.25,0)$) — ($(modhardware.center)+(2.25,-2.5)$);
\draw [->,>=latex] (modRTL.center) — ($(modRTL.center)+(2,0)$) — ($(modRTL.center)+(2,-1.5)$);
\end{tikzpicture}\caption{Scheme of the interaction of Powersim with a SystemC design.}
\label{fig:powersim}
\end{figure*}\end{document}`
Sono andato avanti, ed ovviamente ho incontrato nuovi problemi! 😳
Vi spiego quale è quello attuale: come nella figura postata all’inizio, cerco di collegare il mark dentro alla classe ps_module (constant, RTL, hardware) con la relativa classe.
Vorrei però che si collegasse al south del riquadro. Per questo ho definito il comando \anchormark in modo da potergli passare come cordinata ad esempio psconstant.south (è commentata nel codice) ma questo lo fa dare di matto e la freccia non si sa dove va a finire. cosa sbaglio? non lo posso fare?Ciao e grazie di nuovo
Marco
-
AutoreRisposte

