Risposte nei forum create
-
AutoreRisposte
-
::
grazie ragazzi! il risultato è esattamente quello che volevo realizzare!! 😀solo un paio di domande sulla sintassi di calc:
`\draw[red]
($(m-1-1.south west)-(0.2,0.2)$) rectangle ($(m-1-5.north east)+(0.2,0.2)$);
`
questa riga disegna il bordo intorno alla prima riga della matrice. (0.2,0.2) è l’offset da m-1.1-sout west?grazie anche per avermi mostrato un ciclo for, è la prima volta 🙂
::
ok ci stiamo avvicinando al risultato desiderato 🙂 Tuttavia, ho ancora qualche domanda.– Come faccio a specificare che la prima colonna non deve avere i box come le altre? Per ora li disegno in bianco ma ci deve essere una soluzione migliore.
– Come faccio a specificare che i box esterni (quelli rossi, per capirci) devono essere un po’ piú grandi di quelli interni?Allego un esempio compilabile 🙂
Ancora grazie del supporto!
Attachments:
You must be logged in to view attached files.::
dici di usare array per il testo e poi fare tipo un overlay per il bordo del nodo? qualcosa tipo questo esempio: http://www.texample.net/tikz/examples/highlighting-matrix/
24 Giugno 2013 alle 8:13 in risposta a: [Risolto] Titolo e numero di pagina nel piè di pagina #87084::
Io nella stesura della mia tesi sto usando la classe book con facyhdr per l’intestazione e il piè pagina e frontespizio per il frontespizio. Inoltre puoi usare \frontmatter, \mainmatter e \backmatter per separare indice, capitoli e eventuali appendici con appropriata numerazione in numeri romani e arabi.`\documentclass[12pt,a4paper,twoside,openright,titlepage]{book}
\usepackage{fancyhdr}
\usepackage[signatures]{frontespizio}% page style
\pagestyle{fancy}
\fancyhead[LE,RO]{\slshape \rightmark}
\fancyhead[LO,RE]{\slshape }
\fancyfoot[C]{\thepage}
% more page style
%\lhead{}
%\chead{}
%\rhead{}
%\lfoot{}
%\cfoot{\thepage}
%\rfoot{}
\renewcommand{\headrulewidth}{0.01cm}\begin{document}
{
\begin{frontespizio}
% see frontespizio doc
…
\end{frontespizio}\frontmatter
\tableofcontents
% eventually lists of figures and tables\mainmatter
% actual chapters of your thesis
% bibliography\backmatter
%\appendix
}
\end{document}`
::
ok controllando il sorgente pare che si sia un blocco non chiuso in un altro algoritmo. Posto un MWE, è lungo e diviso in due sezioni. Rileggendo non sono stato in grado di capire cosa ho lasciato aperto (:oops: ). Se qualcuno avesse voglia/tempo di buttarci un occhio sarebbe gesto molto apprezzato. Grazie.`\documentclass{article}
\usepackage{amsmath,amsfonts,algorithm,algpseudocode}\begin{document}
\begin{algorithm}[!h]
\caption{Vincent-Soille watershed algorithm}\label{wshedPseudocode}
\small
\begin{algorithmic}[1]
\Procedure{Watershed-by-Immersion}{}
\Require{digital grey scale image $G = (D,E,im)$}
\Ensure{labelled watershed image \textit{lab} on $D$}
\State{\# define \textsc{init} -1 } \Comment{initial value of $lab$ image}
\State{\# define \textsc{mask} -2 } \Comment{initial value of each level}
\State{\# define \textsc{wshed} 0 } \Comment{label of watershed pixel}
\State{\# define \textsc{fictitious} (-1,-1) } \Comment{fictitious pixel $\notin D$}
\State$curlab \gets 0$ \Comment{$curlab$ is the current label}
\State$fifo\_init(queue)$
\For{\textbf{all} $p \in D$}
\State $lab\lbrack p \rbrack \gets \textsc{init}; dist\lbrack p \rbrack \gets 0$ \Comment{$dist$ is a work image of distances}
\EndFor
\State{SORT pixels in increasing order of grey values from $h_{min}$ to $h_{max}$}
\State
\State{Start Flooding}
\For{$h = h_{min}$ to $h_{max}$} \Comment{Geodesic SKIZ of level $h-1$ inside level $h$}
\For{\textbf{all} $p \in D$ \textbf{with} $im\lbrack p\rbrack = h$} \Comment{mask all pixel at level h, these are directly accessible because of the sorting step}
\State{$lab\lbrack p \rbrack \gets \textsc{mask}$ }
\If{$p$ has a neighbour $q$ \textbf{with} ($lab \lbrack q \rbrack = \textsc{wshed}$)}
\Comment{Initialize queue with neighbours at level $h$ of current basins or watersheds}
\State $dist\lbrack p \rbrack \gets 1; fifo\_add(p,queue)$
\EndIf
\EndFor
\State$curdist \gets 1; fifo\_add(\textsc{fictitious},queue)$\Loop \Comment{extend basins}
\State $p \gets fifo\_remove(queue)$
\If {$p = \textsc{fictitious}$}
\If {$ fifo\_empty(queue)$}
\State{\textsc{break}}
\Else
\State $fifo\_add(\textsc{fictitious},queue $)
\State $curdist \gets curdist +1 $
\State $ p \gets fifo\_remove(queue)$
\EndIf
\EndIf\For{\textbf{all} $q \in N_G(p)$}\Comment{labelling $p$ by inspecting neighbours}
\If{$dist\lbrack q \rbrack < curdist$ \textbf{and} $lab\lbrack q \rbrack > 0$ \textbf{or} $lab\lbrack q \rbrack > \textsc{wshed}$}
\State{$q$ belongs to an existing basin or watershed}
\algstore{bkbreak}
\end{algorithmic}
\end{algorithm}
\clearpage
\begin{algorithm}[!h]
\begin{algorithmic}[1]
\algrestore{bkbreak}\If{$lab\lbrack q \rbrack > 0$}
\If{$lab\lbrack p \rbrack = \textsc{mask}$ \textsc{or} $lab\lbrack p \rbrack > \textsc{wshed}$}
\State $lab\lbrack p \rbrack \gets lab\lbrack q \rbrack $
\ElsIf{$lab\lbrack p \rbrack \neq lab\lbrack q \rbrack $}
\State $lab\lbrack p \rbrack \gets \textsc{wshed} $
\EndIf
\ElsIf{$lab\lbrack p \rbrack = \textsc{mask} $}
\State$lab\lbrack p \rbrack \gets \textsc{wshed} $
\EndIf
\ElsIf{$lab\lbrack q \rbrack = \textsc{mask}$ \textsc{and} $dist\lbrack q \rbrack = 0$} \Comment{$q$ is a plateau pixel}
\State$dist\lbrack q \rbrack \gets curdist + 1; fifo\_add(1,queue)$
\EndIf
\EndFor
\EndLoop
\State{detect and process new minima at level $h$}
\For{\textbf{all} $p \in D$ \textbf{with} $im \lbrack p \rbrack = h$}
\State$dist \lbrack p \rbrack = 0$ \Comment{reset distance to zero}
\If{$lab\lbrack p \rbrack = \textsc{mask}$} \Comment{$p$ is inside a new minimum}
\State{$curlab \gets curlab +1$} \Comment{create a new label}
\State{$fifo\_add(p,queue);lab\lbrack p \rbrack \gets curlab$}
\While{\textbf{not} $fifo\_empty(queue)$}
\State{$q \gets fifo\_remove(queue)$}
\For{\textbf{all} $r \in N_G(q)$}\Comment{inspect neighbours of $q$}
\If{$lab\lbrack r \rbrack = \textsc{mask}$}
\State{$fifo\_add(r,queue); lab\lbrack r \rbrack \gets curlab$}
\EndIf
\EndFor
\EndWhile
\EndIf
\EndFor
\EndFor
\State{End Flooding}
\end{algorithmic}
\end{algorithm}
\end{document}`
::
buongiorno, mi scuso per riaprire un vecchio topic, ma sono alle prese con il frontespizio per la mia tesi e vorrei sapere se esiste un modo scrivere la sessione sopra all’anno accademico e sopra alla line di fondo pagina. allego il mio codice. grazie`
\begin{frontespizio}
\Universita{Bologna}
\Istituzione{Alma Mater Studiorum – Universit\`a di Bologna}
\Facolta{Scienze Matematiche Fisiche e Naturali}
\Scuola{International Master in Bioinformatics}
\Piede{Anno Accademico 2012–2013 \\ Sessione I}
\Titoletto{Tesi di laurea magistrale}
\Titolo{Image Processing Based Prediction of \\ Ovarian Cancer Sensitivity to \\ Platinum-Based Chemotherapic Treatments}
\Sottotitolo{Image Processing and Machine Learning Approach to \\ the Prediction of Pharmacological Properties of Ovarian Cistoadenocarcinoma}
\Candidato[0000647952]{Francesco Tabaro}
\Relatore{Prof.ssa R. Casadio}
\Correlatore{Prof. M. Nykter}
\Correlatore{Prof. P. Ruusuvuori}
\end{frontespizio}
`
-
AutoreRisposte