[Risolto] Hyperref: url con #

  • Questo topic ha 7 risposte, 3 partecipanti ed è stato aggiornato l'ultima volta 15 anni fa da cfiandra.
  • Creatore
    Topic
  • #63692
    Up
    0
    Down
    ::


    Ciao,

    mi serve poter scrivere con beamer un url in cui è presente un #. Non ho nessuna idea. Mi sapreste aiutare?

    Grazie mille!

Visualizzazione 6 filoni di risposte
  • Autore
    Risposte
    • #63693
      admin
      Amministratore del forum
        Up
        0
        Down
        ::

        cfiandra” post=62690Ciao,

        mi serve poter scrivere con beamer un url in cui è presente un #. Non ho nessuna idea. Mi sapreste aiutare?

        Grazie mille!

        Perché non hai nessuna idea? \url{…} non va bene? Oppure \href{…}{…}?

        Ciao
        Orlando

      • #63694
        Up
        0
        Down
        ::


        Ho provato tranquillamente con \href{}{} sicuro di non avere problemi. Invece compilando (con xelatex) esce questo problema:

        [27]
        ! Illegal parameter number in definition of \test.

        !
        l.43 \end{itemize}

        Per inciso gli url che mi servono sono in un elenco. Da shell ho provato a vedere ulteriori informazioni e il risultato è:

        ? H
        You meant to type ## instead of #, right?
        Or maybe a } was forgotten somewhere earlier, and things
        are all screwed up? I’m going to assume that you meant ##.

        Da questo ho dedotto che il problema fosse il #. E non ho davvero idea di come risolverlo (era a questo che mi riferivo nel post precedente).

      • #63695
        admin
        Amministratore del forum
          Up
          0
          Down
          ::

          cfiandra” post=62693Ho provato tranquillamente con \href{}{} sicuro di non avere problemi. Invece compilando (con xelatex) esce questo problema:

          [27]
          ! Illegal parameter number in definition of \test.

          !
          l.43 \end{itemize}

          Per inciso gli url che mi servono sono in un elenco. Da shell ho provato a vedere ulteriori informazioni e il risultato è:

          ? H
          You meant to type ## instead of #, right?
          Or maybe a } was forgotten somewhere earlier, and things
          are all screwed up? I’m going to assume that you meant ##.

          Da questo ho dedotto che il problema fosse il #. E non ho davvero idea di come risolverlo (era a questo che mi riferivo nel post precedente).

          Puoi riportare il link completo o un e.m.c.?

          Ciao
          Orlando

        • #63696
          Up
          0
          Down
          ::


          Certo. Ho fatto alcune prove con risultati un pò contraddittori.

          Prova 1: uso di standalone. Risultato: funzionante.

          `
          \documentclass{standalone}
          \usepackage{hyperref}

          \begin{document}

          \begin{itemize}
          \item the group \href{https://www.facebook.com/#!/groups/beamer2thesis/}{Beamer2Thesis}
          \item the page \href{http://claudiofiandrino.altervista.org/beamer2thesis.zip}{http://claudiofiandrino.altervista.org/beamer2thesis.zip}
          \end{itemize}
          \end{document}
          `

          Prova 2: uso di beamer. Risultato: crash.

          `
          \documentclass{beamer}
          \usepackage{hyperref}
          \usetheme{Madrid}
          \begin{document}
          \begin{frame}
          \begin{itemize}
          \item the group \href{https://www.facebook.com/#!/groups/beamer2thesis/}{Beamer2Thesis}
          \item the page \href{http://claudiofiandrino.altervista.org/beamer2thesis.zip}{http://claudiofiandrino.altervista.org/beamer2thesis.zip}
          \end{itemize}
          \end{frame}
          \end{document}
          `

          Ho caricato ugualmente hyperref anche se beamer dovrebbe già farlo di suo (se non ricordo male).

        • #63697
          Up
          0
          Down
          ::


          Ti basta usare \# anziché #.

          E poi, http://www.facebook.com/#!/bla, è uguale a http://www.facebook.com/bla 😉

        • #63698
          admin
          Amministratore del forum
            Up
            0
            Down
            ::

            d.paleino” post=62697Ti basta usare \# anziché #.

            E poi, http://www.facebook.com/#!/bla, è uguale a http://www.facebook.com/bla 😉

            Ci sono arrivato proprio ora 😀 .

            Ad ogni modo: fatevi sentire di più su questo forum, abbiamo bisogno di tutti!

            Ciao
            Orlando

          • #63699
            Up
            0
            Down
            ::


            Hai perfettamente ragione: ora funziona. Ammetto di non averci provato perchè pensavo creasse problemi nel pdf all’apertura dell’url: invece no, si apre perfettamente.

            Grazie!!

        Visualizzazione 6 filoni di risposte
        • Devi essere connesso per rispondere a questo topic.

        Go to top