evidenziare parte formula e aggiungere annotazioni

  • Creatore
    Topic
  • #113350
    Up
    0
    Down
    ::


    Ciao!! 🙂 Sto cercando di fare la presentazione per la tesi con beamer..volevo chiedervi qualche indicazione tecnica 😕
    Allora.. il mio codice è il seguente:

    `
    \documentclass{beamer}
    \usepackage[english]{babel}
    \usepackage[T1]{fontenc}
    \usepackage{lmodern}
    \usepackage{graphicx}% for images
    \usepackage{ctable}%
    \usepackage{amsmath,amsfonts,amssymb}
    \usepackage{%
    ltablex,
    caption,
    makecell,
    hhline,
    booktabs,
    threeparttablex,
    tabularx,
    rotating,
    }
    \usepackage{xcolor, colortbl}% <----------------------- \definecolor{harvardcrimson}{rgb}{0.79,0.0,0.09} \definecolor{white}{rgb}{1,1,1} \title[The gender effects of overeducation]{The gender effects of overeducation} \author[Giulia ]{Giulia } \date[13]{July 13, 2018} \institute[Università di Bologna]{Alma Mater Studiorum - Università di Bologna} \logo{\includegraphics[width=16mm]{bolo.jpg}} \usetheme{dresden} \usecolortheme{orchid} \setbeamercolor*{frame}{fg=white} \setbeamercolor*{framesubtitle}{fg=white} \setbeamercolor*{structure}{fg=harvardcrimson} \useoutertheme[left]{sidebar} \setbeamercovered{dynamic} \theoremstyle{definition} \newtheorem{definizione}{Definition} \theoremstyle{plain} \newtheorem{teorema}{Theorem} \expandafter\def\expandafter\insertshorttitle\expandafter{% \insertshorttitle\hfill% \insertframenumber\,/\,\inserttotalframenumber} %to put the page numbering \makeatletter % Sidebar \setbeamersize{sidebar width \beamer@sidebarside=\beamer@sidebarwidth} \setbeamertemplate{sidebar \beamer@sidebarside} { \beamer@tempdim=\beamer@sidebarwidth% \advance\beamer@tempdim by -6pt% \insertverticalnavigation{\beamer@sidebarwidth}% \vfill \ifx\beamer@sidebarside\beamer@lefttext% \else% \usebeamercolor{normal text}% \llap{\usebeamertemplate***{navigation symbols}\hskip0.1cm}% \vskip2pt% \fi% }% \ifx\beamer@sidebarside\beamer@lefttext% \defbeamertemplate*{sidebar right}{sidebar theme} {% \vfill% \llap{\usebeamertemplate***{navigation symbols}\hskip0.1cm}% \vskip2pt} \fi \makeatother \begin{document} \begin{frame} \maketitle \end{frame} \setbeamertemplate{section in toc}{\inserttocsection} \setbeamertemplate{section in toc}[ball unnumbered] \begin{frame} \frametitle{Contents} \tableofcontents \end{frame} \section{Introduction} \begin{frame} \frametitle{Introduction} \framesubtitle{What is `Overeducation'?} \begin{center} \includegraphics[width=.7\textwidth]{puck.jpg} \end{center} \alert{`Overeducation'} describes the extent to which an individual owns a level of education in excess of that which is required for their particular job. \end{frame} \begin{frame} \frametitle{Introduction} \framesubtitle{`Overeducation' causes and effects} \begin{quote} <> (Ferrante, 2009)
    \pause
    \end{quote}
    \alert{`Overeducation'} may have adverse effects
    \pause
    \begin{enumerate}[<+->]
    \item On the society
    \item On firms
    \item On individuals
    \end{enumerate}
    \end{frame}
    \section{The Italian case}
    \begin{frame}
    \frametitle{The Italian case}
    Proportion of people aged 25-64 with a university degree:
    \begin{itemize}
    \item Italy: 15\%
    \item EU average: 27\%
    \end{itemize}
    \begin{figure}
    Proportion of overeducated people 5 years after the attainment of the degree:
    \includegraphics[width=0.8\textwidth]{graphiitaly.png}
    \end{figure}
    \end{frame}
    \section{The goals of this project}
    \begin{frame}
    \frametitle{The goals of this project}
    \begin{itemize}\itemsep8pt
    \item Understand the main determinants of the phenomenon and depict the identikit of the overeducated worker
    \item Detect whether a link between overeducation and the GPG exists
    \item Check if the theory of compensating wage differential is supported by data
    \end{itemize}
    \end{frame}
    \begin{frame}
    \section{Data and method}
    \frametitle{Data and methods}
    \begin{itemize}
    \item ISTAT data (`University graduates vocational integration' 2015 database)
    \item Probit analysis:
    \begin{itemize}
    \item Dependent variable: probability to be overeducated
    \item Independent variables: set of controls comprehending educational experience, access to the labor market, job search and family situation.
    \end{itemize}
    \item Mincer wage equation and detailed Oaxaca Blinder decomposition
    \item 2SLS method employing an exogenous instrument
    \end{itemize}
    \end{frame}
    \section{The identikit of the overeducated worker}
    \begin{frame}
    \frametitle{The identikit of the overeducated worker}
    Main determinants of overeducation:
    \footnotesize{
    \begin{itemize}
    \item Sex
    \item Choice of the high school
    \item Degree field
    \item Having attended a mobility program
    \item Age at the degree attainment
    \item Degree grade
    \item Type of contract (permanent vs fixed term)
    \item Working in the private sector
    \item Further educational qualification after the degree
    \item Job tenure
    \item Period between the attainment of the degree and the first job
    \end{itemize}
    }
    \end{frame}
    \section{Overeducation and the GPG}
    \begin{frame}
    \frametitle{Overeducation and the GPG}
    Mincer wage equation:
    \begin{equation}\notag
    ln{W_i}={{X_i}^{'}}\beta+\gamma{Overeducation}+\epsilon_i
    \end{equation}
    Oaxaca-Blinder decomposition:
    \resizebox{\textwidth}{!}{
    \begin{equation}\notag
    \overline{{ln{W_m}}^m} – \overline{{ln{W_f}}^m}&=({{{\overline{X_M}}^{m'}}-{{\overline{X_F}}^{m'}}}){{\hat{\beta}_{F}}^m} + {{\overline{X_F}}^{m'}({{{\hat{\beta}_{M}}^m}-{{\hat{\beta}_{F}}^m}}})+({{{\overline{X_M}}^{m'}} – {{\overline{X_F}}^{m'}})({{{\hat{\beta}_{M}}^m}-{{\hat{\beta}_{F}}^m}}})
    \end{equation}
    }
    \end{frame}
    \begin{frame}
    \frametitle{Overeducation and the GPG}

    \begin{table}
    \centering
    \scalebox{0.9}{
    \resizebox{\textwidth}{!}{
    {
    \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
    \begin{tabular}{lcc}
    \hline
    \multicolumn{1}{c}{} &\multicolumn{1}{c}{Overeducated sample} &\multicolumn{1}{c}{Properly educated sample}\\
    \hline
    \textit{Differential} & \\
    [1em]
    ${\overline{ln{W_m}}}$ & 2.0751\sym{***} & 2.2239\sym{***} \\
    [1em]
    ${\overline{ln{W_f}}}$ & 2.0295\sym{***} & 2.1915\sym{***} \\
    [1em]
    Difference & 0.0456 & 0.0324\sym{***} \\
    \textit{Decomposition} & \\
    [1em]
    Endowments & -0.0449 & 0.0158\sym{*} \\
    [1em]
    Coefficients & 0.0599 & 0.0398\sym{***} \\
    [1em]
    Interaction & 0.0307 & -0.0232\sym{*} \\
    [1em]

    Observations & 917 & 9314 \\

    \hline
    \multicolumn{2}{l}{\footnotesize \sym{*} \(p<0.05\), \sym{**} \(p<0.01\), \sym{***} \(p<0.001\)}
    \end{tabular}
    }
    }
    }
    \end{table}
    \end{frame}
    \section{The theory of compensating wage differential}
    \begin{frame}
    \frametitle{The theory of wage differential}
    \end{frame}
    \section{Conclusions}
    \begin{frame}
    \frametitle{Conclusions}
    \end{frame}
    \end{document}

    `

    Da qualche giorno sto cercando di risolvere dei problemini tecnici, ma forse sbaglio qualcosa..
    Partiamo dagli errori:
    – mi da parecchi errori sulla parte di codice utilizzata per togliere autore e titolo dalla sidebar. Il risultato esce lo stesso; il codice che ho usato l ho trovato su https://guitex.org/home/it/forum/5-tex-e-latex/50405-beamer-come-togliere-il-titolo-e-lautore-dalla-sidebar
    ammetto di non aver capito interamente il meccanismo, quindi vi chiederei gentilmente una mano se mi indicate qualcosa sull errore o della documentazione da leggere 🙂
    – per quanto riguarda il colore dei titoli delle slides, volevo metterli bianchi. facendo però
    \setbeamercolor*{frame}{fg=white}
    \setbeamercolor*{framesubtitle}{fg=white}
    mi cambia solo i sottotitoli e non i titoli, e non ne capisco il motivo..
    – sulla formula lunga di decomposizione (la seconda per intenderci) mi da errore ‘missing $ inserted’, ma non capisco perchè voglia le $ essendo dentro l’ ambiente equation (ho fatto copia incolla dal doc latex per la tesi dove non mi dava nessun errore)

    Per ultima cosa vorrei chiedervi un aiuto grande:
    sempre su questa formula, vorrei riuscire a evidenziare le tre componenti a destra dell’uguale una alla volta facendo passare un riquadro evidenziato dall’una all’altra, e aggiungendo un’annotazione per ognuna. Ho letto diversi modi per farlo e ne ho provati parecchi, ma forse sbaglio l’approccio. Ho usato principalmente il documento ‘introduzione a tikzmark’..focalizzandomi soprattutto sull’ultima parte. Li evidenzia parte di un algoritmo e ci inserisce un’annotazione. Ho provato diverse soluzione anche trovate sul forum per vedere se riuscivo a fare qualcosa, ma non sono riuscita a trovare/creare una soluzione che funzioni

    Scusate i molti punti, se riusciste anche ad aiutarmi su uno /due ve ne sarei davvero grata! 🙂
    grazie mille!

Visualizzazione 1 filone di risposte
  • Autore
    Risposte
    • #113351
      OldClaudio
      Partecipante
        Up
        0
        Down
        ::


        La domanda è troppo complessa; quindi ti rispondo a quello che ho capito.

        Purtroppo il file che hai allegato non è compilabile, perché contiene delle figure che non hai accluso; nel codice che segue ho commentato tutti gli \includegraphis e ho cambiato il nome del logo di Bologna con quello di un file di cui dispongo; tu riristina bolo.jpg.

        Usi le graffe a caso; le graffe in LaTeX hanno degli scopi ben precisi: gli usi più comuni sono quelli di contenere un gruppo all’interno del quale quanto assegnato e quanto definito funziona, ma alal fine del gruppo quanto assegnato e quanto è definiti viene “dimenticato”; oppure racchiudono gli argomenti dei comandi.
        Nel tuo caso, per esempio \gamma{Observation} non vuole dire niente perché \gamma non è una macro che richede argomenti e quelle graffe non trattano la parola Bservation in nessun modo particolare.

        Va notato inoltre che beamer lege ed analizza almano due volte quello che è contenuto in un frame; questo significa che i comandi che compaiono dentro un frame devono essere robusti; i comandi fragili si “rompono” e producono errori difficili da scovare; questo, per esempio è il motivo per il quale trovi l’errore che manca un segno di $.

        Ho cercato di correggere come meglio ho potuto perché non ho la più vaga idea di che cosa rappresentino le tue formule; in particolare non ho capito se il tuo “ln” dovrebbe rappresentare il “logaritmo naturale” o qualcos’altro; Di sicuro, se esso rappresenta il logaritmo naturale esso non va scritto come l’hai scritto tu ma come la macro \ln.

        Non ha senso mettere un sezionamento ogni due slide, talvolta ogni slide. Una buona presentazione ha tre, al massimo quattro sezioni; Il titolo di ogni slide sostituisce perfettamente quello che hai indicato nel comando di sezionamento. quindi togliendo quei comandi di sezionamento, in particolare il primo e l’ultimo, e mettendo (per esempio) \section{the state of the art} \section{The Italian case} è più che sufficiente; al massimo potreesti ancora mettere qualcosa come \section{Open issues} se vuoi elencare alcune questioni aperte che potrebbero essere esaminate con il supporto del tuo lavoro.

        Ho cambiato i font; In generale i font senza grazie sono preferibili ai font con grazie nell presentazioni; ma i font senza grazie spesso mancano di controparti adeguate per la matematica; gli unici font che secondo me non hanno nessuni dei difietti che ti ho elencato sono gli LXfonts; per i quali basta invocare il pacchetto; La lettura della documentazione ti rivela che sono io che gli ho costruiti, ma non te lo dici per vantarmene; solo per segnalarti che li ho costruiti apposta per poterli usare in diapositive che contengano testo descrittivo, matematica, e anche greco (per una tesi umanistica) ma anche il greco matematico e il greco “matematico tondo” per rispettare le norme ISO a cui io sono obbligato. Secondo me la leggibilità è perfetta con quasi tutti i caratteri (d’altra parte sono partito dai file sviluppati da Knuth stesso per i suoi aforismi alla fine di ogni sui capitolo) Se ti piacciono, bene, altrimenti ritorna ure con i font Latin Modern, ma divi poi fare piccoli ritocchi per assicurare la leggibilità.

        Ho tolto tutti gli ambienti figure e table, perché con le presentazioni non ha nessun senso rendere mobili quegli oggetti, né ha senso attribuire loro una didascalia: il titolo del frame è del tutto sufficiente.

        Ho tolto tutti gli \scalebox e \resizebox perché sono fragili, e in baso a quanto detto sopra non si possono usare dentro i frame senza proteggerli in qualche modo.

        Ho totlto alcune graffe inutili, ma non tutt perché non sono sicuro di avre capito il motivo per il quel le hai usate.

        Ecco il mio codice:`% !TEX TS-program = pdflatex
        % !TEX encoding = UTF-8 Unicode
        \documentclass{beamer}
        \usepackage[english]{babel}
        \usepackage[T1]{fontenc}
        %\usepackage{lmodern}% mmmm… I font con grazie sono poco consigliabili
        % per le diapositive
        % Meglio usare i font LXfonts completi anche per la matematica e per
        % i simboli
        \usepackage{lxfonts}
        %\usepackage{graphicx}% for images; già usato da beamer
        \usepackage{ctable}%
        \usepackage{amsmath,%amsfonts,
        amssymb}
        \usepackage{%
        ltablex,
        caption,
        makecell,
        hhline,
        booktabs,
        threeparttablex,
        tabularx,
        rotating,
        }
        \usepackage{xcolor, colortbl}% <----------------------- \definecolor{harvardcrimson}{rgb}{0.79,0.0,0.09} % \definecolor{white}{rgb}{1,1,1} \title[The gender effects of overeducation]{The gender effects of overeducation} \author[Giulia ]{Giulia } \date[13]{July 13, 2018} \institute[Università di Bologna]{Alma Mater Studiorum - Università di Bologna} %\logo{\includegraphics[width=16mm]{bolo.jpg}} \logo{\includegraphics[width=16mm]{LogoUniBO.jpg}} \usetheme{Dresden} \usecolortheme{orchid} \setbeamercolor*{frame}{fg=white} \setbeamercolor*{framesubtitle}{fg=white} \setbeamercolor*{structure}{fg=harvardcrimson} \useoutertheme[left]{sidebar} \setbeamercovered{dynamic} \theoremstyle{definition} \newtheorem{definizione}{Definition} \theoremstyle{plain} \newtheorem{teorema}{Theorem} \expandafter\def\expandafter\insertshorttitle\expandafter{% \insertshorttitle\hfill% \insertframenumber\,/\,\inserttotalframenumber} %to put the page numbering \def\sym#1{\ensuremath{^{#1}}}% Spostato qui e ridefinito \makeatletter % Sidebar \setbeamersize{sidebar width \beamer@sidebarside=\beamer@sidebarwidth} \setbeamertemplate{sidebar \beamer@sidebarside} { \beamer@tempdim=\beamer@sidebarwidth% \advance\beamer@tempdim by -6pt% \insertverticalnavigation{\beamer@sidebarwidth}% \vfill \ifx\beamer@sidebarside\beamer@lefttext% \else% \usebeamercolor{normal text}% \llap{\usebeamertemplate***{navigation symbols}\hskip0.1cm}% \vskip2pt% \fi% }% % \ifx\beamer@sidebarside\beamer@lefttext% % \defbeamertemplate*{sidebar right}{sidebar theme} % {% % \vfill% % \llap{\usebeamertemplate***{navigation symbols}\hskip0.1cm}% % \vskip2pt} % \fi \makeatother \begin{document} \begin{frame}[plain] \maketitle \end{frame} \setbeamertemplate{section in toc}{\inserttocsection} \setbeamertemplate{section in toc}[ball unnumbered] \begin{frame} \frametitle{Contents} \tableofcontents \end{frame} \section{Introduction} \begin{frame}{Introduction} \framesubtitle{What is `Overeducation'?} \begin{center} %\includegraphics[width=.7\textwidth]{puck.jpg} Figura puck.jpg \end{center} \alert{Overeducation} describes the extent to which individuals own a level of education in excess of that which is required for their particular job. \end{frame} \begin{frame} \frametitle{Introduction} \framesubtitle{`Overeducation' causes and effects} \begin{quote} <> (Ferrante, 2009)
        \pause
        \end{quote}
        \alert{Overeducation} may have adverse effects
        \pause
        \begin{enumerate}[<+->]
        \item On the society
        \item On firms
        \item On individuals
        \end{enumerate}
        \end{frame}

        \section{The Italian case}

        \begin{frame}
        \frametitle{The Italian case}
        Proportion of people aged 25-64 with a university degree:
        \begin{itemize}
        \item Italy: 15\%
        \item EU average: 27\%
        \end{itemize}
        %\begin{figure}
        Proportion of overeducated people 5 years after the attainment of the degree:
        %\includegraphics[width=0.8\textwidth]{graphiitaly.png}
        %\end{figure}
        \end{frame}

        \section{The goals of this project}

        \begin{frame}
        \frametitle{The goals of this project}
        \begin{itemize}\itemsep8pt
        \item Understand the main determinants of the phenomenon and depict the identikit of the overeducated worker
        \item Detect whether a link between overeducation and the GPG exists
        \item Check if the theory of compensating wage differential is supported by data
        \end{itemize}
        \end{frame}

        \begin{frame}
        \section{Data and method}
        \frametitle{Data and methods}
        \begin{itemize}
        \item ISTAT data (`University graduates vocational integration' 2015 database)
        \item Probit analysis:
        \begin{itemize}
        \item Dependent variable: probability to be overeducated
        \item Independent variables: set of controls comprehending educational experience, access to the labor market, job search and family situation.
        \end{itemize}
        \item Mincer wage equation and detailed Oaxaca Blinder decomposition
        \item 2SLS method employing an exogenous instrument
        \end{itemize}
        \end{frame}
        \section{The identikit of the overeducated worker}

        \begin{frame}
        \frametitle{The identikit of the overeducated worker}
        Main determinants of overeducation:
        \footnotesize{
        \begin{itemize}
        \item Sex
        \item Choice of the high school
        \item Degree field
        \item Having attended a mobility program
        \item Age at the degree attainment
        \item Degree grade
        \item Type of contract (permanent vs fixed term)
        \item Working in the private sector
        \item Further educational qualification after the degree
        \item Job tenure
        \item Period between the attainment of the degree and the first job
        \end{itemize}
        }
        \end{frame}

        \section{Overeducation and the GPG}

        \begin{frame}{Overeducation and the GPG}
        Mincer wage equation:
        \begin{equation*}
        ln{W_i}={{X_i}^{'}}\beta+\gamma{Overeducation}+\epsilon_i
        \end{equation*}

        Oaxaca-Blinder decomposition:
        %\resizebox{\textwidth}{!}{
        \begin{align*}
        \overline{{ln{W_m}}^m} – \overline{{ln{W_f}}^m}&=({{{\overline{X_M}}^{m'}}-{{\overline{X_F}}^{m'}}}){{\hat{\beta}_{F}}^m}\\
        &+ ({{\overline{X_F}}^{m'}{{{\hat{\beta}_{M}}^m}-{{\hat{\beta}_{F}}^m}}})\\
        &+({{{\overline{X_M}}^{m'}} – {{\overline{X_F}}^{m'}})({{{\hat{\beta}_{M}}^m}-{{\hat{\beta}_{F}}^m}}})
        \end{align*}
        %}
        \end{frame}

        \begin{frame}{Overeducation and the GPG}

        %\begin{table}
        \centering
        %\scalebox{0.9}{
        %\resizebox{\textwidth}{!}{
        %{
        \begin{tabular}{lcc}
        \toprule
        & \multicolumn{1}{c}{Overeducated}
        & \multicolumn{1}{c}{Properly} \\
        & \multicolumn1c{ sample}
        & \multicolumn1c{educated sample}\\
        \midrule
        \textit{Differential} & \\[0.25ex]
        ${\overline{ln{W_m}}}$ & 2.0751\sym{***} & 2.2239\sym{***} \\[0.25ex]
        ${\overline{ln{W_f}}}$ & 2.0295\sym{***} & 2.1915\sym{***}
        \\[0.25ex]
        Difference & 0.0456 & 0.0324\sym{***} \\
        \textit{Decomposition} & \\[0.25ex]
        Endowments & -0.0449 & 0.0158\sym{*} \\[0.25ex]
        Coefficients & 0.0599 & 0.0398\sym{***} \\[0.25ex]
        Interaction & 0.0307 & -0.0232\sym{*} \\[0.25ex]

        Observations & 917 & 9314 \\
        \midrule
        \multicolumn{3}{l}{\centering\footnotesize \sym{*} \(p<0.05\), \sym{**} \(p<0.01\), \sym{***} \(p<0.001\)}\\
        \bottomrule
        \end{tabular}
        %}
        %}
        %}
        %\end{table}
        \end{frame}

        \section{The theory of compensating wage differential}

        \begin{frame}{The theory of wage differential}
        \end{frame}

        \section{Conclusions}

        \begin{frame}{Conclusions}
        \end{frame}

        \end{document}`

      • #113352
        Up
        0
        Down
        ::


        Ciao Claudio, grazie mille. 🙂
        Per i font ti do pienamente ragione, l’aspetto risulta molto più gradevole ( complimenti per la creazione 😮 )
        Per quanto riguarda le graffe, ora ricontrollo. Quella su \gamma{Overeducation} l’avevo messa perchè ‘overeducation’ è la mia variabile che andrebbe moltiplicata a gamma, e senza mi dava errore..proverò comunque a riguardarmi la documentazione, grazie mille.
        Ultima cosa giusto per accertarmi.. usando il codice a te i titoli delle diapositive vengono bianche? Perchè a me continuano a venire neri, mentre per i sottotitoli il comando funziona e me li da bianchi.. Ho riguardato bene la documentazione ma non mi pare ci siano errori nell’utilizzo di
        \setbeamercolor*{frametitle}{fg=white}
        \setbeamercolor*{framesubtitle}{fg=white}

        (nel codice allegato prima avevo sbagliato e scritto frame al posto di frametitle, ma anche mettendo frametitle che dovrebbe essere il nome corretto non mi funziona)
        ma mi prende solo il secondo..
        Grazie anche per il commento sulle sezioni!

    Visualizzazione 1 filone di risposte
    • Devi essere connesso per rispondere a questo topic.

    Go to top