Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
composition:texte:lignes:url_qui_depasse_dans_la_marge [2018/12/03 23:42] jejust2_composition:texte:lignes:url_qui_depasse_dans_la_marge [2021/01/22 22:22] (Version actuelle) – Renommage des sections de base: correction des liens internes. yannick.tanguy
Ligne 1: Ligne 1:
-====== Link text doesn't break at end line ======+====== Comment bien gérer une URL s'étendant sur deux lignes? ======
  
 +Lorsque vous utilisez l'extension [[ctanpkg>hyperref|hyperref]], vous transformez parfois un bloc de texte pour en faire un hyperlien « actif » (lorsque l'utilisateur clique sur ce texte, le programme de lecture ouvre la cible du lien). Cette extension utilise un pilote (à l'image de l'extension [[ctanpkg>graphics|graphics]]) pour déterminer comment implémenter ce type de fonctionnalité.
  
-When using the [[ctanpkg>hyperref|hyperref]] package, you make a block of text +Si vous utilisez le pilote ''dvips'' (pour gérer un document PostScript), les limitations dans la façon dont ''dvips'' traite les commandes ''\special'' impliquent que l'extension [[ctanpkg>hyperref|hyperref]] doit empêcher les liens de se rompre à la fin de la ligne de texte. Les autres pilotes (notamment ceux pour ''pdfTeX'' et pour ''dvipdfm''ne souffrent pas de ce problème.
-"active" when you define a hyper-link (when the user clicks on +
-that text, the reader program will divert to the //target// of the +
-link).+
  
-The [[ctanpkg>hyperref|hyperref]] package uses a //driver// (in the same way +Le problème peut se produire dans un certain nombre de circonstances. Dans quelques casil existe des solutions de contournement : 
-as the [[ctanpkg>graphics|graphics]] package does)to determine how to implement +  * si vous avez une URL qui forme un hyperlien actifDans ce casl'extension [[ctanpkg>hyperref|hyperref]] utilise l'extension [[ctanpkg>url|url]] pour fractionner l'URL (comme décrit dans la question « [[3_composition:texte:mots:mettre_en_forme_des_url_et_des_adresses_electroniques|Comment gérer des adresses web (ou URL) ?]] »), mais le pilote ''dvips'' supprime alors ce fractionnementLa solution est donnée par l'extension [[ctanpkg>breakurl|breakurl]] qui modifie la commande ''\url'' pour qu'elle scinde l'URL en plusieurs morceauxentre lesquels un saut de ligne est autoriséChaque groupe de morceauxqui se termine sur une seule ligneest converti en un seul lien cliquable ; 
-all that hyper-stuff. +  * si vous avez une table des matièresune liste de figures ou de tableauxou autre construction similairel'extension [[ctanpkg>hyperref|hyperref]] rendra normalement les titres y figurant actifsSi le titre est trop long, il devra faire l'objet d'un retour à la ligne... que le pilote ''dvips'' l'empêcheraDans ce caschargez [[ctanpkg>hyperref|hyperref]] avec l'option ''linktocpage'', et seul le numéro de page sera rendu actif.
- +
-If you use the driver for ''dvips'' output (presumably you want +
-to distill the resulting PostScript)limitations in the way ''dvips'' +
-deals with the ''\special'commands mean that [[ctanpkg>hyperref|hyperref]] +
-must prevent link anchors from breaking at the end of lines.  Other +
-drivers (notably those for pdfTeX and for ''dvipdfm'') don'+
-suffer from this problem. +
- +
-The problem may occur in a number of different circumstances.  For a +
-couple of them, there are work-arounds: +
- +
-First, if you have an URL which is active (so that clicking on +
-it will activate your web browser to "go to" the URL).  In +
-this case [[ctanpkg>hyperref|hyperref]] employs the [[ctanpkg>url|url]] package to +
-split up the URL (as described in  +
-[[FAQ-setURL|typesetting URLs]]), but the +
-''dvips'' driver then suppresses the breaks The way out is +
-the [[ctanpkg>breakurl|breakurl]] package, which modifies the ''\url'' command +
-to produce several smaller piecesbetween each of which a line break +
-is permitted Each group of piecesthat ends up together in one +
-lineis converted to a single clickable link. +
- +
-Second, if you have a table of contentslist of figure or tablesor +
-the like, [[ctanpkg>hyperref|hyperref]] will ordinarily make the titles in the +
-table of contents, or captions in the lists, active If the title or +
-caption is long, it will need to break within the table, but the +
-''dvips'' driver will prevent that In this caseload +
-[[ctanpkg>hyperref|hyperref]] with the option ''linktocpage'', and only +
-the page number will be made active. +
- +
-Otherwise, if you have a lengthy piece of text that you want active, +
-you have at present no simple solution: you have to rewrite your text, +
-or to use a different PDF generation mechanism.+
  
 +Sinon, si vous avez un long morceau de texte que vous souhaitez activer, vous n'avez actuellement pas de solution simple : vous devez réécrire votre texte ou utiliser un autre mécanisme de génération de PDF.
  
 +FIXME //: le contenu de cette page est à valider. Il faut voir s'il faut parler ici de l'option breaklinks et de l'option hypertex (+dvips). //
 ----- -----
  
Ligne 50: Ligne 17:
  
 {{htmlmetatags>metatag-keywords=(LaTeX,errors) {{htmlmetatags>metatag-keywords=(LaTeX,errors)
-metatag-og:title=(Link text doesn't break at end line)+metatag-og:title=(Comment bien gérer une URL s'étendant sur deux lignes)
 metatag-og:site_name=(FAQ LaTeX francophone) metatag-og:site_name=(FAQ LaTeX francophone)
 }} }}
  
3_composition/texte/lignes/url_qui_depasse_dans_la_marge.1543880560.txt.gz · Dernière modification : 2018/12/03 23:42 de jejust
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0