Bagaimana cara merujuk ke satu item dalam enumerasi kustom

GioMott 10/19/2018. 1 answers, 61 views
hyperref lists enumitem

Saya telah mendefinisikan lingkungan enumerate dengan nama item kustom: setiap item harus dimulai dengan titik peluru dan kemudian "Type X case" , di mana X menunjukkan nomor item.

Kemudian dalam teks, saya ingin merujuk ke item dalam daftar, tetapi hanya dengan nomornya: misalnya, saya ingin menulis "we now refer to case X" (di mana X harus menyertakan hyperlink ke item daftar yang relevan) .

MWE:

\documentclass{report}
\usepackage[shortlabels]{enumitem}
\usepackage{hyperref}
\begin{document}
\begin{enumerate}[label=$\bullet\;$\textit{Type \arabic* case}:]
        \item \label{item:type1case} If blah blah
        \item \label{item:type2case} If instead blah
        \item \label{item:type3case} this blah
\end{enumerate}

We now refer to case \ref*{item:type1case}...
\end{document} 

Hasil akhir (dalam kalimat terakhir) adalah sesuatu seperti "Kami sekarang mengacu pada kasus • Kasus Tipe 1: ..." tetapi saya ingin memiliki "We now refer to case 1:..."

Bagaimana melakukan ini menggunakan paket enumitem dan (mungkin) tanpa harus memuat paket lain?

1 Answers


moewe 10/19/2018.

enumitem tahu opsi ref untuk menyesuaikan tampilan label

\documentclass{report}
\usepackage[shortlabels]{enumitem}
\usepackage{hyperref}
\begin{document}
\begin{enumerate}[label=$\bullet\;$\textit{Type \arabic* case}:,ref=case \arabic*:]
        \item \label{item:type1case} If blah blah
        \item \label{item:type2case} If instead blah
        \item \label{item:type3case} this blah
\end{enumerate}

We now refer to case \ref*{item:type1case}...
\end{document} 

Kami sekarang mengacu pada case case 1: ...


HighResolutionMusic.com - Download Hi-Res Songs

1 The Chainsmokers

Beach House flac

The Chainsmokers. 2018. Writer: Andrew Taggart.
2 (G)I-DLE

POP/STARS flac

(G)I-DLE. 2018. Writer: Riot Music Team;Harloe.
3 Anne-Marie

Rewrite The Stars flac

Anne-Marie. 2018. Writer: Benj Pasek;Justin Paul.
4 Ariana Grande

​Thank U, Next flac

Ariana Grande. 2018. Writer: Crazy Mike;Scootie;Victoria Monét;Tayla Parx;TBHits;Ariana Grande.
5 Diplo

Close To Me flac

Diplo. 2018. Writer: Ellie Goulding;Savan Kotecha;Peter Svensson;Ilya;Swae Lee;Diplo.
6 BTS

Waste It On Me flac

BTS. 2018. Writer: Steve Aoki;Jeff Halavacs;Ryan Ogren;Michael Gazzo;Nate Cyphert;Sean Foreman;RM.
7 Clean Bandit

Baby flac

Clean Bandit. 2018. Writer: Jack Patterson;Kamille;Jason Evigan;Matthew Knott;Marina;Luis Fonsi.
8 Imagine Dragons

Bad Liar flac

Imagine Dragons. 2018. Writer: Jorgen Odegard;Daniel Platzman;Ben McKee;Wayne Sermon;Aja Volkman;Dan Reynolds.
9 BlackPink

Kiss And Make Up flac

BlackPink. 2018. Writer: Soke;Kny Factory;Billboard;Chelcee Grimes;Teddy Park;Marc Vincent;Dua Lipa.
10 Nicki Minaj

No Candle No Light flac

Nicki Minaj. 2018. Writer: Denisia “Blu June” Andrews;Kathryn Ostenberg;Brittany "Chi" Coney;Brian Lee;TJ Routon;Tushar Apte;ZAYN;Nicki Minaj.
11 Rita Ora

Cashmere flac

Rita Ora. 2018. Writer: Sean Douglas;Lindy Robbins.
12 Backstreet Boys

Chances flac

Backstreet Boys. 2018.
13 Brooks

Limbo flac

Brooks. 2018.
14 Rita Ora

Velvet Rope flac

Rita Ora. 2018.
15 Fitz And The Tantrums

HandClap flac

Fitz And The Tantrums. 2017. Writer: Fitz And The Tantrums;Eric Frederic;Sam Hollander.
16 Little Mix

Woman Like Me flac

Little Mix. 2018. Writer: Nicki Minaj;Steve Mac;Ed Sheeran;Jess Glynne.
17 Cher Lloyd

None Of My Business flac

Cher Lloyd. 2018. Writer: ​iamBADDLUCK;Alexsej Vlasenko;Kate Morgan;Henrik Meinke;Jonas Kalisch;Jeremy Chacon.
18 Billie Eilish

When The Party's Over flac

Billie Eilish. 2018. Writer: Billie Eilish;FINNEAS.
19 Kelly Clarkson

Never Enough flac

Kelly Clarkson. 2018. Writer: Benj Pasek;Justin Paul.
20 Lil Pump

Arms Around You flac

Lil Pump. 2018. Writer: Rio Santana;Lil Pump;Edgar Barrera;Mally Mall;Jon Fx;Skrillex;Maluma;Swae Lee;XXXTENTACION.

Related questions

Hot questions

Language

Popular Tags