Risposte nei forum create
-
AutoreRisposte
-
::
Tutto funziona adesso con questo codice (eliminando \texorpdfstring):
`\newcommand{\changesections}{%
\setsubsecheadstyle{\large\ttfamily\bfseries}
\setsubsubsecheadstyle{\ttfamily\bfseries}
{\normalsize\ttfamily}
}
\newcommand{\cardsection}[1]{%
\phantomsection
\addcontentsline{toc}{subsubsection}{\ttfamily\small #1} %
\subsubsection*{#1}}
\newcounter{card}
\newenvironment{card}[1]
{\changesections\begin{shaded}\stepcounter{card}%
\phantomsection
\addcontentsline{toc}{subsection}
{\ttfamily\small Scheda n.~{ }%
\arabic{card} – #1}
\subsection*{\ttfamily Scheda n.~\arabic{card}\\#1}}
{\end{shaded}}`
tranne che delle schede non c’è traccia nell’indice…M
::
Ho provato la “traduzione” della formattazione per i titoli in questo modo
`\newcommand{\changesections}{%
\setsubsecheadstyle{\large\ttfamily\bfseries}
\setsubsubsecheadstyle{\ttfamily\bfseries}
{\normalsize\ttfamily}
}
\newcommand{\cardsection}[1]{%
\phantomsection
\addcontentsline{toc}{subsubsection}{\ttfamily\small #1} %
\subsubsection*{#1}}
\newcounter{card}
\newenvironment{card}[1]
{\changesections\begin{shaded}\stepcounter{card}%
\phantomsection
\addcontentsline{toc}{subsection}
{\ttfamily\small Scheda n.\texorpdfstring{\ }{ }%
\arabic{card} – #1}
\subsection*{\ttfamily Scheda n.~\arabic{card}\\#1}}
{\end{shaded}}`
ma \changesections dev’essere incompleto
perché in ogni caso ricevo:
`[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/local/texlive/2011/texmf-dist/tex/latex/base/t1cmtt.fd)
! Undefined control sequence.
…ily \small Scheda n.\texorpdfstring
{\ }{ }\arabic {card} – Co…
l.36 \begin{card}{Condivisioni con BitTorrent}? `
M
::
Hai ragione, ma la faccenda è oscura (ovviamente per me)
`\documentclass{memoir}
\usepackage[OT2,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage[dvipsnames,table]{xcolor}
\usepackage{framed}
\definecolor{shadecolor}{gray}{0.92}
\setsecheadstyle{\scshape\raggedright}\newcommand{\changesections}{%
\setsubsecheadstyle{\subsection}
{\relax}
{\MakeLowercase{\thesubsection}}
{1em}
{\large\ttfamily\bfseries}%
\setsubsubsecheadstyle{\subsubsection}
{\relax}
{\MakeLowercase{\thesubsubsection}}
{1em}
{\normalsize\ttfamily}%
}
\newcommand{\cardsection}[1]{%
\phantomsection
\addcontentsline{toc}{subsubsection}{\ttfamily\small #1} %
\subsubsection*{#1}}
\newcounter{card}
\newenvironment{card}[1]
{\changesections\begin{shaded}\stepcounter{card}%
\phantomsection
\addcontentsline{toc}{subsection}
{\ttfamily\small Scheda n.\texorpdfstring{\ }{ }%
\arabic{card} – #1}
\subsection*{\ttfamily Scheda n.~\arabic{card}\\#1}}
{\end{shaded}}\begin{document}
Come quasi tutte le distribuzioni GNU Linux, anche Slackware si trova in
allegato a parecchie riviste. Se si intende utilizzarla stabilmente, non è
inopportuno acquistarla o abbonarsi (per ricevere gli aggiornamenti), così da
fornire un supporto economico anche se minimo agli sviluppatori. Il set consta
di sei CD o di un DVD perché contiene tutti i sorgenti.\begin{card}{Condivisioni con BitTorrent}
Fino a qualche anno fa, in Internet dominava una netta distinzione fra i
server e i client. I server fornivano contenuti che potevano essere scaricati
dai client. Ciò era dovuto anche ai limiti oggettivi della banda: chi stava
scaricando con un modem a 56KB non aveva banda sufficiente per condividere
file. Con l'avvento delle tecnologie broadband come la DSL si è resa
disponibile una banda notevolmente più ampia, che ha portato alla nascita dei
p2p, acronimo di «peer-to-peer», che letteralmente significa «da pari a pari»
(per sottolineare il fatto che tutti i nodi rivestono, indistintamente, lo
stesso ruolo). Fra questi, una soluzione particolarmente felice è costituita
da BitTorrent, creato da Bram Cohen e reperibile all'indirizzo:
\URL{http://www.bittorrent.com}.
\end{card}
\end{document}`
E con questo codice l’errore è
`! Undefined control sequence.
…ily \small Scheda n.\texorpdfstring
{\ }{ }\arabic {card} – Co…
l.43 \begin{card}{Condivisioni con BitTorrent}`M
::
Il codice è
`\newcommand{\changesections}{%
\setsubsecheadstyle{\subsection}
{\relax}
{\MakeLowercase{\thesubsection}}
{1em}
{\large\ttfamily\bfseries}%
\setsubsubsecheadstyle{\subsubsection}
{\relax}
{\MakeLowercase{\thesubsubsection}}
{1em}
{\normalsize\ttfamily}%
}
\newcommand{\cardsection}[1]{%
\phantomsection
\addcontentsline{toc}{subsubsection}{\ttfamily\small #1} %
\subsubsection*{#1}}
\newcounter{card}
\newenvironment{card}[1]
{\changesections\begin{shaded}\stepcounter{card}%
\phantomsection
\addcontentsline{toc}{subsection}
{\ttfamily\small Scheda n.\texorpdfstring{\ }{ }%
\arabic{card} – #1}
\subsection*{\ttfamily Scheda n.~\arabic{card}\\#1}}
{\end{shaded}}`
Il testo quello riportato nel messaggio sopraM
::
Modificando solo quello, l’output che risulta è terrificante:
`Runaway argument?
{\@hangfrom {\hskip \subsecindent \relax \@svsec }\interlinepenalty \@M \ETC.
! TeX capacity exceeded, sorry [main memory size=3000000].
…alty \@M \Hy@SectionAnchorHref {sect
ion*.29}\Sectionformat {\@…\Sectionformat #1#2->#1
…{2}\@@par }{2}\@@par }{2}\@@par }{2}
\@@par
\Sectionformat #1#2->#1…{2}\@@par }{2}\@@par }{2}\@@par }{2}
\@@par
\Sectionformat #1#2->#1…{2}\@@par }{2}\@@par }{2}\@@par }{2}
\@@par
\Sectionformat #1#2->#1…{2}\@@par }{2}\@@par }{2}\@@par }{2}
\@@par
\Sectionformat #1#2->#1…
l.29 \begin{card}{Condivisioni con BitTorrent}! ==> Fatal error occurred, no output PDF file produced!
Transcript written on s4d.log.
samiel@debian:~/slack4dummies$ `
::
Prima variante, che mi dà sempre errore:
`\newcommand{\changesections}{%
\setsubsecheadstyle{\subsection}
{\relax}
{\MakeLowercase{\thesubsection}}
{1em}
{\large\ttfamily\textbf}%
\setsubsubsecheadstyle{\subsubsection}
{\relax}
{\MakeLowercase{\thesubsubsection}}
{1em}
{\normalsize\ttfamily}%
}
\newcommand{\cardsection}[1]{%
\phantomsection
\addcontentsline{toc}{subsubsection}{\ttfamily\small #1} %
\subsubsection*{#1}}
\newcounter{card}
\newenvironment{card}[1]
{\changesections\begin{shaded}\stepcounter{card}%
\phantomsection
\addcontentsline{toc}{subsection}
{\ttfamily\small Scheda n.\texorpdfstring{\ }{ }%
\arabic{card} – #1}
\subsection*{\ttfamily Scheda n.~\arabic{card}\\#1}}
{\end{shaded}}`
Il testo è
`\begin{card}{Condivisioni con BitTorrent}
Fino a qualche anno fa, in Internet dominava una netta distinzione fra i
server e i client. I server fornivano contenuti che potevano essere scaricati
dai client. Ciò era dovuto anche ai limiti oggettivi della banda: chi stava
scaricando con un modem a 56KB non aveva banda sufficiente per condividere
file. Con l'avvento delle tecnologie broadband come la DSL si è resa
disponibile una banda notevolmente più ampia, che ha portato alla nascita dei
p2p, acronimo di «peer-to-peer», che letteralmente significa «da pari a pari»
(per sottolineare il fatto che tutti i nodi rivestono, indistintamente, lo
stesso ruolo). Fra questi, una soluzione particolarmente felice è costituita
da BitTorrent, creato da Bram Cohen e reperibile all'indirizzo:
\URL{http://www.bittorrent.com}.
\end{card}`
e l’errore
`! Argument of \textbf has an extra }.
\par
}
\changesections …em} {\large \ttfamily \textbf }
\setsubsubsecheadstyle {\s…\card #1->\changesections
\begin {shaded}\stepcounter {card}\phantomsection …
l.29 \begin{card}{Condivisioni con BitTorrent}? `
M
::
Ahhhh, beati i ciechi poiché di essi…
In effetti la segnalazione più ampia ottenuta col comando
suggeritomi da OldClaudio mi ha fatto individuare l’errore.Visto che l’appetito vien mangiando…
Qui c’è una ridefinizione di alcuni comandi
per produrre delle schede numerate e ombreggiate:
`\newcommand{\changesections}{%
\titleformat{\subsection}
{\relax}
{\MakeTextLowercase{\thesubsection}}
{1em}
{\large\ttfamily\textbf}%
\titleformat{\subsubsection}
{\relax}
{\MakeTextLowercase{\thesubsubsection}}
{1em}
{\normalsize\ttfamily}%
}
\newcommand{\cardsection}[1]{%
\phantomsection
\addcontentsline{toc}{subsubsection}{\ttfamily\small #1} %
\subsubsection*{#1}}
\newcounter{card}
\newenvironment{card}[1]
{\changesections\begin{shaded}\stepcounter{card}%
\phantomsection
\addcontentsline{toc}{subsection}
{\ttfamily\small Scheda n.\texorpdfstring{\ }{ }%
\arabic{card} – #1}
\subsection*{\ttfamily Scheda n.~\arabic{card}\\#1}}
{\end{shaded}}`
e l’errore che spunta è:
`! Undefined control sequence.
\changesections ->\titleformat
{\subsection } {\relax } {\MakeTextLowercase …\card #1->\changesections
\begin {shaded}\stepcounter {card}\phantomsection …
l.29 \begin{card}{Condivisioni con BitTorrent}`
Ce cosa c’è qui di incompatibile con memoir?M.
14 Ottobre 2011 alle 9:55 in risposta a: Posizionamento elementi in frontespizio con linea verticale #64822::
Per un lavoretto, io ho usato parallel,
ma con una variante per non dover scrivere
i versi alternati e fare invece un assai più velore
copia-incolla dei due testi. Ti allego il codice
`\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage{microtype}
\usepackage[margin=2cm,heightrounded]{geometry}
\setlength{\parindent}{0pt}
\frenchspacing
\usepackage{parallel}
\newenvironment{verseparallel}[2]
{\begin{Parallel}{}{}\parindent=0pt
\ParallelLText{#1}\ParallelRText{#2}}
{\end{Parallel}}\begin{document}
{\huge \textbf{DIE ZAUBERFL\”OTE}}
\medskip
Libretto di E\textsc{manuel} S\textsc{chickaneder}
Musica di W\textsc{olfgang} A\textsc{madeus} M\textsc{ozart}
Prima rappresentazione: Theather auf der Wieden, 30 settembre 1791
\bigskip
\begin{verseparallel}
{
\textbf{T\textsc{amino}}\\
Dies Bildnis ist bezaubernd sch\”on,\\
Wie noch kein Auge je gesehn.\\
Ich f\”uhl' es, wie dies G\”otterbild\\
Mein Herz mit neuer Regung f\”ullt.\\
Dies Etwas kann ich zwar nicht nennen,\\
Doch f\”uhl' ich's hier wie Feuer brennen:\\
Soll die Empfindung Liebe sein?\\
Ja, ja die Liebe ist's allein.\\
O wenn ich sie nur finden k\”onnte!\\
O wenn sie doch schon vor mir st\”unde!\\
Ich w\”urde — w\”urde — warm und rein —\\
Was w\”urde ich? – Ich w\”urde sie voll Entz\”ucken\\
An diesen hei\ss{}en Busen dr\”ucken,\\
Und ewig w\”are sie dann mein!
}
{
\textbf{T\textsc{amino}}\\
Questo ritratto è meravigliosamente bello,\\
Quanto ancora occhio alcuno ha visto mai.\\
Sento come tale immagine divina\\
Riempia il mio cuore d'un nuovo sentimento.\\
Questo qualcosa non so invero come chiamarlo,\\
Eppure lo sento qui bruciare come fuoco.\\
Potrebbe tale sensazione essere amore?\\
Sì, sì, non è che amore.\\
Oh, se solo la potessi trovare!\\
Oh, se ella fosse già dinanzi a me!\\
Io farei — farei – ardente e puro —\\
Cosa farei? – Tutto estasiato\\
La stringerei a questo petto infuocato,\\
E così sarebbe eternamente mia.
}
\end{verseparallel}`M.
-
AutoreRisposte