Hiperenllaces relativos y absolutos
Si inclúi los hiperenllaces tienen de tenese en cuenta dos factores: si estableciéronse como relativos o absolutos al guardar; y si el ficheru ta presente.
-
Escueya LibreOffice - PreferenciesFerramientes - Opciones - Cargar/Guardar - Xeneral y especifique, nel campu Guardar les URL en forma relativa a, si LibreOffice va crear hiperenllaces relativos o absolutos. Namái pue Enllazase en forma relativa cuando'l documentu nel que trabaya y l'enllaz de destín tán na mesma unidá de discu.
-
You should create the same directory structure on your hard disk as that which exists in the web space hosted by your Internet provider. Call the root directory for the homepage on your hard disk "homepage", for example. The start file is then "index.html", the full path being "C:\homepage\index.html" (assuming Windows operating system). The URL on your Internet provider's server might then be as follows: "http://www.myprovider.com/mypage/index.html". With relative addressing, you indicate the link relative to the location of the output document. For example, if you placed all the graphics for your homepage in a subfolder called "C:\homepage\images", you would need to give the following path to access the graphic "picture.gif": "images\picture.gif". This is the relative path, starting from the location of the file "index.html". On the provider's server, you would place the picture in the folder "mypage/images". When you transfer the document "index.html" to the provider's server through the File - Save As dialog, and if you have marked the option Copy local images to Internet under LibreOffice - PreferencesTools - Options - Load/Save - HTML Compatibility, LibreOffice will automatically copy the graphic to the correct directory on the server.
-
An absolute path such as "C:\homepage\graphics\picture.gif" would no longer function on the provider server. Neither a server nor the computer of a reader needs to have a C hard drive: operating systems such as Unix or macOS do not recognize drive letters, and even if the folder homepage\graphics existed, your picture would not be available. It is better to use relative addressing for file links.
-
Un enllaz a una páxina web, por exemplu, "www.example.com" o "www.myprovider.com/mypage/index.html" ye un enllaz absolute.
-
LibreOffice tamién reacciona de forma distinta, si el ficheru al que se refier nel enllaz esiste o non, y el llugar onde s'atope. LibreOffice comprueba cada nuevu enllaz y configura un destín y un protocolu automáticamente. La resultancia pue vese nel códigu HTML xeneráu dempués de guardar el documentu fonte.
-
Les siguientes regles van ser válides: La referencia relativa ("imaxe/semeya.gif") va ser namái posible cuando los dos ficheros atopar na mesma unidá. Si los dos ficheros atopar n'unidaes distintes pero nel sistema local de ficheros, la referencia absoluta va ser Protocolu "file" ("file:///data1/xyz/semeya.gif"). Si ambos ficheros atopar en distintos sirvidores o si nesti momentu'l destín del enllaz entá nun esiste, la referencia absoluta va ser Protocolu "http" ("http://data2/abc/semeya.gif").
-
Entame tolos ficheros de la páxina principal na mesma unidá que el ficheru d'entamu de la páxina principal. D'esti mou, LibreOffice pue configurar el protocolu y el destín de forma que la referencia al sirvidor seya siempres correcta.
Na ayuda emerxente d'un hiperenllaz y nel Editor de testu fonte HTML va ver siempres la referencia absoluta yá que LibreOffice utiliza rutes absolutes (nel so sistema internu). La direición y ruta completa del ficheru va vese namái al visualizar la resultancia de la esportación HTML, por exemplu: al cargar el ficheru HTML como "testu" o al abrir con un editor de testu.